Convenience wrapper that JIT-compiles and immediately evaluates a single expression.
Equivalent to wrapping expr in an anonymous function, calling jit() on it, and
invoking the result.
Useful if you want to evaluate an expression once.
Arguments
- expr
(NSE)
Expression to compile and evaluate.- device
(
NULL|character(1)|PJRTDevice)
The device to use. By default (NULL), the device is inferred from the tensors encountered during tracing, falling back to"cpu". or"cpu".