Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'MDCONV_CUDA' has no attribute 'deform_conv2d_forward_cuda' #13

Open
ccl-private opened this issue Sep 27, 2022 · 3 comments
Open

Comments

@ccl-private
Copy link

complete success, but run my_test.py failed.

@MungoMeng
Copy link

I also met the same problem. It seems that only modulated_deform_conv2d works well.
When I tried to use deform_conv2d, deform_conv3d, and modulated_deform_conv3d, I will meet "module 'MDCONV_CUDA' has no attribute xxx"

@BboyDuck
Copy link

BboyDuck commented Dec 2, 2024

需要在相应代码后面添加类似如下代码,才能将C++模块暴露在python模块中(可以参考:src/mdeformable_conv.cu中末尾的代码):
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
m.def("modulated_deform_conv2d_forward_cuda", &modulated_deform_conv2d_forward_cuda,
"modulated_deform_conv2d_forward_cuda");
m.def("modulated_deform_conv2d_backward_cuda", &modulated_deform_conv2d_backward_cuda,
"modulated_deform_conv2d_backward_cuda");
}

@CodeMage11
Copy link

@BboyDuck 这样做好像不太行,我像这么加了,但还是出现同样的报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants