-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[OpenCL] Fix OpenCL get_valid_counts errors due to intrinsic atomic_add #5857
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -270,8 +270,8 @@ def verify_get_valid_counts(dshape, score_threshold, id_index, score_index): | |
| intrp = relay.create_executor("debug", ctx=ctx, target=target) | ||
| out = intrp.evaluate(func)(np_data) | ||
| tvm.testing.assert_allclose(out[0].asnumpy(), np_out1, rtol=1e-3, atol=1e-04) | ||
| # get_valid_count for cuda doesn't do data rearrangement | ||
| if target == 'cuda': | ||
| # get_valid_count for cuda, opencl doesn't do data rearrangement | ||
| if target in ['cuda', 'opencl']: | ||
| return | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Returning here looks wrong to me. The test in the below link doesn't work for OpenCL too because we don't do data rearrangement for GPU nms implementation. Probably, we should fix non_max_suppression for GPU first?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OpenCL uses the same implementation as CUDA. The CUDA implementation of That issue with NMS looks to be a separate issue where the CUDA implementation wasn't fully updated to match changes to CPU implementation by #4312
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for your explanation. Actually, I've successfully build NMS if I revert the change in #4312. |
||
| tvm.testing.assert_allclose(out[1].asnumpy(), np_out2, rtol=1e-3, atol=1e-04) | ||
| tvm.testing.assert_allclose(out[2].asnumpy(), np_out3, rtol=1e-3, atol=1e-04) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.