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

Function _skip_for_invalid_environment

tests/unit/ops/aio/test_aio.py:26–29  ·  view source on GitHub ↗
(use_cuda_pinned_tensor=True)

Source from the content-addressed store, hash-verified

24
25
26def _skip_for_invalid_environment(use_cuda_pinned_tensor=True):
27 if get_accelerator().device_name() != 'cuda':
28 if use_cuda_pinned_tensor:
29 pytest.skip("torch.pin_memory is only supported in CUDA environments.")
30
31
32def _get_local_rank():

Callers 8

test_parallel_readMethod · 0.85
test_async_readMethod · 0.85
test_parallel_writeMethod · 0.85
test_async_writeMethod · 0.85
test_readMethod · 0.85
test_writeMethod · 0.85
test_offset_writeMethod · 0.85
test_offset_readMethod · 0.85

Calls 2

get_acceleratorFunction · 0.90
device_nameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…