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

Commit

Permalink
Fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
reminisce committed Oct 13, 2019
1 parent 7a088a9 commit 5f08bba
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions python/mxnet/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2238,14 +2238,14 @@ def has_tvm_ops():
built_with_tvm_op = _features.is_enabled("TVM_OP")
ctx = current_context()
if ctx.device_type == 'gpu':
try:
cc = get_cuda_compute_capability(ctx)
except:
print('Failed to get CUDA compute capability for context {}. The operators '
try:
cc = get_cuda_compute_capability(ctx)
except: # pylint: disable=bare-except
print('Failed to get CUDA compute capability for context {}. The operators '
'built with USE_TVM_OP=1 will not be run in unit tests.'.format(ctx))
return False
print('Cuda arch compute capability: sm_{}'.format(str(cc)))
return built_with_tvm_op and cc >= 53
return False
print('Cuda arch compute capability: sm_{}'.format(str(cc)))
return built_with_tvm_op and cc >= 53
return built_with_tvm_op


Expand All @@ -2260,7 +2260,7 @@ def is_op_runnable():
else:
try:
cc = get_cuda_compute_capability(ctx)
except:
except: # pylint: disable=bare-except
print('Failed to get CUDA compute capability for context {}. The operators '
'built with USE_TVM_OP=1 will not be run in unit tests.'.format(ctx))
return False
Expand Down

0 comments on commit 5f08bba

Please sign in to comment.