mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-133171: Prevent combinations of --disable-gil and --enable-experimental-jit... for now (GH-133179)
This commit is contained in:
parent
f425509349
commit
2da48e32f6
5 changed files with 48 additions and 26 deletions
53
.github/workflows/jit.yml
vendored
53
.github/workflows/jit.yml
vendored
|
@ -126,29 +126,30 @@ jobs:
|
||||||
make all --jobs 4
|
make all --jobs 4
|
||||||
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
|
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
|
||||||
|
|
||||||
jit-with-disabled-gil:
|
# XXX: GH-133171
|
||||||
name: Free-Threaded (Debug)
|
# jit-with-disabled-gil:
|
||||||
needs: interpreter
|
# name: Free-Threaded (Debug)
|
||||||
runs-on: ubuntu-24.04
|
# needs: interpreter
|
||||||
timeout-minutes: 90
|
# runs-on: ubuntu-24.04
|
||||||
strategy:
|
# timeout-minutes: 90
|
||||||
fail-fast: false
|
# strategy:
|
||||||
matrix:
|
# fail-fast: false
|
||||||
llvm:
|
# matrix:
|
||||||
- 19
|
# llvm:
|
||||||
steps:
|
# - 19
|
||||||
- uses: actions/checkout@v4
|
# steps:
|
||||||
with:
|
# - uses: actions/checkout@v4
|
||||||
persist-credentials: false
|
# with:
|
||||||
- uses: actions/setup-python@v5
|
# persist-credentials: false
|
||||||
with:
|
# - uses: actions/setup-python@v5
|
||||||
python-version: '3.11'
|
# with:
|
||||||
- name: Build with JIT enabled and GIL disabled
|
# python-version: '3.11'
|
||||||
run: |
|
# - name: Build with JIT enabled and GIL disabled
|
||||||
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
|
# run: |
|
||||||
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
|
# sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
|
||||||
./configure --enable-experimental-jit --with-pydebug --disable-gil
|
# export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
|
||||||
make all --jobs 4
|
# ./configure --enable-experimental-jit --with-pydebug --disable-gil
|
||||||
- name: Run tests
|
# make all --jobs 4
|
||||||
run: |
|
# - name: Run tests
|
||||||
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
|
# run: |
|
||||||
|
# ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Since free-threaded builds do not support the experimental JIT compiler,
|
||||||
|
prevent these configurations from being combined.
|
|
@ -123,6 +123,13 @@ if "%do_pgo%" EQU "true" if "%platf%" EQU "x64" (
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if "%UseDisableGil%" EQU "true" if "%UseTIER2%" NEQ "" (
|
||||||
|
rem GH-133171: This configuration builds the JIT but never actually uses it,
|
||||||
|
rem which is surprising (and strictly worse than not building it at all):
|
||||||
|
echo.ERROR: --experimental-jit cannot be used with --disable-gil.
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
if not exist "%GIT%" where git > "%TEMP%\git.loc" 2> nul && set /P GIT= < "%TEMP%\git.loc" & del "%TEMP%\git.loc"
|
if not exist "%GIT%" where git > "%TEMP%\git.loc" 2> nul && set /P GIT= < "%TEMP%\git.loc" & del "%TEMP%\git.loc"
|
||||||
if exist "%GIT%" set GITProperty=/p:GIT="%GIT%"
|
if exist "%GIT%" set GITProperty=/p:GIT="%GIT%"
|
||||||
if not exist "%GIT%" echo Cannot find Git on PATH & set GITProperty=
|
if not exist "%GIT%" echo Cannot find Git on PATH & set GITProperty=
|
||||||
|
|
6
configure
generated
vendored
6
configure
generated
vendored
|
@ -10866,6 +10866,12 @@ fi
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tier2_flags $jit_flags" >&5
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tier2_flags $jit_flags" >&5
|
||||||
printf "%s\n" "$tier2_flags $jit_flags" >&6; }
|
printf "%s\n" "$tier2_flags $jit_flags" >&6; }
|
||||||
|
|
||||||
|
if test "$disable_gil" = "yes" -a "$enable_experimental_jit" != "no"; then
|
||||||
|
# GH-133171: This configuration builds the JIT but never actually uses it,
|
||||||
|
# which is surprising (and strictly worse than not building it at all):
|
||||||
|
as_fn_error $? "--enable-experimental-jit cannot be used with --disable-gil." "$LINENO" 5
|
||||||
|
fi
|
||||||
|
|
||||||
case "$ac_cv_cc_name" in
|
case "$ac_cv_cc_name" in
|
||||||
mpicc)
|
mpicc)
|
||||||
CFLAGS_NODIST="$CFLAGS_NODIST"
|
CFLAGS_NODIST="$CFLAGS_NODIST"
|
||||||
|
|
|
@ -2786,6 +2786,12 @@ AC_SUBST([REGEN_JIT_COMMAND])
|
||||||
AC_SUBST([JIT_STENCILS_H])
|
AC_SUBST([JIT_STENCILS_H])
|
||||||
AC_MSG_RESULT([$tier2_flags $jit_flags])
|
AC_MSG_RESULT([$tier2_flags $jit_flags])
|
||||||
|
|
||||||
|
if test "$disable_gil" = "yes" -a "$enable_experimental_jit" != "no"; then
|
||||||
|
# GH-133171: This configuration builds the JIT but never actually uses it,
|
||||||
|
# which is surprising (and strictly worse than not building it at all):
|
||||||
|
AC_MSG_ERROR([--enable-experimental-jit cannot be used with --disable-gil.])
|
||||||
|
fi
|
||||||
|
|
||||||
case "$ac_cv_cc_name" in
|
case "$ac_cv_cc_name" in
|
||||||
mpicc)
|
mpicc)
|
||||||
CFLAGS_NODIST="$CFLAGS_NODIST"
|
CFLAGS_NODIST="$CFLAGS_NODIST"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue