-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Adding reciprocal operator and a test #9908
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
Conversation
caffe2/utils/math_cpu.cc
Outdated
|
|
||
| #define DELEGATE_INV_FUNCTION(T) \ | ||
| template <> \ | ||
| void Inv<T, CPUContext>(const int N, const T* x, T* y, CPUContext*) { \ |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
caffe2/operators/reciprocal_op.cc
Outdated
| Argument scale_arg; | ||
| scale_arg.set_name("scale"); | ||
| scale_arg.set_f(0.5); | ||
| return std::vector<OperatorDef>{CreateOperatorDef( |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
@pytorchbot test this please |
|
I found a problem with the test and working on it. |
|
@pytorchbot retest this please |
bddppq
left a comment
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.
re. the build error in pr/caffe2-py2-clang3.8-rocm1.7.1-ubuntu16.04-test, you would also need to add the math::Inv functions in caffe2/utils/hip/math_hip.cc
04:54:57 ../lib/libcaffe2_hip.so: undefined reference to `void caffe2::math::Inv<float, caffe2::HIPContext>(int, float const*, float*, caffe2::HIPContext*)'
|
|
||
| #define DELEGATE_INV_FUNCTION(T) \ | ||
| template <> \ | ||
| void Inv<T, CPUContext>(const int N, const T* x, T* y, CPUContext*) { \ |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
BTW, we should create an internal diff, right? |
|
Thank you. Yes, I'll create it. |
|
You can just use "Import to Phabricator" button. Once internal tests passed, you may try to land it internally. And then the oss pr will be merged automatically. |
facebook-github-bot
left a comment
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.
virtan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Pull Request resolved: pytorch#9908 Differential Revision: D9035809 Pulled By: virtan fbshipit-source-id: bce1db46fd55faeeab18a3b266d25c8beeb08df7
Summary: Pull Request resolved: pytorch#9908 Differential Revision: D9035809 Pulled By: virtan fbshipit-source-id: bce1db46fd55faeeab18a3b266d25c8beeb08df7
No description provided.