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

GPU - gen fallback to shared if error #1740

Merged
merged 3 commits into from
Feb 7, 2025
Merged

GPU - gen fallback to shared if error #1740

merged 3 commits into from
Feb 7, 2025

Conversation

jeremylt
Copy link
Member

@jeremylt jeremylt commented Feb 7, 2025

Ok, there's two main reasons why a gen operator might fail

  1. too much shared memory needed to compile

  2. too many resources needed to run kernel

This PR adds a mechanism to automatically detect these issues and fall back to a shared operator.

@jeremylt
Copy link
Member Author

jeremylt commented Feb 7, 2025

@zatkins-dev can I get your thoughts on the overall approach? This should basically let people use /gpu/[cuda,hip] and all unsupported operators will automatically fallback

@zatkins-dev
Copy link
Collaborator

Yeah, I like the approach. I definitely think that it's good for users to be able to use /gpu/[cuda|hip] without worrying about support for whatever their use case is on a particular implementation

@jeremylt jeremylt force-pushed the jeremy/gen-rollback branch 4 times, most recently from 10cebd5 to d3a5b9e Compare February 7, 2025 20:11
Copy link
Collaborator

@zatkins-dev zatkins-dev left a comment

Choose a reason for hiding this comment

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

Overall I think this looks good, with a few minor things

backends/cuda-gen/ceed-cuda-gen-operator-build.cpp Outdated Show resolved Hide resolved
backends/cuda-gen/ceed-cuda-gen-operator-build.cpp Outdated Show resolved Hide resolved
backends/hip-gen/ceed-hip-gen-operator-build.cpp Outdated Show resolved Hide resolved
backends/hip-gen/ceed-hip-gen-operator-build.cpp Outdated Show resolved Hide resolved
@jeremylt jeremylt force-pushed the jeremy/gen-rollback branch from acff3cc to c9192ac Compare February 7, 2025 23:08
@jeremylt jeremylt merged commit ea41f46 into main Feb 7, 2025
27 of 28 checks passed
@jeremylt jeremylt deleted the jeremy/gen-rollback branch February 7, 2025 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants