[Mlir-commits] [mlir] [MLIR][Python] add f8E5M2 and tests for np_to_memref (PR #106028)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Aug 26 02:10:50 PDT 2024
================
@@ -65,6 +72,11 @@ def to_numpy(array):
), f"bfloat16 requires the ml_dtypes package, please run:\n\npip install ml_dtypes\n"
if array.dtype == BF16:
return array.view("bfloat16")
+ assert not (
+ array.dtype == F8E5M2 and ml_dtypes is None
+ ), f"float8_e5m2 requires the ml_dtypes package, please run:\n\npip install ml_dtypes\n"
----------------
PhrygianGates wrote:
Here it's just to imitate the bf16 case in line 72 above. But thanks for pointing out!
https://github.com/llvm/llvm-project/pull/106028
More information about the Mlir-commits
mailing list