Improve fp4_quantize_test (#120) #395
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
| # Copyright (c) Meta Platforms, Inc. and affiliates. | |
| # All rights reserved. | |
| # This source code is licensed under the BSD-style license found in the | |
| # LICENSE file in the root directory of this source tree. | |
| # This workflow is used for MSLK ROCm CI as well as nightly builds of MSLK ROCm | |
| # against PyTorch-ROCm Nightly. | |
| name: MSLK ROCm CI | |
| on: | |
| # PR Trigger (enabled for regression checks and debugging) | |
| # Only run on PRs that touch ROCm/AMD-related files | |
| # | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| # Workflow and CI scripts | |
| - '.github/scripts/generate_ci_matrix.py' | |
| - '.github/workflows/mslk_ci_rocm.yml' | |
| - 'ci/scripts/utils_rocm.bash' | |
| # CMake ROCm/HIP configuration | |
| - 'cmake/Hip.cmake' | |
| - 'cmake/RocmSetup.cmake' | |
| # External dependencies | |
| - 'external/hipify_torch.submodule.txt' | |
| - 'external/composable_kernel.submodule.txt' | |
| # Python ROCm utilities | |
| - 'mslk/testing/rocm.py' | |
| # HIP source files (AMD GPU kernels) | |
| - '**/*.hip' | |
| # Any file/folder with 'ck' in the path (Composable Kernel) | |
| - '**/ck/**' | |
| - '**/ck_*/**' | |
| # Communication and quantization source files | |
| - 'csrc/comm/**' | |
| - 'csrc/quantize/**' | |
| # Push Trigger (enable to catch errors coming out of multiple merges) | |
| # | |
| push: | |
| branches: | |
| - main | |
| # Cron Trigger (UTC) | |
| # | |
| # Based on the Conda page for PyTorch-nightly, the GPU nightly releases appear | |
| # around 02:30 PST every day (roughly 2 hours after the CPU releases) | |
| # | |
| schedule: | |
| - cron: '45 12 * * *' | |
| # Manual Trigger | |
| # | |
| workflow_dispatch: | |
| inputs: | |
| pytorch-channel-version: | |
| description: Package Channel + Version to Use for PyTorch Installation, in `<channel>[/<version>]` Format | |
| type: string | |
| required: false | |
| default: "" | |
| publish-to-pypi: | |
| description: Publish Artifact to PyPI | |
| type: boolean | |
| required: false | |
| default: false | |
| concurrency: | |
| # Cancel previous runs in the PR if a new commit is pushed | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| generate-build-matrix: | |
| if: ${{ github.repository_owner == 'meta-pytorch' }} | |
| uses: ./.github/workflows/_mslk_generate_ci_matrix.yml | |
| with: | |
| repo-owner: ${{ github.repository_owner }} | |
| repo-ref: ${{ (github.event_name == 'schedule' && 'nightly') || github.ref }} | |
| targets: default | |
| variant: rocm | |
| jobtype: build | |
| build: | |
| needs: generate-build-matrix | |
| uses: ./.github/workflows/_mslk_rocm_build.yml | |
| with: | |
| matrix: ${{ needs.generate-build-matrix.outputs.matrix }} | |
| repo-ref: ${{ (github.event_name == 'schedule' && 'nightly') || github.ref }} | |
| pytorch-channel-version: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.pytorch-channel-version) || 'nightly' }} | |
| generate-test-matrix: | |
| needs: build | |
| uses: ./.github/workflows/_mslk_generate_ci_matrix.yml | |
| with: | |
| repo-owner: ${{ github.repository_owner }} | |
| repo-ref: ${{ (github.event_name == 'schedule' && 'nightly') || github.ref }} | |
| targets: default | |
| variant: rocm | |
| jobtype: test | |
| test: | |
| needs: generate-test-matrix | |
| uses: ./.github/workflows/_mslk_rocm_test.yml | |
| with: | |
| matrix: ${{ needs.generate-test-matrix.outputs.matrix }} | |
| repo-ref: ${{ (github.event_name == 'schedule' && 'nightly') || github.ref }} | |
| pytorch-channel-version: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.pytorch-channel-version) || 'nightly' }} | |
| publish-to-pypi: ${{ (github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-to-pypi == 'true') }} | |
| rocm-version-publish: 7.0 | |
| secrets: | |
| PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} |