Pull requests / #3553

#3553 [Engine] let a HIP helper read pinned expert rows in place

open · @sakuumomo · 0 Kommentare · Auf GitHub

AMD / HIPNVIDIA / CUDASecurityLinux

Beschreibung

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 uses `claims()`, which is the cache or a pin that device can read. With `STRATA_HYBRID` off, the previous `holds()` body and the previous cache lookup stay.

Related discussion: #3551, which this change needs. No separate issue.

Approach: `claims()` is compiled only with `STRATA_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 from `owns()` after a successful `begin()`.

Validation:
  Passed: four compiles of `604b2cf3` on Linux x86-64. `STRATA_BUILD_TESTS=OFF` and `STRATA_PORTABLE=ON` on the Nix builds.
    HIP, `STRATA_HYBRID` off: `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` (`strata` and `strata-device`).
    CUDA, `STRATA_HYBRID` off: `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` (`strata` and `strata-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` (`strata` and `strata-device`).
    SYCL: the `strata-sycl-dev` image from `sycl/tools/Dockerfile` (oneAPI 2026.1.0, no AOT device). `sycl/tools/build.sh strata` printed `BUILD EXIT 0` and `errors: 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.

Mehr auf der Site

Links zu Install, Modellen, Releases.