Repository navigation
[Engine] build Inkling 2's DSpark screen on HIP - #206
Open
okada-shogo wants to merge 1 commit into
Open
okada-shogo wants to merge 1 commit into
okada-shogo wants to merge 1 commit into
Conversation
The HIP build of strata-poly stopped at inkling2.cu since 8ddd416: the screen kernels (scr_base_kernel, scr_step_kernel, scr_final_kernel) call __ldcs and __ldcg on uint4, uint32_t, float and float2, and HIP has those two only for halves ("no matching function for call to '__ldcs'", ten errors, ROCm 7.2.4, gfx1201). On HIP they are now plain loads: the screen uses them as cache hints, on a copy's words read once and on candidates that earlier launches wrote. CUDA builds compile the same code as before (the definitions are under __HIPCC__). Class: same bits on CUDA; HIP did not build before. Inkling 2 is VecSzn's engine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Erqa3PhC87SPTfVSKZ3Ri5
|
Thanks for the pull request. To keep the tracker readable, every item needs an area prefix in the title and the parts of the pull request template filled in. This one is missing:
Edit the pull request (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment Details: CONTRIBUTING.md |
|
Thanks, this follows the format now. |
This was referenced Nov 22, 2026
Open
[Engine] Inkling 2: IQ1_S prompt products on the int8 kernel (opt-in, STRATA_PREFILL_IQ1S=int8)
#250
Open
okada-shogo
added a commit
to okada-shogo/PolyStrata
that referenced
this pull request
Nov 23, 2026
… HIP Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Problem and result
Since 8ddd416 (the DSpark screen), the HIP build of
strata-polystops atengine/src/poly/inkling2.cu. The screen kernels (scr_base_kernel,scr_step_kernel,scr_final_kernel) call__ldcsand__ldcgonuint4,uint32_t,floatandfloat2. HIP declares those two only for__halfand__half2, so the build fails with ten errors:After this change,
strata-polybuilds for HIP again.Related discussion
Fixes #207 (the same ten errors, reported on gfx1032).
Split out of #200 as the maintainer asked there (one change per PR, HIP support separately). The HIP support for Inkling 2 will be its own PR on top of this one.
Approach
On HIP only,
__ldcsand__ldcgbecome plain loads (two small templates under#if defined(__HIPCC__)). The screen uses them only as cache hints, on a copy's words that are read once and on candidates that earlier launches wrote, so a plain load gives the same values. CUDA code is unchanged: the definitions are not compiled for CUDA.Validation
Passed:
HIP build of
strata-polyfor gfx1201. ROCm 7.2.4 in a container based onrocm/dev-ubuntu-24.04:7.2.4-complete(digestsha256:92f309c5…), with cmake, ninja and ccache added:FAILED: CMakeFiles/strata-poly.dir/src/poly/inkling2.cu.o.[2/2] Linking HIP executable strata-poly.CUDA object identity:
engine/src/poly/inkling2.cuat d1f711e and with this commit, each at the same path, compiled with main's nvcc line for sm_75 (CUDA 12.9,-O3 -std=c++20 --generate-code=arch=compute_75,code=[compute_75,sm_75], the same-Dflags). The md5 ofcuobjdump -sass, ofcuobjdump -ptx(without.file/.loclines) and of the host code (objdump -d --no-show-raw-insn) is the same before and after.CUDA: full
strata-polybuild for sm_75 with this commit (CUDA 12.9, gcc 11):cmake -S engine -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=75 -DSTRATA_NATIVE_EXPERTS=ONthencmake --build build --target strata-poly: 118 of 118 steps, 0 errors.HIP compile of
inkling2.cufor gfx1100 and gfx1200 (same container,strata-poly's clang++ line): 0 errors. Three warnings per arch about constants unused under HIP (kFlashRel,kFlashKv), which were there before this change.Failed: none observed.
Not run:
#if defined(__HIPCC__)ininkling2.cu,and the CUDA object code is unchanged (the sm_75 SASS/PTX/host-code md5 check above).
Limits
Build fix only. It does not claim that Inkling 2 runs correctly on AMD.
🤖 Generated with Claude Code