From c9a7f610a325d2d642ea17d6d71977e2124b38e9 Mon Sep 17 00:00:00 2001 From: "Agarwal, Udit" Date: Wed, 22 Jan 2025 16:02:44 -0800 Subject: [PATCH 1/3] DIsable spriv-tools in CI --- .github/workflows/sycl-linux-build.yml | 2 ++ .github/workflows/sycl-windows-build.yml | 2 ++ llvm-spirv/test/lit.cfg.py | 11 +++++++---- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index 8971079f08f30..0f536b26a86b1 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -200,6 +200,8 @@ jobs: - name: check-llvm-spirv if: always() && !cancelled() && contains(inputs.changes, 'llvm_spirv') run: | + # Temporary workaround to disable running tests requiring spriv-tools. + export LIT_OPTS="--param disable-spriv-tools=True" cmake --build $GITHUB_WORKSPACE/build --target check-llvm-spirv - name: check-xptifw if: always() && !cancelled() && contains(inputs.changes, 'xptifw') diff --git a/.github/workflows/sycl-windows-build.yml b/.github/workflows/sycl-windows-build.yml index 77ea70c23c8d1..566ec14fdb421 100644 --- a/.github/workflows/sycl-windows-build.yml +++ b/.github/workflows/sycl-windows-build.yml @@ -159,6 +159,8 @@ jobs: - name: check-llvm-spirv if: always() && !cancelled() && contains(inputs.changes, 'llvm_spirv') run: | + # Temporary workaround to disable running tests requiring spriv-tools. + export LIT_OPTS="--param disable-spriv-tools=True" cmake --build build --target check-llvm-spirv - name: check-xptifw if: always() && !cancelled() && contains(inputs.changes, 'xptifw') diff --git a/llvm-spirv/test/lit.cfg.py b/llvm-spirv/test/lit.cfg.py index b56953aa56d01..af66ea1be6f41 100644 --- a/llvm-spirv/test/lit.cfg.py +++ b/llvm-spirv/test/lit.cfg.py @@ -60,24 +60,27 @@ using_spirv_tools = False -if config.spirv_tools_have_spirv_as: +# Explicitly disable using spirv tools, if requested. +disable_spriv_tools = lit_config.params.get("disable-spriv-tools", False) + +if config.spirv_tools_have_spirv_as and not disable_spriv_tools: llvm_config.add_tool_substitutions(['spirv-as'], [config.spirv_tools_bin_dir]) config.available_features.add('spirv-as') using_spirv_tools = True -if config.spirv_tools_have_spirv_dis: +if config.spirv_tools_have_spirv_dis and not disable_spriv_tools: llvm_config.add_tool_substitutions(['spirv-dis'], [config.spirv_tools_bin_dir]) config.available_features.add('spirv-dis') using_spirv_tools = True -if config.spirv_tools_have_spirv_link: +if config.spirv_tools_have_spirv_link and not disable_spriv_tools: llvm_config.add_tool_substitutions(['spirv-link'], [config.spirv_tools_bin_dir]) config.available_features.add('spirv-link') using_spirv_tools = True # Unlike spirv-{as,dis,link} above, running spirv-val is optional: if spirv-val is # not available, the test must still run and just skip any spirv-val commands. -if config.spirv_tools_have_spirv_val: +if config.spirv_tools_have_spirv_val and not disable_spriv_tools: llvm_config.add_tool_substitutions(['spirv-val'], [config.spirv_tools_bin_dir]) using_spirv_tools = True else: From 56139f08da72efd9cfa61e546e6dd31e53f533f1 Mon Sep 17 00:00:00 2001 From: "Agarwal, Udit" Date: Wed, 22 Jan 2025 16:29:41 -0800 Subject: [PATCH 2/3] Use env instead of export --- .github/workflows/sycl-linux-build.yml | 5 +++-- .github/workflows/sycl-windows-build.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index 0f536b26a86b1..afb52ad28ee8a 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -199,9 +199,10 @@ jobs: cmake --build $GITHUB_WORKSPACE/build --target check-sycl-unittests - name: check-llvm-spirv if: always() && !cancelled() && contains(inputs.changes, 'llvm_spirv') + # Temporary workaround to disable running tests requiring spriv-tools. + env: + LIT_OPTS: "--param disable-spriv-tools=True" run: | - # Temporary workaround to disable running tests requiring spriv-tools. - export LIT_OPTS="--param disable-spriv-tools=True" cmake --build $GITHUB_WORKSPACE/build --target check-llvm-spirv - name: check-xptifw if: always() && !cancelled() && contains(inputs.changes, 'xptifw') diff --git a/.github/workflows/sycl-windows-build.yml b/.github/workflows/sycl-windows-build.yml index 566ec14fdb421..ec3486648d833 100644 --- a/.github/workflows/sycl-windows-build.yml +++ b/.github/workflows/sycl-windows-build.yml @@ -158,9 +158,10 @@ jobs: cmake --build build --target check-sycl-unittests - name: check-llvm-spirv if: always() && !cancelled() && contains(inputs.changes, 'llvm_spirv') + # Temporary workaround to disable running tests requiring spriv-tools. + env: + LIT_OPTS: "--param disable-spriv-tools=True" run: | - # Temporary workaround to disable running tests requiring spriv-tools. - export LIT_OPTS="--param disable-spriv-tools=True" cmake --build build --target check-llvm-spirv - name: check-xptifw if: always() && !cancelled() && contains(inputs.changes, 'xptifw') From 853ba49f9aebab99a24f0b0110ac958913a761d7 Mon Sep 17 00:00:00 2001 From: Udit Kumar Agarwal Date: Thu, 23 Jan 2025 08:35:17 -0800 Subject: [PATCH 3/3] Address feedback Co-authored-by: Marcos Maronas --- .github/workflows/sycl-linux-build.yml | 4 ++-- .github/workflows/sycl-windows-build.yml | 4 ++-- llvm-spirv/test/lit.cfg.py | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index afb52ad28ee8a..59f4aa99e4e42 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -199,9 +199,9 @@ jobs: cmake --build $GITHUB_WORKSPACE/build --target check-sycl-unittests - name: check-llvm-spirv if: always() && !cancelled() && contains(inputs.changes, 'llvm_spirv') - # Temporary workaround to disable running tests requiring spriv-tools. + # Temporary workaround to disable running tests requiring spirv-tools. env: - LIT_OPTS: "--param disable-spriv-tools=True" + LIT_OPTS: "--param disable-spirv-tools=True" run: | cmake --build $GITHUB_WORKSPACE/build --target check-llvm-spirv - name: check-xptifw diff --git a/.github/workflows/sycl-windows-build.yml b/.github/workflows/sycl-windows-build.yml index ec3486648d833..c7349331f8f6f 100644 --- a/.github/workflows/sycl-windows-build.yml +++ b/.github/workflows/sycl-windows-build.yml @@ -158,9 +158,9 @@ jobs: cmake --build build --target check-sycl-unittests - name: check-llvm-spirv if: always() && !cancelled() && contains(inputs.changes, 'llvm_spirv') - # Temporary workaround to disable running tests requiring spriv-tools. + # Temporary workaround to disable running tests requiring spirv-tools. env: - LIT_OPTS: "--param disable-spriv-tools=True" + LIT_OPTS: "--param disable-spirv-tools=True" run: | cmake --build build --target check-llvm-spirv - name: check-xptifw diff --git a/llvm-spirv/test/lit.cfg.py b/llvm-spirv/test/lit.cfg.py index af66ea1be6f41..29b8a6e4dd3f6 100644 --- a/llvm-spirv/test/lit.cfg.py +++ b/llvm-spirv/test/lit.cfg.py @@ -61,26 +61,26 @@ using_spirv_tools = False # Explicitly disable using spirv tools, if requested. -disable_spriv_tools = lit_config.params.get("disable-spriv-tools", False) +disable_spirv_tools = lit_config.params.get("disable-spirv-tools", False) -if config.spirv_tools_have_spirv_as and not disable_spriv_tools: +if config.spirv_tools_have_spirv_as and not disable_spirv_tools: llvm_config.add_tool_substitutions(['spirv-as'], [config.spirv_tools_bin_dir]) config.available_features.add('spirv-as') using_spirv_tools = True -if config.spirv_tools_have_spirv_dis and not disable_spriv_tools: +if config.spirv_tools_have_spirv_dis and not disable_spirv_tools: llvm_config.add_tool_substitutions(['spirv-dis'], [config.spirv_tools_bin_dir]) config.available_features.add('spirv-dis') using_spirv_tools = True -if config.spirv_tools_have_spirv_link and not disable_spriv_tools: +if config.spirv_tools_have_spirv_link and not disable_spirv_tools: llvm_config.add_tool_substitutions(['spirv-link'], [config.spirv_tools_bin_dir]) config.available_features.add('spirv-link') using_spirv_tools = True # Unlike spirv-{as,dis,link} above, running spirv-val is optional: if spirv-val is # not available, the test must still run and just skip any spirv-val commands. -if config.spirv_tools_have_spirv_val and not disable_spriv_tools: +if config.spirv_tools_have_spirv_val and not disable_spirv_tools: llvm_config.add_tool_substitutions(['spirv-val'], [config.spirv_tools_bin_dir]) using_spirv_tools = True else: