FlagOpen / FlagGems

FlagGems is an operator library for large language models implemented in Triton Language.
Apache License 2.0
347 stars 48 forks source link

Suppress "Warning only once for all operators" during PyTorch dispatch #190

Closed 2niuhe closed 2 months ago

2niuhe commented 3 months ago

This commit implements a warning filter to ignore the "Warning only once for all operators, other operators may also be overrided." message generated during PyTorch dispatch calls. This change helps maintain cleaner logs by preventing this specific warning from appearing, which can occur when multiple operators are overridden.

Bowen12992 commented 3 months ago

Thanks for your contribution,but I wonder if there is a more helpful way to suppress this warning but can also indicates that the replacement of flag_gems succeeded ?Also,Please use pre-commit to format your codes to make them the same style with the code repo

2niuhe commented 2 months ago

Hi @Bowen12992,

Thank you for your feedback. I understand your concerns, but I currently cannot find an elegant solution that both suppresses the warning and indicates that the patch was successful. Therefore, I have decided to close this PR for now.

If I come up with a better approach in the future, I will revisit this issue.