We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b56d2da commit ce41ec8Copy full SHA for ce41ec8
torch_xla/csrc/xla_graph_executor.cpp
@@ -642,7 +642,7 @@ std::vector<at::Tensor> XLAGraphExecutor::GetTensorsFused(
642
// completes. Release the GIL so other threads can proceed and unblock any
643
// collective computations.
644
PyThreadState* save = nullptr;
645
- if (PyGILState_Check()) {
+ if (Py_IsInitialized() && PyGILState_Check()) {
646
save = PyEval_SaveThread();
647
}
648
std::vector<xla::Literal> literals =
0 commit comments