Add HIP/ROCm build paths and conditional GPU kernels for CUDA extensions - #3
Draft
Looong01 wants to merge 3 commits into
Draft
Add HIP/ROCm build paths and conditional GPU kernels for CUDA extensions#3Looong01 wants to merge 3 commits into
Looong01 wants to merge 3 commits into
Conversation
added 2 commits
February 12, 2026 03:22
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.
Motivation
nvcc/cudaandhipcc/ROCmtoolchains.Description
setup.pyusingSPLATT3R_GPU_BACKENDwithauto|cuda|rocm|cpuoptions and emit backend-appropriateextra_compile_argsandCUDAExtensionconfiguration.splatt3r_slam/backend/src/gn_kernels.cuandsplatt3r_slam/backend/src/matching_kernels.cuto conditionally includehip/hip_runtime.h(andhip/hip_fp16.hwhere needed) under ROCm and to replacecuda::stdusage with portablestd::numeric_limits.curopecopies (splatt3r_core/src/.../curopeandthirdparty/mast3r/.../curope) to add aCUROPE_GPU_BACKENDauto|cuda|rocmselector in theirsetup.pyand to makekernels.cuuse backend-agnostic aliases (gpuGetLastError,gpuGetErrorString,gpuError_t,gpuSuccess) guarded byUSE_ROCM/__HIP_PLATFORM_AMD__.README.mdand added examples for forcing builds (SPLATT3R_GPU_BACKENDandCUROPE_GPU_BACKEND).Testing
python -m py_compile setup.py splatt3r_core/src/mast3r_src/dust3r/croco/models/curope/setup.py thirdparty/mast3r/dust3r/croco/models/curope/setup.pywhich completed successfully.CUROPE_GPU_BACKEND=invalid python .../curope/setup.py --namewhich produced the expectedRuntimeErrorfor an invalid backend.rg(checks forhip_runtime,hip_fp16,CUROPE_GPU_BACKEND,PYTORCH_ROCM_ARCH, andnumeric_limits<scalar_t>::lowest) which matched the updated files.Codex Task