Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #62477 to release/2.6 #62776

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/cpp/inference/api/trt_dynamic_shape_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ void TestTunedDynamic() {
output_t->copy_to_cpu(out_data.data());
};
check_func(predictor_tuned.get());
predictor_tuned.reset(nullptr);

// check tuned_dynamic_shape
AnalysisConfig config;
Expand Down
1 change: 1 addition & 0 deletions test/ir/inference/test_trt_convert_lookup_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def generate_input2(dims, attrs: List[Dict[str, Any]]):
)
},
outputs=["out_data"],
no_cast_list=["indices"],
)

yield program_config
Expand Down
2 changes: 1 addition & 1 deletion test/ir/inference/test_trt_convert_solve.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def clear_dynamic_shape():
yield self.create_inference_config(), (1, 3), 1e-5

self.trt_param.precision = paddle_infer.PrecisionType.Half
yield self.create_inference_config(), (1, 3), 1e-3
yield self.create_inference_config(), (1, 3), (1e-3, 1e-3)

def test(self):
self.run_test()
Expand Down
5 changes: 5 additions & 0 deletions test/legacy_test/test_sparse_fused_attention_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def get_cuda_version():
)
class TestSparseAttentionAPI1(unittest.TestCase):
def setUp(self):
paddle.seed(0)
self.batch_size = 16
self.num_heads = 16
self.seq_len = 128
Expand Down Expand Up @@ -134,6 +135,7 @@ def test_dygraph(self):

class TestSparseAttentionAPI2(TestSparseAttentionAPI1):
def setUp(self):
super().setUp()
self.batch_size = 16
self.num_heads = 16
self.seq_len = 128
Expand All @@ -144,6 +146,7 @@ def setUp(self):

class TestSparseAttentionAPI3(TestSparseAttentionAPI1):
def setUp(self):
super().setUp()
self.batch_size = 16
self.num_heads = 16
self.seq_len = 512
Expand All @@ -154,6 +157,7 @@ def setUp(self):

class TestSparseAttentionAPI4(TestSparseAttentionAPI1):
def setUp(self):
super().setUp()
self.batch_size = 16
self.num_heads = 16
self.seq_len = 512
Expand All @@ -164,6 +168,7 @@ def setUp(self):

class TestSparseAttentionAPI5(TestSparseAttentionAPI1):
def setUp(self):
super().setUp()
self.batch_size = 16
self.num_heads = 16
self.seq_len = 512
Expand Down