Skip to content

Commit

Permalink
Adding guards around frontend-specific code
Browse files Browse the repository at this point in the history
  • Loading branch information
KrishnanPrash committed Oct 28, 2024
1 parent d2939cb commit 46121ff
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/python/tritonfrontend/_c/tritonfrontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,28 @@ class TritonFrontend {

server_.reset(server_ptr, EmptyDeleter);

if constexpr (
std::is_same_v<FrontendServer, HTTPAPIServer> ||
std::is_same_v<FrontendServer, triton::server::grpc::Server>) {
#ifdef TRITON_ENABLE_HTTP
if constexpr (std::is_same_v<FrontendServer, HTTPAPIServer>) {
ThrowIfError(FrontendServer::Create(
server_, data, nullptr /* TraceManager */,
nullptr /* SharedMemoryManager */, restricted_features, &service));
}
#endif

#ifdef TRITON_ENABLE_GRPC
if constexpr (std::is_same_v<
FrontendServer, triton::server::grpc::Server>) {
ThrowIfError(FrontendServer::Create(
server_, data, nullptr /* TraceManager */,
nullptr /* SharedMemoryManager */, restricted_features, &service));
}
#endif

#ifdef TRITON_ENABLE_METRICS
if constexpr (std::is_same_v<FrontendServer, HTTPMetricsServer>) {
ThrowIfError(FrontendServer::Create(server_, data, &service));
}
#endif
};

// TODO: [DLIS-7194] Add support for TraceManager & SharedMemoryManager
Expand Down

0 comments on commit 46121ff

Please sign in to comment.