Skip to content

Commit

Permalink
fix(dtensor): support torch dispatch mode exclude
Browse files Browse the repository at this point in the history
support torch dispatch python mode to tls excluded which will cause dispatch hang
  • Loading branch information
JsBlueCat committed Apr 4, 2024
1 parent 86190b6 commit 3bdfde2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cc/torchdistx/deferred_init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ void runDeferredInitHandler(const OperatorHandle& op, DispatchKeySet key_set, St
}

void enableDeferredInitHandler(bool value) noexcept {
c10::impl::tls_set_dispatch_key_included(DispatchKey::DeferredInit, value);
c10::impl::tls_set_dispatch_key_excluded(DispatchKey::DeferredInit, value);
}

bool isDeferredInitEnabled() noexcept {
Expand Down

0 comments on commit 3bdfde2

Please sign in to comment.