[Mlir-commits] [mlir] [MLIR][Python] add f8E5M2 and tests for np_to_memref (PR #106028)
Maksim Levental
llvmlistbot at llvm.org
Mon Aug 26 06:53:02 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"
----------------
makslevental wrote:
Well then you can remove in both
https://github.com/llvm/llvm-project/pull/106028
More information about the Mlir-commits
mailing list