Skip to content

Commit

Permalink
Revision 1
Browse files Browse the repository at this point in the history
  • Loading branch information
oandreeva-nv committed Jul 27, 2023
1 parent 2ea04df commit e986006
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion include/triton/core/tritonserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,10 @@ TRITONSERVER_DECLSPEC struct TRITONSERVER_Error*
TRITONSERVER_InferenceTraceRequestId(
struct TRITONSERVER_InferenceTrace* trace, const char** request_id);

/// Get the child trace, spawned from the parent trace.
/// Get the child trace, spawned from the parent trace. The caller owns
/// the returned object and must call TRITONSERVER_InferenceTraceDelete
/// to release the object, unless ownership is transferred through
/// other APIs (see TRITONSERVER_ServerInferAsync).
///
/// \param trace The trace.
/// \param child_trace Returns the child trace, spawned from the trace.
Expand Down
8 changes: 6 additions & 2 deletions src/tritonserver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1067,8 +1067,12 @@ TRITONSERVER_InferenceTraceSpawnChildTrace(
{
#ifdef TRITON_ENABLE_TRACING
tc::InferenceTrace* ltrace = reinterpret_cast<tc::InferenceTrace*>(trace);
*child_trace =
reinterpret_cast<TRITONSERVER_InferenceTrace*>(ltrace->SpawnChildTrace());
if (trace != nullptr) {
*child_trace = reinterpret_cast<TRITONSERVER_InferenceTrace*>(
ltrace->SpawnChildTrace());
} else {
*child_trace = nullptr;
}
return nullptr; // Success
#else
return TRITONSERVER_ErrorNew(
Expand Down

0 comments on commit e986006

Please sign in to comment.