Skip to content

refactor(sysrap): use vendored OptiX Toolkit vector math#399

Merged
plexoos merged 4 commits into
mainfrom
third-party-scuda
Jul 6, 2026
Merged

refactor(sysrap): use vendored OptiX Toolkit vector math#399
plexoos merged 4 commits into
mainfrom
third-party-scuda

Conversation

@plexoos

@plexoos plexoos commented Jul 2, 2026

Copy link
Copy Markdown
Member
  • Vendor NVIDIA OptiX Toolkit v1.3.0 ShaderUtil headers under third_party/optix-toolkit
  • Replace the duplicated vector math body in sysrap/scuda.h with a small compatibility facade over upstream vec_math.h
  • Preserve Simphony-local helpers and legacy compatibility APIs that are not provided by upstream
  • Add the OptiX Toolkit include root to SysRap and the CSGOptiX PTX target
  • Install the vendored headers, README, and BSD-3 license alongside SysRap headers

The vendored files are pinned to NVIDIA/optix-toolkit v1.3.0
(3b9d3c6d08c884372ffc85270c987d1f5273a985) and keep the upstream BSD-3-Clause license text.

  • Byte-compared vec_math.h, Preprocessor.h, and LICENSE.txt against the v1.3.0 tag

Copilot AI review requested due to automatic review settings July 2, 2026 12:43
@plexoos plexoos self-assigned this Jul 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors SysRap’s CUDA vector-math support to rely on a vendored, pinned NVIDIA OptiX Toolkit (v1.3.0) vec_math.h, reducing locally maintained duplication while preserving Simphony-specific helper APIs via a small compatibility facade.

Changes:

  • Vendor OptiX Toolkit ShaderUtil headers + license text under third_party/optix-toolkit (pinned to v1.3.0).
  • Replace the large duplicated vector-math implementation in sysrap/scuda.h with a thin facade over OptiXToolkit/ShaderUtil/vec_math.h, keeping Simphony-local helpers.
  • Extend include paths and installation rules so both SysRap and the CSGOptiX PTX target can include the vendored headers.

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
third_party/optix-toolkit/README.md Documents vendoring scope, upstream pin, and licensing expectations.
third_party/optix-toolkit/OptiXToolkit/ShaderUtil/Preprocessor.h Adds vendored upstream preprocessor helper header used by vec_math.h.
third_party/optix-toolkit/LICENSE.txt Vendors upstream BSD-3-Clause license text for redistribution compliance.
sysrap/scuda.h Replaces duplicated vector math with an OptiX Toolkit facade while keeping Simphony-local helpers.
sysrap/CMakeLists.txt Adds include roots and install rules for the vendored OptiX Toolkit headers/license/readme.
CSGOptiX/CMakeLists.txt Adds OptiX Toolkit include root for the PTX compilation target.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sysrap/scuda.h Outdated
- Vendor NVIDIA OptiX Toolkit `v1.3.0` ShaderUtil headers under `third_party/optix-toolkit`
- Replace the duplicated vector math body in `sysrap/scuda.h` with a small compatibility facade over upstream `vec_math.h`
- Preserve Simphony-local helpers and legacy compatibility APIs that are not provided by upstream
- Add the OptiX Toolkit include root to SysRap and the CSGOptiX PTX target
- Install the vendored headers, README, and BSD-3 license alongside SysRap headers

The vendored files are pinned to NVIDIA/optix-toolkit `v1.3.0`
(`3b9d3c6d08c884372ffc85270c987d1f5273a985`) and keep the upstream
BSD-3-Clause license text.

- Byte-compared `vec_math.h`, `Preprocessor.h`, and `LICENSE.txt` against the `v1.3.0` tag
@plexoos plexoos force-pushed the third-party-scuda branch from 80b4fd4 to 0537015 Compare July 2, 2026 15:30
plexoos added 3 commits July 6, 2026 15:53
Backport NVIDIA optix-toolkit commit 7acd88bc272a23067a36dc396ca835db145882fd
to guard CUDA 13-only _16a vector helpers behind CUDART_VERSION >= 13000.

Restore the legacy scuda narrowing overloads needed by Simphony on CUDA 12,
since the upstream guard also hides adjacent make_float2/make_float3 helpers.

Document the exact upstream patch commit in the vendored optix-toolkit README.
Keep the legacy scuda.h behavior by importing otk into global scope by
default, but allow newer call sites to define SCUDA_NO_GLOBAL_OTK_USING before
including the header to avoid namespace pollution.

Qualify scuda.h internal OptiX Toolkit calls so the header compiles in opt-out
mode, and keep the narrow legacy make_float2/make_float3 shims available
without importing the full otk namespace.
@plexoos plexoos merged commit b847ce3 into main Jul 6, 2026
23 checks passed
@plexoos plexoos deleted the third-party-scuda branch July 6, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants