Skip to contents

Prints a tensor value to the console during JIT execution and returns the input unchanged. Useful for debugging.

Usage

nv_print(operand)

Arguments

operand

(tensorish)
Operand.

Value

tensorish
Returns operand unchanged.

Note

Currently only works on the CPU backend.

See also

nvl_print() for the underlying primitive.

Examples

jit_eval({
  x <- nv_tensor(c(1, 2, 3), device = "cpu")
  nv_print(x)
})
#> AnvilTensor
#>  1
#>  2
#>  3
#> [ f32{3} ]
#> AnvilTensor
#>  1
#>  2
#>  3
#> [ CPUf32{3} ]