Skip to content

The solution of problem about: no module named 'enclib_cpu' or no module named 'enclib_gpu' #432

@Chrisqyf

Description

@Chrisqyf

If you want to solve this problem, you can follow this reference: https://zhuanlan.zhihu.com/p/191314560
To be specific, you can get 'enclib_cpu.so' or 'enclib_gpu.so' by 'build.ninja' in '/site-packages/encoding/lib/cpu' or '/site-packages/encoding/lib/gpu'.
But in this process, I met a new problem: nvcc fatal: Unsupported gpu architecture 'compute_86'
One widely-used solution is to set environment variables to reduce computing power requirements.
e.g. export TORCH_CUDA_ARCH_LIST="7.5"
CUDA 10.1 does not support compute_86, while CUDA 10.1 supports compute_75 at most.
I failed again. This solution was not worked.
My final solution is edit the 'build.ninja': change '-gencode arch=compute_86, code=sm_86' into '-gencode arch=compute_75, code=sm_75'
I got it!
Hope my experience is helpful for ones struggling the same problem.

note:
My environment settings: Ubuntu 20.04 CUDA 10.1 python=3.6 torch=1.4.1
There are many problems for configuring pytorch-encoding in Windows system, in my experience. So the successful configuration may be easier in Linux or mac.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions