Skip to content

Commit c5793a2

Browse files
authored
Merge pull request #379 from Yhg1s/windows-nogil
Fix benchmarking on Windows for free-threaded Python
2 parents 0371837 + c26e6e4 commit c5793a2

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

Diff for: PROVISIONING.md

+13
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,16 @@ Install [git for Windows](https://git-scm.com/download/win).
8585
### Install Python
8686

8787
Install Python 3.9 or later from [python.org](https://python.org), and install for all users.
88+
89+
### Install Clang 19
90+
91+
For support for building with Clang and the tail-call interpreter, install
92+
the right version of the windows-msvc clang+llvm package from
93+
https://github.com/llvm/llvm-project/releases ([direct link to clang+llvm 19.1.6
94+
for x86_64](https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.6/clang+llvm-19.1.6-x86_64-pc-windows-msvc.tar.xz))
95+
and install it by copying its contents to `C:\Program Files\LLVM`, such that
96+
`C:\Program Files\LLVM\bin\clang-cl.exe` and `C:\Program
97+
Files\LLVM\lib\clang\19\` exist. (The version and installation
98+
directory are passed to `PCbuild\build.bat` in
99+
`bench_runner/templates/_benchmark.src.yml`, using `/p:LLVMInstallDir` and
100+
`/p:LLVMToolsVersion`.)

Diff for: bench_runner/templates/_benchmark.src.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
- name: Running pyperformance
127127
if: ${{ steps.should_run.outputs.should_run != 'false' }}
128128
run: |
129-
venv\Scripts\python.exe -m bench_runner run_benchmarks benchmark cpython\$env:BUILD_DEST\python.exe ${{ inputs.fork }} ${{ inputs.ref }} ${{ inputs.benchmarks || 'all' }} "${{ env.flags }}" --run_id ${{ github.run_id }}
129+
venv\Scripts\python.exe -m bench_runner run_benchmarks benchmark ${{ (inputs.nogil == true && '(get-item cpython/$env:BUILD_DEST/python3.*.exe).FullName' || 'cpython/$env:BUILD_DEST/python.exe') }} ${{ inputs.fork }} ${{ inputs.ref }} ${{ inputs.benchmarks || 'all' }} "${{ env.flags }}" --run_id ${{ github.run_id }}
130130
# Pull again, since another job may have committed results in the meantime
131131
- name: Pull benchmarking
132132
if: ${{ steps.should_run.outputs.should_run != 'false' }}

0 commit comments

Comments
 (0)