MCPcopy
hub / github.com/deepspeedai/DeepSpeed / skip_on_cuda

Function skip_on_cuda

tests/unit/util.py:27–36  ·  view source on GitHub ↗
(valid_cuda)

Source from the content-addressed store, hash-verified

25
26
27def skip_on_cuda(valid_cuda):
28 split_version = lambda x: map(int, x.split('.')[:2])
29 if get_accelerator().device_name() == 'cuda':
30 CUDA_MAJOR, CUDA_MINOR = split_version(torch_info['cuda_version'])
31 CUDA_VERSION = (CUDA_MAJOR * 10) + CUDA_MINOR
32 if valid_cuda.count(CUDA_VERSION) == 0:
33 pytest.skip(f"requires cuda versions {valid_cuda}")
34 else:
35 assert is_current_accelerator_supported()
36 return
37
38
39def bf16_required_version_check(accelerator_check=True):

Callers 2

test_softmaxFunction · 0.90
test_matmulFunction · 0.90

Calls 3

get_acceleratorFunction · 0.90
device_nameMethod · 0.45

Tested by 2

test_softmaxFunction · 0.72
test_matmulFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…