-
Notifications
You must be signed in to change notification settings - Fork 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
Fixes crash in deformable convolutions (2598) #2604
Conversation
- Adjusted num_kernels and batch_size according to kMaxGridNum * CUDA_NUM_THREADS - Tests to add
Codecov Report
@@ Coverage Diff @@
## master #2604 +/- ##
=======================================
Coverage 71.65% 71.65%
=======================================
Files 94 94
Lines 8121 8121
Branches 1289 1289
=======================================
Hits 5819 5819
Misses 1896 1896
Partials 406 406 Continue to review full report at Codecov.
|
- Added test to check the code from issue and compared grads CPU/CUDA
3f115e4
to
d6fffe0
Compare
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.
Looks great, thanks a lot!
I have one comment (which might be silly), let me know what you think
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.
Thanks a lot @vfdev-5 !
* [WIP] Fixes pytorch#2598 - Adjusted num_kernels and batch_size according to kMaxGridNum * CUDA_NUM_THREADS - Tests to add * - Redefined kMaxGridNum as max grid according to current CUDA device - Added test to check the code from issue and compared grads CPU/CUDA * Fixed static kMaxGridNum evaluation to dynamic
Fixes #2598
Description:
[x] Adjustednum_kernels
andbatch_size
according tokMaxGridNum * CUDA_NUM_THREADS
kMaxGridNum
as max grid according to current CUDA deviceThis PR adjustsnum_kernels
andbatch_size
to avoid the situation such thatnum_kernels
>kMaxGridNum * CUDA_NUM_THREADS
. If it is not possible to adjustbatch_size
(e.g. batch_size=0), an exception is raised.