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

Function preferred_dtype

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

Source from the content-addressed store, hash-verified

510
511# bf16 > fp16 > fp32
512def preferred_dtype():
513 if get_accelerator().is_bf16_supported():
514 return torch.bfloat16
515 elif get_accelerator().is_fp16_supported():
516 return torch.float16
517 else:
518 return torch.float32
519
520
521class EnableDeterminism:

Calls 3

get_acceleratorFunction · 0.90
is_bf16_supportedMethod · 0.45
is_fp16_supportedMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…