From 45273c142579b0b873a6af9f5ced5a84735b1e96 Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Fri, 28 Jun 2024 09:20:45 -0700 Subject: [PATCH 01/19] Added a preliminary benchmark workflow --- .github/workflows/sycl-benchmark.yml | 136 +++++++++++++++++++++ .github/workflows/sycl-linux-precommit.yml | 65 ++++++---- .github/workflows/sycl-linux-run-tests.yml | 3 +- 3 files changed, 177 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/sycl-benchmark.yml diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml new file mode 100644 index 0000000000000..207633cf45331 --- /dev/null +++ b/.github/workflows/sycl-benchmark.yml @@ -0,0 +1,136 @@ +name: Run benchmarks (using sycl-bench) + +on: + workflow_call: + inputs: + runner: + type: string + required: True + image: + type: string + required: True + image_options: + type: string + required: True + + sycl_toolchain_artifact: + type: string + default: '' + required: False + sycl_toolchain_archive: + type: string + default: '' + required: False + sycl_toolchain_decompress_command: + type: string + default: '' + required: False + + workflow_dispatch: + inputs: + runner: + type: choice + options: + - '["Linux", "gen12"]' + - '["amdgpu"]' + - '["Linux", "arc"]' + - '["cts-cpu"]' + image: + description: | + Use option ending with ":build" for AMDGPU, ":latest" for the rest. + type: choice + options: + - 'ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:latest' + - 'ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:build' + image_options: + description: | + Use option with "--device=/dev/kfd" for AMDGPU, without it for the rest. + type: choice + options: + - '-u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN' + - '-u 1001 --device=/dev/dri --device=/dev/kfd --privileged --cap-add SYS_ADMIN' + + sycl_toolchain_artifact: + type: string + default: '' + required: False + sycl_toolchain_archive: + type: string + default: '' + required: False + sycl_toolchain_decompress_command: + type: string + default: '' + required: False + + +permissions: + contents: read + +jobs: + run: + name: Run benchmarks using sycl-bench + runs-on: ${{ fromJSON(inputs.runner) }} + container: + image: ${{ inputs.image }} + options: ${{ inputs.image_options }} + steps: + - run: pwd + - run: ls + - name: Download SYCL toolchain + if: inputs.sycl_toolchain_artifact != '' && github.event_name != 'workflow_run' + uses: actions/download-artifact@v4 + with: + name: ${{ inputs.sycl_toolchain_artifact }} + - name: Debug prints [workflow_run] + if: inputs.sycl_toolchain_artifact != '' && github.event_name == 'workflow_run' + run: | + pwd + ls + - name: Download SYCL toolchain [workflow_run] + if: inputs.sycl_toolchain_artifact != '' && github.event_name == 'workflow_run' + uses: actions/github-script@v7 + with: + script: | + const name = '${{ inputs.sycl_toolchain_artifact }}' + let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: context.payload.workflow_run.id, + }); + let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { + return artifact.name == name + })[0]; + let download = await github.rest.actions.downloadArtifact({ + owner: context.repo.owner, + repo: context.repo.repo, + artifact_id: matchArtifact.id, + archive_format: 'zip', + }); + let fs = require('fs'); + fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/` + name + '.zip', Buffer.from(download.data)); + - name: Unzip artifact [workflow_run] + if: inputs.sycl_toolchain_artifact != '' && github.event_name == 'workflow_run' + run: | + pwd + ls + unzip ${{ inputs.sycl_toolchain_artifact }}.zip + rm ${{ inputs.sycl_toolchain_artifact }}.zip + - name: Extract/Setup SYCL toolchain + if: inputs.sycl_toolchain_artifact != '' + run: | + mkdir toolchain + tar -I '${{ inputs.sycl_toolchain_decompress_command }}' -xf ${{ inputs.sycl_toolchain_archive }} -C toolchain + rm -f ${{ inputs.sycl_toolchain_archive }} + echo PATH=$PWD/toolchain/bin/:$PATH >> $GITHUB_ENV + echo LD_LIBRARY_PATH=$PWD/toolchain/lib/:$LD_LIBRARY_PATH >> $GITHUB_ENV + - run: which clang++ sycl-ls + - run: sycl-ls --verbose + - run: SYCL_PI_TRACE=-1 sycl-ls + - uses: actions/checkout@v4 + with: + repository: 'ianayl/sycl-bench' + - run: pwd + - run: ls + - run: cd sycl-bench + - run: ls diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 19d106fa23675..51bfe7a897776 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -76,11 +76,12 @@ jobs: fail-fast: false matrix: include: - - name: AMD/HIP - runner: '["Linux", "amdgpu"]' - image: ghcr.io/intel/llvm/ubuntu2204_build:latest-0300ac924620a51f76c4929794637b82790f12ab - image_options: -u 1001 --device=/dev/dri --device=/dev/kfd - target_devices: ext_oneapi_hip:gpu + # TODO UNDO THIS + # - name: AMD/HIP + # runner: '["Linux", "amdgpu"]' + # image: ghcr.io/intel/llvm/ubuntu2204_build:latest-0300ac924620a51f76c4929794637b82790f12ab + # image_options: -u 1001 --device=/dev/dri --device=/dev/kfd + # target_devices: ext_oneapi_hip:gpu - name: Intel runner: '["Linux", "gen12"]' image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest @@ -89,27 +90,27 @@ jobs: reset_gpu: true install_drivers: ${{ contains(needs.detect_changes.outputs.filters, 'drivers') }} extra_lit_opts: --param gpu-intel-gen12=True - - name: E2E tests on Intel Arc A-Series Graphics - runner: '["Linux", "arc"]' - image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest - image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN - target_devices: ext_oneapi_level_zero:gpu;opencl:gpu - reset_gpu: true - install_drivers: ${{ contains(needs.detect_changes.outputs.filters, 'drivers') }} - extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True - env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }' - - name: E2E tests with dev igc on Intel Arc A-Series Graphics - runner: '["Linux", "arc"]' - image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:${{ contains(github.event.pull_request.labels.*.name, 'ci-no-devigc') && 'latest' || 'devigc' }} - image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN - target_devices: ext_oneapi_level_zero:gpu;opencl:gpu - reset_gpu: true - install_drivers: >- - ${{ contains(needs.detect_changes.outputs.filters, 'drivers') || - contains(needs.detect_changes.outputs.filters, 'devigccfg') }} - use_dev_igc: ${{ contains(needs.detect_changes.outputs.filters, 'devigccfg') }} - extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True - env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }' + # - name: E2E tests on Intel Arc A-Series Graphics + # runner: '["Linux", "arc"]' + # image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest + # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN + # target_devices: ext_oneapi_level_zero:gpu;opencl:gpu + # reset_gpu: true + # install_drivers: ${{ contains(needs.detect_changes.outputs.filters, 'drivers') }} + # extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True + # env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }' + # - name: E2E tests with dev igc on Intel Arc A-Series Graphics + # runner: '["Linux", "arc"]' + # image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:${{ contains(github.event.pull_request.labels.*.name, 'ci-no-devigc') && 'latest' || 'devigc' }} + # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN + # target_devices: ext_oneapi_level_zero:gpu;opencl:gpu + # reset_gpu: true + # install_drivers: >- + # ${{ contains(needs.detect_changes.outputs.filters, 'drivers') || + # contains(needs.detect_changes.outputs.filters, 'devigccfg') }} + # use_dev_igc: ${{ contains(needs.detect_changes.outputs.filters, 'devigccfg') }} + # extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True + # env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }' uses: ./.github/workflows/sycl-linux-run-tests.yml with: @@ -181,3 +182,15 @@ jobs: sycl_toolchain_artifact: sycl_linux_default sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }} sycl_toolchain_decompress_command: ${{ needs.build.outputs.artifact_decompress_command }} + + sycl-bench: + needs: [build, test] + if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} + uses: ./.github/workflows/sycl-bench.yml + with: + runner: ${{ matrix. runner }} + image: ${{ matrix.image }} + image_options: ${{ matrix.image_options }} + sycl_toolchain_artifact: sycl_linux_default + sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }} + sycl_toolchain_decompress_command: ${{ needs.build.outputs.artifact_decompress_command }} \ No newline at end of file diff --git a/.github/workflows/sycl-linux-run-tests.yml b/.github/workflows/sycl-linux-run-tests.yml index 2f8e62eabd701..c71f7b04be6c8 100644 --- a/.github/workflows/sycl-linux-run-tests.yml +++ b/.github/workflows/sycl-linux-run-tests.yml @@ -339,7 +339,8 @@ jobs: ONEAPI_DEVICE_SELECTOR: ${{ inputs.target_devices }} # This job takes ~100min usually. But sometimes some test isn't # responding, so the job reaches the 360min limit. Setting a lower one. - timeout-minutes: 150 + # TODO UNDO THIS + timeout-minutes: 1 # By-default GitHub actions execute the "run" shell script with -e option, # so the execution terminates if any command returns a non-zero status. # Since we're using a loop to run all test-binaries separately, some test From 7e56b6c2c86d92f3ff4b956d09f2a328ceae3a26 Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Fri, 28 Jun 2024 09:59:23 -0700 Subject: [PATCH 02/19] Fixed typo --- .github/workflows/sycl-linux-precommit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 51bfe7a897776..5cfd71d4697e1 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -183,10 +183,10 @@ jobs: sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }} sycl_toolchain_decompress_command: ${{ needs.build.outputs.artifact_decompress_command }} - sycl-bench: + sycl-benchmark: needs: [build, test] if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} - uses: ./.github/workflows/sycl-bench.yml + uses: ./.github/workflows/sycl-benchmark.yml with: runner: ${{ matrix. runner }} image: ${{ matrix.image }} From 5c8a4c924cecb344a3153def8b75b0d6f74ea634 Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Fri, 28 Jun 2024 15:41:37 -0700 Subject: [PATCH 03/19] bug fix --- .github/workflows/sycl-benchmark.yml | 2 +- .github/workflows/sycl-linux-precommit.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml index 207633cf45331..8cf993a151a4a 100644 --- a/.github/workflows/sycl-benchmark.yml +++ b/.github/workflows/sycl-benchmark.yml @@ -70,7 +70,7 @@ permissions: jobs: run: name: Run benchmarks using sycl-bench - runs-on: ${{ fromJSON(inputs.runner) }} + runs-on: ${{ fromJSON(inputs.runner || '["Linux", "gen12"]') }} container: image: ${{ inputs.image }} options: ${{ inputs.image_options }} diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 5cfd71d4697e1..ee40d0da61c2f 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -188,7 +188,7 @@ jobs: if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} uses: ./.github/workflows/sycl-benchmark.yml with: - runner: ${{ matrix. runner }} + runner: ${{ matrix.runner }} image: ${{ matrix.image }} image_options: ${{ matrix.image_options }} sycl_toolchain_artifact: sycl_linux_default From 203e6f87a27d2c56e28c13d1910ea5b4d4a9763b Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Fri, 28 Jun 2024 19:17:29 -0700 Subject: [PATCH 04/19] Bug fix --- .github/workflows/sycl-linux-precommit.yml | 143 ++++++++++++--------- 1 file changed, 83 insertions(+), 60 deletions(-) diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index ee40d0da61c2f..52dce516433f4 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -69,68 +69,68 @@ jobs: else echo 'arc_tests="Matrix/"' >> "$GITHUB_OUTPUT" fi - test: - needs: [build, detect_changes, determine_arc_tests] - if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} - strategy: - fail-fast: false - matrix: - include: - # TODO UNDO THIS - # - name: AMD/HIP - # runner: '["Linux", "amdgpu"]' - # image: ghcr.io/intel/llvm/ubuntu2204_build:latest-0300ac924620a51f76c4929794637b82790f12ab - # image_options: -u 1001 --device=/dev/dri --device=/dev/kfd - # target_devices: ext_oneapi_hip:gpu - - name: Intel - runner: '["Linux", "gen12"]' - image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest - image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN - target_devices: ext_oneapi_level_zero:gpu;opencl:gpu;opencl:cpu - reset_gpu: true - install_drivers: ${{ contains(needs.detect_changes.outputs.filters, 'drivers') }} - extra_lit_opts: --param gpu-intel-gen12=True - # - name: E2E tests on Intel Arc A-Series Graphics - # runner: '["Linux", "arc"]' - # image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest - # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN - # target_devices: ext_oneapi_level_zero:gpu;opencl:gpu - # reset_gpu: true - # install_drivers: ${{ contains(needs.detect_changes.outputs.filters, 'drivers') }} - # extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True - # env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }' - # - name: E2E tests with dev igc on Intel Arc A-Series Graphics - # runner: '["Linux", "arc"]' - # image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:${{ contains(github.event.pull_request.labels.*.name, 'ci-no-devigc') && 'latest' || 'devigc' }} - # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN - # target_devices: ext_oneapi_level_zero:gpu;opencl:gpu - # reset_gpu: true - # install_drivers: >- - # ${{ contains(needs.detect_changes.outputs.filters, 'drivers') || - # contains(needs.detect_changes.outputs.filters, 'devigccfg') }} - # use_dev_igc: ${{ contains(needs.detect_changes.outputs.filters, 'devigccfg') }} - # extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True - # env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }' + # test: + # needs: [build, detect_changes, determine_arc_tests] + # if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} + # strategy: + # fail-fast: false + # matrix: + # include: + # # TODO UNDO THIS + # # - name: AMD/HIP + # # runner: '["Linux", "amdgpu"]' + # # image: ghcr.io/intel/llvm/ubuntu2204_build:latest-0300ac924620a51f76c4929794637b82790f12ab + # # image_options: -u 1001 --device=/dev/dri --device=/dev/kfd + # # target_devices: ext_oneapi_hip:gpu + # - name: Intel + # runner: '["Linux", "gen12"]' + # image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest + # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN + # target_devices: ext_oneapi_level_zero:gpu;opencl:gpu;opencl:cpu + # reset_gpu: true + # install_drivers: ${{ contains(needs.detect_changes.outputs.filters, 'drivers') }} + # extra_lit_opts: --param gpu-intel-gen12=True + # # - name: E2E tests on Intel Arc A-Series Graphics + # # runner: '["Linux", "arc"]' + # # image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest + # # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN + # # target_devices: ext_oneapi_level_zero:gpu;opencl:gpu + # # reset_gpu: true + # # install_drivers: ${{ contains(needs.detect_changes.outputs.filters, 'drivers') }} + # # extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True + # # env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }' + # # - name: E2E tests with dev igc on Intel Arc A-Series Graphics + # # runner: '["Linux", "arc"]' + # # image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:${{ contains(github.event.pull_request.labels.*.name, 'ci-no-devigc') && 'latest' || 'devigc' }} + # # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN + # # target_devices: ext_oneapi_level_zero:gpu;opencl:gpu + # # reset_gpu: true + # # install_drivers: >- + # # ${{ contains(needs.detect_changes.outputs.filters, 'drivers') || + # # contains(needs.detect_changes.outputs.filters, 'devigccfg') }} + # # use_dev_igc: ${{ contains(needs.detect_changes.outputs.filters, 'devigccfg') }} + # # extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True + # # env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }' - uses: ./.github/workflows/sycl-linux-run-tests.yml - with: - name: ${{ matrix.name }} - runner: ${{ matrix. runner }} - image: ${{ matrix.image }} - image_options: ${{ matrix.image_options }} - target_devices: ${{ matrix.target_devices }} - reset_gpu: ${{ matrix.reset_gpu }} - install_drivers: ${{ matrix.install_drivers }} - use_dev_igc: ${{ matrix.use_dev_igc }} - extra_lit_opts: ${{ matrix.extra_lit_opts }} - env: ${{ matrix.env || '{}' }} + # uses: ./.github/workflows/sycl-linux-run-tests.yml + # with: + # name: ${{ matrix.name }} + # runner: ${{ matrix. runner }} + # image: ${{ matrix.image }} + # image_options: ${{ matrix.image_options }} + # target_devices: ${{ matrix.target_devices }} + # reset_gpu: ${{ matrix.reset_gpu }} + # install_drivers: ${{ matrix.install_drivers }} + # use_dev_igc: ${{ matrix.use_dev_igc }} + # extra_lit_opts: ${{ matrix.extra_lit_opts }} + # env: ${{ matrix.env || '{}' }} - ref: ${{ github.sha }} - merge_ref: '' + # ref: ${{ github.sha }} + # merge_ref: '' - sycl_toolchain_artifact: sycl_linux_default - sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }} - sycl_toolchain_decompress_command: ${{ needs.build.outputs.artifact_decompress_command }} + # sycl_toolchain_artifact: sycl_linux_default + # sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }} + # sycl_toolchain_decompress_command: ${{ needs.build.outputs.artifact_decompress_command }} test-perf: @@ -184,8 +184,31 @@ jobs: sycl_toolchain_decompress_command: ${{ needs.build.outputs.artifact_decompress_command }} sycl-benchmark: - needs: [build, test] + needs: [build] #, test] if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} + strategy: + fail-fast: false + matrix: + include: + # - name: AMD/HIP + # runner: '["Linux", "amdgpu"]' + # image: ghcr.io/intel/llvm/ubuntu2204_build:latest-0300ac924620a51f76c4929794637b82790f12ab + # image_options: -u 1001 --device=/dev/dri --device=/dev/kfd + # target_devices: ext_oneapi_hip:gpu + - name: Intel + runner: '["Linux", "gen12"]' + image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest + image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN + # - name: E2E tests on Intel Arc A-Series Graphics + # runner: '["Linux", "arc"]' + # image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest + # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN + # target_devices: ext_oneapi_level_zero:gpu;opencl:gpu + # - name: E2E tests with dev igc on Intel Arc A-Series Graphics + # runner: '["Linux", "arc"]' + # image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:${{ contains(github.event.pull_request.labels.*.name, 'ci-no-devigc') && 'latest' || 'devigc' }} + # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN + # target_devices: ext_oneapi_level_zero:gpu;opencl:gpu uses: ./.github/workflows/sycl-benchmark.yml with: runner: ${{ matrix.runner }} From 60e8d40e51461248daaaf722ba5c835efa9ba126 Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Fri, 28 Jun 2024 19:27:46 -0700 Subject: [PATCH 05/19] Experimentation --- .github/workflows/sycl-benchmark.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml index 8cf993a151a4a..1bfa749528ba0 100644 --- a/.github/workflows/sycl-benchmark.yml +++ b/.github/workflows/sycl-benchmark.yml @@ -124,13 +124,10 @@ jobs: rm -f ${{ inputs.sycl_toolchain_archive }} echo PATH=$PWD/toolchain/bin/:$PATH >> $GITHUB_ENV echo LD_LIBRARY_PATH=$PWD/toolchain/lib/:$LD_LIBRARY_PATH >> $GITHUB_ENV - - run: which clang++ sycl-ls - - run: sycl-ls --verbose - - run: SYCL_PI_TRACE=-1 sycl-ls - uses: actions/checkout@v4 with: repository: 'ianayl/sycl-bench' - - run: pwd - - run: ls - - run: cd sycl-bench - run: ls + - run: which clang++ sycl-ls + - run: sycl-ls --verbose + - run: SYCL_PI_TRACE=-1 sycl-ls From 3e30dffca810f47a49210b3ae0e95f0c9047b340 Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Fri, 28 Jun 2024 19:55:59 -0700 Subject: [PATCH 06/19] Prevent actions/checkout@v4 from overriding my current folder's contents --- .github/workflows/sycl-benchmark.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml index 1bfa749528ba0..c1fa83b8cc746 100644 --- a/.github/workflows/sycl-benchmark.yml +++ b/.github/workflows/sycl-benchmark.yml @@ -127,7 +127,8 @@ jobs: - uses: actions/checkout@v4 with: repository: 'ianayl/sycl-bench' + clean: false + path: './sycl-bench/' - run: ls - - run: which clang++ sycl-ls - run: sycl-ls --verbose - run: SYCL_PI_TRACE=-1 sycl-ls From b5593d7e08d7e2e55babcc32b0fd2eb713cefcd7 Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Fri, 28 Jun 2024 20:50:34 -0700 Subject: [PATCH 07/19] Added script to run benchmarks --- .github/workflows/sycl-benchmark.yml | 72 ++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml index c1fa83b8cc746..d43f5348a87f1 100644 --- a/.github/workflows/sycl-benchmark.yml +++ b/.github/workflows/sycl-benchmark.yml @@ -123,12 +123,76 @@ jobs: tar -I '${{ inputs.sycl_toolchain_decompress_command }}' -xf ${{ inputs.sycl_toolchain_archive }} -C toolchain rm -f ${{ inputs.sycl_toolchain_archive }} echo PATH=$PWD/toolchain/bin/:$PATH >> $GITHUB_ENV + echo SYCL_ARTIFACT_PATH="$PWD/toolchain/" echo LD_LIBRARY_PATH=$PWD/toolchain/lib/:$LD_LIBRARY_PATH >> $GITHUB_ENV - uses: actions/checkout@v4 with: repository: 'ianayl/sycl-bench' - clean: false + clean: false # Prevents actions/checkout@v4 from deleting the extracted artifact path: './sycl-bench/' - - run: ls - - run: sycl-ls --verbose - - run: SYCL_PI_TRACE=-1 sycl-ls + - name: Build sycl-bench + run: | + cd ./sycl-bench + cmake -DSYCL_IMPL=dpcpp -DCMAKE_CXX_COMPILER=$SYCL_ARTIFACT_PATH/bin/clang++ -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=./bin -S . -B ./build && + cmake --build ./build + cd - + echo LD_LIBRARY_PATH=$SYCL_ARTIFACT_PATH/lib/:$LD_LIBRARY_PATH >> $GITHUB_ENV + - name: Run sycl-bench tests + run: | + # Determine the index of a column in a CSV given its title + # Usage: get_csv_col_index + get_csv_col_index() { + tmp_csv_col_i="$(cat "$1" | head -n 1 | grep -o "^.*$2," | grep -o ',' | wc -l)" + } + + # Usage: print_bench_res + print_bench_res() { + if [ ! -s $1 ]; then + printf "NO OUTPUT! (Status $2)\n" | tee -a $3 + return # Do not proceed if file is empty + fi + + get_csv_col_index $1 run-time-mean + tmp_run_time_mean_i=$tmp_csv_col_i + get_csv_col_index $1 run-time-median + tmp_run_time_median_i=$tmp_csv_col_i + get_csv_col_index $1 run-time-throughput + tmp_run_time_throughput_i=$tmp_csv_col_i + + # Columns of interest used in `cut`: + tmp_columns="1,$tmp_run_time_mean_i,$tmp_run_time_median_i,$tmp_run_time_throughput_i" + + # `sycl-bench` output seems to like inserting the header multiple times. + # This caches the header and prints it only once: + tmp_header_title="$(cat $1 | head -n 1 | sed 's/^\# Benchmark name/benchmark/')" + + { echo $tmp_header_title; cat $1; } | + grep "^[^#]" | # Discard extraneous headers + cut -d',' -f$tmp_columns | # Cut out columns of interest + tr ',' '\t' | column -t | # Display as a table + tee -a $3 # Print to summary file + } + + # run sycl bench step + run() { + tmp_timestamp="$(date '+%Y%m%d_%H%M%S')" + mkdir "./sycl-bench/build/bench-$tmp_timestamp/" + tmp_summary_file="./sycl-bench/build/bench-$tmp_timestamp/summary.txt" + + for file in ./sycl-bench/build/bin/*; do + # TODO -size should not be always 256, caution + tmp_bench_output="./sycl-bench/build/bench-$tmp_timestamp/$(basename $file).csv" + tmp_bench_log="./sycl-bench/build/bench-$tmp_timestamp/$(basename $file).log" + + printf "\n### Results for $(basename $file) ###\n" | tee -a $tmp_summary_file + $file --output=$tmp_bench_output --no-verification --size=256 2> "$tmp_bench_log" + print_bench_res $tmp_bench_output $? $tmp_summary_file + # Remove log if nothing logged + [ ! -s "$tmp_bench_log" ] && rm "$tmp_bench_log" || cat "$tmp_bench_log" | tee -a $tmp_summary_file + done + } + + run + - name: Check results + run: | + cat ./sycl-bench/build/bench-*/summary.txt From 05b2e2fd6b7149c0040856a44f4ac713292f6cbf Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Fri, 28 Jun 2024 23:30:05 -0700 Subject: [PATCH 08/19] Bug fix --- .github/workflows/sycl-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml index d43f5348a87f1..7f7f6364eb8df 100644 --- a/.github/workflows/sycl-benchmark.yml +++ b/.github/workflows/sycl-benchmark.yml @@ -123,7 +123,7 @@ jobs: tar -I '${{ inputs.sycl_toolchain_decompress_command }}' -xf ${{ inputs.sycl_toolchain_archive }} -C toolchain rm -f ${{ inputs.sycl_toolchain_archive }} echo PATH=$PWD/toolchain/bin/:$PATH >> $GITHUB_ENV - echo SYCL_ARTIFACT_PATH="$PWD/toolchain/" + echo SYCL_ARTIFACT_PATH="$PWD/toolchain/" >> $GITHUB_ENV echo LD_LIBRARY_PATH=$PWD/toolchain/lib/:$LD_LIBRARY_PATH >> $GITHUB_ENV - uses: actions/checkout@v4 with: From efa88cb43ec986281e6b14004ca1230f6dc8dbb3 Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Sun, 30 Jun 2024 14:13:58 -0700 Subject: [PATCH 09/19] Amend lack of column in ubuntu util-linux --- .github/workflows/sycl-benchmark.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml index 7f7f6364eb8df..2cbc25dca54df 100644 --- a/.github/workflows/sycl-benchmark.yml +++ b/.github/workflows/sycl-benchmark.yml @@ -75,8 +75,6 @@ jobs: image: ${{ inputs.image }} options: ${{ inputs.image_options }} steps: - - run: pwd - - run: ls - name: Download SYCL toolchain if: inputs.sycl_toolchain_artifact != '' && github.event_name != 'workflow_run' uses: actions/download-artifact@v4 @@ -192,6 +190,13 @@ jobs: done } + # Install pretty-printing utilities + # + # For some reason, ubuntu has an issue with the `column` command not included in standard util-linux. + # So, to use `column`, the BSD utils is used. Either wait until this fixed on Ubuntu's side, or + # I can write another script to accomplish this. + sudo apt install -y bsdmainutils + run - name: Check results run: | From 4998a4777c00d2b3ecae3923e767fa3f71a03ddf Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Sun, 30 Jun 2024 14:30:21 -0700 Subject: [PATCH 10/19] Update repos before proceeding --- .github/workflows/sycl-benchmark.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml index 2cbc25dca54df..22fa9070751e4 100644 --- a/.github/workflows/sycl-benchmark.yml +++ b/.github/workflows/sycl-benchmark.yml @@ -195,6 +195,7 @@ jobs: # For some reason, ubuntu has an issue with the `column` command not included in standard util-linux. # So, to use `column`, the BSD utils is used. Either wait until this fixed on Ubuntu's side, or # I can write another script to accomplish this. + sudo apt update sudo apt install -y bsdmainutils run From d381136acd472c31437f1814e6b1938fa13038e7 Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Tue, 2 Jul 2024 08:20:59 -0700 Subject: [PATCH 11/19] trying to fix networking --- .github/workflows/sycl-benchmark.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml index 22fa9070751e4..804cf54f17603 100644 --- a/.github/workflows/sycl-benchmark.yml +++ b/.github/workflows/sycl-benchmark.yml @@ -73,7 +73,7 @@ jobs: runs-on: ${{ fromJSON(inputs.runner || '["Linux", "gen12"]') }} container: image: ${{ inputs.image }} - options: ${{ inputs.image_options }} + options: "${{ inputs.image_options }} --network=host" steps: - name: Download SYCL toolchain if: inputs.sycl_toolchain_artifact != '' && github.event_name != 'workflow_run' @@ -167,7 +167,7 @@ jobs: { echo $tmp_header_title; cat $1; } | grep "^[^#]" | # Discard extraneous headers cut -d',' -f$tmp_columns | # Cut out columns of interest - tr ',' '\t' | column -t | # Display as a table + tr ',' '\t' | #column -t | # Display as a table tee -a $3 # Print to summary file } @@ -195,6 +195,7 @@ jobs: # For some reason, ubuntu has an issue with the `column` command not included in standard util-linux. # So, to use `column`, the BSD utils is used. Either wait until this fixed on Ubuntu's side, or # I can write another script to accomplish this. + cat /etc/resolv.conf sudo apt update sudo apt install -y bsdmainutils From f5ba15078072877dafc0ff1e4f4cf062be209005 Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Tue, 2 Jul 2024 10:24:33 -0700 Subject: [PATCH 12/19] Abort fixing networking, checking current results --- .github/workflows/sycl-benchmark.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml index 804cf54f17603..0373f225b7c8b 100644 --- a/.github/workflows/sycl-benchmark.yml +++ b/.github/workflows/sycl-benchmark.yml @@ -73,7 +73,7 @@ jobs: runs-on: ${{ fromJSON(inputs.runner || '["Linux", "gen12"]') }} container: image: ${{ inputs.image }} - options: "${{ inputs.image_options }} --network=host" + options: ${{ inputs.image_options }} steps: - name: Download SYCL toolchain if: inputs.sycl_toolchain_artifact != '' && github.event_name != 'workflow_run' @@ -167,7 +167,7 @@ jobs: { echo $tmp_header_title; cat $1; } | grep "^[^#]" | # Discard extraneous headers cut -d',' -f$tmp_columns | # Cut out columns of interest - tr ',' '\t' | #column -t | # Display as a table + tr ',' '\t' # | #column -t | # Display as a table tee -a $3 # Print to summary file } @@ -190,15 +190,6 @@ jobs: done } - # Install pretty-printing utilities - # - # For some reason, ubuntu has an issue with the `column` command not included in standard util-linux. - # So, to use `column`, the BSD utils is used. Either wait until this fixed on Ubuntu's side, or - # I can write another script to accomplish this. - cat /etc/resolv.conf - sudo apt update - sudo apt install -y bsdmainutils - run - name: Check results run: | From 45fb5b6fe2d97dbff38b1000f1cf9a5c3bfd7273 Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Tue, 2 Jul 2024 13:08:07 -0700 Subject: [PATCH 13/19] Removed dependency on column --- .github/workflows/sycl-benchmark.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml index 0373f225b7c8b..d85ccff9d28ed 100644 --- a/.github/workflows/sycl-benchmark.yml +++ b/.github/workflows/sycl-benchmark.yml @@ -150,6 +150,9 @@ jobs: return # Do not proceed if file is empty fi + tmp_newline=" + " + get_csv_col_index $1 run-time-mean tmp_run_time_mean_i=$tmp_csv_col_i get_csv_col_index $1 run-time-median @@ -157,18 +160,17 @@ jobs: get_csv_col_index $1 run-time-throughput tmp_run_time_throughput_i=$tmp_csv_col_i - # Columns of interest used in `cut`: - tmp_columns="1,$tmp_run_time_mean_i,$tmp_run_time_median_i,$tmp_run_time_throughput_i" - # `sycl-bench` output seems to like inserting the header multiple times. - # This caches the header and prints it only once: + # Here we cache the header to make sure it prints only once: tmp_header_title="$(cat $1 | head -n 1 | sed 's/^\# Benchmark name/benchmark/')" - - { echo $tmp_header_title; cat $1; } | - grep "^[^#]" | # Discard extraneous headers - cut -d',' -f$tmp_columns | # Cut out columns of interest - tr ',' '\t' # | #column -t | # Display as a table - tee -a $3 # Print to summary file + tmp_result="$(cat $1 | grep '^[^\#]')" + + awk -v me="$tmp_run_time_mean_i" \ + -v md="$tmp_run_time_median_i" \ + -v th="$tmp_run_time_throughput_i" \ + -F',' '{printf "%-57s %-13s %-15s %-20s\n", $1, $me, $md, $th }' \ + <<< "$tmp_header_title$tmp_newline$tmp_result" \ + | tee -a $3 # Print to summary file } # run sycl bench step From d5b60aef177c840e8608f771b2e2939fb6397e9c Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Tue, 2 Jul 2024 13:09:44 -0700 Subject: [PATCH 14/19] Do not terminate after segfault --- .github/workflows/sycl-benchmark.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml index d85ccff9d28ed..a1c259e4aae24 100644 --- a/.github/workflows/sycl-benchmark.yml +++ b/.github/workflows/sycl-benchmark.yml @@ -136,6 +136,7 @@ jobs: cd - echo LD_LIBRARY_PATH=$SYCL_ARTIFACT_PATH/lib/:$LD_LIBRARY_PATH >> $GITHUB_ENV - name: Run sycl-bench tests + continue-on-error: true run: | # Determine the index of a column in a CSV given its title # Usage: get_csv_col_index From 03a6c0222c59f99313d4dc278f3b9d21d6925b69 Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Tue, 2 Jul 2024 14:36:18 -0700 Subject: [PATCH 15/19] Whatever shell this is using does not seem to appreciate newlines --- .github/workflows/sycl-benchmark.yml | 30 ++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml index a1c259e4aae24..5c45cb6aa9851 100644 --- a/.github/workflows/sycl-benchmark.yml +++ b/.github/workflows/sycl-benchmark.yml @@ -169,21 +169,19 @@ jobs: awk -v me="$tmp_run_time_mean_i" \ -v md="$tmp_run_time_median_i" \ -v th="$tmp_run_time_throughput_i" \ - -F',' '{printf "%-57s %-13s %-15s %-20s\n", $1, $me, $md, $th }' \ - <<< "$tmp_header_title$tmp_newline$tmp_result" \ - | tee -a $3 # Print to summary file + -F',' '{printf "%-57s %-13s %-15s %-20s\n", $1, $me, $md, $th }' <<< "$tmp_header_title$tmp_newline$tmp_result" | tee -a $3 # Print to summary file } # run sycl bench step run() { - tmp_timestamp="$(date '+%Y%m%d_%H%M%S')" - mkdir "./sycl-bench/build/bench-$tmp_timestamp/" - tmp_summary_file="./sycl-bench/build/bench-$tmp_timestamp/summary.txt" + TIMESTAMP="$(date '+%Y%m%d_%H%M%S')" + mkdir "./sycl-bench/build/bench-$TIMESTAMP/" + tmp_summary_file="./sycl-bench/build/bench-$TIMESTAMP/summary.txt" for file in ./sycl-bench/build/bin/*; do # TODO -size should not be always 256, caution - tmp_bench_output="./sycl-bench/build/bench-$tmp_timestamp/$(basename $file).csv" - tmp_bench_log="./sycl-bench/build/bench-$tmp_timestamp/$(basename $file).log" + tmp_bench_output="./sycl-bench/build/bench-$TIMESTAMP/$(basename $file).csv" + tmp_bench_log="./sycl-bench/build/bench-$TIMESTAMP/$(basename $file).log" printf "\n### Results for $(basename $file) ###\n" | tee -a $tmp_summary_file $file --output=$tmp_bench_output --no-verification --size=256 2> "$tmp_bench_log" @@ -191,9 +189,25 @@ jobs: # Remove log if nothing logged [ ! -s "$tmp_bench_log" ] && rm "$tmp_bench_log" || cat "$tmp_bench_log" | tee -a $tmp_summary_file done + + # Export timestamp for later use + echo TIMESTAMP=$TIMESTAMP >> $GITHUB_ENV } run - name: Check results run: | cat ./sycl-bench/build/bench-*/summary.txt +# - name: Pack results +# id: pack_results +# run: | +# ARCHIVE_PATH="./sycl-bench/build/bench-$TIMESTAMP.tar.gz" +# tar -I gzip -cf "$ARCHIVE_PATH" -C "./sycl-bench/build/bench-$TIMESTAMP" . +# echo ARCHIVE_PATH="$ARCHIVE_PATH" >> $GITHUB_OUTPUT +# - name: Upload results +# uses: actions/upload-artifact@v4 +# with: +# name: sycl_benchmark_res_${{ env.TIMESTAMP }} +# path: ${{ steps.pack_results.outputs.ARCHIVE_PATH }} +# retention-days: 7 +# \ No newline at end of file From 8062b73de170ab2139061ddffca35f5c24417a73 Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Tue, 2 Jul 2024 17:15:06 -0700 Subject: [PATCH 16/19] This shell really hates newlines.... --- .github/workflows/sycl-benchmark.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml index 5c45cb6aa9851..78f8be7caa8b8 100644 --- a/.github/workflows/sycl-benchmark.yml +++ b/.github/workflows/sycl-benchmark.yml @@ -166,10 +166,7 @@ jobs: tmp_header_title="$(cat $1 | head -n 1 | sed 's/^\# Benchmark name/benchmark/')" tmp_result="$(cat $1 | grep '^[^\#]')" - awk -v me="$tmp_run_time_mean_i" \ - -v md="$tmp_run_time_median_i" \ - -v th="$tmp_run_time_throughput_i" \ - -F',' '{printf "%-57s %-13s %-15s %-20s\n", $1, $me, $md, $th }' <<< "$tmp_header_title$tmp_newline$tmp_result" | tee -a $3 # Print to summary file + awk -v me="$tmp_run_time_mean_i" -v md="$tmp_run_time_median_i" -v th="$tmp_run_time_throughput_i" -F',' '{printf "%-57s %-13s %-15s %-20s\n", $1, $me, $md, $th }' <<< "$tmp_header_title$tmp_newline$tmp_result" | tee -a $3 # Print to summary file } # run sycl bench step From 83c41e4633939763f897f580f4814275fb78cb4f Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Wed, 3 Jul 2024 07:33:01 -0700 Subject: [PATCH 17/19] Ubuntu docker images use dash as the default shell??? --- .github/workflows/sycl-benchmark.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml index 78f8be7caa8b8..65b3192dfce18 100644 --- a/.github/workflows/sycl-benchmark.yml +++ b/.github/workflows/sycl-benchmark.yml @@ -151,9 +151,6 @@ jobs: return # Do not proceed if file is empty fi - tmp_newline=" - " - get_csv_col_index $1 run-time-mean tmp_run_time_mean_i=$tmp_csv_col_i get_csv_col_index $1 run-time-median @@ -166,7 +163,12 @@ jobs: tmp_header_title="$(cat $1 | head -n 1 | sed 's/^\# Benchmark name/benchmark/')" tmp_result="$(cat $1 | grep '^[^\#]')" - awk -v me="$tmp_run_time_mean_i" -v md="$tmp_run_time_median_i" -v th="$tmp_run_time_throughput_i" -F',' '{printf "%-57s %-13s %-15s %-20s\n", $1, $me, $md, $th }' <<< "$tmp_header_title$tmp_newline$tmp_result" | tee -a $3 # Print to summary file + printf "%s\n%s" "$tmp_header_title" "$tmp_result" \ + | awk -F',' -v me="$tmp_run_time_mean_i" \ + -v md="$tmp_run_time_median_i" \ + -v th="$tmp_run_time_throughput_i" \ + '{printf "%-57s %-13s %-15s %-20s\n", $1, $me, $md, $th }' \ + | tee -a $3 # Print to summary file } # run sycl bench step From c4a0f3d83208992f9e7432db5f58df48163c97de Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Wed, 3 Jul 2024 07:33:52 -0700 Subject: [PATCH 18/19] Reintroduce artifacts --- .github/workflows/sycl-benchmark.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml index 65b3192dfce18..d068107774499 100644 --- a/.github/workflows/sycl-benchmark.yml +++ b/.github/workflows/sycl-benchmark.yml @@ -196,17 +196,16 @@ jobs: run - name: Check results run: | - cat ./sycl-bench/build/bench-*/summary.txt -# - name: Pack results -# id: pack_results -# run: | -# ARCHIVE_PATH="./sycl-bench/build/bench-$TIMESTAMP.tar.gz" -# tar -I gzip -cf "$ARCHIVE_PATH" -C "./sycl-bench/build/bench-$TIMESTAMP" . -# echo ARCHIVE_PATH="$ARCHIVE_PATH" >> $GITHUB_OUTPUT -# - name: Upload results -# uses: actions/upload-artifact@v4 -# with: -# name: sycl_benchmark_res_${{ env.TIMESTAMP }} -# path: ${{ steps.pack_results.outputs.ARCHIVE_PATH }} -# retention-days: 7 -# \ No newline at end of file + cat "./sycl-bench/build/bench-$TIMESTAMP/summary.txt" + - name: Pack results + id: pack_results + run: | + ARCHIVE_PATH="./sycl-bench/build/bench-$TIMESTAMP.tar.gz" + tar -I gzip -cf "$ARCHIVE_PATH" -C "./sycl-bench/build/bench-$TIMESTAMP" . + echo ARCHIVE_PATH="$ARCHIVE_PATH" >> $GITHUB_OUTPUT + - name: Upload results + uses: actions/upload-artifact@v4 + with: + name: sycl_benchmark_res_${{ env.TIMESTAMP }} + path: ${{ steps.pack_results.outputs.ARCHIVE_PATH }} + retention-days: 7 From 8c01f8c14cb3cf4f5a5cc80a7aacc38a758f9fb0 Mon Sep 17 00:00:00 2001 From: "Li, Ian" Date: Wed, 3 Jul 2024 09:22:47 -0700 Subject: [PATCH 19/19] Attempt to suppress segfault --- .github/workflows/sycl-benchmark.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sycl-benchmark.yml b/.github/workflows/sycl-benchmark.yml index d068107774499..9c9f56531e700 100644 --- a/.github/workflows/sycl-benchmark.yml +++ b/.github/workflows/sycl-benchmark.yml @@ -136,7 +136,7 @@ jobs: cd - echo LD_LIBRARY_PATH=$SYCL_ARTIFACT_PATH/lib/:$LD_LIBRARY_PATH >> $GITHUB_ENV - name: Run sycl-bench tests - continue-on-error: true + id: run-benchmarks run: | # Determine the index of a column in a CSV given its title # Usage: get_csv_col_index @@ -182,9 +182,10 @@ jobs: tmp_bench_output="./sycl-bench/build/bench-$TIMESTAMP/$(basename $file).csv" tmp_bench_log="./sycl-bench/build/bench-$TIMESTAMP/$(basename $file).log" + tmp_err="0" printf "\n### Results for $(basename $file) ###\n" | tee -a $tmp_summary_file - $file --output=$tmp_bench_output --no-verification --size=256 2> "$tmp_bench_log" - print_bench_res $tmp_bench_output $? $tmp_summary_file + $file --output=$tmp_bench_output --no-verification --size=256 2> "$tmp_bench_log" || tmp_err=$? + print_bench_res $tmp_bench_output $tmp_err $tmp_summary_file # Remove log if nothing logged [ ! -s "$tmp_bench_log" ] && rm "$tmp_bench_log" || cat "$tmp_bench_log" | tee -a $tmp_summary_file done @@ -195,15 +196,18 @@ jobs: run - name: Check results + if: steps.run-benchmarks.outcome == 'success' run: | cat "./sycl-bench/build/bench-$TIMESTAMP/summary.txt" - name: Pack results + if: steps.run-benchmarks.outcome == 'success' id: pack_results run: | ARCHIVE_PATH="./sycl-bench/build/bench-$TIMESTAMP.tar.gz" tar -I gzip -cf "$ARCHIVE_PATH" -C "./sycl-bench/build/bench-$TIMESTAMP" . echo ARCHIVE_PATH="$ARCHIVE_PATH" >> $GITHUB_OUTPUT - name: Upload results + if: steps.run-benchmarks.outcome == 'success' uses: actions/upload-artifact@v4 with: name: sycl_benchmark_res_${{ env.TIMESTAMP }}