Conversation
luhenry
added a commit
that referenced
this pull request
Sep 20, 2026
Contributor
|
luhenry
force-pushed
the
warp-lang
branch
2 times, most recently
from
September 20, 2026 21:05
b38fb84 to
5782841
Compare
Builds the CPU-only configuration of NVIDIA Warp for riscv64: the core runtime
plus the bundled Clang/LLVM that JIT-compiles kernels to native code at run
time. Upstream publishes no riscv64 wheel, and no prebuilt riscv64 Clang/LLVM
SDK either, so the workflow compiles LLVM from source in the manylinux
container the way upstream's own build-llvm-sdk.yml does for x86_64/aarch64.
CUDA is off (upstream's --no-cuda, the configuration it ships macOS with):
neither the CUDA toolkit nor libmathdx exists for riscv64, and the NVIDIA
driver does not either, so a GPU build would have no device to run on.
Four patches. 0001 and 0002 make the build work at all - the platform tables,
and the rv64gc/lp64d ABI the Clang frontend does not default to at the cc1
level. 0003 and 0004 come from the first full run of upstream's test suite on
the wheel, which accounted for every one of its 1552 errors:
- 649 were one bug. RV64GC has no half-precision hardware, so Clang lowers
builtin.h's _Float16 conversions to __extendhfsf2/__truncsfhf2, and
wp_load_obj() resolves a JIT-compiled module's externals from a curated CRT
table holding no compiler builtins - so every module with an fp16 kernel
failed to materialize and took its non-fp16 kernels with it. x86_64 avoids
this with +f16c and aarch64 with armv8-a's fcvt; RISC-V has no baseline
equivalent (Zfh is optional and not in rv64gc), so 0003 converts in
software, bit-for-bit what _Float16 yields elsewhere.
- 903 were the test runner's hard-coded 3600s wall-clock limit. Warp compiles
every kernel with Clang on the machine running the tests, and four riscv64
cores got through 137 of 180 suites inside the hour; the other 43 were
marked crashed. 0004 reads the limit from WARP_TEST_SUITE_TIMEOUT.
setup.py packages examples/assets and tests/assets, both git-lfs, so the wheel
shipped pointer stubs and example_nvdb died on "NanoVDB signature not found".
The blobs are fetched over the media CDN rather than by checking out with
lfs: true, which would need a git-lfs client on the runner (gotcha 296).
luhenry
added a commit
that referenced
this pull request
Sep 21, 2026
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.
warp-lang1.16.0Compiles Warp's native runtime (
warp.so) and the Clang/LLVM library that JIT-compiles kernels to native code at run time (warp-clang.so), plus the Clang/LLVM 21.1.0 it links. Upstream publishes no riscv64 wheel.Mirrors upstream's
build-llvm-sdk.ymland thecreate wheelsjob of.gitlab-ci.yml.Differs from upstream
--no-cuda- no CUDA toolkit, libmathdx or driver for riscv64; upstream's own macOS configuration.--build-llvminstead of a prebuilt SDK bundle - upstream publishes none for riscv64.dnf install libstdc++-static- warp links-static-libstdc++, and the riscv64 image ships nolibstdc++.a.examples/assetsandtests/assetsare fetched frommedia.githubusercontent.com-setup.pypackages both, both are git-lfs, and nothing guarantees a git-lfs client on the self-hosted runner.Matrix: single build - the wheel is
py3-none-<platform>, so one build serves every interpreter (imports smoke-tested on cp312/cp313/cp314/cp314t).Testing
python -m warp.tests), run against the installed wheel rather than the build tree.License: Wheel bundles Clang/LLVM (Apache-2.0 WITH LLVM-exception, licence text already shipped by upstream) and statically links the image's libstdc++/libgcc (GPL-3.0 with runtime exception), whose sources the
gpl_sourcesjob collects.Patches
0001-Add-riscv64-to-the-build-and-packaging-platform-tabl.patch-To upstream.machine_architecture()raises on riscv64, so the build aborts;setup.py's platform table andLLVM_TARGETS_TO_BUILDneed the arch too. riscv64-only.0002-clang-name-the-rv64gc-lp64d-target-ABI-for-JIT-compi.patch-To upstream. cc1 defaults RV64 to rv64i and soft-float lp64, so JIT-compiled kernels would pass floats in the wrong registers when calling intocrt.cpp. riscv64-only.0003-Convert-fp16-in-software-on-RISC-V-targets-without-Z.patch-To upstream. rv64gc has no half-precision hardware, so Clang lowersbuiltin.h's_Float16conversions to the compiler-rt libcalls__extendhfsf2/__truncsfhf2, andwp_load_obj()resolves a JIT module's externals from a curated CRT table that holds no compiler builtins - so every module with an fp16 kernel failed to materialize and took its non-fp16 kernels with it. x86_64 avoids this with+f16c, aarch64 with armv8-a'sfcvt; RISC-V has no baseline equivalent (Zfh is optional and not in rv64gc). The software routines are bit-for-bit what_Float16yields elsewhere, verified exhaustively over all 2^32 floats and all 2^16 halves. riscv64-only.0004-tests-let-the-environment-raise-the-parallel-run-s-w.patch-To upstream.unittest_parallelcaps the whole parallel run at a hard-coded 3600s; Warp compiles every kernel with Clang on the machine running the tests, so four riscv64 cores got through 137 of 180 suites in the hour and the rest were marked crashed. Reads the cap fromWARP_TEST_SUITE_TIMEOUT, default unchanged.