AnvilBox subclass that wraps an AbstractTensor for use in debug mode.
When anvil operations (e.g. nv_add()) are called outside of jit(),
they return DebugBox objects instead of actual computed results.
This allows checking the types and shapes of intermediate values
without compiling or running a computation – see vignette("debugging") for details.
The convenience constructor debug_box() creates a DebugBox from a dtype and shape directly.
Arguments
- aval
(
AbstractTensor)
The abstract tensor representing the value.