Skip to content

Commit 7b2138b

Browse files
kleinhenzpytorchmergebot
authored andcommitted
[inductor] fix uncaught exception when checking for openmp on macos (pytorch#141208)
Based on pytorch#133776 Pull Request resolved: pytorch#141208 Approved by: https://github.com/Skylion007
1 parent e908f92 commit 7b2138b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch/_inductor/cpp_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ def is_conda_llvm_openmp_installed() -> bool:
825825
command = "conda list llvm-openmp --json"
826826
output = subprocess.check_output(command.split()).decode("utf8")
827827
return len(json.loads(output)) > 0
828-
except subprocess.SubprocessError:
828+
except (subprocess.SubprocessError, FileNotFoundError):
829829
return False
830830

831831

0 commit comments

Comments
 (0)