diff --git a/mlir/include/mlir/Dialect/Math/IR/MathOps.td b/mlir/include/mlir/Dialect/Math/IR/MathOps.td --- a/mlir/include/mlir/Dialect/Math/IR/MathOps.td +++ b/mlir/include/mlir/Dialect/Math/IR/MathOps.td @@ -593,7 +593,14 @@ Example: ```mlir + // Scalar log operation. %y = math.log %x : f64 + + // SIMD pointwise log operation. + %y = math.log %x : vector<4xf64> + + // Tensor pointwise log operation. + %y = math.log %x : tensor<4x?xf64> ``` }]; } @@ -612,7 +619,14 @@ Example: ```mlir + // Scalar log10 operation. %y = math.log10 %x : f64 + + // SIMD pointwise log10 operation. + %y = math.log10 %x : vector<4xf64> + + // Tensor pointwise log10 operation. + %y = math.log10 %x : tensor<4x?xf64> ``` }]; } @@ -633,7 +647,14 @@ Example: ```mlir + // Scalar log1p operation. %y = math.log1p %x : f64 + + // SIMD pointwise log1p operation. + %y = math.log1p %x : vector<4xf64> + + // Tensor pointwise log1p operation. + %y = math.log1p %x : tensor<4x?xf64> ``` }]; } @@ -652,7 +673,14 @@ Example: ```mlir + // Scalar log2 operation. %y = math.log2 %x : f64 + + // SIMD pointwise log2 operation. + %y = math.log2 %x : vector<4xf64> + + // Tensor pointwise log2 operation. + %y = math.log2 %x : tensor<4x?xf64> ``` }]; let hasFolder = 1; @@ -682,7 +710,7 @@ // Scalar exponentiation. %a = math.powf %b, %c : f64 - // SIMD pointwise vector exponentiation + // SIMD pointwise vector exponentiation. %f = math.powf %g, %h : vector<4xf32> // Tensor pointwise exponentiation. @@ -723,8 +751,10 @@ ```mlir // Scalar square root value. %a = math.sqrt %b : f64 + // SIMD vector element-wise square root value. %f = math.sqrt %g : vector<4xf32> + // Tensor element-wise square root value. %x = math.sqrt %y : tensor<4x?xf32> ```