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

Where is "_ext"? #5

Open
mujm opened this issue Dec 16, 2020 · 3 comments
Open

Where is "_ext"? #5

mujm opened this issue Dec 16, 2020 · 3 comments

Comments

@mujm
Copy link

mujm commented Dec 16, 2020

Hello! I meet a problem when running the codes:

In custom_func.py, there is a code : "from _ext import my_lib", however, I can't find this pakage named "_ext", could you tell me how can I get it?

During make the codes, I got a mistake, too:

~/RS/graph_adversarial_attack/code/common$ make /bin/nvcc --default-stream per-thread -I/include -I/mkl/include -I/tbb/include -Iinclude -std=c++11 --use_fast_math --compiler-options '-fPIC' -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 -M src/custom_kernel.cu -o _ext/custom_kernel.d -odir _ext make: /bin/nvcc: Command not found make: *** [Makefile:42: _ext/custom_kernel.o] Error 127

I guess it is because there is no pakage named "_ext", so again I wonder how to get this pakage.

I hope that you could reply, thanks!

@Hanjun-Dai
Copy link
Owner

This was built for torch 0.3.1, the new torch uses pybind11, a different c++ binding mechanism. You may want to rollback torch version (and corresponding dependencies).

@vietvo89
Copy link

vietvo89 commented Jun 16, 2021

Hi @Hanjun-Dai

It seems that I cannot install an old version by following your instruction. I got an error as below when doing pip install. Any way to reuse your code for new version of torch?

Thanks

ERROR: torch-0.3.1-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform.

@Hanjun-Dai
Copy link
Owner

Sorry for the lack of maintenance.

  • You can try to see if you can find a suitable one here https://pytorch.org/get-started/previous-versions/
  • otherwise you may want to build the torch 0.3.1 from source
  • or you can try if you can use docker
  • or VM
  • or if it is just python issue, see if you can use conda env to create an old one

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

3 participants