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

Compile ‘index_max’ fail. #22

Open
SkyeFromKindergarten opened this issue Aug 21, 2019 · 12 comments
Open

Compile ‘index_max’ fail. #22

SkyeFromKindergarten opened this issue Aug 21, 2019 · 12 comments

Comments

@SkyeFromKindergarten
Copy link

SkyeFromKindergarten commented Aug 21, 2019

Thanks for your working and new uploads ~

When compiling in file 'index_max_ext', I fail like below,
image

I cannot find why I fail. Do I have to use this new extension? I remember last time I run this code it does not need to be done.

Thanks and regards.

@lijx-nutonomy
Copy link
Contributor

Thanks for point this out. I have updated the index_max_ext module, which is ok on my system with python3.7+cuda10.1+pytorch1.1. Could you please try again and tell me the result?

Previous the cuda operation is implemented with numba. In the latest commit I remove the dependency of numba and introduce the c++ based index_max_ext to do the job.

@SkyeFromKindergarten
Copy link
Author

It seems to be the same ERROR with your latest code. My system is : python3.7 + cuda 10.0 + pytorch 1.2.
image

In the last line, it says command 'gcc' failed with exit status 1.
I don't know if there's anything do with gcc's version. Version of my gcc is 7.3.0. I think it should be my environment problem which I couldn't find out TAT

@JeremyCJM
Copy link

I also failed to compile in folder 'index_max_ext'. My system is python3.7 + Cuda 9.1 + PyTorch 1.1.

@lijx-nutonomy
Copy link
Contributor

That is weird since it is working fine on several computers in my lab. Anyway, I will try to solve it as soon as possible, but it may take some time. In the meantime, you may switch back to the numba implementation, e.g., the last commit.

@lijx-nutonomy
Copy link
Contributor

@JeremyCJM @SkyeFromKindergarten The index_max_ext module has been updated for torch 1.2. Could you guys try again and give some feedbacks? Thanks!

@SkyeFromKindergarten
Copy link
Author

I can successfully compile on my mechine now :)

@JeremyCJM
Copy link

Still failed to build...
image

@lijx10
Copy link
Owner

lijx10 commented Mar 11, 2020

Please make sure that the cuda environment is configured properly. For example, proper environment variables. For example, you may consider adding these lines to ~/.bashrc

# cuda-10.1
export CUDA_HOME=/usr/local/cuda-10.1
export PATH=/usr/local/cuda-10.1/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64:${LD_LIBRARY_PATH}

Run nvcc -V to confirm that cuda is working properly.

After making sure that cuda and pytorch is installed properly, delete folder dist, build, and the file index_max.egg-info, then run python setup install to install the index_max module again.

Finally, please make sure that the index_max folder is not in the python path. There may be linking problems.

@robin1chen2
Copy link

"Finally, please make sure that the index_max folder is not in the python path. There may be linking problems."
You said make sure that the index_max_ext folder ''is not", instead of ''is'' ,in the python path .Did you make a mistake or I misunderstood?

@lijx10
Copy link
Owner

lijx10 commented Jul 17, 2020

The index_max_ext folder should NOT in the python path, otherwise it may cause confusion on the one you installed into python, or that "un-installed" folder.

@lovepythonhm
Copy link

Hello, thank you very much for the open source of the code, the paper inspired me a lot. But there are some problems when replicating the code, about "import index_max", the compilation environment I use is pytorch1.12.0+cudatoolkit11.3., but I can't import it when importing index_max? How to solve it?

@zhren711
Copy link

Hello, thank you very much for the open source of the code, the paper inspired me a lot. But there are some problems when replicating the code, about "import index_max", the compilation environment I use is pytorch1.12.0+cudatoolkit11.3., but I can't import it when importing index_max? How to solve it?

hi, I met this issue too. Have you solved it ?

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

7 participants