Temporary: Set AllocateGTTAccess and node_id for MES

Temporary change to set the AllocateGTTAccess flag and node_id
on MES devices.

Change-Id: I22385d11b17b76cfb44278fa0d8a09bc8721cea6
This commit is contained in:
David Yat Sin
2024-03-07 23:54:17 +00:00
parent 9e8f185397
commit efe455c2fa
10 changed files with 69 additions and 28 deletions
+3 -3
View File
@@ -198,7 +198,7 @@ class Runtime {
/// @retval ::HSA_STATUS_SUCCESS If allocation is successful.
hsa_status_t AllocateMemory(const MemoryRegion* region, size_t size,
MemoryRegion::AllocateFlags alloc_flags,
void** address);
void** address, int agent_node_id = 0);
/// @brief Free memory previously allocated with AllocateMemory.
///
@@ -419,7 +419,7 @@ class Runtime {
amd::hsa::code::AmdHsaCodeManager* code_manager() { return &code_manager_; }
std::function<void*(size_t size, size_t align, MemoryRegion::AllocateFlags flags)>&
std::function<void*(size_t size, size_t align, MemoryRegion::AllocateFlags flags, int agent_node_id)>&
system_allocator() {
return system_allocator_;
}
@@ -659,7 +659,7 @@ class Runtime {
prefetch_map_t prefetch_map_;
// Allocator using ::system_region_
std::function<void*(size_t size, size_t align, MemoryRegion::AllocateFlags flags)> system_allocator_;
std::function<void*(size_t size, size_t align, MemoryRegion::AllocateFlags flags, int agent_node_id)> system_allocator_;
// Deallocator using ::system_region_
std::function<void(void*)> system_deallocator_;