SO-Net icon indicating copy to clipboard operation
SO-Net copied to clipboard

Compile ‘index_max’ fail.

Open SkyeFromKindergarten opened this issue 5 years ago • 12 comments

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.

SkyeFromKindergarten avatar Aug 21 '19 08:08 SkyeFromKindergarten

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.

lijx-nutonomy avatar Aug 21 '19 10:08 lijx-nutonomy

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

SkyeFromKindergarten avatar Aug 22 '19 01:08 SkyeFromKindergarten

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

JeremyCJM avatar Aug 22 '19 03:08 JeremyCJM

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 avatar Aug 22 '19 11:08 lijx-nutonomy

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

lijx-nutonomy avatar Aug 26 '19 09:08 lijx-nutonomy

I can successfully compile on my mechine now :)

SkyeFromKindergarten avatar Aug 27 '19 08:08 SkyeFromKindergarten

Still failed to build... image

JeremyCJM avatar Aug 27 '19 18:08 JeremyCJM

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.

lijx10 avatar Mar 11 '20 10:03 lijx10

"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?

robin1chen2 avatar Jul 17 '20 09:07 robin1chen2

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.

lijx10 avatar Jul 17 '20 09:07 lijx10