Skip to content

Commit 2a5c507

Browse files
committed
Undo C++ client checks and tests
1 parent 60f3f52 commit 2a5c507

File tree

7 files changed

+5
-355
lines changed

7 files changed

+5
-355
lines changed

src/c++/library/CMakeLists.txt

-12
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ if(TRITON_ENABLE_CC_GRPC OR TRITON_ENABLE_PERF_ANALYZER)
223223
grpcclient_static
224224
PRIVATE gRPC::grpc++
225225
PRIVATE gRPC::grpc
226-
PRIVATE triton-common-model-config
227226
PUBLIC protobuf::libprotobuf
228227
PUBLIC Threads::Threads
229228
)
@@ -252,7 +251,6 @@ if(TRITON_ENABLE_CC_GRPC OR TRITON_ENABLE_PERF_ANALYZER)
252251
grpcclient
253252
PRIVATE gRPC::grpc++
254253
PRIVATE gRPC::grpc
255-
PRIVATE triton-common-model-config
256254
PUBLIC protobuf::libprotobuf
257255
PUBLIC Threads::Threads
258256
)
@@ -378,10 +376,6 @@ if(TRITON_ENABLE_CC_HTTP OR TRITON_ENABLE_PERF_ANALYZER)
378376
http-client-library EXCLUDE_FROM_ALL OBJECT
379377
${REQUEST_SRCS} ${REQUEST_HDRS}
380378
)
381-
add_dependencies(
382-
http-client-library
383-
proto-library
384-
)
385379

386380
if (NOT WIN32)
387381
set_property(
@@ -394,14 +388,12 @@ if(TRITON_ENABLE_CC_HTTP OR TRITON_ENABLE_PERF_ANALYZER)
394388
http-client-library
395389
PUBLIC
396390
triton-common-json # from repo-common
397-
triton-common-model-config
398391
)
399392

400393
# libhttpclient_static.a
401394
add_library(
402395
httpclient_static STATIC
403396
$<TARGET_OBJECTS:http-client-library>
404-
$<TARGET_OBJECTS:proto-library>
405397
)
406398
add_library(
407399
TritonClient::httpclient_static ALIAS httpclient_static
@@ -410,7 +402,6 @@ if(TRITON_ENABLE_CC_HTTP OR TRITON_ENABLE_PERF_ANALYZER)
410402
target_link_libraries(
411403
httpclient_static
412404
PRIVATE triton-common-json
413-
PRIVATE triton-common-model-config
414405
PUBLIC CURL::libcurl
415406
PUBLIC Threads::Threads
416407
)
@@ -426,7 +417,6 @@ if(TRITON_ENABLE_CC_HTTP OR TRITON_ENABLE_PERF_ANALYZER)
426417
add_library(
427418
httpclient SHARED
428419
$<TARGET_OBJECTS:http-client-library>
429-
$<TARGET_OBJECTS:proto-library>
430420
)
431421
add_library(
432422
TritonClient::httpclient ALIAS httpclient
@@ -444,7 +434,6 @@ if(TRITON_ENABLE_CC_HTTP OR TRITON_ENABLE_PERF_ANALYZER)
444434
target_link_libraries(
445435
httpclient
446436
PRIVATE triton-common-json
447-
PRIVATE triton-common-model-config
448437
PUBLIC CURL::libcurl
449438
PUBLIC Threads::Threads
450439
)
@@ -470,7 +459,6 @@ if(TRITON_ENABLE_CC_HTTP OR TRITON_ENABLE_PERF_ANALYZER)
470459
$<INSTALL_INTERFACE:include>
471460
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
472461
$<TARGET_PROPERTY:CURL::libcurl,INTERFACE_INCLUDE_DIRECTORIES>
473-
$<TARGET_PROPERTY:proto-library,INCLUDE_DIRECTORIES>
474462
PRIVATE
475463
${CMAKE_CURRENT_SOURCE_DIR}
476464
)

src/c++/library/common.cc

+1-25
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
// Copyright 2020-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
//
33
// Redistribution and use in source and binary forms, with or without
44
// modification, are permitted provided that the following conditions
@@ -26,10 +26,6 @@
2626

2727
#include "common.h"
2828

29-
#include <numeric>
30-
31-
#include "triton/common/model_config.h"
32-
3329
namespace triton { namespace client {
3430

3531
//==============================================================================
@@ -236,26 +232,6 @@ InferInput::SetBinaryData(const bool binary_data)
236232
return Error::Success;
237233
}
238234

239-
Error
240-
InferInput::ValidateData() const
241-
{
242-
inference::DataType datatype =
243-
triton::common::ProtocolStringToDataType(datatype_);
244-
// String inputs will be checked at core and backend to reduce overhead.
245-
if (datatype == inference::DataType::TYPE_STRING) {
246-
return Error::Success;
247-
}
248-
249-
int64_t expected_byte_size = triton::common::GetByteSize(datatype, shape_);
250-
if ((int64_t)byte_size_ != expected_byte_size) {
251-
return Error(
252-
"input '" + name_ + "' got unexpected byte size " +
253-
std::to_string(byte_size_) + ", expected " +
254-
std::to_string(expected_byte_size));
255-
}
256-
return Error::Success;
257-
}
258-
259235
Error
260236
InferInput::PrepareForRequest()
261237
{

src/c++/library/common.h

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
// Copyright 2020-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
//
33
// Redistribution and use in source and binary forms, with or without
44
// modification, are permitted provided that the following conditions
@@ -354,10 +354,6 @@ class InferInput {
354354
/// \return Error object indicating success or failure.
355355
Error SetBinaryData(const bool binary_data);
356356

357-
/// Validate input has data and input shape matches input data.
358-
/// \return Error object indicating success of failure.
359-
Error ValidateData() const;
360-
361357
private:
362358
#ifdef TRITON_INFERENCE_SERVER_CLIENT_CLASS
363359
friend class TRITON_INFERENCE_SERVER_CLIENT_CLASS;

src/c++/library/grpc_client.cc

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
// Copyright 2020-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
//
33
// Redistribution and use in source and binary forms, with or without
44
// modification, are permitted provided that the following conditions
@@ -1470,13 +1470,7 @@ InferenceServerGrpcClient::PreRunProcessing(
14701470

14711471
int index = 0;
14721472
infer_request_.mutable_raw_input_contents()->Clear();
1473-
Error err;
14741473
for (const auto input : inputs) {
1475-
err = input->ValidateData();
1476-
if (!err.IsOk()) {
1477-
return err;
1478-
}
1479-
14801474
// Add new InferInputTensor submessages only if required, otherwise
14811475
// reuse the submessages already available.
14821476
auto grpc_input = (infer_request_.inputs().size() <= index)

src/c++/library/http_client.cc

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
// Copyright 2020-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
//
33
// Redistribution and use in source and binary forms, with or without
44
// modification, are permitted provided that the following conditions
@@ -2116,11 +2116,6 @@ InferenceServerHttpClient::PreRunProcessing(
21162116
// Add the buffers holding input tensor data
21172117
bool all_inputs_are_json{true};
21182118
for (const auto this_input : inputs) {
2119-
err = this_input->ValidateData();
2120-
if (!err.IsOk()) {
2121-
return err;
2122-
}
2123-
21242119
if (this_input->BinaryData()) {
21252120
all_inputs_are_json = false;
21262121
}

src/c++/tests/CMakeLists.txt

+1-32
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# Copyright 2020-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
#
33
# Redistribution and use in source and binary forms, with or without
44
# modification, are permitted provided that the following conditions
@@ -70,9 +70,6 @@ install(
7070
RUNTIME DESTINATION bin
7171
)
7272

73-
#
74-
# cc_client_test
75-
#
7673
add_executable(
7774
cc_client_test
7875
cc_client_test.cc
@@ -92,34 +89,6 @@ install(
9289
RUNTIME DESTINATION bin
9390
)
9491

95-
#
96-
# client_input_test
97-
#
98-
add_executable(
99-
client_input_test
100-
client_input_test.cc
101-
$<TARGET_OBJECTS:shm-utils-library>
102-
)
103-
target_include_directories(
104-
client_input_test
105-
PRIVATE
106-
${GTEST_INCLUDE_DIRS}
107-
)
108-
target_link_libraries(
109-
client_input_test
110-
PRIVATE
111-
grpcclient_static
112-
httpclient_static
113-
gtest
114-
${GTEST_LIBRARY}
115-
${GTEST_MAIN_LIBRARY}
116-
GTest::gmock
117-
)
118-
install(
119-
TARGETS client_input_test
120-
RUNTIME DESTINATION bin
121-
)
122-
12392
endif() # TRITON_ENABLE_CC_HTTP AND TRITON_ENABLE_CC_GRPC
12493

12594
endif()

0 commit comments

Comments
 (0)