Repository navigation
Conversation
STRATA_HYBRID stays off. Turning it on keeps the CUDA host path and compiles the shared kernels again for HIP. Ordinals past the CUDA devices are HIP. The build is Linux x86-64 only. CUDA-only and HIP-only builds leave this path out. A HIP device is named by its architecture, with compute capability left at 0. Helpers are every other visible GPU. The HIP copies get the same hipBLASLt and rocBLAS switches as a pure HIP build when those libraries are present, and the HIP prompt kernels use their own device table. When the current device is AMD, startup matches a pure HIP build: the probe accepts a non-gfx11 host, mapped expert fills go through one pinned buffer, the helper busy-waits for its stream, --vram-elastic stays off, and the tail skip, PCIe share, architecture defaults, gfx12 chunk, and pipeline windows follow that card. A HIP primary does not probe the canonical PCIe pack or say that share will change.
With STRATA_HYBRID, a pinned expert the helper can see is that helper's row, so the primary does not copy it over PCIe. The first helper claims the row, so a second HIP device does not launch the same rows. holds() stays cache membership. Decode uses claims(), which is the cache or a pin that device can read. The default build keeps the previous holds() body and the previous cache lookup.
sakuumomo
marked this pull request as ready for review
October 21, 2026 07:28
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.
Depends on #3551.
Merge #3551 first. This branch is that pull request plus one commit,
604b2cf3. Until #3551 is merged, the file list here includes the hybrid build as well. The change that belongs to this pull request is that last commit only: 161 lines in five files (git diff 10fdcb31..604b2cf3).A merge commit of #3551 leaves this pull request showing only
604b2cf3. A squash of #3551 keeps the hybrid diff here, and this branch then needs a rebase onto that squash.Problem and result: With
STRATA_HYBRID, a pinned expert the helper can see was still the primary's row, so the primary copied it over PCIe. That row is now the helper's, and the primary does not copy it. The first helper claims the row, so a second HIP device does not launch the same rows.holds()stays cache membership. Decode usesclaims(), which is the cache or a pin that device can read. WithSTRATA_HYBRIDoff, the previousholds()body and the previous cache lookup stay.Related discussion: #3551, which this change needs. No separate issue.
Approach:
claims()is compiled only withSTRATA_HYBRID. A failed map, a 64-byte miss, a lost exchange, a soft commit, or an unregistered pin leaves the row on the CPU. The one-token path and the multi-token path both set the owned kind fromowns()after a successfulbegin().Validation:
Passed: four compiles of
604b2cf3on Linux x86-64.STRATA_BUILD_TESTS=OFFandSTRATA_PORTABLE=ONon the Nix builds.HIP,
STRATA_HYBRIDoff:STRATA_ENABLE_HIP=ON,STRATA_ENABLE_CUDA=OFF,CMAKE_HIP_ARCHITECTURES=gfx1030,STRATA_PREFILL_MMQ=ON, HIP 7.2.3. CMake reported "Strata: HIP enabled, arch gfx1030" and did not report a hybrid build. Output/nix/store/zm4ln1bi1v0ahalc4y1wzi5i1nzhifhy-strata-hip-0.2.1(strataandstrata-device).CUDA,
STRATA_HYBRIDoff:STRATA_ENABLE_CUDA=ON,STRATA_ENABLE_HIP=OFF,CMAKE_CUDA_ARCHITECTURES=89-real,STRATA_PREFILL_MMQ=OFF, CUDA 12.9.86, gcc 14.4.0. CMake reported "Strata: CUDA enabled, arch 89-real" and did not report a hybrid build. Output/nix/store/qv2y92cv0q6csg5v9mh9wgq9dipq4ygg-strata-cuda-0.2.1(strataandstrata-device).STRATA_HYBRID=ON: the same CUDA flags, plus HIP gfx1150. CMake reported CUDA arch 89-real, "Strata hybrid: gfx1150", and that hipBLASLt solution-table dispatch is available. Output/nix/store/xwbnkgp4jg00cisqn2fw19nr5rqf9z9p-strata-hybrid-0.2.1(strataandstrata-device).SYCL: the
strata-sycl-devimage fromsycl/tools/Dockerfile(oneAPI 2026.1.0, no AOT device).sycl/tools/build.sh strataprintedBUILD EXIT 0anderrors: 0. Binary/tmp/strata-wt-pin/build-sycl/strata. The SYCL port compiles its own copies of the five files in this commit, so this build checks the shared headers this commit inherits from #3551.The author ran it on two Linux machines and reports that both function as intended. The laptop has an RTX 4060 and a Radeon 890M and serves with
STRATA_HYBRID, which is the build that compiles this rule. The desktop has an RX 6800 and an RX 6900 XT and serves with the HIP build, which keeps the previous cache lookup. No command log or timing was attached to that report.Failed: none observed.
Not run: a trace showing a pinned row stayed off the PCIe copy. A SYCL process on a device.
Limits: The ownership rule is compiled only into the hybrid build. A default CUDA, HIP, or SYCL build keeps the previous cache lookup.