Repository navigation
Linux: the emulator tests build and pass again (#277) - #279
Merged
phantoslayer21 merged 5 commits intoNov 20, 2026
Merged
Conversation
swin.hip:486 called __builtin_amdgcn_readfirstlane directly and :504 used the AMDGCN-only "+s" asm constraint, so the host emulator build (WG_EMU) failed with every compiler. Use wg_uniform (the same builtin on the GPU) and guard the asm with #ifndef WG_EMU. gfx1201 code objects are byte-identical before and after. Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
CONV_SOURCES missed lz4block.cpp, convert5.cpp, ops5.cpp and api.cpp, so the converter link failed on Linux. Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
…x too check_no_dev_diagnostics.py used os.path.basename on the packager's Windows-style paths, so dx12\manifest.json was never checked on Linux. Windows behaviour is unchanged. Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
The quality9 (Lanczos-3) filter was compared with the default filter's reference. Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
The kernels store RGBA16F output saturated to +-65504 on purpose (post.hip); the tests expected the infinity of a plain astype(np.float16). Clip the f32 reference before the FP16 conversion in test_runtime, test_runtime_external and the post emulator tests. Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
j0nsh1n
added a commit
to j0nsh1n/wronggpu
that referenced
this pull request
Nov 18, 2026
The block kernel called __builtin_amdgcn_readfirstlane directly and held a "+s" asm constraint for the RESIDENT kernels. Neither exists in the host build (-DWG_EMU), so build.py --emu-only and every emulator test failed with "use of undeclared identifier '__builtin_amdgcn_readfirstlane'" and "invalid output constraint '+s' in asm". The wave index now goes through wg_uniform, which is readfirstlane on the device and the value itself on the host. The asm is left out of the host build (#ifndef WG_EMU), the same form as upstream PR phantoslayer21#279 for this line. Device code is unchanged. Verified: build.py --emu-only fails with those two errors before and builds after; TestLayoutIndependence passes (27 s); the 27 gfx1201 code objects have identical SHA-256 before and after (clang 20, ROCm 7.1.1). Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the Linux-only test failures of #277 (the open questions in #278 are not touched). Five small commits, each one fix:
swin.hipbuilds for the host lane emulator again:wg_uniforminstead of__builtin_amdgcn_readfirstlane(the same builtin on the GPU), and the"+s"asm guarded with#ifndef WG_EMU. The 49 gfx1201 code objects built with ROCm 10.1 are byte-identical before and after; no HLSL or shader header changes.test_model_wgcmlinks the converter sources it needs (lz4block.cpp,convert5.cpp,ops5.cpp,api.cpp).check_no_dev_diagnostics.pyreads the packager's backslash paths on Linux too (Windows unchanged).test_post_emucomparespost_filter_quality9with its own reference.test_runtime,test_runtime_external, the post emulator tests).Tested on Linux (Fedora 44 with clang 22, and Ubuntu 24.04 with clang 18):
test_post_emu,test_model_wgcm,test_dev_diagnostics_offand the post emulator tests pass;test_runtimegoes from 8 to 6 failures,test_runtime_externalkeeps 2, both left for #278. CI's Python jobs run on Windows, where these tests skip, so CI cannot show the change; a Linux shard would.Checklist
Signed-off-by:line (DCO 1.1).REUSE.toml(no new files).