OFA-Sys / Chinese-CLIP

Chinese version of CLIP which achieves Chinese cross-modal retrieval and representation generation.
MIT License
4.21k stars 439 forks source link

为什么使用gpu进行推理比cpu还慢? #257

Closed liumingzhu6060 closed 6 months ago

liumingzhu6060 commented 6 months ago

image 使用官方的示例,用gpu(A800)进行推理,图片向量化时间为28s,而使用cpu进行推理,图片向量化时间为0.74s image image

liumingzhu6060 commented 6 months ago

python3.10, torch1.13.1, torchvison0.14.1, 而且torch.cuda.is_available()也为True