-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Fix binary scalar dtype and add bool support #18277
Conversation
Hey @Tommliu , Thanks for submitting the PR
CI supported jobs: [windows-gpu, website, clang, edge, miscellaneous, centos-cpu, sanity, windows-cpu, unix-cpu, unix-gpu, centos-gpu] Note: |
@mxnet-bot run ci [centos-cpu, centos-gpu, unix-cpu, unix-gpu, windows-cpu, windows-gpu] |
Jenkins CI successfully triggered : [windows-gpu, centos-cpu, windows-cpu, unix-gpu, unix-cpu, centos-gpu] |
eeb7e20
to
d970243
Compare
python/mxnet/symbol/numpy/_symbol.py
Outdated
if rfn_scalar is None: | ||
# commutative function | ||
return lfn_scalar(rhs, float(lhs), out=out) | ||
return lfn_scalar(rhs, float(lhs), is_int=is_int, out=out) |
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.
is_int=is_int
does not seem to be necessary
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.
we add a struct NumpyBinaryScalarParam
which contains scalar
and is_int
to indicate the dtype of scalar input. Using this struct to solve type issue.
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.
is_int=is_int
does not seem to be necessary
Because of the existence of FFI, we can get the scalar type when writing C++ codes instead of writing Python. The implementation of symbol doesn't contain FFI process, that's why we need to use a parameter "is_int" when calling symbol function.
11d4d87
to
74fd79e
Compare
would this also resolve #18068 ? |
I think it will resolve the issue. However, the tests are still failing. |
still working on fixing those tests cause these operators are written in many different files |
8a2e9ac
to
ba0a7f3
Compare
963771e
to
139da7d
Compare
@mxnet-bot run ci [centos-cpu] |
Jenkins CI successfully triggered : [centos-cpu] |
@mxnet-bot run ci [windows-gpu] |
Jenkins CI successfully triggered : [windows-gpu] |
Thanks @Tommliu @cassinixu @sxjscience |
* add boolean support for concatenate (apache#18213) * fix binary scalar logic dtype (apache#16964) * common_expr test remove * binary scalar op support scalar dtype Co-Authored-By: Wentao Xu <[email protected]> * test_error_fix Co-authored-by: Wentao Xu <[email protected]>
Description
attempt to fix the issues mentioned in
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments