Skip to content

Commit

Permalink
change test from a parser error to an impl-needs-update error
Browse files Browse the repository at this point in the history
  • Loading branch information
j2kun committed Nov 19, 2024
1 parent c07772d commit f962e3e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/Dialect/Polynomial/Transforms/elementwise_to_affine.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
// RUN: heir-opt '--convert-elementwise-to-affine=convert-ops=artih.addi convert-dialects=arith' %s \
// RUN: | FileCheck --enable-var-scope --check-prefix=CHECK --check-prefix=CHECK_NOTADD --check-prefix=CHECK_NOTMUL %s

!poly = !polynomial.polynomial<ring=<coefficientType=!mod_arith.mod_arith<33538049:i32>, polynomialModulus=#polynomial.int_polynomial<1 + x**1024>>>
!coeff_ty = !mod_arith.mod_arith<33538049:i32>
!poly = !polynomial.polynomial<ring=<coefficientType=!coeff_ty, polynomialModulus=#polynomial.int_polynomial<1 + x**1024>>>

// CHECK-LABEL: @test_elementwise
// CHECK: {{.*}} -> [[T:tensor<2x!polynomial.*33538049.*]] {
Expand All @@ -77,10 +78,10 @@ func.func @test_elementwise(%arg0: tensor<2x!poly>, %arg1: tensor<2x!poly>) ->
}

// CHECK-LABEL: @test_partially_elementwise
// CHECK: ([[ARG0:%.+]]: [[T:tensor<2x!polynomial.*33538049.*]], [[ARG1:%.+]]: i32) -> [[T]] {
func.func @test_partially_elementwise(%arg0: tensor<2x!poly>, %arg1: i32) -> tensor<2x!poly> {
// CHECK_NOTMUL: polynomial.mul_scalar{{.*}} : [[T]], i32
%0 = polynomial.mul_scalar %arg0, %arg1 : tensor<2x!poly>, i32
// CHECK: ([[ARG0:%.+]]: [[T:tensor<2x!polynomial.*33538049.*]], [[ARG1:%.+]]: [[MOD_ARITH_TY:.*]]) -> [[T]] {
func.func @test_partially_elementwise(%arg0: tensor<2x!poly>, %arg1: !coeff_ty) -> tensor<2x!poly> {
// CHECK_NOTMUL: polynomial.mul_scalar{{.*}} : [[T]], [[MOD_ARITH_TY]]
%0 = polynomial.mul_scalar %arg0, %arg1 : tensor<2x!poly>, !coeff_ty
return %0 : tensor<2x!poly>
// CHECK_MUL: [[EMPTY:%.+]] = tensor.empty() : [[T:tensor<2x!polynomial.*33538049.*]]
// CHECK_MUL: [[LOOP:%.+]] = affine.for [[I:%.+]] = 0 to 2 iter_args([[T0:%.+]] = [[EMPTY]]) -> ([[T]]) {
Expand Down

0 comments on commit f962e3e

Please sign in to comment.