-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[lit] Running lit with bazel fails for Python 3.11 #75963
Comments
EugeneZelenko
added
bazel
"Peripheral" support tier build system: utils/bazel
llvm-lit
and removed
new issue
labels
Dec 19, 2023
I noticed lots of repositories seem to pin to Python3.10 which makes this issue hidden. |
+1 we're hitting this after updating one of our dependencies which transitively uses a newer rules_python (with python 3.11 interpreter). |
sjain-stanford
added a commit
to sjain-stanford/mlir-tcp
that referenced
this issue
Feb 5, 2024
sjain-stanford
added a commit
to sjain-stanford/mlir-tcp
that referenced
this issue
Feb 11, 2024
torch-mlir pip dep buildifier use python 3.10 llvm/llvm-project#75963 fix fixes --test_output=errors for showing errors on GHA cleanup minor add py_test fix fix paths fix add python tests to test_suite headers enable python lit tests buildifier clean disk space fix bump actions versions fix fix fix update requirements
sjain-stanford
added a commit
to sjain-stanford/mlir-tcp
that referenced
this issue
Feb 11, 2024
torch-mlir pip dep buildifier use python 3.10 llvm/llvm-project#75963 fix fixes --test_output=errors for showing errors on GHA cleanup minor add py_test fix fix paths fix add python tests to test_suite headers enable python lit tests buildifier clean disk space fix bump actions versions fix fix fix update requirements minor try stablehlo without test_output cleanup specify shell disk space cleanup trial fix more fixes fix fix
fzakaria
added a commit
to openxla/stablehlo
that referenced
this issue
Feb 13, 2024
Major change: Bump Bazel to the new LTS at 7.X * Included a default Python toolchain 3.10 There is a problem at the moment running lit using Python311 where it cannot find the module. Our CI system already enforces Python310 to get around it but we should set the toolchain in Bazel itself to avoid this problem. I had already filed llvm/llvm-project#75963 * I moved skylib to MODULE.bazel to test the MODULE portion of Bazel is working. A remaining action item is to move LLVM itself to MODULE.bazel which would preclude needing to define skylib since its a dependency of LLVM. * Workspace names are no longer named in Bazel 7+ I had to change stablehlo to _main to fix the runfiles directory. Please see bazelbuild/bazel#18128 We should consider using https://github.com/bazelbuild/rules_python/blob/main/python/runfiles/runfiles.py#L262 instead to get the runfiles directory for future proofing. Fixes #1878 --------- Co-authored-by: mlevesquedion <mlevesquedion@google.com>
keith
added a commit
that referenced
this issue
Mar 29, 2024
In python3.11 there is a new environment variable PYTHONSAFEPATH which stops python from setting the current directory as the first entry in sys.path. Bazel started setting this to ensure that python targets don't accidentally access things that aren't in their dependency tree. This resulted in lit tests breaking because sys.path didn't include the directory to the lit source files. This is fixed by adding the lit binary to the dependency tree and propagating the import path from it. Fixes #75963
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I noticed that running llvm's lit is failing for Python 3.11 but passes for Python 3.10 -- I am not sure why but I wanted to capture my investigation.
Here is a script of me running lit with bazel on Python 3.10 successfully and then switching to Python 3.11 and failing.
We are using LLVM out of tree in https://github.com/openxla/stablehlo using
llvm_configure
starlark rule.We are using a pretty recent commit as of this issue posting: b2cdf3c commit.
The text was updated successfully, but these errors were encountered: