[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]
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d0e630cd03
Коммит
3abb3be245
@@ -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";
|
||||
|
||||
@@ -235,7 +235,8 @@ public:
|
||||
static void* hsa_malloc(size_t size, const Device::Memory& mem)
|
||||
{
|
||||
void* ret;
|
||||
hsa_status_t err = hsa_amd_memory_pool_allocate(mem.pool, size, 0, &ret);
|
||||
hsa_status_t err =
|
||||
hsa_amd_memory_pool_allocate(mem.pool, size, HSA_AMD_MEMORY_POOL_EXECUTABLE_FLAG, &ret);
|
||||
RET_IF_HSA_ERR(err);
|
||||
|
||||
err = hsa_amd_agents_allow_access(
|
||||
|
||||
Ссылка в новой задаче
Block a user