asc.experimental.asctile.device_print
- asc.experimental.asctile.device_print(*values: Any, sep: str | None = None, end: str | None = None) None
Print values during kernel execution on the device.
Outputs values to the device console. Strings are printed as-is, scalars are formatted by type, and tensors are dumped in full.
- Parameters:
values – Values to print (strings, scalars, or tensors).
sep – Separator between values (default
" ").end – Line terminator (default
"\n").
Note
Only active when
debug=Trueis set in the JIT decorator. The built-inprint()function dispatches to this function inside JIT kernels.Examples
Print a mix of strings, scalars, and tensors:
@asctile.jit(debug=True) def kernel(): x = asctile.zeros([128], asctile.float32) asctile.device_print("block", asctile.block_idx(), "tensor", x)