scaled_type_convert.hpp Source File#
scaled_type_convert.hpp
Go to the documentation of this file.
28inline __host__ __device__ float scaled_type_convert<float, f8_ocp_t>(e8m0_bexp_t scale, f8_ocp_t x)
66inline __host__ float2_t scaled_type_convert<float2_t, f8x2_ocp_t>(e8m0_bexp_t scale, f8x2_ocp_t x)
101inline __host__ __device__ float16_t scaled_type_convert<float16_t, f8x16_ocp_t>(e8m0_bexp_t scale,
130inline __host__ __device__ float16_t scaled_type_convert<float16_t, bf8x16_ocp_t>(e8m0_bexp_t scale,
159inline __host__ __device__ float32_t scaled_type_convert<float32_t, f8x32_ocp_t>(e8m0_bexp_t scale,
188inline __host__ __device__ float32_t scaled_type_convert<float32_t, bf8x32_ocp_t>(e8m0_bexp_t scale,
216inline __host__ __device__ f8_ocp_t scaled_type_convert<f8_ocp_t, float>(e8m0_bexp_t scale, float x)
247inline __host__ __device__ f8x2_ocp_t scaled_type_convert<f8x2_ocp_t, float2_t>(e8m0_bexp_t scale,
250inline __host__ f8x2_ocp_t scaled_type_convert<f8x2_ocp_t, float2_t>(e8m0_bexp_t scale, float2_t x)
262inline __host__ __device__ bf8x2_ocp_t scaled_type_convert<bf8x2_ocp_t, float2_t>(e8m0_bexp_t scale,
__host__ __device__ float to_float< bf6_t >(e8m0_bexp_t const scale, bf6_t const data)
Converts an bf6_t value to a float based on an e8m0_bexp_t scale factor.
Definition mxf6_utils.hpp:165
__host__ __device__ float to_float< f4_t >(e8m0_bexp_t const scale, f4_t const data)
Definition mxf4_utils.hpp:40
__host__ __device__ float to_float< f6_t >(e8m0_bexp_t const scale, f6_t const data)
Converts an f6_t value to a float based on an e8m0_bexp_t scale factor.
Definition mxf6_utils.hpp:139
Definition ck.hpp:268
__host__ bf8x32_ocp_t scaled_type_convert< bf8x32_ocp_t, float32_t >(e8m0_bexp_t scale, float32_t x)
Definition scaled_type_convert.hpp:337
__host__ f8_ocp_t scaled_type_convert< f8_ocp_t, float >(e8m0_bexp_t scale, float x)
Definition scaled_type_convert.hpp:218
__host__ __device__ constexpr Y mxf8_convert_rne(X x, float scale)
__host__ float16_t scaled_type_convert< float16_t, bf8x16_ocp_t >(e8m0_bexp_t scale, bf8x16_ocp_t x)
Definition scaled_type_convert.hpp:133
__host__ __device__ f6_t f6_convert_rne(float x, float scale=1.0f)
Converts a float to a 6-bit float type (f6_t) using round-to-nearest-even.
Definition utility/type_convert.hpp:1801
__host__ float scaled_type_convert< float, bf8_ocp_t >(e8m0_bexp_t scale, bf8_ocp_t x)
Definition scaled_type_convert.hpp:48
__host__ __device__ bf6_t bf6_convert_sr(float x, float scale=1.0f)
Converts a float to the 6-bit BF6 type using stochastic rounding.
Definition utility/type_convert.hpp:2204
__host__ float scaled_type_convert< float, f8_ocp_t >(e8m0_bexp_t scale, f8_ocp_t x)
Definition scaled_type_convert.hpp:30
__host__ float16_t scaled_type_convert< float16_t, f8x16_ocp_t >(e8m0_bexp_t scale, f8x16_ocp_t x)
Definition scaled_type_convert.hpp:104
__host__ __device__ bf6_t bf6_convert_rne(float x, float scale=1.0f)
Converts a float to the 6-bit BF6 type using round-to-nearest-even.
Definition utility/type_convert.hpp:2137
typename vector_type< f8_ocp_t, 32 >::type f8x32_ocp_t
Definition dtype_vector.hpp:2204
__host__ __device__ f4_t f4_convert_rne(float x, float scale=1.0f)
Definition utility/type_convert.hpp:1468
__host__ bf8x2_ocp_t scaled_type_convert< bf8x2_ocp_t, float2_t >(e8m0_bexp_t scale, float2_t x)
Definition scaled_type_convert.hpp:265
__host__ bf8x16_ocp_t scaled_type_convert< bf8x16_ocp_t, float16_t >(e8m0_bexp_t scale, float16_t x)
Definition scaled_type_convert.hpp:301
typename vector_type< bf8_ocp_t, 32 >::type bf8x32_ocp_t
Definition dtype_vector.hpp:2212
__host__ float32_t scaled_type_convert< float32_t, f8x32_ocp_t >(e8m0_bexp_t scale, f8x32_ocp_t x)
Definition scaled_type_convert.hpp:162
__host__ f8x2_ocp_t scaled_type_convert< f8x2_ocp_t, float2_t >(e8m0_bexp_t scale, float2_t x)
Definition scaled_type_convert.hpp:250
__host__ float2_t scaled_type_convert< float2_t, f8x2_ocp_t >(e8m0_bexp_t scale, f8x2_ocp_t x)
Definition scaled_type_convert.hpp:66
__host__ f8x32_ocp_t scaled_type_convert< f8x32_ocp_t, float32_t >(e8m0_bexp_t scale, float32_t x)
Definition scaled_type_convert.hpp:319
typename vector_type< bf8_ocp_t, 2 >::type bf8x2_ocp_t
Definition dtype_vector.hpp:2208
__host__ float2_t scaled_type_convert< float2_t, bf8x2_ocp_t >(e8m0_bexp_t scale, bf8x2_ocp_t x)
Definition scaled_type_convert.hpp:84
__host__ __device__ f4_t f4_convert_sr(float x, float scale=1.0f)
Definition utility/type_convert.hpp:1546
__host__ __device__ constexpr Y type_convert(X x)
Definition utility/type_convert.hpp:98
typename vector_type< f8_ocp_t, 16 >::type f8x16_ocp_t
Definition dtype_vector.hpp:2203
__host__ bf8_ocp_t scaled_type_convert< bf8_ocp_t, float >(e8m0_bexp_t scale, float x)
Definition scaled_type_convert.hpp:234
__host__ __device__ constexpr Y mxf8_convert_sr(X x, float scale)
typename vector_type< bf8_ocp_t, 16 >::type bf8x16_ocp_t
Definition dtype_vector.hpp:2211
__host__ __device__ f6_t f6_convert_sr(float x, float scale=1.0f)
Converts a float to the 6-bit floating-point type (f6_t) using stochastic rounding.
Definition utility/type_convert.hpp:1866
__host__ f8x16_ocp_t scaled_type_convert< f8x16_ocp_t, float16_t >(e8m0_bexp_t scale, float16_t x)
Definition scaled_type_convert.hpp:283
__host__ constexpr Y scaled_type_convert(e8m0_bexp_t scale, X x)
__host__ float32_t scaled_type_convert< float32_t, bf8x32_ocp_t >(e8m0_bexp_t scale, bf8x32_ocp_t x)
Definition scaled_type_convert.hpp:191
Definition amd_ck_fp8.hpp:369
Unsigned representation of a conventional biased Float32 exponent.
Definition utility/e8m0.hpp:26
Definition amd_ck_fp8.hpp:323
Definition functional2.hpp:33