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

Simplify upscale cuda kernels #680

Merged
merged 2 commits into from
Apr 8, 2023
Merged

Simplify upscale cuda kernels #680

merged 2 commits into from
Apr 8, 2023

Conversation

coreylowman
Copy link
Owner

Resolves #677

@coreylowman
Copy link
Owner Author

@nkoppel for some reason this seems to resolve the bug? I have no idea why. On main I get an illegal memory address accessed. But not on this branch

@nkoppel
Copy link
Contributor

nkoppel commented Apr 8, 2023

This seems to fix it on my end as well, though I am somewhat skeptical that it's not due to a different allocation pattern.

Comment on lines +99 to +102
size_t y0 = min(static_cast<size_t>(h_scale * oh), op.h_in - 1);
size_t y1 = min(y0 + 1, op.h_in - 1);
size_t x0 = min(static_cast<size_t>(w_scale * ow), op.w_in - 1);
size_t x1 = min(x0 + 1, op.w_in - 1);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nkoppel this was the issue

@coreylowman coreylowman merged commit 07aef2d into main Apr 8, 2023
@coreylowman coreylowman deleted the simplify-upscale branch April 8, 2023 19:26
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

Successfully merging this pull request may close these issues.

Upscale2D or Conv2D produces NaN values
2 participants