[Mlir-commits] [mlir] Upstream polynomial.ntt and polynomial.intt (PR #90992)

Jeremy Kun llvmlistbot at llvm.org
Sat May 4 18:11:18 PDT 2024


================
@@ -51,3 +51,90 @@ func.func @test_mul_scalar_wrong_type(%arg0: !ty) -> !ty {
   %poly = polynomial.mul_scalar %arg0, %scalar : !ty, i32
   return %poly : !ty
 }
+
+// -----
+
+#my_poly = #polynomial.polynomial<-1 + x**1024>
+#ring = #polynomial.ring<coefficientType=i16, coefficientModulus=256, polynomialModulus=#my_poly, primitiveRoot=31>
+!poly_ty = !polynomial.polynomial<#ring>
+
+// CHECK-NOT: @test_invalid_ntt
+// CHECK-NOT: polynomial.ntt
+func.func @test_invalid_ntt(%0 : !poly_ty) {
+  // expected-error at +1 {{a ring encoding was not provided to the tensor}}
----------------
j2kun wrote:

Fixed in 4120f2f69ec

https://github.com/llvm/llvm-project/pull/90992


More information about the Mlir-commits mailing list