[Mlir-commits] [mlir] [mlir] Add helper to check elementwise-mappable ops with tensors and scalars (PR #154872)
Samarth Narang
llvmlistbot at llvm.org
Fri Aug 22 09:37:36 PDT 2025
================
@@ -19,6 +19,53 @@ func.func @addf_rank0(%arg0: tensor<f32>, %arg1: tensor<f32>) -> tensor<f32> {
return %0 : tensor<f32>
}
+// Test a binary elementwise op with a tensor and a scalar operand.
+// CHECK-LABEL: func @addf_tensor_plus_scalar_rank1
+// CHECK-SAME: %[[T:[0-9a-zA-Z]*]]: tensor<?xf32>, %[[S:[0-9a-zA-Z]*]]: f32
+func.func @addf_tensor_plus_scalar_rank1(%t: tensor<?xf32>, %s: f32) -> tensor<?xf32> {
----------------
snarang181 wrote:
Would you have any advise on how to proceed?
https://github.com/llvm/llvm-project/pull/154872
More information about the Mlir-commits
mailing list