[SWDEV-479204] Fix the hipGraph AQL package fill issue
This patch fixes this potential issue that filling AQL header before filling the AQL body. The hsa spec specifies "Packet processors may process AQL packets after the packet format field is updated, but before the doorbell is signaled." However, the hipGraph AQL package with valid header will be filled before fill the body, which may have the potential issue that CP receive invalid AQL body. Change-Id: I84af798c19ee2b8805ba19732b0eabdea2958a96
이 커밋은 다음에 포함됨:
1 부모
432bdd7bf2
커밋
3959b5be1e
1 파일이 변경됨
+10
-1
@@ -999,7 +999,16 @@ inline bool VirtualGPU::dispatchAqlPacket(
|
||||
auto packet = reinterpret_cast<hsa_kernel_dispatch_packet_t*>(aqlpacket);
|
||||
ClPrint(amd::LOG_INFO, amd::LOG_KERN, "Graph shader name : %s",
|
||||
kernelName.c_str());
|
||||
dispatchGenericAqlPacket(packet, packet->header, packet->setup, false);
|
||||
|
||||
// The Aqlpacket with valid header will trigger the issue that AQL fill
|
||||
// the header before filling the body. However, the CP can handle the AQL package
|
||||
// after seeing the valid AQL header with the AQL package's body is NULL.
|
||||
// This patch fixes this potential issue that filling AQL header before
|
||||
// filling the AQL body.
|
||||
uint16_t packetHeader = packet->header;
|
||||
packet->header = (HSA_PACKET_TYPE_INVALID << HSA_PACKET_HEADER_TYPE);
|
||||
dispatchGenericAqlPacket(packet, packetHeader, packet->setup, false);
|
||||
packet->header = packetHeader;
|
||||
|
||||
profilingEnd(*vcmd);
|
||||
|
||||
|
||||
새 이슈에서 참조
사용자 차단