Skip to content

Various fixed and cleanups for HIP and CPU use of cuBQL - #34

Merged
iwald-nvidia merged 12 commits into
NVIDIA:mainfrom
ingowald:main
Jun 14, 2026
Merged

iwald-nvidia merged 12 commits into
NVIDIA:mainfrom
ingowald:main

Conversation

@ingowald

Copy link
Copy Markdown
Contributor

This diff contains a lot of smaller fixes and cleanups that came as a result of using cuBQL once in a HIP environment, and once with CPU-side builders.

@iwald-nvidia
iwald-nvidia merged commit e82f1dc into NVIDIA:main Jun 14, 2026
6 checks passed
jeffdaily added a commit to AMD-Ecosystem/warp that referenced this pull request Nov 18, 2026
Bring the changes of NVIDIA/cuBQL#34 "Various fixed and cleanups for HIP and CPU use of cuBQL" (merge e82f1dc826, by Ingo Wald) into the vendored cuBQL snapshot (NVIDIA/cuBQL@5a651b3), restricted to files under warp/native/cuBQL. The CMake and CI files of the pull request do not apply to Warp, which compiles cuBQL inside bvh.cpp and bvh.cu.

Applied as in the pull request: builder/cpu/spatialMedian.h, builder/cuda/builder_common.h, builder/cuda/sm_builder.h, math/affine.h, math/box.h, math/common.h, math/vec.h, the first hunk of builder/cuda.h and the first hunk of math/math.h.

Adapted: the second hunk of math/math.h stops defining the host __int_as_float/__float_as_int fallbacks under HIP, where the HIP headers provide them; the snapshot spells that gate `!defined(__CUDACC__)`, which now also excludes `__HIPCC__`. The same hunk's change of CUBQL_INF does not apply: the snapshot's non-CUDA branch already uses std::numeric_limits.

Not applied, because the snapshot's code differs and the hunks only reformat or comment out debug output: the second hunk of builder/cuda.h, the hunk of queries/triangleData/math/rayTriangleIntersections.h, and the seven hunks of traversal/rayQueries.h.

This change was prepared with the help of an AI coding agent (Claude) and reviewed by the committer.

Test Plan:

```
python build_lib.py --rocm-path "$(rocm-sdk path --root)" --hip-arch gfx950
python build_lib.py --cuda-path /usr/local/cuda --no-use-libmathdx
python -m warp.tests -s autodetect -p 'test_mesh*.py'
python -m warp.tests -s autodetect -p 'test_bvh.py'
```

Signed-off-by: Jeff Daily <jeff.daily@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants