Skip to content

Commit aff3cea

Browse files
committed
fix: fix automatic plugin test issue
1 parent 8a61d9b commit aff3cea

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

.github/workflows/build-test-linux-x86_64.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,9 @@ jobs:
426426
set -euo pipefail
427427
pushd .
428428
cd tests/py/dynamo
429-
python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_plugins_tests_results.xml automatic_plugin/
429+
python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_plugins_tests_results.xml automatic_plugin/test_automatic_plugin.py
430+
python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_plugins_tests_results.xml automatic_plugin/test_automatic_plugin_with_attrs.py
431+
python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_plugins_tests_results.xml automatic_plugin/test_flashinfer_rmsnorm.py.py
430432
popd
431433
432434
L2-torchscript-tests:

tests/py/dynamo/automatic_plugin/test_automatic_plugin.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33

44
import torch
55
import torch.nn as nn
6-
import torch_tensorrt
76
import triton
87
import triton.language as tl
98
from parameterized import parameterized
109
from torch.testing._internal.common_utils import run_tests
1110

11+
import torch_tensorrt
12+
1213
from ..conversion.harness import DispatchTestCase
1314

1415

@@ -39,7 +40,7 @@ def elementwise_mul(X: torch.Tensor, Y: torch.Tensor) -> torch.Tensor:
3940
Z = torch.empty_like(X)
4041

4142
# Define block size
42-
BLOCK_SIZE = 1024
43+
BLOCK_SIZE = 64
4344

4445
# Grid of programs
4546
grid = lambda meta: (X.numel() // meta["BLOCK_SIZE"],)

tests/py/dynamo/automatic_plugin/test_automatic_plugin_with_attrs.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33

44
import torch
55
import torch.nn as nn
6-
import torch_tensorrt
76
import triton
87
import triton.language as tl
98
from parameterized import parameterized
109
from torch.testing._internal.common_utils import run_tests
1110

11+
import torch_tensorrt
12+
1213
from ..conversion.harness import DispatchTestCase
1314

1415

@@ -40,7 +41,7 @@ def elementwise_scale_mul(
4041
Z = torch.empty_like(X)
4142

4243
# Define block size
43-
BLOCK_SIZE = 1024
44+
BLOCK_SIZE = 64
4445

4546
# Grid of programs
4647
grid = lambda meta: (X.numel() // meta["BLOCK_SIZE"],)

tests/py/dynamo/automatic_plugin/test_flashinfer_rmsnorm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
import pytest
55
import torch
66
import torch.nn as nn
7-
import torch_tensorrt
87
from parameterized import parameterized
98
from torch.testing._internal.common_utils import run_tests
9+
10+
import torch_tensorrt
1011
from torch_tensorrt._enums import dtype
1112

1213
from ..conversion.harness import DispatchTestCase

0 commit comments

Comments
 (0)