-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Crop layer remove redundance #5138
Conversation
The change in the crop_layer.cpp file looks good to me. The code was in a for-loop when it does the same thing every loop (index is used and nothing is incremented). I haven't figured out how the crop_layer.cu changes are equivalent yet. Can you give some explanation? |
@williford glad to see you interesting my PR so these simplicity can remove |
@BlGene could you take a look when you have the chance? |
It makes sense that we don't need to iterate over the size of the last spatial dimension because we are copying it in one go, as it is stored in memory continuously. Sorry for overlooking this before. @xmyqsh: Thanks for finding this, can you please squash the PR. |
Thanks @xmyqsh for the simplification and removal of the redundant operations. |
remove the redundancy for loop in crop.cpp
remove the redundancy compute in crop.cu