trevor-m commented on a change in pull request #5857:
URL: https://github.com/apache/incubator-tvm/pull/5857#discussion_r443817236
##########
File path: src/target/source/codegen_opencl.cc
##########
@@ -70,6 +70,10 @@ std::string CodeGenOpenCL::Finish() {
"#endif\n\n";
}
+ // Enable atomic_add used by get_valid_counts. Only needed for OpenCL < 1.1.
Review comment:
Thanks @wpan11nv for reviewing! I touched on this in the description:
> Enable cl_khr_global_int32_base_atomics. This isn't required for OpenCL
1.1+ because atomic_add became a core feature. I'm happy to remove this if we
don't care about OpenCL 1.0. Alternatively we can override op->call_type ==
CallNode::PureExtern and set a flag to enable this only when atomic_add is
actually used.
I can definitely add a flag but it would require us to override
`VisitExpr()` for `CallNode::PureExtern` just to check if atomic_add is used.
Do you think I should do that?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]