Skip to content

Use TORCH_CHECK instead of throw #537

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

Open
NicolasHug opened this issue Mar 6, 2025 · 1 comment
Open

Use TORCH_CHECK instead of throw #537

NicolasHug opened this issue Mar 6, 2025 · 1 comment
Labels
good first issue Good for newcomers refactor Improves code itself, but does not fix a bug or add new functionality.

Comments

@NicolasHug
Copy link
Member

Whenever possible, we should try to raise exceptions through TORCH_CHECK instead of throw in our C++ code-base (follow-up to #535 (comment)).

This may require updates to the Python and C++ tests as well to catch the proper exception type.

@scotts
Copy link
Contributor

scotts commented Mar 6, 2025

Kinda a dupe of #212, but I prefer the clarity of purpose in this issue.

@scotts scotts added the good first issue Good for newcomers label Mar 8, 2025
@scotts scotts added the refactor Improves code itself, but does not fix a bug or add new functionality. label Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers refactor Improves code itself, but does not fix a bug or add new functionality.
Projects
None yet
Development

No branches or pull requests

2 participants