2025-01-08 08:22:09 -08:00
2024-12-03 15:36:32 -08:00
2024-12-03 15:36:32 -08:00
2024-12-03 15:36:32 -08:00
2024-12-03 15:36:32 -08:00
2024-12-03 15:36:32 -08:00
2024-12-03 15:36:32 -08:00
2024-12-03 15:36:32 -08:00
2024-12-03 15:36:32 -08:00
2024-12-03 15:36:32 -08:00
2024-12-03 15:36:32 -08:00
2024-12-03 15:36:32 -08:00

mi300a-xnack

Test HSA_XNACK behavior on AMD MI300A

XNACK refers to the GPU's ability to retry memory accesses that failed due a page fault (which normally would lead to a memory access error), and instead retrieve the missing page (source)

Quick Start

./run.sh

ROCm 6.2.1 Results

Device Name

HSA_XNACK=0 (or unset) HSA_XNACK=1
amdgcn-amd-amdhsa--gfx942:sramecc+:xnack- amdgcn-amd-amdhsa--gfx942:sramecc+:xnack+
  • xnack+: XNACK is available and enabled
  • xnack-: XNACK is available and disabled (source)

Compiled with --offload-arch=gfx942 or no --offload-arch provided

GPU kernels will run regardless of whether XNACK is enabled

Allocator Access HSA_XNACK=0 (or unset) HSA_XNACK=1
hipMalloc GPU Kernel yes yes
hipMalloc Host Loop yes yes
hipMalloc hipMemset yes yes
malloc GPU Kernel segfault yes
malloc Host Loop yes yes
malloc hipMemset HIP runtime error HIP runtime error
hipMallocManaged GPU Kernel yes yes
hipMallocManaged Host Loop yes yes
hipMallocManaged hipMemset yes yes

Compiled with --offload-arch=gfx942:xnack-

GPU kernels will run only if XNACK is disabled

Allocator Access HSA_XNACK=0 (or unset) HSA_XNACK=1
hipMalloc GPU Kernel yes N/A
hipMalloc Host Loop yes yes
hipMalloc hipMemset yes yes
malloc GPU Kernel segfault N/A
malloc Host Loop yes yes
malloc hipMemset HIP runtime error HIP runtime error
hipMallocManaged GPU Kernel yes N/A
hipMallocManaged Host Loop yes yes
hipMallocManaged hipMemset yes yes

Compiled with --offload-arch=gfx942:xnack+

GPU kernels will run only if XNACK is enabled

Allocator Access HSA_XNACK=0 (or unset) HSA_XNACK=1
hipMalloc GPU Kernel N/A yes
hipMalloc Host Loop yes yes
hipMalloc hipMemset yes yes
malloc GPU Kernel N/A yes
malloc Host Loop yes yes
malloc hipMemset HIP runtime error HIP runtime error
hipMallocManaged GPU Kernel N/A yes
hipMallocManaged Host Loop yes yes
hipMallocManaged hipMemset yes yes
Description
Test HSA_XNACK behavior on AMD MI300A
Readme 30 KiB
Languages
C++ 65.2%
Shell 18.1%
CMake 16.7%