comaniac commented on a change in pull request #10108:
URL: https://github.com/apache/tvm/pull/10108#discussion_r796078709



##########
File path: src/runtime/opencl/opencl_device_api.cc
##########
@@ -122,7 +123,8 @@ void OpenCLWorkspace::GetAttr(Device dev, DeviceAttrKind 
kind, TVMRetValue* rv)
                corresponding to the number of SIMD entries the heardware 
configures.
                We need to figure out a way to query this information from the 
hardware.
       */
-      *rv = 1;
+      const int warp_size = dmlc::GetEnv("TVM_OPENCL_WARP_SIZE", 1);

Review comment:
       Hmm I agree to have this change but with a different reason. If we just 
look at the device API without Ansor, this change could be the only general 
workaround for OpenCL devices. Specifically, any place in TVM may query device 
API to get the wrap size, so setting default wrap size to 1 in Ansor might not 
be a general solution.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to