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

RuntimeError: CUDA illegal memory access #24

Closed
karnikram opened this issue Mar 19, 2023 · 1 comment
Closed

RuntimeError: CUDA illegal memory access #24

karnikram opened this issue Mar 19, 2023 · 1 comment

Comments

@karnikram
Copy link

Hi,

Thank you for your work and code, this is really cool!

I've been running some experiments with your code and I noticed the gradient_bias option inside the Patchifier network to bias patch selection towards regions with high gradient.

However when I enable this option the training exits with an error:

RuntimeError: CUDA error: an illegal memory access was encountered

I think this is happening because of a shape mismatch inside the patchify_forward_kernel cuda kernel coming from the gradient images, but I wanted to check if you are aware of this error?

@lahavlipson
Copy link
Collaborator

Thanks for pointing this out, I've just added a fix.

The gradient_bias wasn't tested during training, and during inference it doesn't seem to perform much better than randomly sampling patch centroids.

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

2 participants