mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-14 18:17:44 +00:00
Merge commit '9bd67c2cf2fe8e4479a433bcd6d467e2ea9aedb4' into develop
This commit is contained in:
@@ -101,15 +101,30 @@ template <int I>
|
||||
struct static_counter_uniq_;
|
||||
}
|
||||
|
||||
#define MAKE_SC() \
|
||||
__extension__ ck_tile::static_counter<ck_tile::impl::static_counter_uniq_<__COUNTER__>> {}
|
||||
// clang-format off
|
||||
#define MAKE_SC() \
|
||||
_Pragma("clang diagnostic push") \
|
||||
_Pragma("clang diagnostic ignored \"-Wpre-c2y-compat\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wc2y-extensions\"") \
|
||||
ck_tile::static_counter<ck_tile::impl::static_counter_uniq_<__COUNTER__>>{} \
|
||||
_Pragma("clang diagnostic pop")
|
||||
#define MAKE_SC_WITH(start_, step_) \
|
||||
__extension__ ck_tile:: \
|
||||
static_counter<ck_tile::impl::static_counter_uniq_<__COUNTER__>, start_, step_> \
|
||||
{ \
|
||||
}
|
||||
#define NEXT_SC(c_) __extension__ c_.next<__COUNTER__>()
|
||||
#define NEXT_SCI(c_, static_i_) __extension__ c_.next<__COUNTER__ + static_i_>()
|
||||
_Pragma("clang diagnostic push") \
|
||||
_Pragma("clang diagnostic ignored \"-Wpre-c2y-compat\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wc2y-extensions\"") ck_tile:: \
|
||||
static_counter<ck_tile::impl::static_counter_uniq_<__COUNTER__>, start_, step_>{} \
|
||||
_Pragma("clang diagnostic pop")
|
||||
#define NEXT_SC(c_) \
|
||||
_Pragma("clang diagnostic push") \
|
||||
_Pragma("clang diagnostic ignored \"-Wpre-c2y-compat\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wc2y-extensions\"") c_.next<__COUNTER__>() \
|
||||
_Pragma("clang diagnostic pop")
|
||||
#define NEXT_SCI(c_, static_i_) \
|
||||
_Pragma("clang diagnostic push") \
|
||||
_Pragma("clang diagnostic ignored \"-Wpre-c2y-compat\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wc2y-extensions\"") \
|
||||
c_.next<__COUNTER__ + static_i_>() _Pragma("clang diagnostic pop")
|
||||
// clang-format on
|
||||
|
||||
// Usage:
|
||||
// constexpr auto c = MAKE_SC()
|
||||
|
||||
@@ -74,6 +74,12 @@ class ProfilerOperationRegistry final
|
||||
#define PP_CONCAT(x, y) PP_CONCAT_IMPL(x, y)
|
||||
#define PP_CONCAT_IMPL(x, y) x##y
|
||||
|
||||
#define REGISTER_PROFILER_OPERATION(name, description, operation) \
|
||||
__extension__ static const bool PP_CONCAT(operation_registration_result_, __COUNTER__) = \
|
||||
::ProfilerOperationRegistry::GetInstance().Add(name, description, operation)
|
||||
// clang-format off
|
||||
#define REGISTER_PROFILER_OPERATION(name, description, operation) \
|
||||
_Pragma("clang diagnostic push") \
|
||||
_Pragma("clang diagnostic ignored \"-Wpre-c2y-compat\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wc2y-extensions\"") static const bool \
|
||||
PP_CONCAT(operation_registration_result_, __COUNTER__) = \
|
||||
::ProfilerOperationRegistry::GetInstance().Add(name, description, operation) \
|
||||
_Pragma("clang diagnostic pop")
|
||||
// clang-format on
|
||||
|
||||
Reference in New Issue
Block a user