mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-06-29 19:28:33 +00:00
Move static constexpr to structs
This commit is contained in:
@@ -109,6 +109,8 @@ using is_known_at_compile_time = is_static<T>;
|
||||
{ \
|
||||
};
|
||||
|
||||
DEFINE_STATIC_MEMBER_CHECKER(has_bcastpolicy, BCastPolicy);
|
||||
|
||||
// FIXME: do we need this anymore?
|
||||
template <
|
||||
typename PY,
|
||||
|
||||
@@ -21,7 +21,13 @@ struct GemmPipelineAgBgCrImplBase
|
||||
using ALayout = remove_cvref_t<std::tuple_element_t<number<0>{}, AsLayout>>;
|
||||
using BInDataType = remove_cvref_t<std::tuple_element_t<number<0>{}, BsDataType>>;
|
||||
|
||||
static constexpr bool IsBCastPolicyBeforeLDSWrite = IsBCastPolicyBeforeLDSWrite_v<Problem>;
|
||||
static constexpr bool IsBCastPolicyBeforeLDSWrite = [] {
|
||||
if constexpr(has_bcastpolicy<Problem>::value)
|
||||
return Problem::BCastPolicy == CastPolicy::BeforeLDSWrite;
|
||||
else
|
||||
return false;
|
||||
}();
|
||||
|
||||
using BDataType = std::conditional_t<IsBCastPolicyBeforeLDSWrite, ADataType, BInDataType>;
|
||||
|
||||
using BLayout = remove_cvref_t<std::tuple_element_t<number<0>{}, BsLayout>>;
|
||||
|
||||
@@ -11,16 +11,6 @@
|
||||
|
||||
namespace ck_tile {
|
||||
|
||||
DEFINE_STATIC_MEMBER_CHECKER(has_bcastpolicy, BCastPolicy);
|
||||
|
||||
template <typename Problem>
|
||||
static constexpr bool IsBCastPolicyBeforeLDSWrite_v = [] {
|
||||
if constexpr(has_bcastpolicy<Problem>::value)
|
||||
return Problem::BCastPolicy == CastPolicy::BeforeLDSWrite;
|
||||
else
|
||||
return false;
|
||||
}();
|
||||
|
||||
template <typename T, typename = void>
|
||||
struct has_a_tile_access_pattern : std::false_type
|
||||
{
|
||||
@@ -90,6 +80,14 @@ struct UniversalGemmBasePolicy
|
||||
static constexpr bool is_b_load_tr = false;
|
||||
#endif
|
||||
|
||||
template <typename Problem>
|
||||
static constexpr bool IsBCastPolicyBeforeLDSWrite_v = [] {
|
||||
if constexpr(has_bcastpolicy<Problem>::value)
|
||||
return Problem::BCastPolicy == CastPolicy::BeforeLDSWrite;
|
||||
else
|
||||
return false;
|
||||
}();
|
||||
|
||||
static constexpr auto I0 = number<0>{};
|
||||
static constexpr auto I1 = number<1>{};
|
||||
static constexpr auto I2 = number<2>{};
|
||||
|
||||
Reference in New Issue
Block a user