Skip to content

Commit

Permalink
Replace TRTIS naming with triton (triton-inference-server#1498)
Browse files Browse the repository at this point in the history
* Rename trtserver and tensorrtserver to triton equivalents

* Rename TRTIS* -> TRITON*
  • Loading branch information
deadeyegoodwin committed May 21, 2020
1 parent 8c1aaf9 commit 4da7ada
Show file tree
Hide file tree
Showing 101 changed files with 1,342 additions and 1,347 deletions.
152 changes: 75 additions & 77 deletions Dockerfile

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Dockerfile.centos_client
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ COPY src/core src/core
RUN cd build && \
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX:PATH=/workspace/install \
-DTRTIS_ENABLE_GRPC=ON \
-DTRTIS_ENABLE_HTTP=ON && \
-DTRITON_ENABLE_GRPC=ON \
-DTRITON_ENABLE_HTTP=ON && \
make -j16 trtis-clients
RUN cd install && \
export VERSION=`cat /workspace/VERSION` && \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.client
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ COPY src/core src/core
RUN cd build && \
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX:PATH=/workspace/install \
-DTRTIS_ENABLE_GRPC=ON \
-DTRTIS_ENABLE_HTTP=ON && \
-DTRITON_ENABLE_GRPC=ON \
-DTRITON_ENABLE_HTTP=ON && \
make -j16 trtis-clients
RUN cd install && \
export VERSION=`cat /workspace/VERSION` && \
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.custombackend
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -53,8 +53,8 @@ COPY src/custom src/custom
COPY src/core src/core

RUN (cd build && \
cmake -DTRTIS_ENABLE_GPU=OFF \
-DTRTIS_ENABLE_METRICS_GPU=OFF \
cmake -DTRITON_ENABLE_GPU=OFF \
-DTRITON_ENABLE_METRICS_GPU=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX:PATH=/workspace/install/custom-backend-sdk && \
make -j16 trtis-custom-backends) && \
Expand Down
242 changes: 121 additions & 121 deletions build/CMakeLists.txt

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/libevhtp/config.h.in.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ index e5e434f..0daf25c 100644
#cmakedefine EVHTP_DEBUG
#cmakedefine EVHTP_DISABLE_MEMFUNCTIONS

+#cmakedefine EVHTP_TRTIS_ENABLE_TRACING
+#cmakedefine EVHTP_TRTIS_ENABLE_HTTP_CONTIGUOUS
+#cmakedefine EVHTP_TRITON_ENABLE_TRACING
+#cmakedefine EVHTP_TRITON_ENABLE_HTTP_CONTIGUOUS
+
#ifndef EVHTP_DISABLE_REGEX
#include <onigposix.h>
Expand Down
44 changes: 22 additions & 22 deletions build/libevhtp/evhtp.c.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ index 8d34676..5993ddc 100644
@@ -1335,6 +1335,10 @@ htp__request_parse_start_(htparser * p)
return -1;
}
+#ifdef EVHTP_TRTIS_ENABLE_TRACING

+#ifdef EVHTP_TRITON_ENABLE_TRACING
+ clock_gettime(CLOCK_MONOTONIC, &(c->request->recv_start_ts));
+#endif // EVHTP_TRTIS_ENABLE_TRACING
+#endif // EVHTP_TRITON_ENABLE_TRACING
+
return 0;
}

@@ -1839,6 +1843,28 @@ htp__request_parse_body_(htparser * p, const char * data, size_t len)
return -1;
}

+ // NVIDIA: Don't use a scratch evbuffer, just copy the data
+ // directly into the request's buffer_in. This allows the body to
+ // be contiguous in buffer_in. We don't use the htp__hook_body_
+ // callback so there is no need to stage the body data through
+ // 'buf'.
+#ifdef EVHTP_TRTIS_ENABLE_HTTP_CONTIGUOUS
+#ifdef EVHTP_TRITON_ENABLE_HTTP_CONTIGUOUS
+ if (len > 0) {
+ // The first time we get some body content, reserve enough
+ // space in buffer_in to hold the entire body.
Expand All @@ -44,44 +44,44 @@ index 8d34676..5993ddc 100644
}
@@ -1854,6 +1880,7 @@ htp__request_parse_body_(htparser * p, const char * data, size_t len)
}

