Add global_flags reporting to pointer info.
global_flags reporting allows discovery of an allocation's memory
model (coarse, fine, kernarg). This is critical on gfx90a and
also allows discovery of the memory model of IPC imports.
Change-Id: Icbc3c243ca20e264af5e1931becd2419f762c7ad
[ROCm/ROCR-Runtime commit: e3a01690a5]
Αυτή η υποβολή περιλαμβάνεται σε:
@@ -776,7 +776,7 @@ hsa_status_t Runtime::PtrInfo(void* ptr, hsa_amd_pointer_info_t* info, void* (*a
|
||||
HsaPointerInfo thunkInfo;
|
||||
uint32_t* mappedNodes;
|
||||
|
||||
hsa_amd_pointer_info_t retInfo;
|
||||
hsa_amd_pointer_info_t retInfo = {0};
|
||||
|
||||
// check output struct has an initialized size.
|
||||
if (info->size == 0) return HSA_STATUS_ERROR_INVALID_ARGUMENT;
|
||||
@@ -805,6 +805,11 @@ hsa_status_t Runtime::PtrInfo(void* ptr, hsa_amd_pointer_info_t* info, void* (*a
|
||||
retInfo.hostBaseAddress = thunkInfo.CPUAddress;
|
||||
retInfo.sizeInBytes = thunkInfo.SizeInBytes;
|
||||
retInfo.userData = thunkInfo.UserData;
|
||||
retInfo.global_flags = thunkInfo.MemFlags.ui32.CoarseGrain
|
||||
? HSA_AMD_MEMORY_POOL_GLOBAL_FLAG_COARSE_GRAINED
|
||||
: HSA_AMD_MEMORY_POOL_GLOBAL_FLAG_FINE_GRAINED;
|
||||
retInfo.global_flags |=
|
||||
thunkInfo.MemFlags.ui32.Uncached ? HSA_AMD_MEMORY_POOL_GLOBAL_FLAG_KERNARG_INIT : 0;
|
||||
if (block_info != nullptr) {
|
||||
// Block_info reports the thunk allocation from which we may have suballocated.
|
||||
// For locked memory we want to return the host address since hostBaseAddress is used to
|
||||
|
||||
@@ -1774,6 +1774,12 @@ typedef struct hsa_amd_pointer_info_s {
|
||||
GPU boards) any such agent may be returned.
|
||||
*/
|
||||
hsa_agent_t agentOwner;
|
||||
/*
|
||||
Contains a bitfield of hsa_amd_memory_pool_global_flag_t values.
|
||||
Reports the effective global flags bitmask for the allocation. This field is not meaningful if
|
||||
the type of the allocation is HSA_EXT_POINTER_TYPE_UNKNOWN.
|
||||
*/
|
||||
uint32_t global_flags;
|
||||
} hsa_amd_pointer_info_t;
|
||||
|
||||
/**
|
||||
|
||||
Αναφορά σε νέο ζήτημα
Block a user