PreciseRoIPooling icon indicating copy to clipboard operation
PreciseRoIPooling copied to clipboard

cudaCheckError() failed: initialization error

Open yingxin666 opened this issue 3 years ago • 4 comments

when I run "output = _prroi_pooling.prroi_pooling_forward_cuda(features, rois, *params)" ,I get the debug "cudaCheckError() failed: initialization error".

yingxin666 avatar Mar 31 '22 08:03 yingxin666

        pool = PrRoIPool2D(7, 7, spatial_scale=0.5)
        features = torch.rand((4, 16, 24, 32)).cuda()
        rois = torch.tensor([
            [0, 0, 0, 14, 14],
            [1, 14, 14, 28, 28],
        ]).float().cuda()

        out = pool(features, rois)

Can you check if this minimal script run on your machine? The error you encountered seems like a pytorch-level error. Can you check if built-in methods, for example, output = torch.nn.functional.avg_pool2d(features, 7) work?

vacancy avatar Apr 01 '22 14:04 vacancy

"out = pool(features, rois)" can not work,the error is the same.but "output = torch.nn.functional.avg_pool2d(features, 7)" can work well.

yingxin666 avatar Apr 25 '22 01:04 yingxin666

the full error message is: Using /home/zyd/.cache/torch_extensions as PyTorch extensions root... Detected CUDA files, patching ldflags Emitting ninja build file /home/zyd/.cache/torch_extensions/_prroi_pooling/build.ninja... Building extension module _prroi_pooling... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) ninja: no work to do. Loading extension module _prroi_pooling... cudaCheckError() failed : initialization error

yingxin666 avatar Apr 25 '22 09:04 yingxin666

I see. I think this is probably a issue with your cuda compiler setup etc. Is it possible to run the minimal code example here: https://pytorch.org/tutorials/advanced/cpp_extension.html (The CUDA extension part) ?

vacancy avatar Apr 25 '22 19:04 vacancy