Problem
The new SystemInfo::is_strix_apu() function scans /sys/class/kfd/kfd/topology/nodes/*/properties for gfx_target_version, then calls has_unified_memory() on each node. Currently this has no test coverage in test/cpp/test_amd_vram.cpp.
Additionally, the method is hardcoded to "Strix" APUs only. We have an old AMD 2400G APU (Stoney Ridge, gfx v8) that we want to validate detection against -- which means the function name and scope need broadening.
Proposed Solution
- Rename
SystemInfo::is_strix_apu() --> SystemInfo::is_apu() -- broader name reflecting that it detects any AMD APU with unified memory, not just Strix-generation parts.
- Add sysfs scanning test -- mock or parameterize the KFD path so the test can verify:
- Correct parsing of
gfx_target_version from properties file
- Multiple node iteration (at least one matching --> return true)
- Missing/empty nodes gracefully handled
- Validate on 2400G hardware -- once detection logic covers Stoney Ridge, test against the actual APU.
Related
Depends on future-proof detection logic issue for the detection predicate itself. This issue focuses on renaming + test coverage.
Files to update
src/cpp/include/lemon/system_info.h -- rename declaration
src/cpp/server/system_info.cpp -- rename implementation, any callers
test/cpp/test_amd_vram.cpp -- add test cases
CMakeLists.txt -- if test dependencies change
Problem
The new
SystemInfo::is_strix_apu()function scans/sys/class/kfd/kfd/topology/nodes/*/propertiesforgfx_target_version, then callshas_unified_memory()on each node. Currently this has no test coverage intest/cpp/test_amd_vram.cpp.Additionally, the method is hardcoded to "Strix" APUs only. We have an old AMD 2400G APU (Stoney Ridge, gfx v8) that we want to validate detection against -- which means the function name and scope need broadening.
Proposed Solution
SystemInfo::is_strix_apu()-->SystemInfo::is_apu()-- broader name reflecting that it detects any AMD APU with unified memory, not just Strix-generation parts.gfx_target_versionfrom properties fileRelated
Depends on future-proof detection logic issue for the detection predicate itself. This issue focuses on renaming + test coverage.
Files to update
src/cpp/include/lemon/system_info.h-- rename declarationsrc/cpp/server/system_info.cpp-- rename implementation, any callerstest/cpp/test_amd_vram.cpp-- add test casesCMakeLists.txt-- if test dependencies change