From cc6be6b0bfff7240bcbf01ee2bd12dced8620c9a Mon Sep 17 00:00:00 2001 From: Cheng Date: Tue, 18 Nov 2025 08:17:59 +0900 Subject: [PATCH 1/5] lint should not need setup-linux --- .github/workflows/pull_request.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 8f1686333c..45c7d512ad 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v5 - - uses: ./.github/actions/setup-linux - uses: pre-commit/action@v3.0.1 linux_build_and_test: + needs: check_lint strategy: matrix: runner: @@ -75,6 +75,7 @@ jobs: linux_fedora_build_cpp: name: Linux Fedora CPP Build (${{ matrix.arch }}) + needs: check_lint strategy: fail-fast: false matrix: From a60dc6c35d6f15bf15b77b3ac3de1770ceea8276 Mon Sep 17 00:00:00 2001 From: Cheng Date: Tue, 18 Nov 2025 08:19:30 +0900 Subject: [PATCH 2/5] Check if pre-commit still works --- mlx/backend/cuda/allocator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mlx/backend/cuda/allocator.cpp b/mlx/backend/cuda/allocator.cpp index 4b244d91e4..8508a120d9 100644 --- a/mlx/backend/cuda/allocator.cpp +++ b/mlx/backend/cuda/allocator.cpp @@ -20,8 +20,7 @@ constexpr int page_size = 16384; // Any allocations smaller than this will try to use the small pool constexpr int small_block_size = 8; -// The small pool size in bytes. This should be a multiple of the host page -// size and small_block_size. +// The small pool size in bytes. This should be a multiple of the host page // size and small_block_size. constexpr int small_pool_size = 4 * page_size; SmallSizePool::SmallSizePool() { From 5676b35a5fae8cd7015b5dd539d25297cfe82edf Mon Sep 17 00:00:00 2001 From: Cheng Date: Tue, 18 Nov 2025 08:35:25 +0900 Subject: [PATCH 3/5] Revert "Check if pre-commit still works" This reverts commit a60dc6c35d6f15bf15b77b3ac3de1770ceea8276. --- mlx/backend/cuda/allocator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mlx/backend/cuda/allocator.cpp b/mlx/backend/cuda/allocator.cpp index 8508a120d9..4b244d91e4 100644 --- a/mlx/backend/cuda/allocator.cpp +++ b/mlx/backend/cuda/allocator.cpp @@ -20,7 +20,8 @@ constexpr int page_size = 16384; // Any allocations smaller than this will try to use the small pool constexpr int small_block_size = 8; -// The small pool size in bytes. This should be a multiple of the host page // size and small_block_size. +// The small pool size in bytes. This should be a multiple of the host page +// size and small_block_size. constexpr int small_pool_size = 4 * page_size; SmallSizePool::SmallSizePool() { From 9bd62fcb59f321bae6da63ff53a5a00ba7241728 Mon Sep 17 00:00:00 2001 From: Cheng Date: Tue, 18 Nov 2025 08:32:57 +0900 Subject: [PATCH 4/5] Avoid duplicate runs --- .github/workflows/pull_request.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 45c7d512ad..694bc815b0 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -11,6 +11,9 @@ concurrency: jobs: check_lint: + # Avoid duplicate runs when starting a pull request from upstream branch. + if: (github.event_name != 'pull_request') || + (github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v5 From 3e705aef7419b5887831e4f368d7ceb6251a310d Mon Sep 17 00:00:00 2001 From: Cheng Date: Tue, 18 Nov 2025 10:09:03 +0900 Subject: [PATCH 5/5] Only run CI for pushes to main branch --- .github/workflows/pull_request.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 694bc815b0..1b72b32b26 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,6 +1,12 @@ name: Build and Test -on: [pull_request, push] +on: + pull_request: + push: + branches: + - main + # For testing CI without starting a pull request: + - test/* permissions: contents: read @@ -11,9 +17,6 @@ concurrency: jobs: check_lint: - # Avoid duplicate runs when starting a pull request from upstream branch. - if: (github.event_name != 'pull_request') || - (github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v5