Could not load the custom kernel

#4
by colacool - opened

environment: Centos 7.6 cuda:11.4. torch:2.0.1 transformers:4.41.0.dev0

When attempting to utilize the demo provided in https://github.com/NielsRogge/Transformers-Tutorials/blob/master/Grounding%20DINO/Inference_with_Grounding_DINO_for_zero_shot_object_detection.ipynb, I encountered a series of errors as follows:
Could not load the custom kernel for multi-scale deformable attention: [Errno 2] No such file or directory: '/home/fconlas/ground_dino/transformers-main/src/transformers/kernels/grounding_dino/vision.cpp'".
Could not load the custom kernel for multi-scale deformable attention: [Errno 2] No such file or directory: '/home/fconlas/ground_dino/transformers-main/src/transformers/kernels/grounding_dino/vision.cpp'".

But this error did not occur when running the demo on a Mac.

same error on the cuda:12.1 torch:2.1.2 transformers: 4.40.1

same

Could not load the custom kernel for multi-scale deformable attention: [Errno 2] No such file or directory: 'D:\\Program Files\\anaconda\\envs\\learning\\lib\\site-packages\\transformers\\kernels\\grounding_dino\\vision.cpp'

@bkfeng @JacksonLopez @colacool could you update the library and try again? It should be fixed with the latest release yesterday

@garmanwu which version of transformers are you using?

transformers 4.42.3
It occurs error on windows even if I copied and rename detr instead of missing vision.cpp .
But Macbook is okay.

@garmanwu you don't need to copy anything I fixed it with a PR a few weeks ago the only thing is that you gotta also have ninja installed to use the kernels. I would recommend trying the latest version of transformers

same error on the cuda 12.1 pytorch 2.4.1, transformers 4.45.2 (pyhd8ed1ab_1 conda-forge), windows

transformers 4.45.0, on linux,
Could not load the custom kernel for multi-scale deformable attention: /home/.../.cache/torch_extensions/py39_cu121/MultiScaleDeformableAttention/MultiScaleDeformableAttention.so: cannot open shared object file: No such file or directory
But I can still get the result.
the result is correct.
so actually the above Could not load the custom kernel ... does not matter?

Sign up or log in to comment