Skip to content

Conversation

@davidegrohmann
Copy link
Contributor

@davidegrohmann davidegrohmann commented Aug 5, 2025

This should execute also the MLIR SPIRV Target tests which require the SPIRV-Tools validator

@llvmbot
Copy link
Member

llvmbot commented Aug 5, 2025

@llvm/pr-subscribers-github-workflow

Author: Davide Grohmann (davidegrohmann)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/152124.diff

1 Files Affected:

  • (modified) .github/workflows/spirv-tests.yml (+2-2)
diff --git a/.github/workflows/spirv-tests.yml b/.github/workflows/spirv-tests.yml index f15ca1cb64ba5..a2bb64d400bbf 100644 --- a/.github/workflows/spirv-tests.yml +++ b/.github/workflows/spirv-tests.yml @@ -23,7 +23,7 @@ jobs: name: Test SPIR-V uses: ./.github/workflows/llvm-project-tests.yml with: - build_target: check-llvm-codegen-spirv + build_target: check-llvm-codegen-spirv check-mlir projects: - extra_cmake_args: '-DLLVM_TARGETS_TO_BUILD="SPIRV" -DLLVM_INCLUDE_SPIRV_TOOLS_TESTS=ON' + extra_cmake_args: '-DLLVM_TARGETS_TO_BUILD="X86;SPIRV" -DLLVM_INCLUDE_SPIRV_TOOLS_TESTS=ON' os_list: '["ubuntu-24.04"]' 
@davidegrohmann davidegrohmann force-pushed the mlir-spv-enable-spirv-tests branch from 28e45e5 to 2acd645 Compare August 5, 2025 11:29
Copy link
Member

@kuhar kuhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if it would be better to bifurcate spirv-tests.yml and have a separate version for mlir-spirv. It's very rare that we have PRs that affect both implementations, so having them separate could save us some CI time.

@davidegrohmann davidegrohmann force-pushed the mlir-spv-enable-spirv-tests branch from 2acd645 to 22ca55f Compare August 6, 2025 10:43
@davidegrohmann
Copy link
Contributor Author

I'm wondering if it would be better to bifurcate spirv-tests.yml and have a separate version for mlir-spirv. It's very rare that we have PRs that affect both implementations, so having them separate could save us some CI time.

Yes it is likely better. This is now done.

This should execute also the MLIR SPIRV Target tests which require the SPIRV-Tools validation Signed-off-by: Davide Grohmann <davide.grohmann@arm.com> Change-Id: Ied323152e36b95d6f21ed7d4ce4f5f813f280f17
@davidegrohmann davidegrohmann force-pushed the mlir-spv-enable-spirv-tests branch from 22ca55f to 0301179 Compare August 6, 2025 10:54
@kuhar kuhar changed the title [mlir][spv] Enable spirv-tests CI to run for mlir-spv target tests [mlir][spirv] Enable spirv-tests CI to run for mlir-spv target tests Aug 6, 2025
Signed-off-by: Davide Grohmann <davide.grohmann@arm.com> Change-Id: I52a5fcf79aba2c272a2ac6a4dc2c393a02b398d9
@davidegrohmann davidegrohmann changed the title [mlir][spirv] Enable spirv-tests CI to run for mlir-spv target tests [mlir][spirv] Add mlir-spirv-tests CI to run for mlir-spv target tests Aug 6, 2025
- add SPIRV dialect definition and implementation - add serialization/deserialization implementation Signed-off-by: Davide Grohmann <davide.grohmann@arm.com> Change-Id: Ib63045fec041ba7a2d52b527589c30157ed56258
Signed-off-by: Davide Grohmann <davide.grohmann@arm.com> Change-Id: I9919a359c8fbefbc5dd030f9a19c7a83fab12682
@kuhar
Copy link
Member

kuhar commented Aug 7, 2025

I'm going to merge once we confirm that the new check works as intended: https://github.com/llvm/llvm-project/actions/runs/16807047739/job/47602153053?pr=152124

@kuhar kuhar merged commit 3fa34f1 into llvm:main Aug 7, 2025
10 checks passed
@davidegrohmann davidegrohmann deleted the mlir-spv-enable-spirv-tests branch August 8, 2025 07:16
@IgWod-IMG
Copy link
Contributor

MLIR SPIR-V tests seem to take ~1h (https://github.com/llvm/llvm-project/actions/workflows/mlir-spirv-tests.yml) compared to regular checks that finish in ~5-10min. I wonder if there is any reason for that and whether we can bring the time down?

@davidegrohmann
Copy link
Contributor Author

MLIR SPIR-V tests seem to take ~1h (https://github.com/llvm/llvm-project/actions/workflows/mlir-spirv-tests.yml) compared to regular checks that finish in ~5-10min. I wonder if there is any reason for that and whether we can bring the time down?

I can have a look. Can you point me to the workflows scripts for the regular checks so I can compare those with the mlir spir-v tests script?

@kuhar
Copy link
Member

kuhar commented Aug 13, 2025

Probably no build cache? When I built this configuration locally, a lot of time was spent during spirv-tools checkout. I wonder if we can optimize how this gets cloned, e.g., --depth=1 or checkout submodules with -j $(nproc).

@IgWod-IMG
Copy link
Contributor

I can have a look. Can you point me to the workflows scripts for the regular checks so I can compare those with the mlir spir-v tests script?

I believe it's "CI Checks" (https://github.com/llvm/llvm-project/actions/workflows/premerge.yaml), script: https://github.com/llvm/llvm-project/blob/main/.github/workflows/premerge.yaml

@IgWod-IMG
Copy link
Contributor

IgWod-IMG commented Aug 13, 2025

I have also noticed that auto-merge doesn't wait for this job: #153440 We also should address that if deemed necessary. Not sure if this PR is the best place to track those issues.

@boomanaiden154
Copy link
Contributor

I believe it's "CI Checks" (https://github.com/llvm/llvm-project/actions/workflows/premerge.yaml), script: https://github.com/llvm/llvm-project/blob/main/.github/workflows/premerge.yaml

Those checks run on powerful self hosted runners (64 threads) and have good build caching. This workflow runs on the free four core Github runners and Github build caching is generally pretty poor. It is going to be a lot slower.

I have also noticed that auto-merge doesn't wait for this job: #153440 We also should address that if deemed necessary. Not sure if this PR is the best place to track those issues.

Enabling auto-merge requires making the check required. Required checks cannot have path dependencies. I also doubt the community is interested in making this check required.

@IgWod-IMG
Copy link
Contributor

Those checks run on powerful self hosted runners (64 threads) and have good build caching. This workflow runs on the free four core Github runners and Github build caching is generally pretty poor. It is going to be a lot slower.

That makes sense, thanks for investigating.

Enabling auto-merge requires making the check required. Required checks cannot have path dependencies. I also doubt the community is interested in making this check required.

In the hindsight, I agree we probably don't need this check as required, it just took me by surprise, and was quite busy that day, so I wasn’t sure what to do with it :)

@davidegrohmann
Copy link
Contributor Author

What is the plan then? Should we switch to use the more powerful runners?

@boomanaiden154
Copy link
Contributor

What is the plan then? Should we switch to use the more powerful runners?

This workflow should probably stay as it is. The llvm-premerge-linux-runners group (and windows equivalent) are intended to be used for the premerge workflow defined in premerge.yaml. If the workflow latency becomes a big issue, we can look into a better solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

5 participants