F8E8M0 floating type is supposed to represent biased exponent bits of F32 type in OCP Micro scaling floating point formats. https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf This PR expands `arith.truncf` and `arith.extf` to support this behavior. For the `arith.truncf` thing to note here is that F8E8M0FNU type has one NaN representation which is encoded as `0xFF`. Therefore alll kinds of NaNs and +/-Inf in Float32Type would map to NaN in F8E8M0FNU. F8E8M0FNU doesn't have a sign bit therefore it is a lossy and irreversible downcast. cc: @krzysz00 @MaheshRavishankar @Muzammiluddin-Syed-ECE
20 KiB
20 KiB