Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/build_tools/configure_ci.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/usr/bin/env python3
"""Configure CI matrix based on workflow inputs or defaults."""
import os
import json

# GPU target to TheRock family mapping
GPU_CONFIG_MAP = {
"gfx1100": "gfx110X-all",
"gfx90a": "gfx90X-dcgpu",
"gfx942": "gfx94X-dcgpu",
}

# Default configurations for automated runs (push/PR)
DEFAULT_GPU_TARGETS = ["gfx1100"]
DEFAULT_INSTALL_METHODS = ["wheel", "tarball"]


def main():
# Read inputs from environment (set by workflow)
gpu_input = os.getenv("GPU_CONFIG", "")
install_input = os.getenv("INSTALL_METHOD", "")

# Determine GPU configurations
if gpu_input:
# Manual dispatch: use the single provided value
gpu_targets = [gpu_input]
else:
# Automated run: use all defaults
gpu_targets = DEFAULT_GPU_TARGETS

# Determine install methods
if install_input:
# Manual dispatch: use the single provided value
install_methods = [install_input]
else:
# Automated run: use all defaults
install_methods = DEFAULT_INSTALL_METHODS

# Build gpu_config array with both gpu_target and therock_family
gpu_configs = []
for target in gpu_targets:
family = GPU_CONFIG_MAP.get(target, "gfx110X-all")
gpu_configs.append({
"gpu_target": target,
"therock_family": family
})

# Write outputs to $GITHUB_OUTPUT
github_output = os.getenv("GITHUB_OUTPUT")
if github_output:
with open(github_output, "a") as f:
f.write(f"gpu_configs={json.dumps(gpu_configs)}\n")
f.write(f"install_methods={json.dumps(install_methods)}\n")
print(f"Wrote outputs to {github_output}")
else:
# Local testing
print(f"gpu_configs={json.dumps(gpu_configs)}")
print(f"install_methods={json.dumps(install_methods)}")


if __name__ == "__main__":
main()
4 changes: 4 additions & 0 deletions .github/workflows/build_applications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
- 'Applications/**'
- '.github/workflows/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
DEBIAN_FRONTEND: noninteractive
ROCM_VERSION: '7.1.1'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_applications_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
- 'Applications/**'
- '.github/workflows/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
DEBIAN_FRONTEND: noninteractive
ROCM_VERSION: '7.0'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_applications_vs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
- '.github/workflows/**'
- 'Scripts/VisualStudio/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
PLATFORM_TOOLSET_VERSION: 6.4
HIP_PATH: C:\Program Files\AMD\ROCm\6.4\
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ on:
paths:
- 'Dockerfiles/**'
- '.github/workflows/**'


concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

jobs:
find-dockerfiles:
name: Find Dockerfiles
runs-on: self-hosted
runs-on: ubuntu-latest
outputs:
files: ${{ steps.find-files.outputs.files }}
steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_hip_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
- 'HIP-Basic/**'
- '.github/workflows/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
DEBIAN_FRONTEND: noninteractive
ROCM_VERSION: '7.1.1'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_hip_basic_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
- 'HIP-Basic/**'
- '.github/workflows/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
DEBIAN_FRONTEND: noninteractive
ROCM_VERSION: '7.0'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_hip_basic_vs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
- '.github/workflows/**'
- 'Scripts/VisualStudio/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
PLATFORM_TOOLSET_VERSION: 6.4
HIP_PATH: C:\Program Files\AMD\ROCm\6.4\
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_hip_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
- 'HIP-Doc/**'
- '.github/workflows/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
DEBIAN_FRONTEND: noninteractive
ROCM_VERSION: '7.1.1'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_hip_documentation_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
- 'HIP-Doc/**'
- '.github/workflows/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
DEBIAN_FRONTEND: noninteractive
ROCM_VERSION: '7.0'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_hip_documentation_vs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
- '.github/workflows/**'
- 'Scripts/VisualStudio/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
PLATFORM_TOOLSET_VERSION: 6.4
HIP_PATH: C:\Program Files\AMD\ROCm\6.4\
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
- 'Libraries/**'
- '.github/workflows/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
DEBIAN_FRONTEND: noninteractive
ROCM_VERSION: '7.1.1'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_libraries_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
- 'Libraries/**'
- '.github/workflows/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
DEBIAN_FRONTEND: noninteractive
ROCM_VERSION: '7.0'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_libraries_vs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
- '.github/workflows/**'
- 'Scripts/VisualStudio/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
PLATFORM_TOOLSET_VERSION: 6.4
HIP_PATH: C:\Program Files\AMD\ROCm\6.4\
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_portable_sln.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ on:
- '.github/workflows/**'
- 'Scripts/VisualStudio/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
PLATFORM_TOOLSET_VERSION: 6.4
HIP_PATH: C:\Program Files\AMD\ROCm\6.4\
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_programming_guide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
- 'Programming-Guide/**'
- '.github/workflows/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
DEBIAN_FRONTEND: noninteractive
ROCM_VERSION: '7.1.1'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_programming_guide_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
- 'Programming-Guide/**'
- '.github/workflows/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
DEBIAN_FRONTEND: noninteractive
ROCM_VERSION: '7.0'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_programming_guide_vs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
- '.github/workflows/**'
- 'Scripts/VisualStudio/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
PLATFORM_TOOLSET_VERSION: 6.4
HIP_PATH: C:\Program Files\AMD\ROCm\6.4\
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
- 'Tools/**'
- '.github/workflows/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
ROCM_VERSION: '7.1.1'
AMDGPU_INSTALLER_VERSION: 7.1.1.70101-1
Expand Down
Loading
Loading