MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / do_autocast

Function do_autocast

sat/sgm/util.py:141–147  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

139
140def autocast(f, enabled=True):
141 def do_autocast(*args, **kwargs):
142 with torch.cuda.amp.autocast(
143 enabled=enabled,
144 dtype=torch.get_autocast_gpu_dtype(),
145 cache_enabled=torch.is_autocast_cache_enabled(),
146 ):
147 return f(*args, **kwargs)
148
149 return do_autocast
150

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected