Skip to content
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

[BUILD] install fvdb meets "error: dispatchFillToGrid is not a template dispatchFillToGrid<torch::kCPU>(const GridBatchImpl &fromGrid, const GridBatchImpl &toGrid," #1920

Open
Luh1124 opened this issue Sep 27, 2024 · 7 comments

Comments

@Luh1124
Copy link

Luh1124 commented Sep 27, 2024

Environment

Operating System: ubuntu 20,04
Version / Commit SHA:
CMake Version: 3.30.3
Compiler: 11.4.0
torch 2.4.0
python 3.10.14
cuda 12.1

Describe the problem

INFO:root:running develop
/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/command/develop.py:41: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

    ********************************************************************************
    Please avoid running ``setup.py`` and ``easy_install``.
    Instead, use pypa/build, pypa/installer or other
    standards-based tools.

    See https://github.com/pypa/setuptools/issues/917 for details.
    ********************************************************************************

!!
easy_install.initialize_options(self)
/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

    ********************************************************************************
    Please avoid running ``setup.py`` directly.
    Instead, use pypa/build, pypa/installer or other
    standards-based tools.

    See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
    ********************************************************************************

!!
self.initialize_options()
INFO:root:running egg_info
INFO:root:writing fvdb.egg-info/PKG-INFO
INFO:root:writing dependency_links to fvdb.egg-info/dependency_links.txt
INFO:root:writing top-level names to fvdb.egg-info/top_level.txt
INFO:root:reading manifest file 'fvdb.egg-info/SOURCES.txt'
INFO:root:writing manifest file 'fvdb.egg-info/SOURCES.txt'
INFO:root:running build_ext
INFO:root:Failed to apply cutlass patch: Cmd('git') failed due to: exit code(1)
cmdline: git apply /home/xx/xx/openvdb/fvdb/env/cutlass.patch
stderr: 'error: patch failed: include/cutlass/half.h:374
error: include/cutlass/half.h: patch does not apply', continuing without patching
CMake Deprecation Warning at CMakeLists.txt:75 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

