MCPcopy Index your code
hub / github.com/huggingface/diffusers / require_torch_accelerator_with_fp16

Function require_torch_accelerator_with_fp16

tests/testing_utils.py:585–589  ·  view source on GitHub ↗

Decorator marking a test that requires an accelerator with support for the FP16 data type.

(test_case)

Source from the content-addressed store, hash-verified

583
584
585def require_torch_accelerator_with_fp16(test_case):
586 """Decorator marking a test that requires an accelerator with support for the FP16 data type."""
587 return pytest.mark.skipif(
588 not _is_torch_fp16_available(torch_device), reason="test requires accelerator with fp16 support"
589 )(test_case)
590
591
592def require_torch_accelerator_with_fp64(test_case):

Callers

nothing calls this directly

Calls 1

_is_torch_fp16_availableFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…