-
Notifications
You must be signed in to change notification settings - Fork 35
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
[Ascend] use aclnnUnique2 impl unique #1314
Conversation
diopiError_t diopiUnique(diopiContextHandle_t ctx, diopiTensorHandle_t* out, diopiConstTensorHandle_t input, const int64_t* dim, bool sorted, bool returnCounts, | ||
diopiTensorHandle_t indices, diopiTensorHandle_t* counts) { | ||
// aclnnUnique2 only support dim == nullptr | ||
ASCEND_CHECK_ABORT(dim == nullptr, "dim is not supported in aclnnUnique2"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
impl/ascend/functions/unique.cpp
Outdated
// allocate temp inverse tensor | ||
diopiTensorHandle_t inverseTmp = nullptr; | ||
if (returnInverse || returnCounts) { | ||
diopiRequireTensor(ctx, &inverseTmp, &inSize, nullptr, diopi_dtype_int64, diopi_device); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
参考camb的requiresTensor写一些函数通用函数(华为上叫makeTensor),这样就不用每次都从diopiSize_t来获取tensor
--------- Co-authored-by: hellozmz <[email protected]>
Motivation and Context
[Ascend] use aclnnUnique2 impl unique
Description
Use cases (Optional)
BC-breaking (Optional)
Checklist
Before PR:
After PR: