MCPcopy Create free account
hub / github.com/apple/axlearn / _CheckifyCompiledFnWrapper

Class _CheckifyCompiledFnWrapper

axlearn/common/debug_utils.py:10–20  ·  view source on GitHub ↗

Performs error handling on a "checkified" compiled function during the call.

Source from the content-addressed store, hash-verified

8
9
10class _CheckifyCompiledFnWrapper:
11 """Performs error handling on a "checkified" compiled function during the call."""
12
13 def __init__(self, compiled: jax.stages.Compiled):
14 self._compiled = compiled
15
16 def __call__(self, *args, **kwargs) -> Any:
17 """Calls the compiled function and raises on detected checkify error."""
18 err, result = self._compiled(*args, **kwargs)
19 checkify.check_error(err)
20 return result
21
22
23class _CheckifyLoweredFnWrapper:

Callers 1

compileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected