Skip to content

Commit

Permalink
Fix shape and reformat free tensor handling in the input byte size ch…
Browse files Browse the repository at this point in the history
…eck (#125)

* Update model_config.proto
  • Loading branch information
pskiran1 authored Jul 27, 2024
1 parent e827f28 commit 2e9cb9a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/triton/common/triton_json.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,15 @@ class TritonJson {
return TRITONJSON_STATUSSUCCESS;
}

// Set/overwrite a boolean in a value. This changes the
// type of the value to boolean.
TRITONJSON_STATUSTYPE SetBool(const bool value)
{
rapidjson::Value& v = AsMutableValue();
v.SetBool(value);
return TRITONJSON_STATUSSUCCESS;
}

// Set/overwrite a signed integer in a value. This changes the
// type of the value to signed int.
TRITONJSON_STATUSTYPE SetInt(const int64_t value)
Expand Down
18 changes: 18 additions & 0 deletions protobuf/model_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,15 @@ message ModelInput
//@@ Default value is false.
//@@
bool optional = 8;

//@@ .. cpp:var:: bool is_non_linear_format_io
//@@
//@@ Indicates whether the input tensor uses a non-linear IO format. This
//@@ field is currently supported only for TensorRT models. An error will
//@@ be generated if this specification does not comply with the
//@@ underlying model.
//@@
bool is_non_linear_format_io = 9;
}

//@@
Expand Down Expand Up @@ -461,6 +470,15 @@ message ModelOutput
//@@ model.
//@@
bool is_shape_tensor = 6;

//@@ .. cpp:var:: bool is_non_linear_format_io
//@@
//@@ Indicates whether the output tensor uses a non-linear IO format. This
//@@ field is currently supported only for TensorRT models. An error will
//@@ be generated if this specification does not comply with the
//@@ underlying model.
//@@
bool is_non_linear_format_io = 7;
}

//@@ .. cpp:var:: message BatchInput
Expand Down

0 comments on commit 2e9cb9a

Please sign in to comment.