MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / preferred_dtype

Function preferred_dtype

tests/unit/common.py:528–534  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

526
527# bf16 > fp16 > fp32
528def preferred_dtype():
529 if get_accelerator().is_bf16_supported():
530 return torch.bfloat16
531 elif get_accelerator().is_fp16_supported():
532 return torch.float16
533 else:
534 return torch.float32
535
536
537class EnableDeterminism:

Calls 3

get_acceleratorFunction · 0.90
is_bf16_supportedMethod · 0.45
is_fp16_supportedMethod · 0.45