[Mlir-commits] [mlir] [MLIR][test] Fixup for checking for ml_dtypes (PR #123240)

Konrad Kleine llvmlistbot at llvm.org
Fri Jan 17 00:52:33 PST 2025


================
@@ -566,17 +565,16 @@ def testBF16Memref():
         execution_engine.invoke("main", arg1_memref_ptr, arg2_memref_ptr)
 
         # test to-numpy utility
-        # CHECK: [0.5]
-        npout = ranked_memref_to_numpy(arg2_memref_ptr[0])
-        log(npout)
+        x = ranked_memref_to_numpy(arg2_memref_ptr[0])
+        assert len(x) == 1
+        assert x[0] == 0.5
 
 
 if HAS_ML_DTYPES:
     run(testBF16Memref)
 
 
 # Test f8E5M2 memrefs
-# CHECK-LABEL: TEST: testF8E5M2Memref
----------------
kwk wrote:

Originally I had this even before you suggested it but it didn't work. Today when I put the prints (I used `log()`) back in in order to show the error it did work. What can I say other than sorry and thank you. I'll update the PR shortly.

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


More information about the Mlir-commits mailing list