Configuring for Blosc version: 1.21.4
-- Using LZ4 internal sources.
-- Using zlib internal sources.
-- Using ZSTD internal sources.
-- Building for system processor x86_64
-- Adding run-time support for SSE2
-- Adding run-time support for AVX2
-- Adding support for assembly sources in ZSTD
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/xx/xx/openvdb/fvdb/external/c-blosc/build
[100%] Built target blosc_static
Install the project...
-- Install configuration: "Release"
-- Up-to-date: /home/xx/xx/openvdb/fvdb/external/c-blosc/install/lib/pkgconfig/blosc.pc
-- Up-to-date: /home/xx/xx/openvdb/fvdb/external/c-blosc/install/include/blosc.h
-- Up-to-date: /home/xx/xx/openvdb/fvdb/external/c-blosc/install/include/blosc-export.h
-- Up-to-date: /home/xx/xx/openvdb/fvdb/external/c-blosc/install/lib/libblosc.a
/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/torch/utils/cpp_extension.py:424: UserWarning: There are no x86_64-conda-linux-gnu-g++ version bounds defined for CUDA version 12.1
warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
INFO:root:building 'fvdb.fvdblib' extension
/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/torch/utils/cpp_extension.py:1965: 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(
Emitting ninja build file /home/xx/xx/openvdb/fvdb/build/temp.linux-x86_64-cpython-310/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/1] /usr/local/cuda-12.1/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/xx/xx/openvdb/fvdb/build/temp.linux-x86_64-cpython-310/src/detail/ops/FillToGrid.o.d -I/home/xx/xx/openvdb/fvdb/src -I/home/xx/xx/openvdb/fvdb/../nanovdb -I/home/xx/xx/openvdb/fvdb/external/cutlass/include -I/home/xx/xx/openvdb/fvdb/external/c-blosc/install/include -I/home/xx/xx/openvdb/fvdb/external/cudnn_fe/include -I/home/xx/xx/openvdb/fvdb/external/cudnn/cudnn-linux-x86_64-9.1.0.70_cuda12-archive/include -I/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/torch/include -I/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/torch/include/TH -I/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-12.1/include -I/home/xx/miniconda3/envs/fvdb/include/python3.10 -c -c /home/xx/xx/openvdb/fvdb/src/detail/ops/FillToGrid.cu -o /home/xx/xx/openvdb/fvdb/build/temp.linux-x86_64-cpython-310/src/detail/ops/FillToGrid.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'"'"'' -std=c++20 --extended-lambda --diag-suppress=186 -diag-suppress=3189 -Xfatbin -compress-all -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=fvdblib -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_80,code=sm_80 -ccbin /home/xx/miniconda3/envs/fvdb/bin/x86_64-conda-linux-gnu-cc
FAILED: /home/xx/xx/openvdb/fvdb/build/temp.linux-x86_64-cpython-310/src/detail/ops/FillToGrid.o
/usr/local/cuda-12.1/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/xx/xx/openvdb/fvdb/build/temp.linux-x86_64-cpython-310/src/detail/ops/FillToGrid.o.d -I/home/xx/xx/openvdb/fvdb/src -I/home/xx/xx/openvdb/fvdb/../nanovdb -I/home/xx/xx/openvdb/fvdb/external/cutlass/include -I/home/xx/xx/openvdb/fvdb/external/c-blosc/install/include -I/home/xx/xx/openvdb/fvdb/external/cudnn_fe/include -I/home/xx/xx/openvdb/fvdb/external/cudnn/cudnn-linux-x86_64-9.1.0.70_cuda12-archive/include -I/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/torch/include -I/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/torch/include/TH -I/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-12.1/include -I/home/xx/miniconda3/envs/fvdb/include/python3.10 -c -c /home/xx/xx/openvdb/fvdb/src/detail/ops/FillToGrid.cu -o /home/xx/xx/openvdb/fvdb/build/temp.linux-x86_64-cpython-310/src/detail/ops/FillToGrid.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'"'"'' -std=c++20 --extended-lambda --diag-suppress=186 -diag-suppress=3189 -Xfatbin -compress-all -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=fvdblib -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_80,code=sm_80 -ccbin /home/xx/miniconda3/envs/fvdb/bin/x86_64-conda-linux-gnu-cc
/home/xx/xx/openvdb/fvdb/src/detail/ops/FillToGrid.cu(82): error: dispatchFillToGrid is not a template
dispatchFillToGridtorch::kCUDA(const GridBatchImpl &fromGrid, const GridBatchImpl &toGrid,
^

/home/xx/xx/openvdb/fvdb/src/detail/ops/FillToGrid.cu(103): error: dispatchFillToGrid is not a template
dispatchFillToGridtorch::kCPU(const GridBatchImpl &fromGrid, const GridBatchImpl &toGrid,
^

2 errors detected in the compilation of "/home/xx/xx/openvdb/fvdb/src/detail/ops/FillToGrid.cu".
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 2105, in _run_ninja_build
subprocess.run(
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/xx/xx/openvdb/fvdb/setup.py", line 341, in
setup(
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/init.py", line 117, in setup
return distutils.core.setup(**attrs)
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 183, in setup
return run_commands(dist)
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
dist.run_commands()
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
self.run_command(cmd)
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/command/develop.py", line 35, in run
self.install_for_development()
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/command/develop.py", line 112, in install_for_development
self.run_command('build_ext')
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/home/xx/xx/openvdb/fvdb/setup.py", line 165, in run
super().run()
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 98, in run
_build_ext.run(self)
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
self.build_extensions()
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 866, in build_extensions
build_ext.build_extensions(self)
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 476, in build_extensions
self._build_extensions_serial()
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 502, in _build_extensions_serial
self.build_extension(ext)
File "/home/xx/xx/openvdb/fvdb/setup.py", line 106, in build_extension
super().build_extension(_ext)
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 263, in build_extension
_build_ext.build_extension(self, ext)
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 557, in build_extension
objects = self.compiler.compile(
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 679, in unix_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1785, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "/home/xx/miniconda3/envs/fvdb/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 2121, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

To Reproduce

Steps to reproduce the behavior:

  1. Checkout repo 'features/fvdb'
  2. python setup.py develop
  3. See error

Additional context

I followed the instructions in https://github.com/AcademySoftwareFoundation/openvdb/blob/feature/fvdb/fvdb/README.md for environment configuration and compilation, but encountered the aforementioned error.

@Luh1124
Copy link
Author

Luh1124 commented Sep 27, 2024

/home/xx/miniconda3/envs/fvdb/bin/x86_64-conda-linux-gnu-cc
/home/xx/xx/openvdb/fvdb/src/detail/ops/FillToGrid.cu(82): error: dispatchFillToGrid is not a template
dispatchFillToGridtorch::kCUDA(const GridBatchImpl &fromGrid, const GridBatchImpl &toGrid,
^

/home/xx/xx/openvdb/fvdb/src/detail/ops/FillToGrid.cu(103): error: dispatchFillToGrid is not a template
dispatchFillToGridtorch::kCPU(const GridBatchImpl &fromGrid, const GridBatchImpl &toGrid,
^

2 errors detected in the compilation of "/home/xx/xx/openvdb/fvdb/src/detail/ops/FillToGrid.cu".
ninja: build stopped: subcommand failed.

@hseute
Copy link

hseute commented Oct 3, 2024

I encountered the same error while running the command:

# Build the docker image in production mode
docker build -t fvdb/prod .

@samuelgneff
Copy link

Also encountering the same error when running python setup.py develop

@pierre-ailivesim
Copy link

Same error here anyone able to fix it ?

@DanielHabib
Copy link

Same issue. Some help would be greatly appreciated

@DanielHabib
Copy link

DanielHabib commented Oct 26, 2024

I was able to get passed this error, see my PR:
#1946

I'm still running into other issues after that though.
(See gist )
Any chance there is a timeline on when fvdb will be released via conda?
If there is an early access program I would love to be a part of it!

@OasisArtisan
Copy link

I'm having the same error using docker build -t fvdb/prod .

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

No branches or pull requests

6 participants