pycuda._driver.LogicError: cuFuncSetBlockShape failed: invalid resource handle #406
Unanswered
janehwu
asked this question in
Troubleshooting
Replies: 2 comments
-
Honestly not sure, and I don't currently have the bandwidth to help. Sorry! |
Beta Was this translation helpful? Give feedback.
0 replies
-
I encountered a similar issue. When I set grid and block to (32, 32, 1), the program runs normally. However, if I use larger values such as (64, 64, 1), I encounter code
error
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm trying to execute a CUDA kernel inside a pytorch
autograd.Function
backward()
implementation during network training (mixing pytorch and pycuda, which I know is tricky), and it seems that pytorch autograd changes the context used by pycuda such that I'm getting acuFuncSetBlockShape
error when I try to execute any kernel.A sketch of my code is below:
And the error I'm getting is:
I've also tried adding
pycuda_ctx.push()
andpycuda_ctx.pop()
before/after the kernel call, but that gives the same error.Interestingly, this is only a problem on an A100, and the above code works fine on a 3090 (with pycuda version 2021.1). Is it possible to resolve this error on the A100 with pycuda version 2022.2.2? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions