[SWDEV-482060] Set execute permission for HSA allocated memory (#151)

We need execute permission for HSA memory (req for IB buffers).
Enforcement is upcoming which will break counter collection (see
ticket).

Co-authored-by: Benjamin Welton <bewelton@amd.com>
Co-authored-by: Bhardwaj, Gopesh <Gopesh.Bhardwaj@amd.com>

[ROCm/rocprofiler-sdk commit: 0d701cdaac]
This commit is contained in:
Welton, Benjamin
2025-01-28 16:46:22 -08:00
committed by GitHub
parent d0e630cd03
commit 3abb3be245
2 changed files with 4 additions and 2 deletions
@@ -139,7 +139,8 @@ set_profiler_active_on_queue(hsa_amd_memory_pool_t pool,
auto size = (profile.command_buffer.size + mask) & ~mask;
if(hsa::get_amd_ext_table()->hsa_amd_memory_pool_allocate_fn(
pool, size, 0, &profile.command_buffer.ptr) != HSA_STATUS_SUCCESS)
pool, size, HSA_AMD_MEMORY_POOL_EXECUTABLE_FLAG, &profile.command_buffer.ptr) !=
HSA_STATUS_SUCCESS)
{
ROCP_WARNING << "Failed to allocate memory to enable profile command on agent, some "
"counters will be unavailable";