QwenLM / Qwen2-VL

Qwen2-VL is the multimodal large language model series developed by Qwen team, Alibaba Cloud.
Apache License 2.0
2.99k stars 175 forks source link

CUDA error: device-side assert triggered #226

Open snowkueen opened 1 month ago

snowkueen commented 1 month ago

单样本推理做image caption,f16+flash_atten,为了节省内存加的操作: bug

CUDA error: device-side assert triggered CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1 Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

snowkueen commented 1 month ago

@fyabc @hzhwcmhf @c0g @JianxinMa
我找到原因了,因为我是在大量数据上做推理,当有一个异常图片出现推理异常之后,所有正常的图片也无法继续执行推理任务,数据推理存在耦合,是不是官方给的推理代码要加torch.no_grad()? 另外我这里图片异常指的是尺寸比例不符合常规图片,是超长图,模型无法推理。

kq-chen commented 1 month ago

异常尺寸比例的图片具体的高和宽是多少?