evbuffer_drain(buf, -1);
+#endif /* EVHTP_TRTIS_ENABLE_HTTP_CONTIGUOUS */
+#endif /* EVHTP_TRITON_ENABLE_HTTP_CONTIGUOUS */

c->body_bytes_read += len;

@@ -2010,6 +2037,12 @@ htp__request_parse_fini_(htparser * p)
return -1;
}
+#ifdef EVHTP_TRTIS_ENABLE_TRACING

+#ifdef EVHTP_TRITON_ENABLE_TRACING
+ if (c->request) {
+ clock_gettime(CLOCK_MONOTONIC, &(c->request->recv_end_ts));
+ }
+#endif // EVHTP_TRTIS_ENABLE_TRACING
+#endif // EVHTP_TRITON_ENABLE_TRACING
+
return 0;
} /* htp__request_parse_fini_ */

@@ -3788,6 +3821,10 @@ evhtp_send_reply(evhtp_request_t * request, evhtp_res code)
struct evbuffer * reply_buf;
struct bufferevent * bev;
+#ifdef EVHTP_TRTIS_ENABLE_TRACING

+#ifdef EVHTP_TRITON_ENABLE_TRACING
+ clock_gettime(CLOCK_MONOTONIC, &(request->send_start_ts));
+#endif // EVHTP_TRTIS_ENABLE_TRACING
+#endif // EVHTP_TRITON_ENABLE_TRACING
+
c = request->conn;

log_debug("set finished flag");
@@ -3805,6 +3842,10 @@ evhtp_send_reply(evhtp_request_t * request, evhtp_res code)
bufferevent_write_buffer(bev, reply_buf);

evbuffer_drain(reply_buf, -1);
+
+#ifdef EVHTP_TRTIS_ENABLE_TRACING
+#ifdef EVHTP_TRITON_ENABLE_TRACING
+ clock_gettime(CLOCK_MONOTONIC, &(request->send_end_ts));
+#endif // EVHTP_TRTIS_ENABLE_TRACING
+#endif // EVHTP_TRITON_ENABLE_TRACING
}

int
9 changes: 4 additions & 5 deletions build/libevhtp/evhtp.h.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ diff --git a/include/evhtp/evhtp.h b/include/evhtp/evhtp.h
index 9bcee44..e6cf17f 100644
--- a/include/evhtp/evhtp.h
+++ b/include/evhtp/evhtp.h
@@ -416,6 +416,13 @@ struct evhtp_request {
@@ -416,5 +416,12 @@ struct evhtp_request {
#define EVHTP_REQ_FLAG_ERROR (1 << 4)
uint16_t flags;
+#ifdef EVHTP_TRTIS_ENABLE_TRACING

+#ifdef EVHTP_TRITON_ENABLE_TRACING
+ struct timespec recv_start_ts;
+ struct timespec recv_end_ts;
+ struct timespec send_start_ts;
+ struct timespec send_end_ts;
+#endif /* EVHTP_TRTIS_ENABLE_TRACING */
+#endif /* EVHTP_TRITON_ENABLE_TRACING */
+
evhtp_callback_cb cb; /**< the function to call when fully processed */
void * cbarg; /**< argument which is passed to the cb function */

22 changes: 11 additions & 11 deletions build/trtis-clients/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,28 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
include_directories("${PROJECT_SOURCE_DIR}/../..")
include_directories("${PROJECT_BINARY_DIR}")

if(${TRTIS_ENABLE_HTTP})
add_definitions(-DTRTIS_ENABLE_HTTP=1)
endif() # TRTIS_ENABLE_HTTP
if(${TRITON_ENABLE_HTTP})
add_definitions(-DTRITON_ENABLE_HTTP=1)
endif() # TRITON_ENABLE_HTTP

if(${TRTIS_ENABLE_GRPC})
add_definitions(-DTRTIS_ENABLE_GRPC=1)
endif() # TRTIS_ENABLE_GRPC
if(${TRITON_ENABLE_GRPC})
add_definitions(-DTRITON_ENABLE_GRPC=1)
endif() # TRITON_ENABLE_GRPC

if(NOT WIN32)
#
# CUDA
#
if(${TRTIS_ENABLE_GPU})
if(${TRITON_ENABLE_GPU})
find_package(CUDA REQUIRED)
message(STATUS "Using CUDA ${CUDA_VERSION}")

add_definitions(-DTRTIS_ENABLE_GPU=1)
add_definitions(-DTRITON_ENABLE_GPU=1)
set(CUDA_NVCC_FLAGS -std=c++11)
endif() # TRTIS_ENABLE_GPU
endif() # TRITON_ENABLE_GPU
endif() # NOT WIN32

if(${TRTIS_ENABLE_GRPC})
if(${TRITON_ENABLE_GRPC})
#
# Protobuf
#
Expand All @@ -84,7 +84,7 @@ if(${TRTIS_ENABLE_GRPC})
find_package(gRPC CONFIG REQUIRED)
message(STATUS "Using gRPC ${gRPC_VERSION}")
include_directories($<TARGET_PROPERTY:gRPC::grpc,INTERFACE_INCLUDE_DIRECTORIES>)
endif() # TRTIS_ENABLE_GRPC
endif() # TRITON_ENABLE_GRPC

add_subdirectory(../../src/core src/core)
add_subdirectory(../../src/clients/c++ src/clients/c++)
Expand Down
14 changes: 7 additions & 7 deletions build/trtis-custom-backends/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -37,22 +37,22 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

if(${TRTIS_ENABLE_GPU})
add_definitions(-DTRTIS_ENABLE_GPU=1)
add_definitions(-DTRTIS_MIN_COMPUTE_CAPABILITY=${TRTIS_MIN_COMPUTE_CAPABILITY})
endif() # TRTIS_ENABLE_GPU
if(${TRITON_ENABLE_GPU})
add_definitions(-DTRITON_ENABLE_GPU=1)
add_definitions(-DTRITON_MIN_COMPUTE_CAPABILITY=${TRITON_MIN_COMPUTE_CAPABILITY})
endif() # TRITON_ENABLE_GPU

include_directories("${PROJECT_SOURCE_DIR}/../..")
include_directories("${PROJECT_BINARY_DIR}")

#
# CUDA
#
if(${TRTIS_ENABLE_GPU})
if(${TRITON_ENABLE_GPU})
find_package(CUDA REQUIRED)
message(STATUS "Using CUDA ${CUDA_VERSION}")
set(CUDA_NVCC_FLAGS -std=c++11)
endif() # TRTIS_ENABLE_GPU
endif() # TRITON_ENABLE_GPU

#
# Protobuf
Expand Down
14 changes: 7 additions & 7 deletions build/trtis-test-utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -36,22 +36,22 @@ set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_STANDARD 11)

if(${TRTIS_ENABLE_GPU})
add_definitions(-DTRTIS_ENABLE_GPU=1)
add_definitions(-DTRTIS_MIN_COMPUTE_CAPABILITY=${TRTIS_MIN_COMPUTE_CAPABILITY})
endif() # TRTIS_ENABLE_GPU
if(${TRITON_ENABLE_GPU})
add_definitions(-DTRITON_ENABLE_GPU=1)
add_definitions(-DTRITON_MIN_COMPUTE_CAPABILITY=${TRITON_MIN_COMPUTE_CAPABILITY})
endif() # TRITON_ENABLE_GPU

include_directories("${PROJECT_SOURCE_DIR}/../..")
include_directories("${PROJECT_BINARY_DIR}")

#
# CUDA
#
if(${TRTIS_ENABLE_GPU})
if(${TRITON_ENABLE_GPU})
find_package(CUDA REQUIRED)
message(STATUS "Using CUDA ${CUDA_VERSION}")
set(CUDA_NVCC_FLAGS -std=c++11)
endif() # TRTIS_ENABLE_GPU
endif() # TRITON_ENABLE_GPU

#
# Protobuf
Expand Down
Loading

0 comments on commit 4da7ada

Please sign in to comment.