type_convert.hpp File Reference#
type_convert.hpp File Reference
#include <stdint.h>#include <tuple>#include <type_traits>#include "ck_tile/core/config.hpp"#include "ck_tile/core/numeric/half.hpp"#include "ck_tile/core/numeric/bfloat16.hpp"#include "ck_tile/core/numeric/float8.hpp"#include "ck_tile/core/numeric/int8.hpp"#include "ck_tile/core/numeric/mxfp_convert.hpp"#include "ck_tile/core/numeric/pk_fp4.hpp"Go to the source code of this file.
Namespaces | |
| namespace | ck_tile |
Macros | |
| #define | CK_TILE_TYPE_CONVERT(dtype_, dname_, stype_, sname_) |
| #define | CK_TILE_SCALED_TYPE_CONVERT(dtype_, dname_, stype_, sname_) |
Functions | |
| template<typename Y, typename X, std::enable_if_t<!(std::is_const_v< Y >||std::is_const_v< X >), bool > = false> | |
| CK_TILE_HOST_DEVICE constexpr Y | ck_tile::type_convert (X x) |
| template<typename Y, typename X, std::enable_if_t< std::is_const_v< Y >||std::is_const_v< X >, bool > = false> | |
| CK_TILE_HOST_DEVICE constexpr Y | ck_tile::type_convert (X x) |
| template<typename Y, typename X> | |
| CK_TILE_HOST_DEVICE constexpr Y | ck_tile::scaled_type_convert (X x, float scale) |
Macro Definition Documentation
◆ CK_TILE_SCALED_TYPE_CONVERT
| #define CK_TILE_SCALED_TYPE_CONVERT | ( | dtype_, | |
| dname_, | |||
| stype_, | |||
| sname_ ) |
Value:
template <> \
CK_TILE_HOST_DEVICE constexpr dtype_ scaled_type_convert<dtype_, stype_>(stype_ x, \
float scale) \
{ \
return sname_##_to_##dname_(x, scale); \
} \
template <> \
CK_TILE_HOST_DEVICE constexpr dtype_ type_convert<dtype_, stype_>(stype_ x) \
{ \
return sname_##_to_##dname_(x, 1.f); \
}
◆ CK_TILE_TYPE_CONVERT
| #define CK_TILE_TYPE_CONVERT | ( | dtype_, | |
| dname_, | |||
| stype_, | |||
| sname_ ) |
Value:
template <> \
CK_TILE_HOST_DEVICE constexpr dtype_ type_convert<dtype_, stype_>(stype_ x) \
{ \
return sname_##_to_##dname_(x); \
}