File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,9 @@ def run_benchmarks(
82
82
if extra_args is None :
83
83
extra_args = []
84
84
85
+ if (affinity := os .environ .get ('CPU_AFFINITY' )):
86
+ extra_args .append (f'--affinity={ affinity } ' )
87
+
85
88
args = [
86
89
sys .executable ,
87
90
"-m" ,
Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ jobs:
221
221
- name : Tune system
222
222
if : ${{ steps.should_run.outputs.should_run != 'false' }}
223
223
run : |
224
- sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH venv/bin/python -m pyperf system ${{ inputs.perf && 'reset' || 'tune ${PYPERF_CPU_AFFINITY :+--affinity="$PYPERF_CPU_AFFINITY "}' }}
224
+ sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH venv/bin/python -m pyperf system ${{ inputs.perf && 'reset' || 'tune ${CPU_AFFINITY :+--affinity="$CPU_AFFINITY "}' }}
225
225
- name : Tune for (Linux) perf
226
226
if : ${{ steps.should_run.outputs.should_run != 'false' && inputs.perf }}
227
227
run : |
You can’t perform that action at this time.
0 commit comments