Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/177897
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit edbbdb9 with merge base ea0a353 ( UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@yfeldblum has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95726764. |
malfet
left a comment
There was a problem hiding this comment.
SW development moves in circles: one adds return to squash compiler errors, only to remove them later to squash another errors
| } else { | ||
| // We only support simple and static autocast expressions. For example, | ||
| // the following should report an error (since the autocast would not | ||
| // work as expected) | ||
| // | ||
| // autocast_on = autocast(enabled=True) | ||
| // autocast_off = autocast(enabled=False) | ||
| // with autocast_on if condition else autocast_off: | ||
| // ... | ||
| // | ||
| // TODO: better error message | ||
| // | ||
| TORCH_CHECK(false, "Unsupported autocast syntax"); | ||
| } |
There was a problem hiding this comment.
Nit, why not delete an else branch here
| } | |
| } | |
| // We only support simple and static autocast expressions. For example, | |
| // the following should report an error (since the autocast would not | |
| // work as expected) | |
| // | |
| // autocast_on = autocast(enabled=True) | |
| // autocast_off = autocast(enabled=False) | |
| // with autocast_on if condition else autocast_off: | |
| // ... | |
| // | |
| // TODO: better error message | |
| // | |
| TORCH_CHECK(false, "Unsupported autocast syntax"); |
There was a problem hiding this comment.
I'm not familiar with the pytorch codebase. My intention is simply to do the changes which are strictly required to avoid triggering the warning, and to limit all other changes.
| return alloc<Rshift>(lhs, rhs); | ||
| default: | ||
| LOG(FATAL) << "unsupported expr_type: " << static_cast<int>(expr_type); | ||
| return nullptr; |
There was a problem hiding this comment.
Please guard the return, or replace use of LOG with TORCH_CHECK
There was a problem hiding this comment.
The latest version of the PR fixes the non-glog implementation of LOG(FATAL) so that it is marked [[noreturn]]. It already would always throw or abort and never return, but that contract was not part of the interface. The current PR makes it part of the interface so that return; does not need a guard and so we do not need to replace uses, which can be a change of behavior.
5fd8845 to
82f76ad
Compare
) Summary: Pull Request resolved: #177897 TSIA. Test Plan: CI. Differential Revision: D95726764
…rch#177897) Summary: Pull Request resolved: pytorch#177897 TSIA. Test Plan: CI. Differential Revision: D95726764
82f76ad to
244b108
Compare
…rch#177897) Summary: Pull Request resolved: pytorch#177897 TSIA. Test Plan: CI. Differential Revision: D95726764
244b108 to
2623935
Compare
…rch#177897) Summary: Pull Request resolved: pytorch#177897 TSIA. Test Plan: CI. Differential Revision: D95726764
2623935 to
e3d1172
Compare
…rch#177897) Summary: Pull Request resolved: pytorch#177897 TSIA. Test Plan: CI. Differential Revision: D95726764
e3d1172 to
47f6ed2
Compare
…rch#177897) Summary: Pull Request resolved: pytorch#177897 TSIA. Test Plan: CI. Differential Revision: D95726764
47f6ed2 to
b9b7004
Compare
| return false; | ||
| } | ||
| return false; |
There was a problem hiding this comment.
Not that it matters much, but why no default: break;} return false;? This makes it more explicit in case some other cases would also break
| py::pickle( | ||
| /* __getstate__ */ | ||
| [](const PyRRef& /* unused */) { | ||
| [](const PyRRef& /* unused */) -> py::tuple { |
There was a problem hiding this comment.
Why not that? (To be consistent with return signature on line 407?)
| [](const PyRRef& /* unused */) -> py::tuple { | |
| [](const PyRRef& /* unused */) -> std::nullptr_t { |
There was a problem hiding this comment.
Below should have been PyRRef.
b9b7004 to
e55f2f5
Compare
) Summary: Pull Request resolved: #177897 TSIA. Test Plan: CI. Differential Revision: D95726764
…rch#177897) Summary: Pull Request resolved: pytorch#177897 TSIA. Test Plan: CI. Differential Revision: D95726764
e55f2f5 to
edbbdb9
Compare
malfet
left a comment
There was a problem hiding this comment.
Let's not make any changes to FatalLogger, I'm going to submit a quick PR that removes Fatal from the codebase
Summary: TSIA. New PR to take over the changes while yfeldblum is on leave. Old PR: pytorch#177897 Test Plan: CI. Differential Revision: D95726764
…ytorch#179518) Summary: Pull Request resolved: pytorch#179518 TSIA. New PR to take over the changes while yfeldblum is on leave. Old PR: pytorch#177897 Test Plan: CI. Differential Revision: D95726764
…ytorch#179518) Summary: Pull Request resolved: pytorch#179518 TSIA. New PR to take over the changes while yfeldblum is on leave. Old PR: pytorch#177897 Test Plan: CI. Differential Revision: D95726764
…ytorch#179518) Summary: Pull Request resolved: pytorch#179518 TSIA. New PR to take over the changes while yfeldblum is on leave. Old PR: pytorch#177897 Test Plan: CI. Differential Revision: D95726764
…ytorch#179518) Summary: Pull Request resolved: pytorch#179518 TSIA. New PR to take over the changes while yfeldblum is on leave. Old PR: pytorch#177897 Test Plan: CI. Differential Revision: D95726764
…ytorch#179518) Summary: Pull Request resolved: pytorch#179518 TSIA. New PR to take over the changes while yfeldblum is on leave. Old PR: pytorch#177897 Test Plan: CI. Differential Revision: D95726764
…ytorch#179518) Summary: Pull Request resolved: pytorch#179518 TSIA. New PR to take over the changes while yfeldblum is on leave. Old PR: pytorch#177897 Test Plan: CI. Differential Revision: D95726764
…ytorch#179518) Summary: Pull Request resolved: pytorch#179518 TSIA. New PR to take over the changes while yfeldblum is on leave. Old PR: pytorch#177897 Test Plan: CI. Differential Revision: D95726764
…ytorch#179518) Summary: Pull Request resolved: pytorch#179518 TSIA. New PR to take over the changes while yfeldblum is on leave. Old PR: pytorch#177897 Test Plan: CI. Reviewed By: malfet Differential Revision: D95726764
…ytorch#179518) Summary: Pull Request resolved: pytorch#179518 TSIA. New PR to take over the changes while yfeldblum is on leave. Old PR: pytorch#177897 Test Plan: CI. Reviewed By: malfet Differential Revision: D95726764
…179518) (#179518) Summary: TSIA. New PR to take over the changes while yfeldblum is on leave. Old PR: #177897 Test Plan: CI. Reviewed By: malfet Differential Revision: D95726764 Pull Request resolved: #179518 Approved by: https://github.com/Skylion007, https://github.com/malfet
…179518) (#179518) Summary: TSIA. New PR to take over the changes while yfeldblum is on leave. Old PR: #177897 Test Plan: CI. Reviewed By: malfet Differential Revision: D95726764 Pull Request resolved: #179518 Approved by: https://github.com/Skylion007, https://github.com/malfet
…ytorch#179518) (pytorch#179518) Summary: TSIA. New PR to take over the changes while yfeldblum is on leave. Old PR: pytorch#177897 Test Plan: CI. Reviewed By: malfet Differential Revision: D95726764 Pull Request resolved: pytorch#179518 Approved by: https://github.com/Skylion007, https://github.com/malfet
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
…ytorch#179518) (pytorch#179518) Summary: TSIA. New PR to take over the changes while yfeldblum is on leave. Old PR: pytorch#177897 Test Plan: CI. Reviewed By: malfet Differential Revision: D95726764 Pull Request resolved: pytorch#179518 Approved by: https://github.com/Skylion007, https://github.com/malfet
…ytorch#179518) (pytorch#179518) Summary: TSIA. New PR to take over the changes while yfeldblum is on leave. Old PR: pytorch#177897 Test Plan: CI. Reviewed By: malfet Differential Revision: D95726764 Pull Request resolved: pytorch#179518 Approved by: https://github.com/Skylion007, https://github.com/malfet
Summary:
TSIA.
Test Plan: CI.
Differential Revision: D95726764
cc @mcarilli @ptrblck @leslie-fang-intel @jgong5 @EikanWang