-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cstdint include to rasterizer_impl.h #31
Open
stephane-caron
wants to merge
1
commit into
hbb1:main
Choose a base branch
from
stephane-caron:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
This fixes the error `namespace "std" has no member "uintptr_t"` when trying to build the wheel (as happens with `pip install`) on my machine. Here is a full error log for reference: Building wheel for diff_surfel_rasterization (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [95 lines of output] running bdist_wheel /home/stephane-caron/.micromamba/envs/vision/lib/python3.12/site-packages/torch/utils/cpp_extension.py:529: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) running build running build_py creating build/lib.linux-x86_64-cpython-312/diff_surfel_rasterization copying diff_surfel_rasterization/__init__.py -> build/lib.linux-x86_64-cpython-312/diff_surfel_rasterization running build_ext nvcc warning : incompatible redefinition for option 'compiler-bindir', the last value of this option was used /home/stephane-caron/.micromamba/envs/vision/lib/python3.12/site-packages/torch/utils/cpp_extension.py:448: UserWarning: The detected CUDA version (12.8) has a minor version mismatch with the version that was used to compile PyTorch (12.6). Most likely this shouldn't be a problem. warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda)) /home/stephane-caron/.micromamba/envs/vision/lib/python3.12/site-packages/torch/utils/cpp_extension.py:458: UserWarning: There are no /home/stephane-caron/.micromamba/envs/vision/bin/x86_64-conda-linux-gnu-c++ version bounds defined for CUDA version 12.8 warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}') building 'diff_surfel_rasterization._C' extension creating build/temp.linux-x86_64-cpython-312/cuda_rasterizer /home/stephane-caron/.micromamba/envs/vision/lib/python3.12/site-packages/torch/utils/cpp_extension.py:2073: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation. If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST']. warnings.warn( /home/stephane-caron/.micromamba/envs/vision/bin/nvcc -I/home/stephane-caron/.micromamba/envs/vision/include -I/home/stephane-caron/.micromamba/envs/vision/include/torch/csrc/api/include -I/home/stephane-caron/.micromamba/envs/vision/lib/python3.12/site-packages/torch/include -I/home/stephane-caron/.micromamba/envs/vision/include -I/home/stephane-caron/.micromamba/envs/vision/include/python3.12 -c cuda_rasterizer/backward.cu -o build/temp.linux-x86_64-cpython-312/cuda_rasterizer/backward.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -I/home/stephane-caron/src/rubah/vision/third_party/2d-gaussian-splatting/submodules/diff-surfel-rasterization/third_party/glm/ -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1018\" -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=1 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -ccbin /home/stephane-caron/.micromamba/envs/vision/bin/x86_64-conda-linux-gnu-cc -std=c++17 nvcc warning : incompatible redefinition for option 'compiler-bindir', the last value of this option was used nvcc warning : incompatible redefinition for option 'compiler-bindir', the last value of this option was used cuda_rasterizer/auxiliary.h(197): warning #177-D: variable "p_proj" was declared but never referenced float3 p_proj = { p_hom.x * p_w, p_hom.y * p_w, p_hom.z * p_w }; ^ Remark: The warnings can be suppressed with "-diag-suppress <warning-number>" cuda_rasterizer/backward.cu(321): warning #177-D: variable "w" was declared but never referenced const float w = alpha * T; ^ cuda_rasterizer/backward.cu(212): warning #177-D: variable "dL_dmax_dweight" was declared but never referenced float dL_dmax_dweight; ^ cuda_rasterizer/backward.cu(248): warning #177-D: variable "ddelx_dx" was declared but never referenced const float ddelx_dx = 0.5 * W; ^ cuda_rasterizer/backward.cu(249): warning #177-D: variable "ddely_dy" was declared but never referenced const float ddely_dy = 0.5 * H; ^ /home/stephane-caron/.micromamba/envs/vision/bin/nvcc -I/home/stephane-caron/.micromamba/envs/vision/include -I/home/stephane-caron/.micromamba/envs/vision/include/torch/csrc/api/include -I/home/stephane-caron/.micromamba/envs/vision/lib/python3.12/site-packages/torch/include -I/home/stephane-caron/.micromamba/envs/vision/include -I/home/stephane-caron/.micromamba/envs/vision/include/python3.12 -c cuda_rasterizer/forward.cu -o build/temp.linux-x86_64-cpython-312/cuda_rasterizer/forward.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -I/home/stephane-caron/src/rubah/vision/third_party/2d-gaussian-splatting/submodules/diff-surfel-rasterization/third_party/glm/ -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1018\" -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=1 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -ccbin /home/stephane-caron/.micromamba/envs/vision/bin/x86_64-conda-linux-gnu-cc -std=c++17 nvcc warning : incompatible redefinition for option 'compiler-bindir', the last value of this option was used nvcc warning : incompatible redefinition for option 'compiler-bindir', the last value of this option was used cuda_rasterizer/auxiliary.h(197): warning #177-D: variable "p_proj" was declared but never referenced float3 p_proj = { p_hom.x * p_w, p_hom.y * p_w, p_hom.z * p_w }; ^ Remark: The warnings can be suppressed with "-diag-suppress <warning-number>" /home/stephane-caron/.micromamba/envs/vision/bin/nvcc -I/home/stephane-caron/.micromamba/envs/vision/include -I/home/stephane-caron/.micromamba/envs/vision/include/torch/csrc/api/include -I/home/stephane-caron/.micromamba/envs/vision/lib/python3.12/site-packages/torch/include -I/home/stephane-caron/.micromamba/envs/vision/include -I/home/stephane-caron/.micromamba/envs/vision/include/python3.12 -c cuda_rasterizer/rasterizer_impl.cu -o build/temp.linux-x86_64-cpython-312/cuda_rasterizer/rasterizer_impl.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -I/home/stephane-caron/src/rubah/vision/third_party/2d-gaussian-splatting/submodules/diff-surfel-rasterization/third_party/glm/ -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1018\" -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=1 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -ccbin /home/stephane-caron/.micromamba/envs/vision/bin/x86_64-conda-linux-gnu-cc -std=c++17 nvcc warning : incompatible redefinition for option 'compiler-bindir', the last value of this option was used nvcc warning : incompatible redefinition for option 'compiler-bindir', the last value of this option was used cuda_rasterizer/rasterizer_impl.h(24): error: namespace "std" has no member "uintptr_t" std::size_t offset = (reinterpret_cast<std::uintptr_t>(chunk) + alignment - 1) & ~(alignment - 1); ^ cuda_rasterizer/rasterizer_impl.h(40): error: identifier "uint32_t" is undefined uint32_t* point_offsets; ^ cuda_rasterizer/rasterizer_impl.h(41): error: identifier "uint32_t" is undefined uint32_t* tiles_touched; ^ cuda_rasterizer/rasterizer_impl.h(49): error: identifier "uint32_t" is undefined uint32_t* n_contrib; ^ cuda_rasterizer/rasterizer_impl.h(58): error: identifier "uint64_t" is undefined uint64_t* point_list_keys_unsorted; ^ cuda_rasterizer/rasterizer_impl.h(59): error: identifier "uint64_t" is undefined uint64_t* point_list_keys; ^ cuda_rasterizer/rasterizer_impl.h(60): error: identifier "uint32_t" is undefined uint32_t* point_list_unsorted; ^ cuda_rasterizer/rasterizer_impl.h(61): error: identifier "uint32_t" is undefined uint32_t* point_list; ^ cuda_rasterizer/rasterizer_impl.cu(184): warning #549-D: variable "binning" is used before its value is set obtain(chunk, binning.point_list, P, 128); ^ Remark: The warnings can be suppressed with "-diag-suppress <warning-number>" 8 errors detected in the compilation of "cuda_rasterizer/rasterizer_impl.cu". error: command '/home/stephane-caron/.micromamba/envs/vision/bin/nvcc' failed with exit code 2 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for diff_surfel_rasterization
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.
Adding this include fixes the error
that may occur when trying to build the wheel (it happens when running
pip install
on my machine).Detailed error log
Here is a full log of the corresponding error for reference: