Make hsaKmtAllocMemory more compliant with the Thunk spec

Allocations from GPU nodes will return VRAM, not system memory.
Only non-paged allocation from GPU nodes is supported. System
memory can only be allocated from CPU nodes (usually node 0).

The HostAccess flag is no longer used to distinguish the memory
type. It only indicates, whether the memory is mapped for CPU
access.

Maintain compatibility with broken KfdTests by returning system
memory for paged-memory requested from GPU nodes.

Change-Id: I514defede735f55e6de436f41944125b6f2c4ccf
This commit is contained in:
Felix Kuehling
2016-02-06 18:47:40 -05:00
committed by Gerrit Code Review
parent a815a4337f
commit 887b32fe86
6 changed files with 68 additions and 53 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ bool topology_is_dgpu(uint16_t device_id);
HSAuint32 PageSizeFromFlags(unsigned int pageSizeFlags);
void* allocate_exec_aligned_memory_gpu(uint32_t size, uint32_t align,
uint32_t NodeId, bool peer_to_peer);
uint32_t NodeId);
void free_exec_aligned_memory_gpu(void *addr, uint32_t size, uint32_t align);
HSAKMT_STATUS init_process_doorbells(unsigned int NumNodes);
void destroy_process_doorbells(void);