Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shape and reformat free tensor handling in the input byte size check #125

Merged
merged 8 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading