RuntimeError: CUDA error: CUBLAS_STATUS_INVALID_VALUE when calling cublasSgemv(handle, op, m, n, &alpha, a, lda, x, incx, &beta, y, incy)
Author: DRAFT-BEERCreated Jun 6, 2024Updated Sep 19, 2025
当我使用命令 model = YOLOv10('yolov10n.yaml')选定模型后,训练yolov10n.yaml时,进行完一个epoch周期训练再进行验证时会报错CUDA error: CUBLAS_STATUS_INVALID_VALUE when calling `cublasSgemv(handle, op, m, n, &alpha, a, lda, x, incx, &beta, y, incy)`。并伴随有警告UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').index = index // nc。但是当我训练yolov10x.yaml时会产生警告,但是并没有出现报错。请问这是什么原因。怎么修复呢?
Source: THU-MIG/yolov10