Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dipu): add schema: ones/zeros/zero_ #742

Merged
merged 9 commits into from
Mar 26, 2024

Conversation

hellozmz
Copy link
Collaborator

@hellozmz hellozmz commented Mar 23, 2024

add ones/zeros/zero_ op

before:
image

after:
image

@hellozmz hellozmz requested a review from fandaoyi March 26, 2024 07:27
custom_code_at_the_beginning: |
c10::TensorOptions option;
auto shape = c10::asIntArrayRefUnchecked(size);
auto out = nodispatch::empty(shape, option.dtype(dtype).layout(layout).device(device).pinned_memory(pin_memory));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tensoroption 没有给这些方法写右值版本,每次都要 copy 一个 option,不知道这里有没有抠性能的必要?

或许我应该给 empty 补几个重载

@mrdanielw mrdanielw merged commit 115eb8d into DeepLink-org:main Mar 26, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants