Skip to content
This repository was archived by the owner on Dec 24, 2024. It is now read-only.

Commit ec0dc60

Browse files
Using BOs of type BO_SHMEM instead of BO_CMD for kernarg memory region (#19)
* Using BOs of type BO_SHMEM instead of BO_CMD for kernarg memory region * Changing test to use kernarg memory region for operand allocation
1 parent 5aa833b commit ec0dc60

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rocrtst/suites/aie/aie_hsa_dispatch_test.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ int main(int argc, char **argv) {
223223
num_data_elements * sizeof(std::uint32_t);
224224

225225
std::uint32_t *input = {};
226-
r = hsa_amd_memory_pool_allocate(global_dev_mem_pool, data_buffer_size, 0,
226+
r = hsa_amd_memory_pool_allocate(global_kernarg_mem_pool, data_buffer_size, 0,
227227
reinterpret_cast<void **>(&input));
228228
assert(r == HSA_STATUS_SUCCESS);
229229
std::uint32_t input_handle = {};
@@ -232,7 +232,7 @@ int main(int argc, char **argv) {
232232
assert(input_handle != 0);
233233

234234
std::uint32_t *output = {};
235-
r = hsa_amd_memory_pool_allocate(global_dev_mem_pool, data_buffer_size, 0,
235+
r = hsa_amd_memory_pool_allocate(global_kernarg_mem_pool, data_buffer_size, 0,
236236
reinterpret_cast<void **>(&output));
237237
assert(r == HSA_STATUS_SUCCESS);
238238
std::uint32_t output_handle = {};

runtime/hsa-runtime/core/driver/xdna/amd_xdna_driver.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ XdnaDriver::AllocateMemory(const core::MemoryRegion &mem_region,
147147
}
148148

149149
if (region.kernarg()) {
150-
create_bo_args.type = AMDXDNA_BO_CMD;
150+
create_bo_args.type = AMDXDNA_BO_SHMEM;
151151
} else {
152152
create_bo_args.type = AMDXDNA_BO_DEV;
153153
}

0 commit comments

Comments
 (0)