Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

RuntimeError: Error compiling objects for extension #36

Open
buxuangjiehun opened this issue Nov 11, 2024 · 1 comment
Open

RuntimeError: Error compiling objects for extension #36

buxuangjiehun opened this issue Nov 11, 2024 · 1 comment

Comments

@buxuangjiehun
Copy link

I can't download the kaolin(version==0.12.0),So I use these command to download kaolin as follow
#########
git clone --recursive https://github.com/NVIDIAGameWorks/kaolin
cd kaolin
git checkout v0.12.0
python setup.py develop
#########
I cannot compile the kaolin when i run“ python setup.py develop ” ,it will give me an error
################
return distutils.core.setup(**attrs)
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\setuptools_distutils\core.py", line 183, in setup
return run_commands(dist)
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\setuptools_distutils\core.py", line 199, in run_commands
dist.run_commands()
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\setuptools_distutils\dist.py", line 954, in run_commands
self.run_command(cmd)
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\setuptools\dist.py", line 950, in run_command
super().run_command(command)
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\setuptools_distutils\dist.py", line 973, in run_command
cmd_obj.run()
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\setuptools\command\develop.py", line 35, in run
self.install_for_development()
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\setuptools\command\develop.py", line 112, in install_for_development
self.run_command('build_ext')
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\setuptools_distutils\cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\setuptools\dist.py", line 950, in run_command
super().run_command(command)
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\setuptools_distutils\dist.py", line 973, in run_command
cmd_obj.run()
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\setuptools\command\build_ext.py", line 98, in run
_build_ext.run(self)
File "d:\gans\text2mesh-main\text2mesh-main\kaolin.eggs\cython-0.29.20-py3.9.egg\Cython\Distutils\old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\setuptools_distutils\command\build_ext.py", line 359, in run
self.build_extensions()
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\torch\utils\cpp_extension.py", line 708, in build_extensions
build_ext.build_extensions(self)
File "d:\gans\text2mesh-main\text2mesh-main\kaolin.eggs\cython-0.29.20-py3.9.egg\Cython\Distutils\old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\setuptools_distutils\command\build_ext.py", line 476, in build_extensions
self._build_extensions_serial()
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\setuptools_distutils\command\build_ext.py", line 502, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\setuptools\command\build_ext.py", line 263, in build_extension
_build_ext.build_extension(self, ext)
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\setuptools_distutils\command\build_ext.py", line 557, in build_extension
objects = self.compiler.compile(
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\torch\utils\cpp_extension.py", line 681, in win_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\torch\utils\cpp_extension.py", line 1354, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "C:\Users\ghost\anaconda3\envs\text2mesh\lib\site-packages\torch\utils\cpp_extension.py", line 1683, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
################
I tried many pyvirtualenvironment like cuda 12.4,11.6,11.5,11.1 and their compatiable pytorch,I can compile it Only when the torch only support cpu,but it will have error as folllows,I don't know how solve it.
##########

(2): Linear(in_features=256, out_features=256, bias=True)
(3): ReLU()
(4): Linear(in_features=256, out_features=3, bias=True)
)
ModuleList(
(0): Linear(in_features=256, out_features=256, bias=True)
(1): ReLU()
(2): Linear(in_features=256, out_features=256, bias=True)
(3): ReLU()
(4): Linear(in_features=256, out_features=1, bias=True)
)
0%| | 0/1500 [00:00<?, ?it/s]C
rendered_images, elev, azim = render.render_front_views(sampled_mesh, num_views=args.n_views,
File "D:\Gans\text2mesh-main\text2mesh-main\render.py", line 263, in render_front_views
image_features, soft_mask, face_idx = kal.render.mesh.dibr_rasterization(
File "d:\gans\text2mesh-main\text2mesh-main\kaolin\kaolin\render\mesh\dibr.py", line 190, in dibr_rasterization
interpolated_features, face_idx = rasterize(
File "d:\gans\text2mesh-main\text2mesh-main\kaolin\kaolin\render\mesh\rasterization.py", line 492, in rasterize
image_features, face_idx = RasterizeCuda.apply(
File "d:\gans\text2mesh-main\text2mesh-main\kaolin\kaolin\render\mesh\rasterization.py", line 347, in forward
_C.render.mesh.packed_rasterize_forward_cuda(
RuntimeError: Tensor for argument #3 'face_vertices_z' is on CPU, Tensor for argument #4 'face_vertices_image' is on CPU, but expected them to be on GPU (wh
ile checking arguments for packed_rasterize_forward_cuda)

@buxuangjiehun
Copy link
Author

i have solve it by download kaolin in this websites
https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-1.11.0_cu113.html

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant