32#include <gtest/gtest.h>
39 float tmp = float(raw_mxfp);
44 if (raw_mxfp.data != from_float.data &&
58 int max_val = 1 << bits;
59 for (
int val = 0; val < max_val; ++val) {
61 raw_mxfp.data = val << (32 - bits);
103 EXPECT_EQ(errors, 0);
TEST(MxfpTest, MxBf16Test)
bool test_raw_mxfp(T raw_mxfp, int bits)
mxfp< fp8_e4m3_info > mxfloat8
mxfp< fp16_e8m7_info > mxbfloat16
mxfp< fp16_e5m10_info > mxfloat16
mxfp< fp8_e5m2_info > mxbfloat8
constexpr bool isinf(gem5::AMDGPU::fp16_e5m10_info a)
constexpr bool isnan(gem5::AMDGPU::fp16_e5m10_info a)