Home > other >  Pytorch CPP - extension: PIP install - e. local library file did not produce the py files and produc
Pytorch CPP - extension: PIP install - e. local library file did not produce the py files and produc

Time:12-15

I want to try a lot on deformable kernel project, according to the README. Md steps:
 
Conda env create - f environment. Yml

CD deformable_kernels/ops/deform_kernel;
PIP install - e.;


Deformable_kernels/ops/deform_kernel folder structure is as follows:
 
.
CSRC
Filter_sample_depthwise_cuda. CPP
Filter_sample_depthwise_cuda. H
Filter_sample_depthwise_cuda_kernel. Cu
Nd_linear_sample_cuda. CPP
Nd_linear_sample_cuda. H
Nd_linear_sample_cuda_kernel. Cu
Functions provides
Filter_sample_depthwise. Py
Just set p y
Nd_linear_sample. Py
Just set p y
Modules
Filter_sample_depthwise. Py
Just set p y
Setup. Py

Setup. Py the file content is as follows:
 
The from setuptools import setup
From the torch. Utils. Cpp_extension import BuildExtension, CUDAExtension

The setup (
Name='filter_sample_depthwise',
Ext_modules=[
CUDAExtension (
'filter_sample_depthwise_cuda'

'CSRC/filter_sample_depthwise_cuda. CPP,
'CSRC/filter_sample_depthwise_cuda_kernel. Cu,
]
),
],
Cmdclass={' build_ext: BuildExtension}
)

The setup (
Name="nd_linear_sample,"
Ext_modules=[
CUDAExtension (
"Nd_linear_sample_cuda,"

"The CSRC/nd_linear_sample_cuda. CPP",
"The CSRC/nd_linear_sample_cuda_kernel. Cu",
],
)
],
Cmdclass={" build_ext ": BuildExtension},
)

This project contains the CPP - the extension of the code, so use the setuptools needs to generate py files,

The PIP install - e. when installation, the following error:
 
Obtaining file:///home/xxx/Downloads/deformable_kernels/deformable_kernels/ops/deform_kernel
ERROR: wining one. An egg - info directory found in/TMP/PIP PIP - an egg - info - pta6z__q


After separated the two setup () for installation, two under the current folder. So file, rather than. Py files,

Do you have a great god know how to deal with this situation?
  • Related