MCPcopy Create free account
hub / github.com/OpenSparseLLMs/MoM / amp_wrapper

Function amp_wrapper

benchmarks/ops/benchmark.py:15–17  ·  view source on GitHub ↗
(*inputs, **kwinputs)

Source from the content-addressed store, hash-verified

13 print(desc, "- Forward pass")
14
15 def amp_wrapper(*inputs, **kwinputs):
16 with torch.autocast(device_type="cuda", dtype=amp_dtype, enabled=amp):
17 fn(*inputs, **kwinputs)
18
19 t = benchmark.Timer(
20 stmt="fn_amp(*inputs, **kwinputs)",

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected