Skip to content

Commit 5c05143

Browse files
committed
add fatten/flatten2 trt converter test cases
1 parent 630b132 commit 5c05143

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_flatten.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121

2222

2323
class TrtConvertFlattenTest_dim_2(TrtLayerAutoScanTest):
24+
def is_program_valid(self, program_config: ProgramConfig) -> bool:
25+
return True
26+
2427
def sample_program_configs(self):
2528
def generate_input(batch):
2629
return np.random.random([batch, 32]).astype(np.float32)
@@ -102,6 +105,9 @@ def test(self):
102105

103106

104107
class TrtConvertFlattenTest_dim_3(TrtLayerAutoScanTest):
108+
def is_program_valid(self, program_config: ProgramConfig) -> bool:
109+
return True
110+
105111
def sample_program_configs(self):
106112
def generate_input(batch):
107113
return np.random.random([batch, 32, 64]).astype(np.float32)
@@ -183,6 +189,9 @@ def test(self):
183189

184190

185191
class TrtConvertFlattenTest_dim_4(TrtLayerAutoScanTest):
192+
def is_program_valid(self, program_config: ProgramConfig) -> bool:
193+
return True
194+
186195
def sample_program_configs(self):
187196
def generate_input(batch):
188197
return np.random.random([batch, 8, 8, 8]).astype(np.float32)
@@ -264,6 +273,9 @@ def test(self):
264273

265274

266275
class TrtConvertFlattenTest_dim_5(TrtLayerAutoScanTest):
276+
def is_program_valid(self, program_config: ProgramConfig) -> bool:
277+
return True
278+
267279
def sample_program_configs(self):
268280
def generate_input(batch):
269281
return np.random.random([batch, 8, 8, 8]).astype(np.float32)

0 commit comments

Comments
 (0)