Skip to contents

Multiplies two tensors element-wise.

Usage

nvl_mul(lhs, rhs)

Arguments

lhs, rhs

(tensorish)
Tensorish values of any data type. Must have the same shape.

Value

tensorish
Has the same shape and data type as the inputs. It is ambiguous if both inputs are ambiguous.

Implemented Rules

  • stablehlo

  • backward

StableHLO

Lowers to stablehlo::hlo_multiply().

See also

Examples

jit_eval({
  x <- nv_tensor(c(1, 2, 3))
  y <- nv_tensor(c(4, 5, 6))
  nvl_mul(x, y)
})
#> AnvilTensor
#>   4
#>  10
#>  18
#> [ CPUf32{3} ]