-
Notifications
You must be signed in to change notification settings - Fork 25
[Deps] Split up of dependencies #2364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
saiarthiraguram
wants to merge
34
commits into
main
Choose a base branch
from
sai_arthi_raguram/deps_split
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 4 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
7db3ee1
Initial split up
saiarthiraguram b95d954
Adds sanity and whl generation code:
saiarthiraguram cf1b8dc
Merge branch 'main' into sai_arthi_raguram/deps_split
saiarthiraguram 4a62e1b
Potential fix for code scanning alert no. 5851: Artifact poisoning
saiarthiraguram d49b326
Structures whl generation
saiarthiraguram 6bd1f17
Merge branch 'main' into sai_arthi_raguram/deps_split
saiarthiraguram 4806109
Potential fix for code scanning alert no. 5967: Artifact poisoning
saiarthiraguram 7f95151
PR Comment Changes
saiarthiraguram d32f975
Merge remote-tracking branch 'origin/main' into sai_arthi_raguram/dep…
saiarthiraguram aa28d11
[Deps] Adds slim-wheel test and streamlines core-requirement
saiarthiraguram f5a8239
Merge branch 'main' into sai_arthi_raguram/deps_split
saiarthiraguram d9e8df0
Add Cython
saiarthiraguram fd6959e
[CI] Add two docker build slim for compiler and whole docker for othe…
saiarthiraguram 0c1d8ca
Add PR comment changes jul28
saiarthiraguram c5b2a79
[CI] Remove Docker slim image - Base contains core requirements and f…
saiarthiraguram 0ab5cc7
Add only torch to core requirements
saiarthiraguram abea0d6
Merge main
saiarthiraguram 77307ed
Debug commit
saiarthiraguram 4d135fb
Revert "Debug commit"
saiarthiraguram 52280ea
Update TVM submodule to include setup.py SameFileError fix
saiarthiraguram be7b498
Fix Docker image registry prefix in forge-build workflow
saiarthiraguram a197042
Merge branch 'main' of github.com:tenstorrent/tt-forge-fe into sai_ar…
saiarthiraguram 0f79e3a
Debug check
saiarthiraguram 4cfcf3e
Update TVM submodule: rebase setup.py SameFileError fix on latest main
saiarthiraguram 354a07c
Update TVM submodule: rebase setup.py SameFileError fix on latest main
saiarthiraguram 22e9551
Merge main branch
saiarthiraguram 8c4be1e
Revert TVM submodule to standard main commit for CI compatibility
saiarthiraguram ce1334c
Fix TT-MLIR runtime API compatibility after merge
saiarthiraguram c431091
Merge branch 'main' into sai_arthi_raguram/deps_split
saiarthiraguram f17c961
Merge branch 'main' of https://github.com/tenstorrent/tt-forge-fe int…
saiarthiraguram ac88849
Merge branch 'main' into sai_arthi_raguram/deps_split
saiarthiraguram ded02f9
Merge branch 'main' of github.com:tenstorrent/tt-forge-fe into sai_ar…
saiarthiraguram e2db938
Merge branch 'main' of github.com:tenstorrent/tt-forge-fe into sai_ar…
saiarthiraguram a69f5b2
[Docker] Added http instead of https.
saiarthiraguram File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,140 @@ | ||
| name: Sanity Test - Forge Add | ||
|
|
||
| on: | ||
saiarthiraguram marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| workflow_dispatch: | ||
| inputs: | ||
| run_id: | ||
| description: 'Run id to download wheels from (or leave empty to search latest)' | ||
| required: false | ||
| type: string | ||
| workflow_call: | ||
| inputs: | ||
| run_id: | ||
| description: 'Run id to download wheels from' | ||
| required: false | ||
| type: string | ||
| docker-image: | ||
| description: 'Docker image to use for test' | ||
| required: true | ||
| type: string | ||
|
|
||
| permissions: | ||
| packages: read | ||
| actions: read | ||
| checks: write | ||
|
|
||
| jobs: | ||
| sanity-forge-test: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| wheel: [ | ||
| { name: "compiler", artifact: "forge-wheel-compiler" } | ||
| ] | ||
|
|
||
| runs-on: | ||
| - tt-beta-ubuntu-2204-large | ||
|
|
||
| container: | ||
| image: ${{ inputs.docker-image }} | ||
|
|
||
| steps: | ||
| - name: Fetch job id | ||
| id: fetch-job-id | ||
| uses: tenstorrent/tt-github-actions/.github/actions/job_id@main | ||
|
||
| with: | ||
| job_name: "sanity-forge-test (${{ matrix.wheel.name }})" | ||
|
|
||
| - name: Set reusable strings | ||
| id: strings | ||
| shell: bash | ||
| env: | ||
| JOB_ID: ${{ steps.fetch-job-id.outputs.job_id }} | ||
| run: | | ||
| echo "work-dir=$(pwd)" >> "$GITHUB_OUTPUT" | ||
| echo "test_report_path=reports/report_$JOB_ID.xml" >> "$GITHUB_OUTPUT" | ||
| - name: Git safe dir | ||
| run: git config --global --add safe.directory ${{ steps.strings.outputs.work-dir }} | ||
|
|
||
| - uses: actions/checkout@v4 | ||
| with: | ||
| sparse-checkout: | | ||
| env/ | ||
| forge/test | ||
| pytest.ini | ||
| conftest.py | ||
| clean: true | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Download wheel | ||
| if: ${{ inputs.run_id }} | ||
| continue-on-error: true | ||
| uses: tenstorrent/tt-forge/.github/actions/download-artifact@main | ||
|
||
| with: | ||
| name: ${{ matrix.wheel.artifact }} | ||
| run_id: ${{ inputs.run_id }} | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Find and download forge wheel | ||
| if: ${{ !inputs.run_id }} | ||
| uses: dawidd6/action-download-artifact@v9 | ||
|
||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| workflow_conclusion: success | ||
| workflow_search: true | ||
| workflow: build.yml | ||
| name: ${{ matrix.wheel.artifact }} | ||
| repo: tenstorrent/tt-forge-fe | ||
| check_artifacts: true | ||
| search_artifacts: true | ||
|
|
||
| - name: Install wheel | ||
| shell: bash | ||
| run: | | ||
| source env/activate | ||
| # Validate wheel file exists and is secure | ||
| wheel_file=$(find . -name "*.whl" | head -1) | ||
| if [ -z "$wheel_file" ]; then | ||
| echo "Error: No wheel file found" | ||
| exit 1 | ||
| fi | ||
| echo "Installing wheel: $wheel_file" | ||
| # Validate wheel file is from expected source | ||
| if [[ "$wheel_file" != *"forge"* ]]; then | ||
| echo "Error: Wheel file does not appear to be a forge wheel" | ||
| exit 1 | ||
| fi | ||
| pip install "$wheel_file" --force-reinstall | ||
|
||
| - name: Run sanity test | ||
| shell: bash | ||
| run: | | ||
| source env/activate | ||
| echo "Running forge add sanity test for ${{ matrix.wheel.name }} wheel..." | ||
| pytest forge/test/test_sanity_forge_add.py -v -m "sanity" --tb=short \ | ||
| --junit-xml=${{ steps.strings.outputs.test_report_path }} | ||
|
||
| - name: Upload Test Report | ||
| uses: actions/upload-artifact@v4 | ||
| if: success() || failure() | ||
| with: | ||
| name: test-reports-${{ matrix.wheel.name }}-${{ steps.fetch-job-id.outputs.job_id }} | ||
| path: ${{ steps.strings.outputs.test_report_path }} | ||
|
|
||
| - name: Show Test Report | ||
| uses: mikepenz/action-junit-report@v5 | ||
|
||
| if: success() || failure() | ||
| with: | ||
| report_paths: ${{ steps.strings.outputs.test_report_path }} | ||
| check_name: TT-Forge-FE Sanity Tests (${{ matrix.wheel.name }}) | ||
| comment: false | ||
| updateComment: false | ||
| detailed_summary: true | ||
| group_suite: true | ||
|
|
||
| - name: Cleanup | ||
| if: always() | ||
| shell: bash | ||
| run: | | ||
| rm -rf *.whl | ||
This file contains hidden or 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,77 @@ | ||
| #!/usr/bin/env python3 | ||
| # SPDX-FileCopyrightText: (c) 2025 Tenstorrent AI ULC | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| import subprocess | ||
| import os | ||
| import shutil | ||
|
|
||
|
|
||
| def manage_pyproject_toml(disable=False): | ||
| """Temporarily disable/enable pyproject.toml to allow setup.py full control""" | ||
| if disable: | ||
| if os.path.exists("pyproject.toml"): | ||
| if os.path.exists("pyproject.toml.backup"): | ||
| os.remove("pyproject.toml.backup") | ||
| shutil.move("pyproject.toml", "pyproject.toml.backup") | ||
| else: | ||
| if os.path.exists("pyproject.toml.backup"): | ||
| if os.path.exists("pyproject.toml"): | ||
| os.remove("pyproject.toml") | ||
| shutil.move("pyproject.toml.backup", "pyproject.toml") | ||
|
|
||
|
|
||
| def clean_build_dir(): | ||
| """Clean build directory to prevent conflicts between builds""" | ||
| if os.path.exists("build"): | ||
| shutil.rmtree("build") | ||
|
|
||
|
|
||
| def build_and_collect_wheels(): | ||
|
|
||
| try: | ||
| # Temporarily disable pyproject.toml | ||
| manage_pyproject_toml(disable=True) | ||
|
|
||
| # Build compiler variant | ||
| clean_build_dir() | ||
| os.environ["FORGE_VARIANT"] = "compiler" | ||
| subprocess.run(["python3", "setup.py", "bdist_wheel"], check=True) | ||
|
|
||
| # Build dev variant | ||
| clean_build_dir() | ||
| os.environ["FORGE_VARIANT"] = "dev" | ||
| subprocess.run(["python3", "setup.py", "bdist_wheel"], check=True) | ||
|
|
||
| built_files = os.listdir("dist") | ||
|
|
||
| # Collect compiler wheel | ||
| compiler_wheel = None | ||
| dev_wheel = None | ||
|
|
||
| for fname in built_files: | ||
| if fname.startswith("tt_forge_fe_compiler") and fname.endswith(".whl"): | ||
| compiler_wheel = fname | ||
| elif fname.startswith("tt_forge_fe_dev") and fname.endswith(".whl"): | ||
| dev_wheel = fname | ||
|
|
||
| # Move compiler wheel | ||
| if compiler_wheel: | ||
| os.makedirs("dist/compiler", exist_ok=True) | ||
| shutil.move(os.path.join("dist", compiler_wheel), os.path.join("dist/compiler", compiler_wheel)) | ||
|
|
||
| # Move dev wheel | ||
| if dev_wheel: | ||
| os.makedirs("dist/dev", exist_ok=True) | ||
| shutil.move(os.path.join("dist", dev_wheel), os.path.join("dist/dev", dev_wheel)) | ||
|
|
||
| finally: | ||
| # Always restore pyproject.toml | ||
| manage_pyproject_toml(disable=False) | ||
|
|
||
|
|
||
| # Make sure clean slate | ||
| os.makedirs("dist", exist_ok=True) | ||
|
|
||
| # Build both wheels | ||
| build_and_collect_wheels() |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,47 +1,40 @@ | ||
| #core requirements | ||
saiarthiraguram marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| setuptools>=61 | ||
saiarthiraguram marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # This is needed to avoid issue https://yyz-gitlab.local.tenstorrent.com/devops/devops/-/issues/95 | ||
| # jax requires any version of optax which requires any version of chex which in turn | ||
| # requires jax>=0.4.6 which conflicts with our jax == 0.3.16 | ||
| # TODO: Remove when jax library is upgraded | ||
| chex==0.1.6 | ||
| dataclasses-json==0.5.7 | ||
| datasets==2.14.6 | ||
| pybind11==2.6.2 | ||
| numpy==1.26.4 | ||
| scipy>=1.8.0 | ||
| pandas==1.5.3 | ||
| decorator==5.1.1 | ||
| flatbuffers==23.5.26 | ||
| # This is needed to prevent AttributeError: module 'ml_dtypes' has no attribute 'float8_e4m3b11' | ||
| flax==0.9.0 | ||
| jax==0.4.30 | ||
| loguru==0.5.3 | ||
| networkx==2.8.5 | ||
| numpy==1.26.4 | ||
| flatbuffers==23.5.26 | ||
| openpyxl==3.1.5 | ||
| GitPython==3.1.44 | ||
| pyinstrument>=4.1.1 | ||
| pytest==6.2.4 | ||
| pytest-timeout==2.0.1 | ||
| pytest-xdist==2.5.0 | ||
| pytorchcv==0.0.67 | ||
| pytest-split | ||
|
|
||
| #framework requirements | ||
| onnx>=1.15.0 | ||
| onnxruntime>=1.16.3 | ||
| opencv-python-headless==4.11.0.86 | ||
| # This is needed to avoid issue https://yyz-gitlab.local.tenstorrent.com/devops/devops/-/issues/95 | ||
| pandas==1.5.3 | ||
| pybind11==2.6.2 | ||
| pyinstrument>=4.1.1 | ||
| scipy>=1.8.0 | ||
| tf2onnx==1.15.1 | ||
| tensorflow==2.15 | ||
| tensorboard==2.15 | ||
| tf2onnx==1.15.1 | ||
| transformers==4.47.0 | ||
| # To avoid warning during the import | ||
| requests==2.28.2 | ||
| tflite==2.10.0 | ||
| ultralytics==8.3.91 | ||
| torch @ https://download.pytorch.org/whl/cpu/torch-2.7.0%2Bcpu-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version == "3.10" | ||
| torchvision @ https://download.pytorch.org/whl/cpu/torchvision-0.22.0%2Bcpu-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version == "3.10" | ||
| timm==1.0.9 | ||
| transformers==4.47.0 | ||
| dataclasses-json==0.5.7 | ||
|
|
||
| # Paddle stack | ||
saiarthiraguram marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| paddlepaddle==2.6.2 | ||
| paddlenlp==2.8.1 | ||
| aistudio-sdk==0.2.6 | ||
| pytorch_forecasting==1.0.0 | ||
| patool | ||
| openpyxl==3.1.5 | ||
| GitPython==3.1.44 | ||
| mlp-mixer-pytorch==0.2.0 | ||
| gliner==0.2.7 | ||
| ase==3.24.0 | ||
| hippynn==0.0.3 | ||
| bi-lstm-crf==0.2.1 | ||
| peft | ||
| pyclipper==1.3.0 | ||
| shapely==2.1.1 | ||
|
|
||
| # JAX stack — note version constraints from chex | ||
| jax==0.4.30 | ||
| chex==0.1.6 | ||
| flax==0.9.0 # Needs compatibility with jax | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.