Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/examples
/ inspect_mixed_precision
Function
inspect_mixed_precision
distributed/FSDP2/utils.py:20–24 ·
view source on GitHub ↗
(model: FSDPModule)
Source
from the content-addressed store, hash-verified
18
19
20
def
inspect_mixed_precision(model: FSDPModule):
21
model.unshard()
22
for
param in model.parameters(recurse=False):
23
assert param.dtype == torch.bfloat16
24
model.reshard()
Callers
1
main
Function · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected