From b97360361afe91118bf1a37fb09b74d7a68231b7 Mon Sep 17 00:00:00 2001 From: Jiannan Wang Date: Tue, 9 Sep 2025 07:56:41 -0700 Subject: [PATCH 1/6] update test_smoke --- test/test_smoke.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/test/test_smoke.py b/test/test_smoke.py index ffef09ca..91ea0c86 100644 --- a/test/test_smoke.py +++ b/test/test_smoke.py @@ -4,19 +4,16 @@ # This source code is licensed under the BSD 3-Clause license found in the # LICENSE file in the root directory of this source tree. +import importlib.util + import pytest import torch -try: - import importlib.util - - import BackendBench.backends as backends - from BackendBench.eval import eval_one_op - from BackendBench.suite import SmokeTestSuite +import BackendBench.backends as backends +from BackendBench.eval import eval_one_op +from BackendBench.suite import SmokeTestSuite - HAS_TRITON = importlib.util.find_spec("triton") is not None -except ImportError: - HAS_TRITON = False +HAS_TRITON = importlib.util.find_spec("triton") is not None pytestmark = pytest.mark.skipif(not HAS_TRITON, reason="triton not available") From cbce6c6e5572fe376f8cef7fc4a1d542b1231bec Mon Sep 17 00:00:00 2001 From: Jiannan Wang Date: Tue, 9 Sep 2025 08:00:31 -0700 Subject: [PATCH 2/6] remove triton --- test/test_smoke.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/test_smoke.py b/test/test_smoke.py index 91ea0c86..02192380 100644 --- a/test/test_smoke.py +++ b/test/test_smoke.py @@ -4,7 +4,6 @@ # This source code is licensed under the BSD 3-Clause license found in the # LICENSE file in the root directory of this source tree. -import importlib.util import pytest import torch @@ -13,10 +12,6 @@ from BackendBench.eval import eval_one_op from BackendBench.suite import SmokeTestSuite -HAS_TRITON = importlib.util.find_spec("triton") is not None - -pytestmark = pytest.mark.skipif(not HAS_TRITON, reason="triton not available") - class TestSmoke: @pytest.fixture From 7e805ff8bbf256a9fc2dffedd0f58551783f676c Mon Sep 17 00:00:00 2001 From: Jiannan Wang Date: Wed, 10 Dec 2025 11:24:55 -0800 Subject: [PATCH 3/6] BE to refactor test code and unskip tests in CI --- .github/workflows/smoke-test.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index b81d1b21..40cf4846 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -23,12 +23,21 @@ jobs: - name: Install package and dependencies run: uv sync --dev + + - name: Install cupy + run: uv pip install cupy + + - name: Clone FlagGems source + run: git clone git clone https://github.com/FlagOpen/FlagGems.git + + - name: Build and install FlagGems + run: uv pip install FlagGems/ - name: Clone FACTO source run: git clone https://github.com/pytorch-labs/FACTO.git - name: Build and install FACTO - run: cd FACTO && uv pip install . + run: uv pip install FACTO/ - name: Run smoke test run: uv run python -m BackendBench.scripts.main --suite smoke --backend aten From 4ae61deacbee133570b6be248e9eb06ef652d168 Mon Sep 17 00:00:00 2001 From: Jiannan Wang Date: Wed, 10 Dec 2025 11:38:11 -0800 Subject: [PATCH 4/6] fix --- .github/workflows/smoke-test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index 40cf4846..65959aa0 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -23,9 +23,6 @@ jobs: - name: Install package and dependencies run: uv sync --dev - - - name: Install cupy - run: uv pip install cupy - name: Clone FlagGems source run: git clone git clone https://github.com/FlagOpen/FlagGems.git From e8bdea6ef72bd7be62dfd6696bb661725a65f137 Mon Sep 17 00:00:00 2001 From: Jiannan Wang Date: Wed, 10 Dec 2025 11:43:02 -0800 Subject: [PATCH 5/6] fix --- .github/workflows/smoke-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index 65959aa0..24f2fb50 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -25,7 +25,7 @@ jobs: run: uv sync --dev - name: Clone FlagGems source - run: git clone git clone https://github.com/FlagOpen/FlagGems.git + run: git clone https://github.com/FlagOpen/FlagGems.git - name: Build and install FlagGems run: uv pip install FlagGems/ From 6cf7fba1ab07cae5e0009be095d5daeca634c15e Mon Sep 17 00:00:00 2001 From: Jiannan Wang Date: Wed, 10 Dec 2025 11:58:19 -0800 Subject: [PATCH 6/6] skip flag_gems.ops.to_dtype --- BackendBench/backends/flag_gems.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BackendBench/backends/flag_gems.py b/BackendBench/backends/flag_gems.py index 91306afa..ce40c1e9 100644 --- a/BackendBench/backends/flag_gems.py +++ b/BackendBench/backends/flag_gems.py @@ -290,7 +290,7 @@ def __init__(self) -> None: torch.ops.aten.mse_loss.default: flag_gems.ops.mse_loss, torch.ops.aten.eye.default: flag_gems.ops.eye, torch.ops.aten.eye.m: flag_gems.ops.eye_m, - torch.ops.aten.to.dtype: flag_gems.ops.to_dtype, + # torch.ops.aten.to.dtype: flag_gems.ops.to_dtype, # skip as module 'flag_gems.ops' has no attribute 'to_dtype' } # Register all operators in the global registry to ensure consistent object identity for op in self.ops.keys():