Merge "SWDEV-301543 SWDEV-276146 : Fix profile output buff allocation" into amd-staging

Este cometimento está contido em:
Chun Yang criou e Gerrit Code Review cometeu 2021-09-08 13:27:01 -04:00
2 ascendentes d926d09134 2b79931631
cometimento 4409957364
1 ficheiro modificado
+4 -1
+4 -1
Ver ficheiro
@@ -331,7 +331,10 @@ class PmcProfile : public Profile {
hsa_status_t Allocate(util::HsaRsrcFactory* rsrc) {
profile_.command_buffer.ptr =
rsrc->AllocateSysMemory(agent_info_, profile_.command_buffer.size);
profile_.output_buffer.ptr = rsrc->AllocateSysMemory(agent_info_, profile_.output_buffer.size);
// Allocate profile output buffer from kernarg memory pool since kernarg
// memory buffer is uncached. So when GPU copies performance counter values
// to this buffer they are guaranteed to be visible to CPU.
profile_.output_buffer.ptr = rsrc->AllocateKernArgMemory(agent_info_, profile_.output_buffer.size);
return (profile_.command_buffer.ptr && profile_.output_buffer.ptr) ? HSA_STATUS_SUCCESS
: HSA_STATUS_ERROR;
}