@@ -3,10 +3,7 @@ name: Upload benchmark results
33inputs :
44 benchmark-results-dir :
55 description : ' The path to the directory with all the results in JSON format'
6- required : true
7- benchmark-name :
8- description : ' Manually set the name of the benchmark'
9- default : ' '
6+ required : True
107 dry-run :
118 default : ' true'
129 schema-version :
@@ -15,6 +12,7 @@ inputs:
1512 default : ' '
1613 venv :
1714 description : ' Path to virtual environment to activate'
15+ required : false
1816 default : ' '
1917
2018runs :
@@ -28,53 +26,26 @@ runs:
2826 if [[ -n "${{ inputs.venv }}" ]]; then
2927 source "${{ inputs.venv }}"
3028 fi
31- python3 -mpip install boto3==1.35.33 psutil==7.0.0 nvidia-ml-py==13.580.82
29+ python3 -mpip install boto3==1.35.33 psutil==7.0.0 pynvml==12.0.0
3230
33- - name : Get device name
34- shell : bash
35- run : |
36- set -eux
31+ DEVICE_NAME=""
32+ DEVICE_TYPE=""
3733
3834 if command -v nvidia-smi; then
39- DEVICE_NAME=cuda
40- nvidia-smi
41- elif command -v rocm-smi; then
35+ # NB: I'm using PyTorch here to get the device name, however, it needs to
36+ # install the correct version of PyTorch manually for now. Any PyTorch
37+ # version is fine, I just use 2.7.1 to satify PYPIDEP linter
38+ python3 -mpip install torch==2.7.1
39+ elif command -v rocminfo; then
40+ # NB: Installing torch on ROCm runner with pip here causes CI to fail
41+ # with a memoryview is too large error only on MI300 runners. Is pip
42+ # version on ROCm runner there too old? As a workaround, let's use the
43+ # GPU device name coming from rocminfo instead
4244 DEVICE_NAME=rocm
43- rocm-smi
44- elif command -v hl-smi; then
45- DEVICE_NAME=hpu
46- hl-smi
47- else
48- arch=$(uname -m)
49-
50- case "$arch" in
51- aarch64|arm64)
52- DEVICE_NAME=arm64-cpu
53- ;;
54- *)
55- DEVICE_NAME=cpu
56- ;;
57- esac
58- lscpu
59- fi
60- echo "DEVICE_NAME=$DEVICE_NAME" >> $GITHUB_ENV
61-
62- - name : Get device type
63- shell : bash
64- run : |
65- set -eux
66-
67- if [[ "${DEVICE_NAME}" == "cuda" ]]; then
68- DEVICE_TYPE=$(nvidia-smi -i 0 --query-gpu=name --format=csv,noheader | awk '{print $2}')
69- elif [[ "${DEVICE_NAME}" == "rocm" ]]; then
7045 DEVICE_TYPE=$(rocminfo | grep "Marketing Name" | tail -n1 | awk -F':' '{print $2}' | xargs)
71- elif [[ "${DEVICE_NAME}" == "hpu" ]]; then
72- DEVICE_TYPE="Intel Gaudi3 "$(hl-smi -q | grep "Product Name" | head -n 1 | awk -F ':' '{print $2}' | sed 's/^ *//')
73- elif [[ "${DEVICE_NAME}" == "cpu" ]]; then
74- DEVICE_TYPE="$(lscpu | grep "Model name" | sed -E 's/.*Model name:[[:space:]]*//; s/Intel\(R\)//g; s/\(R\)//g; s/\(TM\)//g; s/CPU//g; s/Processor//g; s/[[:space:]]+/ /g; s/^ //; s/ $//; s/ /_/g')_$(awk -F: '/Core\(s\) per socket/ {c=$2} /Socket\(s\)/ {s=$2} END {gsub(/ /,"",c); gsub(/ /,"",s); printf "%sc", c*s}' < <(lscpu))"
75- elif [[ "${DEVICE_NAME}" == "arm64-cpu" ]]; then
76- DEVICE_TYPE=$(lscpu | grep 'Vendor ID' | cut -f 2 -d ":" | awk '{$1=$1}1' | cut -f 2 -d " ")
7746 fi
47+
48+ echo "DEVICE_NAME=$DEVICE_NAME" >> $GITHUB_ENV
7849 echo "DEVICE_TYPE=$DEVICE_TYPE" >> $GITHUB_ENV
7950
8051 - name : Check that GITHUB_TOKEN is defined
10879 RUN_ATTEMPT : ${{ github.run_attempt }}
10980 JOB_ID : ${{ inputs.github-token != '' && steps.get-job-id.outputs.job-id || '0' }}
11081 JOB_NAME : ${{ inputs.github-token != '' && steps.get-job-id.outputs.job-name || '' }}
111- BENCHMARK_NAME : ${{ inputs.benchmark-name || '' }}
11282 run : |
11383 set -eux
11484
@@ -151,7 +121,6 @@ runs:
151121 shell : bash
152122 env :
153123 BENCHMARK_RESULTS_DIR : ${{ inputs.benchmark-results-dir }}
154- BENCHMARK_NAME : ${{ inputs.benchmark-name || '' }}
155124 DRY_RUN : ${{ inputs.dry-run }}
156125 # Additional information about the benchmarks
157126 BENCHMARK_METADATA : ${{ steps.gather-metadata.outputs.metadata }}
0 commit comments