Ultra-Fast-Lane-Detection-v2 icon indicating copy to clipboard operation
Ultra-Fast-Lane-Detection-v2 copied to clipboard

AttributeError: module 'my_interp' has no attribute 'run'

Open wjywjy14 opened this issue 2 years ago • 9 comments

Traceback (most recent call last): File "train.py", line 117, in train(net, train_loader, loss_dict, optimizer, scheduler,logger, epoch, metric_dict, cfg.dataset) File "train.py", line 17, in train for b_idx, data_label in enumerate(progress_bar): File "/home/wjy/anaconda3/envs/lane-det/lib/python3.7/site-packages/tqdm/std.py", line 1195, in iter for obj in iterable: File "/home/wjy/Ultra-Fast-Lane-Detection-V2/data/dali_data.py", line 246, in next points_row = my_interp.run(points, self.interp_loc_row, 0) AttributeError: module 'my_interp' has no attribute 'run'

wjywjy14 avatar Aug 08 '22 06:08 wjywjy14

@wjywjy14 have you successfully installed the CUDA extension?

cd my_interp

sh build.sh
# If this fails, you might need to upgrade your GCC to v7.3.0

cfzd avatar Aug 08 '22 12:08 cfzd

我安装的是cuda11.1,请问有影响吗

wjywjy14 avatar Aug 09 '22 02:08 wjywjy14

@wjywjy14 不好意思,我的意思不是CUDA的版本,而是你安装成功我们这个my_interp的CUDA拓展了没有,安装方式就是上面写的sh build.sh

cfzd avatar Aug 09 '22 06:08 cfzd

安装没有完全成功,有部分报错,是需要gcc7.3.0才能安装成功吗

wjywjy14 avatar Aug 09 '22 06:08 wjywjy14

@wjywjy14 你可以找一下是报什么错,如果是一些类型转换不对的错的话,可能得需要升级gcc,或者你也可以安装个本地的gcc,临时用一下

cfzd avatar Aug 09 '22 06:08 cfzd

@wjywjy14 have you successfully installed the CUDA extension?

cd my_interp

sh build.sh
# If this fails, you might need to upgrade your GCC to v7.3.0

你好,我进行了测试sh.build.sh,但是报错了 The detected CUDA version (10.1) mismatches the version that was used to compile Pytorch (11.3). Please make sure to use the same CUDA versions. 是否表示CUDA版本不对应问题,而不是要更新GCC. 但是我在跑UFLDv1时候并不会报错版本不对应问题

jd926 avatar Nov 16 '22 07:11 jd926

我查看了gcc的版本 gcc version 9.4.0(Ubuntu 9.4.0-1ubuntu1-20.04.1)

jd926 avatar Nov 16 '22 07:11 jd926

@jd926 如果出现这个问题,肯定是你编译my_interp的CUDA和你pytorch的CUDA不一样导致的。你的pytorch可能用的是通过conda安装的libcudatoolkit,而你编译my_interp的是你本地的cuda。你可以通过如下方式查看:

  • libcudatoolkit: conda list | grep cuda
  • 本地cuda: ls -al /usr/local/cuda 如果他们版本不一致,那么你需要安装一个和pytorch的libcudatoolkit版本一致的本地cuda编译my_interp

cfzd avatar Nov 17 '22 07:11 cfzd

@jd926 如果出现这个问题,肯定是你编译my_interp的CUDA和你pytorch的CUDA不一样导致的。你的pytorch可能用的是通过conda安装的libcudatoolkit,而你编译my_interp的是你本地的cuda。你可以通过如下方式查看:

  • libcudatoolkit: conda list | grep cuda
  • 本地cuda: ls -al /usr/local/cuda 如果他们版本不一致,那么你需要安装一个和pytorch的libcudatoolkit版本一致的本地cuda编译my_inter 好的,非常感谢您!

jd926 avatar Nov 25 '22 02:11 jd926