Skip to content

Commit

Permalink
fix build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
nv-hwoo committed Dec 10, 2024
1 parent 8efddcd commit d90aeda
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/client_backend/client_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#endif // TRITON_ENABLE_PERF_ANALYZER_C_API

#ifdef TRITON_ENABLE_PERF_ANALYZER_DGRPC
#include "grpc/dynamic_grpc_client_backend.h"
#include "dynamic_grpc/dynamic_grpc_client_backend.h"
#endif // TRITON_ENABLE_PERF_ANALYZER_DGRPC

#ifdef TRITON_ENABLE_PERF_ANALYZER_OPENAI
Expand Down Expand Up @@ -190,8 +190,8 @@ ClientBackend::Create(
#ifdef TRITON_ENABLE_PERF_ANALYZER_DGRPC
else if (kind == DYNAMIC_GRPC) {
RETURN_IF_CB_ERROR(dynamicgrpc::DynamicGrpcClientBackend::Create(
url, protocol, BackendToGrpcType(compression_algorithm), http_headers,
verbose, &local_backend));
url, protocol, ssl_options, BackendToGrpcType(compression_algorithm),
http_headers, verbose, &local_backend));
}
#endif // TRITON_ENABLE_PERF_ANALYZER_DGRPC
#ifdef TRITON_ENABLE_PERF_ANALYZER_OPENAI
Expand Down
3 changes: 1 addition & 2 deletions src/client_backend/dynamic_grpc/dynamic_grpc_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ DynamicGrpcInferResult::Id(std::string* id) const

Error
DynamicGrpcInferResult::RawData(
const std::string& output_name, const uint8_t** buf,
size_t* byte_size) const
const std::string& output_name, std::vector<uint8_t>& buf) const
{
// TODO
return Error("Not implemented yet.");
Expand Down
2 changes: 2 additions & 0 deletions src/client_backend/dynamic_grpc/dynamic_grpc_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ struct KeepAliveOptions {
int http2_max_pings_without_data;
};

class DynamicGrpcClient;

//==============================================================================
// An DynamicGrpcRequest represents an inflght request on gRPC.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ ParseGrpcSslOptions(const cb::SslOptionsBase& ssl_options)
Error
DynamicGrpcClientBackend::Create(
const std::string& url, const ProtocolType protocol,
const SslOptionsBase& ssl_options,
const grpc_compression_algorithm compression_algorithm,
std::shared_ptr<Headers> http_headers, const bool verbose,
std::unique_ptr<ClientBackend>* client_backend)
Expand Down Expand Up @@ -77,8 +78,8 @@ DynamicGrpcClientBackend::StreamInfer(
const std::vector<InferInput*>& inputs,
const std::vector<const InferRequestedOutput*>& outputs)
{
RETURN_IF_CB_ERROR(grpc_client_->Infer(
&result, options, inputs, outputs, *http_headers_,
RETURN_IF_CB_ERROR(grpc_client_->BidiStreamRPC(
result, options, inputs, outputs, *http_headers_,
compression_algorithm_));

return Error::Success;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "../../perf_utils.h"
#include "../client_backend.h"
#include "dynamic_grpc_client.h"
#include "dynamic_grpc_infer_input.h"

#define RETURN_IF_TRITON_ERROR(S) \
do { \
Expand All @@ -52,6 +53,7 @@ class DynamicGrpcClientBackend : public ClientBackend {
/// arbitrary grpc service.
/// \param url The grpc service url and port.
/// \param protocol The protocol type used.
/// \param ssl_options The SSL options used with client backend.
/// \param compression_algorithm The compression algorithm to be used
/// on the grpc requests.
/// \param http_headers Map of HTTP headers. The map key/value indicates
Expand All @@ -62,6 +64,7 @@ class DynamicGrpcClientBackend : public ClientBackend {
/// \return Error object indicating success or failure.
static Error Create(
const std::string& url, const ProtocolType protocol,
const SslOptionsBase& ssl_options,
const grpc_compression_algorithm compression_algorithm,
std::shared_ptr<Headers> http_headers, const bool verbose,
std::unique_ptr<ClientBackend>* client_backend);
Expand All @@ -70,7 +73,7 @@ class DynamicGrpcClientBackend : public ClientBackend {
Error StreamInfer(
cb::InferResult** result, const InferOptions& options,
const std::vector<InferInput*>& inputs,
const std::vector<const InferRequestedOutput*>& outputs) override;
const std::vector<const InferRequestedOutput*>& outputs);

/// See ClientBackend::ClientInferStat()
Error ClientInferStat(InferStat* infer_stat) override;
Expand Down

0 comments on commit d90aeda

Please sign in to comment.