/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/ck_tile/core/numeric/float8.hpp File Reference#
float8.hpp File Reference
#include "ck_tile/core/config.hpp"
#include "ck_tile/core/utility/bit_cast.hpp"
#include "ck_tile/core/numeric/numeric.hpp"
#include "ck_tile/core/utility/random.hpp"
#include "ck_tile/core/numeric/half.hpp"
#include "ck_tile/core/numeric/math.hpp"
#include "ck_tile/core/numeric/integral_constant.hpp"
#include <stdint.h>
#include <type_traits>
Go to the source code of this file.
Classes | |
struct | ck_tile::numeric_traits< fp8_t > |
struct | ck_tile::numeric_traits< bf8_t > |
struct | ck_tile::numeric< fp8_t > |
struct | ck_tile::numeric< bf8_t > |
Namespaces | |
ck_tile | |
ck_tile::impl | |
Macros | |
#define | CK_TILE_FP8_CVT_DEVICE 0 |
Typedefs | |
using | ck_tile::fp8_t = _BitInt(8) |
using | ck_tile::fp8_raw_t = uint8_t |
using | ck_tile::bf8_t = unsigned _BitInt(8) |
using | ck_tile::bf8_raw_t = uint8_t |
Enumerations | |
enum class | ck_tile::fp8_rounding_mode { ck_tile::standard = 0 , ck_tile::stochastic } |
enum class | ck_tile::fp8_interpretation { ck_tile::E4M3_OCP = 0 , ck_tile::E5M2_OCP = 1 , ck_tile::E4M3_FNUZ = 2 , ck_tile::E5M2_FNUZ = 3 } |
FP8 interpretation used in conversion algorithms. More... | |
Functions | |
template<fp8_rounding_mode rounding = static_cast<fp8_rounding_mode>(CK_TILE_FLOAT_TO_FP8_DEFAULT)> | |
CK_TILE_HOST_DEVICE uint8_t | ck_tile::float_to_fp8_raw (float, constant< rounding >={}) |
template<fp8_rounding_mode rounding = static_cast<fp8_rounding_mode>(CK_TILE_FLOAT_TO_FP8_DEFAULT)> | |
CK_TILE_HOST_DEVICE uint8_t | ck_tile::float_to_bf8_raw (float, constant< rounding >={}) |
CK_TILE_HOST_DEVICE float | ck_tile::fp8_to_float_raw (uint8_t) |
CK_TILE_HOST_DEVICE float | ck_tile::bf8_to_float_raw (uint8_t) |
template<typename SrcT , typename DstT , bool clip = true, bool stoch = false> | |
CK_TILE_HOST_DEVICE DstT | ck_tile::impl::run_cast_to_f8 (SrcT src, unsigned int rng=0) |
template<typename SrcT , typename DstT , bool clip = true> | |
CK_TILE_HOST_DEVICE DstT | ck_tile::impl::run_cast_from_f8 (SrcT x) |
template<typename X , typename Y , bool clip, bool stoch> | |
CK_TILE_HOST_DEVICE Y | ck_tile::impl::cast_to_f8 (X x, uint32_t rng) |
template<typename SrcT , typename DstT > | |
CK_TILE_HOST_DEVICE numeric_traits< DstT >::bitwise_type | ck_tile::float_to_fp8_sr_raw (SrcT x) |
Converts a floating-point value to an 8-bit floating-point representation with stochastic rounding. More... | |
template<typename SrcT , typename DstT > | |
CK_TILE_HOST_DEVICE numeric_traits< DstT >::bitwise_type | ck_tile::float_to_fp8_rtn_raw (SrcT x) |
Converts a floating-point value to an 8-bit floating-point representation with rounding to nearest even. More... | |
template<fp8_rounding_mode rounding> | |
CK_TILE_HOST_DEVICE fp8_raw_t | ck_tile::float_to_fp8_raw (float x, constant< rounding >) |
template<fp8_rounding_mode rounding> | |
CK_TILE_HOST_DEVICE bf8_raw_t | ck_tile::float_to_bf8_raw (float x, constant< rounding >) |
template<fp8_rounding_mode rounding = static_cast<fp8_rounding_mode>(CK_TILE_FLOAT_TO_FP8_DEFAULT)> | |
CK_TILE_HOST_DEVICE fp8_t | ck_tile::float_to_fp8 (float x, constant< rounding >={}) |
template<fp8_rounding_mode rounding = static_cast<fp8_rounding_mode>(CK_TILE_FLOAT_TO_FP8_DEFAULT)> | |
CK_TILE_HOST_DEVICE bf8_t | ck_tile::float_to_bf8 (float x, constant< rounding >={}) |
CK_TILE_HOST_DEVICE float | ck_tile::fp8_to_float (fp8_t x) |
CK_TILE_HOST_DEVICE float | ck_tile::bf8_to_float (bf8_t x) |
template<typename T > | |
CK_TILE_HOST_DEVICE T | ck_tile::abs (const T &x) |
CK_TILE_HOST_DEVICE bool | ck_tile::isnan (const fp8_t &x) |
CK_TILE_HOST_DEVICE bool | ck_tile::isnan (const bf8_t &x) |
Macro Definition Documentation
◆ CK_TILE_FP8_CVT_DEVICE
#define CK_TILE_FP8_CVT_DEVICE 0 |