Repository navigation
Intel XPU nightly CI #15434
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
Merged
Merged
Intel XPU nightly CI #15434
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,278 @@ | ||
| name: Nightly tests on Intel XPU | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: "0 4 * * *" # every day at 4am (offset from the main CUDA nightly) | ||
|
|
||
| env: | ||
| DIFFUSERS_IS_CI: yes | ||
| HF_XET_HIGH_PERFORMANCE: 1 | ||
| OMP_NUM_THREADS: 8 | ||
| MKL_NUM_THREADS: 8 | ||
| PYTEST_TIMEOUT: 600 | ||
| RUN_SLOW: yes | ||
| RUN_NIGHTLY: yes | ||
| PIPELINE_USAGE_CUTOFF: 0 | ||
| SLACK_API_TOKEN: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} | ||
| CONSOLIDATED_REPORT_PATH: consolidated_test_report.md | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| setup_torch_xpu_pipeline_matrix: | ||
| permissions: | ||
| contents: read | ||
| name: Setup Torch Pipelines XPU Slow Tests Matrix | ||
| runs-on: | ||
| group: hfc-intel-b60 | ||
| container: | ||
| image: huggingface/xpu_ci | ||
| options: >- | ||
| --shm-size "8g" | ||
| --privileged | ||
| --network host | ||
| -v /dev/dri/by-path:/dev/dri/by-path | ||
| --device /dev/dri:/dev/dri | ||
| -v /mnt/cache/.cache/huggingface:/mnt/cache/ | ||
| outputs: | ||
| pipeline_test_matrix: ${{ steps.fetch_pipeline_matrix.outputs.pipeline_test_matrix }} | ||
| steps: | ||
| - name: Checkout diffusers | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 2 | ||
| - name: Fetch Pipeline Matrix | ||
| id: fetch_pipeline_matrix | ||
| run: | | ||
| matrix=$(python utils/fetch_torch_cuda_pipeline_test_matrix.py) | ||
| echo $matrix | ||
| echo "pipeline_test_matrix=$matrix" >> $GITHUB_OUTPUT | ||
| - name: Pipeline Tests Artifacts | ||
| if: ${{ always() }} | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: test-pipelines.json | ||
| path: reports | ||
|
|
||
| run_nightly_tests_for_torch_pipelines_xpu: | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| name: Nightly Torch Pipelines XPU Tests | ||
| needs: setup_torch_xpu_pipeline_matrix | ||
| strategy: | ||
| fail-fast: false | ||
| max-parallel: 3 | ||
| matrix: | ||
| module: ${{ fromJson(needs.setup_torch_xpu_pipeline_matrix.outputs.pipeline_test_matrix) }} | ||
| runs-on: | ||
| group: hfc-intel-b60 | ||
| container: | ||
| image: huggingface/xpu_ci | ||
| options: >- | ||
| --shm-size "8g" | ||
| --privileged | ||
| --network host | ||
| -v /dev/dri/by-path:/dev/dri/by-path | ||
| --device /dev/dri:/dev/dri | ||
| -v /mnt/cache/.cache/huggingface:/mnt/cache/ | ||
| steps: | ||
| - name: Checkout diffusers | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 2 | ||
| - name: Environment | ||
| run: | | ||
| diffusers-cli env | ||
| - name: Pipeline XPU Test | ||
| env: | ||
| HF_OIDC_RESOURCE: Diffusers-CI-Bot | ||
| run: | | ||
| pytest -n 1 --max-worker-restart=0 --dist=loadfile \ | ||
| --make-reports=tests_pipeline_${{ matrix.module }}_xpu \ | ||
| --report-log=tests_pipeline_${{ matrix.module }}_xpu.log \ | ||
| tests/pipelines/${{ matrix.module }} | ||
| - name: Failure short reports | ||
| if: ${{ failure() }} | ||
| run: | | ||
| cat reports/tests_pipeline_${{ matrix.module }}_xpu_stats.txt | ||
| cat reports/tests_pipeline_${{ matrix.module }}_xpu_failures_short.txt | ||
| - name: Test suite reports artifacts | ||
| if: ${{ always() }} | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: pipeline_${{ matrix.module }}_xpu_test_reports | ||
| path: reports | ||
|
|
||
| run_nightly_tests_for_other_torch_modules_xpu: | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| name: Nightly Torch XPU Tests | ||
| runs-on: | ||
| group: hfc-intel-b60 | ||
| container: | ||
| image: huggingface/xpu_ci | ||
| options: >- | ||
| --shm-size "8g" | ||
| --privileged | ||
| --network host | ||
| -v /dev/dri/by-path:/dev/dri/by-path | ||
| --device /dev/dri:/dev/dri | ||
| -v /mnt/cache/.cache/huggingface:/mnt/cache/ | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| strategy: | ||
| fail-fast: false | ||
| max-parallel: 2 | ||
| matrix: | ||
| module: [models, schedulers, hooks, lora, others, single_file, examples] | ||
| steps: | ||
| - name: Checkout diffusers | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 2 | ||
|
|
||
| - name: Environment | ||
| run: diffusers-cli env | ||
|
|
||
| - name: Run nightly PyTorch XPU tests for non-pipeline modules | ||
| if: ${{ matrix.module != 'examples'}} | ||
| env: | ||
| HF_OIDC_RESOURCE: Diffusers-CI-Bot | ||
| run: | | ||
| pytest -n 1 --max-worker-restart=0 --dist=loadfile \ | ||
| -m "not compile" \ | ||
| --make-reports=tests_torch_${{ matrix.module }}_xpu \ | ||
| --report-log=tests_torch_${{ matrix.module }}_xpu.log \ | ||
| tests/${{ matrix.module }} | ||
|
|
||
| - name: Run nightly example tests with Torch | ||
| if: ${{ matrix.module == 'examples' }} | ||
| env: | ||
| HF_OIDC_RESOURCE: Diffusers-CI-Bot | ||
| run: | | ||
| pytest -n 1 --max-worker-restart=0 --dist=loadfile \ | ||
| --make-reports=examples_torch_xpu \ | ||
| --report-log=examples_torch_xpu.log \ | ||
| examples/ | ||
|
|
||
| - name: Failure short reports | ||
| if: ${{ failure() }} | ||
| run: | | ||
| cat reports/tests_torch_${{ matrix.module }}_xpu_stats.txt | ||
| cat reports/tests_torch_${{ matrix.module }}_xpu_failures_short.txt | ||
|
|
||
| - name: Test suite reports artifacts | ||
| if: ${{ always() }} | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: torch_${{ matrix.module }}_xpu_test_reports | ||
| path: reports | ||
|
|
||
| run_torch_compile_tests_xpu: | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| name: PyTorch Compile XPU tests | ||
|
|
||
| runs-on: | ||
| group: hfc-intel-b60 | ||
|
|
||
| container: | ||
| image: huggingface/xpu_ci | ||
| options: >- | ||
| --shm-size "8g" | ||
| --privileged | ||
| --network host | ||
| -v /dev/dri/by-path:/dev/dri/by-path | ||
| --device /dev/dri:/dev/dri | ||
| -v /mnt/cache/.cache/huggingface:/mnt/cache/ | ||
|
|
||
| steps: | ||
| - name: Checkout diffusers | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 2 | ||
|
|
||
| - name: Environment | ||
| run: | | ||
| diffusers-cli env | ||
| - name: Run torch compile tests on XPU | ||
| env: | ||
| HF_OIDC_RESOURCE: Diffusers-CI-Bot | ||
| run: | | ||
| pytest -n 1 --max-worker-restart=0 --dist=loadfile -m compile --make-reports=tests_torch_compile_xpu tests/ | ||
| - name: Failure short reports | ||
| if: ${{ failure() }} | ||
| run: cat reports/tests_torch_compile_xpu_failures_short.txt | ||
|
|
||
| - name: Test suite reports artifacts | ||
| if: ${{ always() }} | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: torch_compile_xpu_test_reports | ||
| path: reports | ||
|
|
||
| generate_consolidated_report_xpu: | ||
| permissions: | ||
| contents: read | ||
| name: Generate Consolidated Test Report | ||
| needs: [ | ||
| run_nightly_tests_for_torch_pipelines_xpu, | ||
| run_nightly_tests_for_other_torch_modules_xpu, | ||
| run_torch_compile_tests_xpu, | ||
| ] | ||
| if: always() | ||
| runs-on: | ||
| group: aws-general-8-plus | ||
| container: | ||
| image: huggingface/xpu_ci | ||
| options: >- | ||
| --shm-size "8g" | ||
| --privileged | ||
| --network host | ||
| -v /dev/dri/by-path:/dev/dri/by-path | ||
| --device /dev/dri:/dev/dri | ||
| -v /mnt/cache/.cache/huggingface:/mnt/cache/ | ||
| steps: | ||
| - name: Checkout diffusers | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 2 | ||
|
|
||
| - name: Create reports directory | ||
| run: mkdir -p combined_reports | ||
|
|
||
| - name: Download all test reports | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| path: artifacts | ||
|
|
||
| - name: Prepare reports | ||
| run: | | ||
| # Move all report files to a single directory for processing | ||
| find artifacts -name "*.txt" -exec cp {} combined_reports/ \; | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| pip install slack_sdk tabulate | ||
|
|
||
| - name: Generate consolidated report | ||
| run: | | ||
| python utils/consolidated_test_report.py \ | ||
| --reports_dir combined_reports \ | ||
| --output_file $CONSOLIDATED_REPORT_PATH \ | ||
| --slack_channel_name intel-xpu-hf-ci | ||
|
|
||
| - name: Show consolidated report | ||
| run: | | ||
| cat $CONSOLIDATED_REPORT_PATH >> $GITHUB_STEP_SUMMARY | ||
|
|
||
| - name: Upload consolidated report | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: consolidated_test_report | ||
| path: ${{ env.CONSOLIDATED_REPORT_PATH }} | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need XPU nightly feedback yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have #intel-xpu-hf-ci which gets report from the Transformers CI. The idea is that it is a shared channel with Intel, but it won't add any noise to the Diffusers team (unless you want to join this channel XD).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we rename to
SLACK_CIFEEDBACK_BOT_TOKEN_XPUor something like that then?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have any control over the name of this secret token, it's probably an org-wide token which is used in several HF repos.