SWDEV-451594 - Fallback to host kernel args on older devices

On gfx8, gfx9 devices before MI100 and gfx10.0 or gfx10.1
none of the memory ordering workarounds for device kernel arguments
can be applied. Use host kernel arguments on these devices.

Change-Id: I9be6fbfe4b3986eb7d9f83998334df5f03fd4124
이 커밋은 다음에 포함됨:
Ioannis Assiouras 작성하고 Maneesh Gupta가 2024-05-28 06:28:17 +00:00를 커밋함
1 부모 5bb30d7718
커밋 2b746de6de
1 파일이 변경됨
+9 -1
+9 -1
파일 보기
@@ -250,6 +250,10 @@ void Settings::setKernelArgImpl(const amd::Isa& isa, bool isXgmi, bool hasValidH
const bool isMI300 = gfxipMajor == 9 && gfxipMinor == 4 &&
(gfxStepping == 0 || gfxStepping == 1 || gfxStepping == 2);
const bool isMI200 = (gfxipMajor == 9 && gfxipMinor == 0 && gfxStepping == 10);
const bool isPreMI100 =
(gfxipMajor < 9) || ((gfxipMajor == 9) && (gfxStepping < 8));
const bool isNavi10 =
(gfxipMajor == 10) && ((gfxipMinor == 0) || (gfxipMinor == 1));
auto kernelArgImpl = KernelArgImpl::HostKernelArgs;
@@ -259,7 +263,11 @@ void Settings::setKernelArgImpl(const amd::Isa& isa, bool isXgmi, bool hasValidH
kernelArgImpl = KernelArgImpl::DeviceKernelArgs;
} else if (hasValidHDPFlush) {
// If the HDP flush register is valid implement the HDP flush to MMIO
kernelArgImpl = KernelArgImpl::DeviceKernelArgsHDP;
// workaround. This does not work on gfx9 devices before MI100 or Navi10
// devices
if (!(isPreMI100 || isNavi10)) {
kernelArgImpl = KernelArgImpl::DeviceKernelArgsHDP;
}
} else if (isMI300 || isMI200) {
// Implement the kernel argument readback workaround
// (write all args -> sfence -> write last byte -> mfence -> read last byte)