mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #709] Does the HIP backend work on non-AMD GPUs via chipStar (HIP → SPIR-V)? Spike says yes with a 3-line shim diff #325
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#325
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mq-beefcake on GitHub (Oct 4, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/709
I run Strata on Intel Arc Pro B70 cards (Battlemage, 2×32GB) and found there's currently no Intel path (CUDA needs NVIDIA, HIP needs AMD). I've been experimenting with chipStar — a HIP→SPIR-V compatibility layer that runs HIP code on Intel GPUs via Level Zero/OpenCL — and it looks like Strata's existing HIP backend may be portable to Intel almost for free.
What I did
Compiled Strata's kernels with chipStar's
hipcc(LLVM 22,--offload=spirv64, Level Zero backend) on an Arc Pro B70 (BMG-G21, 0xe223), and ran them:rope.cu,s_gemv.cu,bf16_gemv.cu, and the 2,211-linenative_mmvq.cuinclude/strata/hip_compat/intrinsics.hpp—byte_perm(): guard__builtin_amdgcn_permto gfx targets, add the portable byte-table fallback for everything else__nanosleep:__builtin_amdgcn_s_sleep(1)only on gfx targets, no-op otherwiseinclude/strata/kernels/dp4a.hpp— same__nanosleepguard via__HIP_PLATFORM_SPIRV____dp4agoes throughhip_compat's existing SWAR fallback (chipStar has no native dp4a)s_gemv_splitoutput: max relative error 7e-08 (fp32 rounding only)s_gemv_splittpr=32 on IQ4_NL 4096×2048 = 152 GB/s (untuned first run)What worked out of the box
cl_intel_required_subgroup_size)__shfl_*(Strata's hip_compat already maps_syncvariants to non-sync, which chipStar supports)__byte_perm, intatomicAdd, dynamic shared memory ≤ 64 KiB (Strata's HIP path already targets that limit, same as Arc)Known gaps
device.cu's arch check only accepts gfx architectures — needs an Intel branch if this becomes supportedQuestions for the maintainers
src/core/device.cu, memory budgeting) you know would bite on non-AMD HIP runtimes?Happy to share the spike tree and benchmarks. Not requesting official support — mostly asking whether the shim-cleanliness change is upstream-acceptable so the HIP backend stops assuming gfx targets.
@Niko1221 commented on GitHub (Oct 7, 2026):
Thanks for trying chipStar. The SYCL port is the supported way to run Strata on Intel GPUs (docs/INTEL_ARC.md; it covers the B60). A small PR with your shim change is welcome, but we cannot test chipStar builds, so it would stay an unsupported note. Keeping this open.
@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
vcvars) #387