[Mlir-commits] [mlir] Support float8_e3m4 and float8_e4m3 in np_to_memref (PR #186453)
Maksim Levental
llvmlistbot at llvm.org
Sat Mar 14 18:05:19 PDT 2026
================
@@ -68,15 +88,17 @@ def to_numpy(array):
if array.dtype == F16:
return array.view("float16")
assert not (
- array.dtype == BF16 and ml_dtypes is None
- ), f"bfloat16 requires the ml_dtypes package, please run:\n\npip install ml_dtypes\n"
+ array.dtype in ML_DTYPES_REQUIRED and ml_dtypes is None
----------------
makslevental wrote:
my rule of thumb is things should be promoted if they're used in more than one place - if we get to a point where we need to refer to these specific types in multiple places then we can refactor. but in such a case a) the container should be a tuple so that no one can append b) it should be named more descriptively. but yea let's cross that bridge if we get to it.
https://github.com/llvm/llvm-project/pull/186453
More information about the Mlir-commits
mailing list