Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yinggeh committed Jul 10, 2024
1 parent 1875c07 commit 86a5573
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/test/input_byte_size_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -261,16 +261,16 @@ TEST_F(InputByteSizeTest, ValidInputByteSize)
// Create an inference request
FAIL_TEST_IF_ERR(
TRITONSERVER_InferenceRequestNew(
&irequest_, server_, "pt_identity", -1 /* model_version */),
&irequest_, server_, "simple", -1 /* model_version */),
"creating inference request");
FAIL_TEST_IF_ERR(
TRITONSERVER_InferenceRequestSetReleaseCallback(
irequest_, InferRequestComplete, nullptr /* request_release_userp */),
"setting request release callback");

// Define input shape and data
std::vector<int64_t> shape{1, 8};
std::vector<float> input_data(8, 1);
std::vector<int64_t> shape{1, 16};
std::vector<float> input_data(16, 1);
const auto input0_byte_size = sizeof(input_data[0]) * input_data.size();

// Set input for the request
Expand Down Expand Up @@ -315,16 +315,16 @@ TEST_F(InputByteSizeTest, InputByteSizeMismatch)
// Create an inference request
FAIL_TEST_IF_ERR(
TRITONSERVER_InferenceRequestNew(
&irequest_, server_, "pt_identity", -1 /* model_version */),
&irequest_, server_, "simple", -1 /* model_version */),
"creating inference request");
FAIL_TEST_IF_ERR(
TRITONSERVER_InferenceRequestSetReleaseCallback(
irequest_, InferRequestComplete, nullptr /* request_release_userp */),
"setting request release callback");

// Define input shape and data
std::vector<int64_t> shape{1, 8};
std::vector<float> input_data(10, 1);
std::vector<int64_t> shape{1, 16};
std::vector<float> input_data(17, 1);
const auto input0_byte_size = sizeof(input_data[0]) * input_data.size();

// Set input for the request
Expand Down Expand Up @@ -353,8 +353,8 @@ TEST_F(InputByteSizeTest, InputByteSizeMismatch)
FAIL_TEST_IF_SUCCESS(
TRITONSERVER_ServerInferAsync(server_, irequest_, nullptr /* trace */),
"expect error with inference request",
"input byte size mismatch for input 'INPUT0' for model 'pt_identity'. "
"Expected 32, got 40");
"input byte size mismatch for input 'INPUT0' for model 'simple'. "
"Expected 64, got 68");

// Need to manually delete request, otherwise server will not shut down.
FAIL_TEST_IF_ERR(
Expand Down

0 comments on commit 86a5573

Please sign in to comment.