-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#12177: Add ability to run single sweeps in CI and related static ver…
…ification
- Loading branch information
1 parent
ca39cb9
commit 2d5fa12
Showing
3 changed files
with
71 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,3 +49,12 @@ jobs: | |
run: | | ||
if (( $(grep -Rnw 'tests/tt_metal' -e 'tt_lib' | wc -l ) > 0 )); then exit 1; fi | ||
if (( $(grep -Rnw 'tests/tt_metal' -e 'tt_eager' | wc -l ) > 10 )); then exit 1; fi | ||
check-sweeps-workflow: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/[email protected] | ||
- name: Check sweeps workflow option count against sweep file count | ||
run: | | ||
pip install pyyaml | ||
python tests/sweep_framework/sweeps_workflow_verification.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# SPDX-FileCopyrightText: © 2024 Tenstorrent Inc. | ||
|
||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
from yaml import load, Loader | ||
import pathlib | ||
|
||
with open(".github/workflows/ttnn-run-sweeps.yaml") as file: | ||
workflow = load(file, Loader) | ||
workflow_count = len(workflow[True]["workflow_dispatch"]["inputs"]["sweep_name"]["options"]) | ||
|
||
sweeps_path = pathlib.Path(__file__).parent / "sweeps" | ||
file_count = len(list(sweeps_path.glob("**/*.py"))) | ||
assert ( | ||
file_count + 1 == workflow_count | ||
), f"Sweeps workflow options does not match expected number of sweep files ({workflow_count} exist, expected {file_count + 1}). If you added a new sweep file, please add it to the options in the .github/workflows/ttnn-run-sweeps.yaml workflow file." | ||
print("Sweeps workflow options match expected number of sweep files.") |