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

Function cached_cast

PATH/core/fp16/wrap.py:55–63  ·  view source on GitHub ↗
(mod, fn, cast_fn, handle,
                try_caching=False, verbose=False)

Source from the content-addressed store, hash-verified

53 return output
54
55def cached_cast(mod, fn, cast_fn, handle,
56 try_caching=False, verbose=False):
57 if not utils.has_func(mod, fn):
58 return
59
60 orig_fn = utils.get_func(mod, fn)
61 cast_fn = utils.verbosify(cast_fn, fn, verbose)
62 wrapper = make_cast_wrapper(orig_fn, cast_fn, handle, try_caching)
63 utils.set_func_save(handle, mod, fn, wrapper)
64

Callers

nothing calls this directly

Calls 1

make_cast_wrapperFunction · 0.85

Tested by

no test coverage detected