comaniac commented on a change in pull request #7063:
URL: https://github.com/apache/tvm/pull/7063#discussion_r538840025
##########
File path: python/tvm/contrib/nvcc.py
##########
@@ -269,15 +270,24 @@ def have_int8(compute_version):
return False
-def have_tensorcore(compute_version):
+def have_tensorcore(compute_version=None):
"""Either TensorCore support is provided in the compute capability or not
Parameters
----------
compute_version : str
compute capability of a GPU (e.g. "7.0")
"""
+ if compute_version is None:
+ if tvm.gpu(0).exist:
+ compute_version = tvm.gpu(0).compute_version
+ else:
+ compute_version = AutotvmGlobalScope.current.cuda_target_arch
Review comment:
- It seems to me that we should move this config to PassContext, because
this affects how Relay op strategy select the implementation in general but not
specific to AutoTVM.
- Should properly handle the case that `cuda_target_arch` is `None`. Like we
could print a warning saying that we will not consider tensor core due to
missing information.
----------------------------------------------------------------
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]