Merged
Conversation
4 tasks
784740d to
14d3271
Compare
Contributor
Author
|
This way of writing maybe not good, but in terms of speed, this way is 10 times faster than before using eigen. Config and Env
Config and EnvThe experimental environment is the same as that described above, only the code is different.
|
a45bc33 to
784740d
Compare
63e3ff5 to
116bde6
Compare
116bde6 to
49df2a7
Compare
… profiling/cosine_op_debug
typhoonzero
reviewed
Dec 29, 2017
paddle/operators/cos_sim_op.h
Outdated
| z_(z), | ||
| cols_(static_cast<size_t>(cols)) {} | ||
|
|
||
| inline HOSTDEVICE void operator()(size_t offset) const { |
Contributor
There was a problem hiding this comment.
Change offset => i and below for to j may be more clear? Or row_id and col_id.
Contributor
Author
There was a problem hiding this comment.
Done. I have replace offset with row_id.
72ce007 to
c2577f4
Compare
c2577f4 to
812c5f6
Compare
typhoonzero
approved these changes
Jan 2, 2018
Contributor
typhoonzero
left a comment
There was a problem hiding this comment.
LGTM++
kernel block_size can use some global configuration, since it's rarely chaged.
Contributor
Author
|
Yes, I will change this in the next PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #6486
Experiments Env:
Code:
Total time of 1 Pass:
I found GPU running a little slower than CPU. The result of @typhoonzero's statistics in this issue is also a little slower in GPU.