Skip to content

Commit 2e9cb9a

Browse files
authored
Fix shape and reformat free tensor handling in the input byte size check (#125)
* Update model_config.proto
1 parent e827f28 commit 2e9cb9a

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

include/triton/common/triton_json.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,15 @@ class TritonJson {
248248
return TRITONJSON_STATUSSUCCESS;
249249
}
250250

251+
// Set/overwrite a boolean in a value. This changes the
252+
// type of the value to boolean.
253+
TRITONJSON_STATUSTYPE SetBool(const bool value)
254+
{
255+
rapidjson::Value& v = AsMutableValue();
256+
v.SetBool(value);
257+
return TRITONJSON_STATUSSUCCESS;
258+
}
259+
251260
// Set/overwrite a signed integer in a value. This changes the
252261
// type of the value to signed int.
253262
TRITONJSON_STATUSTYPE SetInt(const int64_t value)

protobuf/model_config.proto

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,15 @@ message ModelInput
409409
//@@ Default value is false.
410410
//@@
411411
bool optional = 8;
412+
413+
//@@ .. cpp:var:: bool is_non_linear_format_io
414+
//@@
415+
//@@ Indicates whether the input tensor uses a non-linear IO format. This
416+
//@@ field is currently supported only for TensorRT models. An error will
417+
//@@ be generated if this specification does not comply with the
418+
//@@ underlying model.
419+
//@@
420+
bool is_non_linear_format_io = 9;
412421
}
413422

414423
//@@
@@ -461,6 +470,15 @@ message ModelOutput
461470
//@@ model.
462471
//@@
463472
bool is_shape_tensor = 6;
473+
474+
//@@ .. cpp:var:: bool is_non_linear_format_io
475+
//@@
476+
//@@ Indicates whether the output tensor uses a non-linear IO format. This
477+
//@@ field is currently supported only for TensorRT models. An error will
478+
//@@ be generated if this specification does not comply with the
479+
//@@ underlying model.
480+
//@@
481+
bool is_non_linear_format_io = 7;
464482
}
465483

466484
//@@ .. cpp:var:: message BatchInput

0 commit comments

Comments
 (0)