-
Notifications
You must be signed in to change notification settings - Fork 7.6k
[v1]Support automatic discovery of registered kernels. #9509
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
Conversation
66b2d92 to
3b672c4
Compare
| # Bind function as an instance method to preserve `self` semantics | ||
| # and replace the original forward | ||
| replace_modules.append(module.__class__.__name__) | ||
| if module.__class__.__name__ in ("Glm4MLP", "Glm4vTextMLP", "Phi3MLP"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A mapping dict is better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, let me modify it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix
4471d41 to
5120553
Compare
What does this PR do?
apply_available_kernels接口调用所有可用kernels,无需逐个调用