MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / half_function

Function half_function

PATH/core/fp16/amp.py:29–31  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

27
28# Decorator form
29def half_function(fn):
30 wrap_fn = functools.partial(wrap.make_cast_wrapper, try_caching=True)
31 return _decorator_helper(fn, utils.maybe_half, wrap_fn)
32
33def float_function(fn):
34 wrap_fn = functools.partial(wrap.make_cast_wrapper, try_caching=False)

Callers

nothing calls this directly

Calls 1

_decorator_helperFunction · 0.85

Tested by

no test coverage detected