Skip to content

Commit

Permalink
Merge pull request #793 from asi1024/ignore-broken-barrier-error
Browse files Browse the repository at this point in the history
Ignore BrokenBarrierError in comparer test
  • Loading branch information
emcastillo authored Nov 21, 2023
2 parents b65ecf3 + eaac95a commit 2dcd7d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pytorch_pfn_extras/utils/comparer.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ def run_engine(self, engine: _Engine, loaders: Any) -> None:
with self.report_lock:
self._finalized = True
self._assert_incompatible_trigger(len(self.targets) == 0)
except threading.BrokenBarrierError:
pass
except Exception:
self.barrier.abort()
raise
Expand Down Expand Up @@ -747,6 +749,8 @@ def _run_engine(self, engine: _Engine, args: Any, kwargs: Any) -> None:
with self._report_lock:
self._finalized = True
self._assert_incompatible_trigger(len(self._targets) == 0)
except threading.BrokenBarrierError:
pass
except Exception:
self._barrier.abort()
raise
Expand Down

0 comments on commit 2dcd7d7

Please sign in to comment.