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

Function do_autocast

sat/vae_modules/utils.py:133–139  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

131
132def autocast(f, enabled=True):
133 def do_autocast(*args, **kwargs):
134 with torch.cuda.amp.autocast(
135 enabled=enabled,
136 dtype=torch.get_autocast_gpu_dtype(),
137 cache_enabled=torch.is_autocast_cache_enabled(),
138 ):
139 return f(*args, **kwargs)
140
141 return do_autocast
142

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected