Skip to content

Commit

Permalink
Update test_converter_activation.py (#70972)
Browse files Browse the repository at this point in the history
  • Loading branch information
PolaKuma authored Feb 8, 2025
1 parent fb82526 commit 66c4f9f
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions test/tensorrt/test_converter_activation.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import paddle


class TestEluTRTPatternCase1(TensorRTBaseTest):
class TestEluTRTPattern(TensorRTBaseTest):
def setUp(self):
self.python_api = paddle.nn.functional.elu
self.api_args = {
Expand All @@ -35,21 +35,8 @@ def setUp(self):
def test_trt_result(self):
self.check_trt_result()


class TestEluTRTPatternCase2(TensorRTBaseTest):
def setUp(self):
self.python_api = paddle.nn.functional.elu
self.api_args = {
"x": np.random.randn(3).astype("float16"),
"alpha": 1.0,
}
self.program_config = {"feed_list": ["x"]}
self.min_shape = {"x": [1]}
self.opt_shape = {"x": [1]}
self.max_shape = {"x": [5]}

def test_trt_result(self):
self.check_trt_result()
def test_trt_result_fp16(self):
self.check_trt_result(rtol=1e-3, atol=1e-3, precision_mode="fp16")


class TestHardSigmoidTRTPattern(TensorRTBaseTest):
Expand Down

0 comments on commit 66c4f9f

Please sign in to comment.