Skip to content

Commit

Permalink
Add cancellation status
Browse files Browse the repository at this point in the history
  • Loading branch information
Tabrizian committed Aug 31, 2023
1 parent 0a6315e commit 8bb1c84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion include/triton/core/tritonserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ typedef enum TRITONSERVER_errorcode_enum {
TRITONSERVER_ERROR_INVALID_ARG,
TRITONSERVER_ERROR_UNAVAILABLE,
TRITONSERVER_ERROR_UNSUPPORTED,
TRITONSERVER_ERROR_ALREADY_EXISTS
TRITONSERVER_ERROR_ALREADY_EXISTS,
TRITONSERVER_ERROR_CANCELLED
} TRITONSERVER_Error_Code;

/// Create a new error object. The caller takes ownership of the
Expand Down
6 changes: 4 additions & 2 deletions src/status.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ TritonCodeToStatusCode(TRITONSERVER_Error_Code code)
return Status::Code::UNSUPPORTED;
case TRITONSERVER_ERROR_ALREADY_EXISTS:
return Status::Code::ALREADY_EXISTS;

case TRITONSERVER_ERROR_CANCELLED:
return Status::Code::CANCELLED;
default:
break;
}
Expand All @@ -74,7 +75,8 @@ StatusCodeToTritonCode(Status::Code status_code)
return TRITONSERVER_ERROR_UNSUPPORTED;
case Status::Code::ALREADY_EXISTS:
return TRITONSERVER_ERROR_ALREADY_EXISTS;

case Status::Code::CANCELLED:
return TRITONSERVER_ERROR_CANCELLED;
default:
break;
}
Expand Down

0 comments on commit 8bb1c84

Please sign in to comment.