Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Skip compute capability <= 52 for TVM generated ops
Browse files Browse the repository at this point in the history
  • Loading branch information
reminisce committed Oct 8, 2019
1 parent b49cfce commit 5dffe7a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion python/mxnet/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2232,4 +2232,13 @@ def is_cd_run():


def has_tvm_ops():
return _features.is_enabled("TVM_OP")
"""Returns True if MXNet is compiled with TVM generated operators. If current ctx
is GPU, it only returns True for CUDA compute capability > 52 where FP16 is supported."""
built_with_tvm_op = _features.is_enabled("TVM_OP")
if current_context().device_type == 'gpu':
try:
import tvm
except:
return False
return built_with_tvm_op and (int("".join(tvm.nd.gpu(0).compute_version.split('.'))) >= 53)
return built_with_tvm_op

0 comments on commit 5dffe7a

Please sign in to comment.