From aff3ceab3b464687ec218a7c4cb9c926f3d3700b Mon Sep 17 00:00:00 2001 From: Bo Wang Date: Tue, 4 Nov 2025 22:13:38 +0000 Subject: [PATCH 1/2] fix: fix automatic plugin test issue --- .github/workflows/build-test-linux-x86_64.yml | 4 +++- tests/py/dynamo/automatic_plugin/test_automatic_plugin.py | 5 +++-- .../automatic_plugin/test_automatic_plugin_with_attrs.py | 5 +++-- tests/py/dynamo/automatic_plugin/test_flashinfer_rmsnorm.py | 3 ++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-test-linux-x86_64.yml b/.github/workflows/build-test-linux-x86_64.yml index da3124c472..810e544762 100644 --- a/.github/workflows/build-test-linux-x86_64.yml +++ b/.github/workflows/build-test-linux-x86_64.yml @@ -426,7 +426,9 @@ jobs: set -euo pipefail pushd . cd tests/py/dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_plugins_tests_results.xml automatic_plugin/ + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_plugins_tests_results.xml automatic_plugin/test_automatic_plugin.py + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_plugins_tests_results.xml automatic_plugin/test_automatic_plugin_with_attrs.py + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_plugins_tests_results.xml automatic_plugin/test_flashinfer_rmsnorm.py.py popd L2-torchscript-tests: diff --git a/tests/py/dynamo/automatic_plugin/test_automatic_plugin.py b/tests/py/dynamo/automatic_plugin/test_automatic_plugin.py index 44acb7b105..622b88547e 100644 --- a/tests/py/dynamo/automatic_plugin/test_automatic_plugin.py +++ b/tests/py/dynamo/automatic_plugin/test_automatic_plugin.py @@ -3,12 +3,13 @@ import torch import torch.nn as nn -import torch_tensorrt import triton import triton.language as tl from parameterized import parameterized from torch.testing._internal.common_utils import run_tests +import torch_tensorrt + from ..conversion.harness import DispatchTestCase @@ -39,7 +40,7 @@ def elementwise_mul(X: torch.Tensor, Y: torch.Tensor) -> torch.Tensor: Z = torch.empty_like(X) # Define block size - BLOCK_SIZE = 1024 + BLOCK_SIZE = 64 # Grid of programs grid = lambda meta: (X.numel() // meta["BLOCK_SIZE"],) diff --git a/tests/py/dynamo/automatic_plugin/test_automatic_plugin_with_attrs.py b/tests/py/dynamo/automatic_plugin/test_automatic_plugin_with_attrs.py index 823d0d600e..831a9f2d53 100644 --- a/tests/py/dynamo/automatic_plugin/test_automatic_plugin_with_attrs.py +++ b/tests/py/dynamo/automatic_plugin/test_automatic_plugin_with_attrs.py @@ -3,12 +3,13 @@ import torch import torch.nn as nn -import torch_tensorrt import triton import triton.language as tl from parameterized import parameterized from torch.testing._internal.common_utils import run_tests +import torch_tensorrt + from ..conversion.harness import DispatchTestCase @@ -40,7 +41,7 @@ def elementwise_scale_mul( Z = torch.empty_like(X) # Define block size - BLOCK_SIZE = 1024 + BLOCK_SIZE = 64 # Grid of programs grid = lambda meta: (X.numel() // meta["BLOCK_SIZE"],) diff --git a/tests/py/dynamo/automatic_plugin/test_flashinfer_rmsnorm.py b/tests/py/dynamo/automatic_plugin/test_flashinfer_rmsnorm.py index d85c8a633f..1666102070 100644 --- a/tests/py/dynamo/automatic_plugin/test_flashinfer_rmsnorm.py +++ b/tests/py/dynamo/automatic_plugin/test_flashinfer_rmsnorm.py @@ -4,9 +4,10 @@ import pytest import torch import torch.nn as nn -import torch_tensorrt from parameterized import parameterized from torch.testing._internal.common_utils import run_tests + +import torch_tensorrt from torch_tensorrt._enums import dtype from ..conversion.harness import DispatchTestCase From e78dec4a29a4b6af68f7edd4b35d402d4af6b9be Mon Sep 17 00:00:00 2001 From: Bo Wang Date: Wed, 5 Nov 2025 22:16:48 +0000 Subject: [PATCH 2/2] update --- .github/workflows/build-test-linux-x86_64.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test-linux-x86_64.yml b/.github/workflows/build-test-linux-x86_64.yml index 810e544762..ac3a56bf82 100644 --- a/.github/workflows/build-test-linux-x86_64.yml +++ b/.github/workflows/build-test-linux-x86_64.yml @@ -426,9 +426,9 @@ jobs: set -euo pipefail pushd . cd tests/py/dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_plugins_tests_results.xml automatic_plugin/test_automatic_plugin.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_plugins_tests_results.xml automatic_plugin/test_automatic_plugin_with_attrs.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_plugins_tests_results.xml automatic_plugin/test_flashinfer_rmsnorm.py.py + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/test_automatic_plugin.xml automatic_plugin/test_automatic_plugin.py + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/test_automatic_plugin_with_attrs.xml automatic_plugin/test_automatic_plugin_with_attrs.py + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/test_flashinfer_rmsnorm.xml automatic_plugin/test_flashinfer_rmsnorm.py.py popd L2-torchscript-tests: