AmdExtTable updated (#292)

* AmdExtTable updated

* hsa_amd_agent_set_async_scratch_limit introduced

* source formatting (clang-format v11) (#294)

Co-authored-by: vlaindic <vlaindic@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: vlaindic <vlaindic@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: 0666f6a197]
This commit is contained in:
Vladimir Indic
2023-12-12 17:36:38 +01:00
committed by GitHub
parent cad071f395
commit 43d5712dcb
4 changed files with 20 additions and 2 deletions
@@ -1305,5 +1305,12 @@ typedef union rocprofiler_hsa_api_args_u
hsa_amd_memory_pool_t* pool;
hsa_amd_memory_type_t* type;
} hsa_amd_vmem_get_alloc_properties_from_handle;
# if HSA_AMD_EXT_API_TABLE_STEP_VERSION >= 0x01
struct
{
hsa_agent_t agent;
size_t threshold;
} hsa_amd_agent_set_async_scratch_limit;
# endif
#endif
} rocprofiler_hsa_api_args_t;
@@ -242,6 +242,9 @@ typedef enum // NOLINT(performance-enum-size)
ROCPROFILER_HSA_API_ID_hsa_amd_vmem_import_shareable_handle,
ROCPROFILER_HSA_API_ID_hsa_amd_vmem_retain_alloc_handle,
ROCPROFILER_HSA_API_ID_hsa_amd_vmem_get_alloc_properties_from_handle,
# if HSA_AMD_EXT_API_TABLE_STEP_VERSION >= 0x01
ROCPROFILER_HSA_API_ID_hsa_amd_agent_set_async_scratch_limit,
# endif
#endif
ROCPROFILER_HSA_API_ID_LAST,
@@ -313,6 +313,14 @@ HSA_API_INFO_DEFINITION_V(ROCPROFILER_HSA_API_TABLE_ID_AmdExt,
alloc_handle,
pool,
type)
# if HSA_AMD_EXT_API_TABLE_STEP_VERSION >= 0x01
HSA_API_INFO_DEFINITION_V(ROCPROFILER_HSA_API_TABLE_ID_AmdExt,
ROCPROFILER_HSA_API_ID_hsa_amd_agent_set_async_scratch_limit,
hsa_amd_agent_set_async_scratch_limit,
hsa_amd_agent_set_async_scratch_limit_fn,
agent,
threshold)
# endif
# endif
#else
@@ -124,7 +124,7 @@ static_assert(HSA_IMAGE_API_TABLE_MAJOR_VERSION == 0x02,
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 == 0x00,
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");
@@ -152,7 +152,7 @@ struct table_size<ROCPROFILER_COMPUTE_VERSION(1, 12, 0)>
{
static constexpr size_t finalizer_ext = 64;
static constexpr size_t image_ext = 120;
static constexpr size_t amd_ext = 552;
static constexpr size_t amd_ext = 560;
static constexpr size_t core_api_ext = 1016;
};