Skip to content

Commit

Permalink
clear pending ir should also clear the cc op tokens (#5385)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackCaoG authored Aug 1, 2023
1 parent c0a432b commit 2676a20
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions torch_xla/csrc/init_python_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1729,6 +1729,8 @@ void InitXlaModuleBindings(py::module m) {
// Use with caution. Those tensor whole ir was cleared with be replaced
// with a placeholder XLAData and SHOULD NOT be accessed.
ClearPendingIrs(device);
auto xla_device = GetDeviceOrCurrent(device);
SetAllReduceToken(xla_device, nullptr);
});

m.def("_run_cached_graph",
Expand Down

0 comments on commit 2676a20

Please sign in to comment.