build: support CUDA 12.8 / torch 2.8 / GCC 11+ host compiler - #639
Open
WhaleK1123 wants to merge 1 commit into
Open
build: support CUDA 12.8 / torch 2.8 / GCC 11+ host compiler#639WhaleK1123 wants to merge 1 commit into
WhaleK1123 wants to merge 1 commit into
Conversation
MinkowskiEngine 0.5.4 (master) fails to compile on a modern toolchain (CUDA 12.8 thrust/CCCL, torch 2.8, GCC 11/13). The sparse-conv CUDA backend needs these compatibility fixes: - Add explicit <thrust/sort.h>, <thrust/unique.h>, <thrust/sequence.h>, <thrust/reduce.h>, <thrust/remove.h>, <thrust/count.h>, <thrust/copy.h>, <thrust/fill.h>, <thrust/device_vector.h>, <thrust/iterator/zip_iterator.h>, <thrust/tuple.h>, <thrust/execution_policy.h> includes. New thrust requires explicit includes; ME relied on transitive ones. - Disable ME's bundled nvtx3 (nvtx3.hpp / ranges.hpp) which collides with torch's nvtx3. Add a no-op CUDF_FUNC_RANGE() so the cudf path still compiles. - Make default_allocator / c10_allocator fully conformant (pointer, const_pointer, size_type, difference_type, rebind, ==/!=). - Make concurrent_unordered_map::create() return std::shared_ptr<Self> instead of unique_ptr. The unique_ptr->shared_ptr conversion triggers a GCC libstdc++ std::__to_address overload ambiguity on both GCC 11 and 13. Build with: export CUDA_HOME=/usr/local/cuda-12.8 export TORCH_CUDA_ARCH_LIST="12.0" export SETUPTOOLS_USE_DISTUTILS=stdlib export CC=gcc-13 CXX=g++-13 python setup.py build_ext --inplace
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.
What
Makes the CUDA sparse-conv backend build with a modern toolchain
(CUDA 12.8 thrust/CCCL, torch 2.8, GCC 11 or 13). Without this, the
backend fails to compile on Blackwell GPUs (e.g. RTX 5070 Ti / sm_120).
Fixes
<thrust/*>algorithm includes (new thrust requiresexplicit includes; ME relied on transitive ones).
nvtx3(nvtx3.hpp/ranges.hpp), which collideswith torch's
nvtx3; add a no-opCUDF_FUNC_RANGE().default_allocator/c10_allocatorconformant.concurrent_unordered_map::create()returnsstd::shared_ptr<Self>instead of
unique_ptr— the unique_ptr→shared_ptr conversion triggers alibstdc++
std::__to_addressoverload ambiguity on GCC 11 and 13.Verification
CUDA 12.8 / torch 2.8.0+cu128 / RTX 5070 Ti (sm_120):
ME.is_cuda_available() == True,cuda_version() == 12080,SparseTensor -> MinkowskiConvolutionruns oncuda:0.Closes #638.