From f96ab90067a57c5c81180b39092a0769eb0e7a1b Mon Sep 17 00:00:00 2001 From: "Jonathan R. Madsen" Date: Fri, 15 Dec 2023 11:01:55 -0600 Subject: [PATCH] Update lib/rocprofiler-sdk/hsa/types.hpp (#305) - remove static asserts on the HSA table step versions - ifdef/else the amd_ext size based on HSA_AMD_EXT_API_TABLE_STEP_VERSION --- source/lib/rocprofiler-sdk/hsa/types.hpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/source/lib/rocprofiler-sdk/hsa/types.hpp b/source/lib/rocprofiler-sdk/hsa/types.hpp index b257902db6..d23bc94d4a 100644 --- a/source/lib/rocprofiler-sdk/hsa/types.hpp +++ b/source/lib/rocprofiler-sdk/hsa/types.hpp @@ -122,17 +122,6 @@ static_assert(HSA_FINALIZER_API_TABLE_MAJOR_VERSION == 0x02, static_assert(HSA_IMAGE_API_TABLE_MAJOR_VERSION == 0x02, "Change in the major version of HSA image API table"); -static_assert(HSA_CORE_API_TABLE_STEP_VERSION == 0x00, - "Change in the major version of HSA core API table"); -static_assert(HSA_AMD_EXT_API_TABLE_STEP_VERSION == 0x01, - "Change in the major version of HSA amd-extended API table"); -static_assert(HSA_FINALIZER_API_TABLE_STEP_VERSION == 0x00, - "Change in the major version of HSA finalizer API table"); -static_assert(HSA_IMAGE_API_TABLE_STEP_VERSION == 0x00, - "Change in the major version of HSA image API table"); -static_assert(HSA_AQLPROFILE_API_TABLE_STEP_VERSION == 0x00, - "Change in the major version of HSA aqlprofile API table"); - // this should always be updated to latest table size template struct table_size; @@ -152,8 +141,14 @@ struct table_size { static constexpr size_t finalizer_ext = 64; static constexpr size_t image_ext = 120; - static constexpr size_t amd_ext = 560; static constexpr size_t core_api_ext = 1016; + + // TODO(jomadsen): come up with a better way of handling this +# if HSA_AMD_EXT_API_TABLE_STEP_VERSION == 0x00 + static constexpr size_t amd_ext = 552; +# else + static constexpr size_t amd_ext = 560; +# endif }; // default static asserts to check against latest version