-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Use ATen native functions for THCTensor_cadd/cmul/cdiv/csub #10707
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
This seems to save a few percent in binary size in libcaffe2_gpu.so, but the effect may not be real. In fact, deleting some functions can cause the binary size to increase (perhaps due to alignment issues).
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.
colesbury has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
if (ndim == 2) | ||
{ | ||
THCTensor_(sum)(state, gradWeightBuf, gradInput, 0, 1); | ||
THCTensor_(sum)(state, gradWeightBuf, gradInput, 0, 0); |
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.
|
||
THCudaCheck(cudaGetLastError()); | ||
auto out = at::Tensor(self_, true); | ||
at::div_out(out, at::Tensor(src1, true), at::Tensor(src2, true)); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
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.
colesbury has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
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!
Summary: This seems to save a few percent in binary size in libcaffe2_gpu.so, but the effect may not be real. In fact, deleting some functions can cause the binary size to increase (perhaps due to alignment issues). cc orionr Pull Request resolved: pytorch/pytorch#10707 Differential Revision: D9409009 Pulled By: colesbury fbshipit-source-id: 282931e562e84e316a33ac6da4788c04c2984f08
…10707) Summary: This seems to save a few percent in binary size in libcaffe2_gpu.so, but the effect may not be real. In fact, deleting some functions can cause the binary size to increase (perhaps due to alignment issues). cc orionr Pull Request resolved: pytorch#10707 Differential Revision: D9409009 Pulled By: colesbury fbshipit-source-id: 282931e562e84e316a33ac6da4788c04c2984f08
This seems to save a few percent in binary size in libcaffe2_gpu.so, but
the effect may not be real. In fact, deleting some functions can cause
the binary size to increase (perhaps due to alignment issues).
cc @orionr