-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[NPU] Support npu kernel for assign_value op #34568
Conversation
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.
LGTM
python/paddle/fluid/tests/unittests/npu/test_assign_value_op_npu.py
Outdated
Show resolved
Hide resolved
a=[False, True], size=(2, 5)).astype(numpy.bool) | ||
self.attrs["bool_values"] = [bool(v) for v in self.value.flat] | ||
|
||
|
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.
建议参考test_assign_value_op.py把里面4个TestAssignApi相关的单测也加上,相应的修改NPUPlace。
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.
LGTM
PR types
New features
PR changes
OPs
Describe
When inputs' dtype is bool, there is no corresponding TensorFromVector template function for vector, so only TensorFromArray can be used, but it didn't consider npu condition before.
ctest result and op running environment