Execute native Windows K DLSS and validate real transformer weights

This commit is contained in:
Codex committed 2026-09-30 18:23:01 +03:00
1 parent a0c36a6d6f
commit 5592b7a921
20 files changed
+948 -54

No files matched your search

+12 -2
View File
@@ -34,6 +34,7 @@ add_custom_target(d4r_wmma_code_object ALL DEPENDS "${wmma_object}")
# directory, until each layer and then the complete network pass replay.
# M uses the existing FP16 widening baseline; native FP8 is not enabled here.
set(native_objects)
option(D4R_K_FP16_BASELINE "Round every K16 accumulation step like NVIDIA f16 WMMA" ON)
foreach(family k m)
file(GLOB native_sources CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/kernels/${family}/*.hip")
file(GLOB native_headers CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/kernels/${family}/*.h")
@@ -44,8 +45,12 @@ foreach(family k m)
file(READ "${source}" kernel_source)
string(REGEX MATCH "// d4r-build-flags: ([^\r\n]+)" flags_line "${kernel_source}")
set(native_flags)
if(family STREQUAL "k" AND D4R_K_FP16_BASELINE)
list(APPEND native_flags -DD4R_K_FP16_BASELINE)
endif()
if(flags_line)
separate_arguments(native_flags NATIVE_COMMAND "${CMAKE_MATCH_1}")
separate_arguments(source_flags NATIVE_COMMAND "${CMAKE_MATCH_1}")
list(APPEND native_flags ${source_flags})
endif()
add_custom_command(OUTPUT "${native_object}"
COMMAND "${D4R_HIP_CLANG}" -x hip -std=c++17 --offload-arch=gfx1201
@@ -116,9 +121,14 @@ install(FILES "${probe_object}" DESTINATION bin)
install(FILES "${wmma_object}" DESTINATION bin)
install(FILES scripts/windows/test-windows-rdna4.ps1 DESTINATION .)
install(FILES scripts/windows/test-k-replay.ps1 DESTINATION .)
install(FILES scripts/windows/test-k-captures.ps1 DESTINATION .)
install(FILES scripts/windows/test-native-overrides.ps1 DESTINATION .)
install(FILES tools/windows/k_layer_validate.py DESTINATION .)
install(FILES tools/windows/k_replay_validate.py DESTINATION .)
install(FILES kernels/tools/pwin_model.py kernels/tools/pwin_check.py DESTINATION reference)
install(FILES tools/windows/k_ptx_validate.py DESTINATION .)
install(FILES tools/windows/frame_compare.py DESTINATION .)
install(FILES kernels/tools/pwin_model.py kernels/tools/pwin_check.py kernels/tools/ptxsim.py
kernels/tools/extract_dlss_ptx.py kernels/tools/kernel_manifest.py DESTINATION reference)
install(FILES docs/windows-rdna4-port.md DESTINATION docs)
include(CTest)
add_test(NAME hip_gfx1201 COMMAND d4r_hip_gfx1201_probe