Files
Strata/include
Niko1221 f73fa74107 Integrated gfx11 under Linux: pageable copies staged by the HIP runtime
The HIP runtime copies a pageable source of 1 MiB or more by pinning its pages in place
(a GPU userptr) and keeps them (generate.cpp, the STRATA_ARENA_MMAP note). On a Radeon
780M such a userptr is memory the kernel can move under a running dispatch: the hc
check's two 6.5 MB vectors at load, and without a registered arena the lent refill's
1.3 MiB blobs (expert_cache.cpp fill_slot_queued); uma-r13 reset in the load with a
"Failed to quiesce KFD" line although nothing of ours was registered.

The engine now sets GPU_PINNED_MIN_XFER_SIZE=1000000 before HIP starts on this class,
the value STRATA_ARENA_MMAP=1 already sets (measured then: decode 49.06 vs 49.16 ms a
window). The class is read from the KFD topology files, since the device properties need
HIP up: every GPU node (simd_count > 0) of /sys/class/kfd/kfd/topology/nodes/*/properties
has gfx_target_version 110003, 110500 or 110501 (gfx1103 / gfx1150 / gfx1151, integrated
only); a machine with another GPU beside them, or no KFD topology, is not the class.

What the runtime does with the variable was not checked against its source: C:\TheRock
on the owner PC is the Windows binary SDK of TheRock 10.0.0 (bin, include, lib, share;
therock-10.0.0.tar.gz holds the same files), not the ROCclr / ROCr sources. Its
bin\amdhip64_7.dll carries the names GPU_PINNED_MIN_XFER_SIZE and GPU_PINNED_XFER_SIZE and
the line "HSA Copy Using Pinned resource size %d", without the flags' descriptions; it is
the Windows (PAL) runtime. The behaviour relied on is the one measured on Linux for
STRATA_ARENA_MMAP.

Cost by reading: one CPU copy into the runtime's staging buffer per pageable copy of
1 MiB or more (milliseconds at load); none in the default mode's requests, whose copies
come from registered or cudaHostAlloc memory.

Scope: compiled only with STRATA_USE_HIP on __linux__; set only in the class above, and
never over a value the caller set (setenv without overwrite, and not at all when the
variable exists). STRATA_KFD_QUIET=0 or STRATA_KFD_QUIET_XFER=0 sets nothing; STRATA_TRACE
prints one line when it is set. Test: the topology rule and the value rule in
tests/core/kfd_quiet_test.cpp (text cases and a temporary folder tree).
2026-11-15 01:57:16 +01:00
..