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


[ROCm/clr commit: 2b746de6de]
Esse commit está contido em:
Ioannis Assiouras
2024-05-08 01:23:25 +01:00
commit de Maneesh Gupta
commit 6a0f554fa6
+9 -1
Ver Arquivo
@@ -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)