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
Error occured when testing the PoinTr pretrained model on the PCN benchmark : "Error building extension 'knn' " #21
Comments
Hi, @LeiKeRrr. According to the log above, it seems that you have failed to install the |
Hi ! Thank you for your quick answer and sorry for my late reply... I checked that the two versions match, and they do. I also get an error when running the command bash install.sh when building the gridding extension : `Installed c:\users\peter\appdata\roaming\python\python39\site-packages\cubic_feature_sampling-1.1.0-py3.9-win-amd64.egg The above exception was the direct cause of the following exception: Traceback (most recent call last): Could this error be related to my previous error ? Thank you for your help (: |
@LeiKeRrr , these two errors, in my opinion, are related. I think the error comes from the cuda. However, i am not familiar with Pytorch in Windows. Sorry for no helpful solutions i can provide. ): |
Ok no problem (: I'll work on it and close this issue if I succeed. |
@LeiKeRrr Hi, I tested this repo in several environments (windows, ubuntu and colab). For your case I can for sure underline what @yuxumin said and that is that you have a missmatch between versions of pytorch and windows. For example, I had a similar issue under windows, even though the versions "matched" (I thought they match). The problem with windows is that you may have some newer cuda toolkit version due to some updates and you haven't realized that. |
Hi @blukaz ! Thank you for your help. I searched for another cuda version in my Apps window but unfortunately there are only CUDA 10.2 applications as you can see below : Also, you can see on the following image some packages that are installed in my virtual environment : I just remembered that when installing the required extensions, I could not install version 0.9 of open3D because I use Python 3.9. So I have another version of open3D. Could this be related to my problem? Thank you in advance for your help ! |
Hi ! Thank you so much, it worked ! However now I have a new error but I'll work on it and make a new issue if necessary. Thanks all ! |
Hi !
I am trying to test the PoinTr pretrained model on the PCN benchmark but I get this error :
`C:\Repos\PoinTr-master>bash ./scripts/test.sh 0
--ckpts ./pretrained/PoinTr_PCN.pth
--config ./cfgs/PCN_models/PoinTr.yaml
--exp_name example
Traceback (most recent call last):
File "C:\Users\peter\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 1717, in _run_ninja_build
subprocess.run(
File "C:\Users\peter\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 528, 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 "C:\Repos\PoinTr-master\main.py", line 1, in
from tools import run_net
File "C:\Repos\PoinTr-master\tools_init_.py", line 1, in
from .runner import run_net
File "C:\Repos\PoinTr-master\tools\runner.py", line 5, in
from tools import builder
File "C:\Repos\PoinTr-master\tools\builder.py", line 8, in
from models import build_model_from_cfg
File "C:\Repos\PoinTr-master\models_init_.py", line 3, in
import models.PoinTr
File "C:\Repos\PoinTr-master\models\PoinTr.py", line 6, in
from .Transformer import PCTransformer
File "C:\Repos\PoinTr-master\models\Transformer.py", line 6, in
from .dgcnn_group import DGCNN_Grouper
File "C:\Repos\PoinTr-master\models\dgcnn_group.py", line 4, in
from knn_cuda import KNN
File "C:\Users\peter\AppData\Local\Programs\Python\Python39\lib\site-packages\knn_cuda_init_.py", line 38, in
knn = load_cpp_ext("knn")
File "C:\Users\peter\AppData\Local\Programs\Python\Python39\lib\site-packages\knn_cuda_init.py", line 26, in load_cpp_ext
ext = load(
File "C:\Users\peter\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 1124, in load
return _jit_compile(
File "C:\Users\peter\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 1337, in _jit_compile
_write_ninja_file_and_build_library(
File "C:\Users\peter\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 1449, in _write_ninja_file_and_build_library
_run_ninja_build(
File "C:\Users\peter\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 1733, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'knn': [1/1] "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64/link.exe" knn.o knn.cuda.o /nologo /DLL c10.lib c10_cuda.lib torch_cpu.lib torch
_cuda.lib -INCLUDE:?warp_size@cuda@at@@yahxz torch.lib /LIBPATH:C:\Users\peter\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\lib torch_python.lib /LIBPATH:C:\Users\peter\AppData\Local\Programs\Python\Python39\libs "/LIBP
ATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\lib/x64" cudart.lib /out:knn.pyd
FAILED: knn.pyd
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64/link.exe" knn.o knn.cuda.o /nologo /DLL c10.lib c10_cuda.lib torch_cpu.lib torch_cuda.lib -INCLUDE:?warp_size@cuda@at@@yahxz torch.l
ib /LIBPATH:C:\Users\peter\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\lib torch_python.lib /LIBPATH:C:\Users\peter\AppData\Local\Programs\Python\Python39\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CU
DA\v10.2\lib/x64" cudart.lib /out:knn.pyd
CrÚation de la bibliothÞque knn.lib et de l'objet knn.exp
knn.o : error LNK2019: symbole externe non rÚsolu "public: long * __cdecl at::TensorBase::data_ptr(void)const " (??$data_ptr@J@TensorBase@at@@QEBAPEAJXZ) rÚfÚrencÚ dans la fonction "public: long * __cdecl at::Tensor::data(voi
d)const " (??$data@J@Tensor@at@@QEBAPEAJXZ)
knn.pyd : fatal error LNK1120: 1 externes non rÚsolus
ninja: build stopped: subcommand failed.`
I have already done the solution for the commun bug in the chamfer distance installation (issue #6 ).
I am on Windows and I was wondering if this error could come from an error when building pytorch extensions.
The text was updated successfully, but these errors were encountered: