SHI-Labs / OneFormer

OneFormer: One Transformer to Rule Universal Image Segmentation, arxiv 2022 / CVPR 2023
https://praeclarumjj3.github.io/oneformer
MIT License
1.51k stars 135 forks source link

Runtime Error #99

Open molu-ggg opened 1 year ago

molu-ggg commented 1 year ago

In accordance with the PyTorch environment and CUDA version you provided, I encountered this error. How can I resolve it? Thank you ! RuntimeError: CUDA error: CUBLAS_STATUS_INVALID_VALUE when callingcublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)`

‘’’ Traceback (most recent call last): File "train_net.py", line 435, in launch( File "/home/data/agqing/OneFormer-main/detectron2/detectron2/engine/launch.py", line 84, in launch main_func(args) File "train_net.py", line 416, in main res = Trainer.test(cfg, model) File "train_net.py", line 366, in test results_i = inference_on_dataset(model, data_loader, evaluator) File "/home/data/agqing/OneFormer-main/detectron2/detectron2/evaluation/evaluator.py", line 158, in inference_on_dataset outputs = model(inputs) File "/home/hya4000/anaconda3/envs/oneformer/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(input, kwargs) File "/home/data/agqing/OneFormer-main/oneformer/oneformer_model.py", line 277, in forward tasks = self.task_mlp(tasks.float()) File "/home/hya4000/anaconda3/envs/oneformer/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, *kwargs) File "/home/data/agqing/OneFormer-main/oneformer/modeling/transformer_decoder/oneformer_transformer_decoder.py", line 222, in forward x = F.relu(layer(x)) if i < self.num_layers - 1 else layer(x) File "/home/hya4000/anaconda3/envs/oneformer/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(input, kwargs) File "/home/hya4000/anaconda3/envs/oneformer/lib/python3.8/site-packages/torch/nn/modules/linear.py", line 103, in forward return F.linear(input, self.weight, self.bias) File "/home/hya4000/anaconda3/envs/oneformer/lib/python3.8/site-packages/torch/nn/functional.py", line 1848, in linear return torch._C._nn.linear(input, weight, bias) RuntimeError: CUDA error: CUBLAS_STATUS_INVALID_VALUE when calling cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)

‘’’

ShenhaoZhu commented 1 year ago

I solved the issue by updating pytorch to 1.12.1