Closed Minglin-Chen closed 2 years ago
I fixed this with the following two steps: Step 1: move the directory _rpg_vid2e/esim_torch/src/esimtorch by the following commands:
mv -r rpg_vid2e/esim_torch/src/esim_torch rpg_vid2e/esim_torch/
Step 2: modify the file _rpg_vid2e/esimtorch/setup.py as:
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
setup(
name='esim_torch',
packages=['esim_torch'], # package_dir={'':'src'},
ext_modules=[
CUDAExtension(name='esim_cuda',
sources=[
'esim_torch/esim_cuda_kernel.cu', # 'src/esim_torch/esim_cuda_kernel.cu',
],
# extra_compile_args={
#'cxx': ['-g'],
#'nvcc': ['-arch=sm_60', '-O3', '-use_fast_math']
#}
)
],
cmdclass={
'build_ext': BuildExtension
})
thanks mlchen666, you saved me a day or two
Thanks a lot. It works for me.
step3: in the file esim_torch/scripts/generate_events.py:
change:
import esim_torch
to:
from esim_torch import esim_torch
This should be fixed with the latest commit, it was an issue with the setup.py
I successfully compiled and installed the _esimtorch package with the commands:
However, I got the following errors while trying
python test/test.py
: