GLEE模型迁移过程运行报错ssertionError: Torch not compiled with CUDA enabled 
收藏回复举报
GLEE模型迁移过程运行报错ssertionError: Torch not compiled with CUDA enabled 
t('forum.solved') 已解决
发表于2025-03-31 11:52:36
0 查看

问题描述】 

GLEE模型迁移过程运行报错ssertionError: Torch not compiled with CUDA enabled 

【芯片类型】 昇腾

【HDK】 23.0.6

【CANN】 CANN 8.0.T63

【镜像版本】1.0.RC3-800I-A2-arm64

【报错信息】

F1le "/root/work/f1lestorage/GLEE/projects/GLEE/glee/GlEE.py", 1ine 1/5,1n-_1nit 

self.glee = GLEE Model(cfg, matcher, self.device, self.video_info, cfg.MODEL.coNTRAs MEAN) 

File "/root/work/filestorage/GLEE/projects/GLEE/glee/models/glee_model.py", line 102, in __init 

self.to(device) 

File "/usr/local/python3.10.2/lib/python3.10/site-packages/torch_npu/utils/_module.py", line 78, in to 

return self._apply(convert) 

File "/usr/local/python3.10.2/lib/python3.10/site-packages/torch/nn/modules/module.py", line 810, in _apply 

module._apply(fn) 

File "/usr/1ocal/python3.10.2/lib/python3.10/site-packages/torch/nn/modules/module.py", line 810, in _apply 

module._apply(fn) 

 File "/usr/iocal/python3.10.2/lib/python3.10/site-packages/torch/nn/modules/module.py", line 810, in _apply 

module._apply(fn) 

[Previous line repeated 1 more time] 

File "/usr/local/python3.10.2/lib/python3.10/site-packages/torch/nn/modules/module.py", line 857, in _apply 

self. buffers [key] = fn(buf) 

File "/usr/local/python3.10.2/lib/python3.10/site-packages/torch_npu/utils/_module.py", line 76, in convert 

return t.to(device, dtype if t.is_floating_point() or t.is complex() else None, non blocking) 

File "/usr/local/python3.10.2/lib/python3.10/site-packages/torch/cuda/__init_-py", line 289, in lazy_init 

raise AssertionError("Torch not compiled with cuDA enabled") 

ssertionError: Torch not compiled with cUDA enabled 

ERROR] 2025-02-21-07:24:00 (PID:1677, Device:-1, ,RankID:-1) ERR99999 UNKNOWN application exception

我要发帖子