From ad6136e513f866a89fc8dd6cfc6182ebe8166ed9 Mon Sep 17 00:00:00 2001 From: Sai Kiran Polisetty Date: Fri, 12 Jul 2024 16:19:53 +0530 Subject: [PATCH 1/7] Update --- include/triton/common/triton_json.h | 9 +++++++++ protobuf/model_config.proto | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/include/triton/common/triton_json.h b/include/triton/common/triton_json.h index d57ff6e..cded06e 100644 --- a/include/triton/common/triton_json.h +++ b/include/triton/common/triton_json.h @@ -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) diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index 06f013d..17c83a3 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -409,6 +409,15 @@ message ModelInput //@@ Default value is false. //@@ bool optional = 8; + + //@@ .. cpp:var:: bool is_reformat_free_tensor + //@@ + //@@ Whether or not the input is a reformat-free tensor to the model. This + //@@ field is currently supported only for the TensorRT model. An error + //@@ will be generated if this specification does not comply with underlying + //@@ model. + //@@ + bool is_reformat_free_tensor = 9; } //@@ @@ -461,6 +470,15 @@ message ModelOutput //@@ model. //@@ bool is_shape_tensor = 6; + + //@@ .. cpp:var:: bool is_reformat_free_tensor + //@@ + //@@ Whether or not the ouput is a reformat-free tensor to the model. This + //@@ field is currently supported only for the TensorRT model. An error + //@@ will be generated if this specification does not comply with underlying + //@@ model. + //@@ + bool is_reformat_free_tensor = 9; } //@@ .. cpp:var:: message BatchInput From 1137ebd99effa5be4de9e750dac17e04e98f5424 Mon Sep 17 00:00:00 2001 From: Sai Kiran Polisetty Date: Sat, 13 Jul 2024 20:46:35 +0530 Subject: [PATCH 2/7] Update flag name --- protobuf/model_config.proto | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index 17c83a3..1cdb12b 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -410,14 +410,14 @@ message ModelInput //@@ bool optional = 8; - //@@ .. cpp:var:: bool is_reformat_free_tensor + //@@ .. cpp:var:: bool is_non_linear_format_io //@@ - //@@ Whether or not the input is a reformat-free tensor to the model. This - //@@ field is currently supported only for the TensorRT model. An error - //@@ will be generated if this specification does not comply with underlying + //@@ 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_reformat_free_tensor = 9; + bool is_non_linear_format_io = 9; } //@@ @@ -471,14 +471,14 @@ message ModelOutput //@@ bool is_shape_tensor = 6; - //@@ .. cpp:var:: bool is_reformat_free_tensor + //@@ .. cpp:var:: bool is_non_linear_format_io //@@ - //@@ Whether or not the ouput is a reformat-free tensor to the model. This - //@@ field is currently supported only for the TensorRT model. An error - //@@ will be generated if this specification does not comply with underlying + //@@ 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_reformat_free_tensor = 9; + bool is_non_linear_format_io = 9; } //@@ .. cpp:var:: message BatchInput From 1c582606af8122f1bda34c3d9f30609eb6bf900d Mon Sep 17 00:00:00 2001 From: Sai Kiran Polisetty Date: Sat, 13 Jul 2024 20:47:46 +0530 Subject: [PATCH 3/7] Update --- protobuf/model_config.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index 1cdb12b..017ee2f 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -478,7 +478,7 @@ message ModelOutput //@@ be generated if this specification does not comply with the underlying //@@ model. //@@ - bool is_non_linear_format_io = 9; + bool is_non_linear_format_io = 7; } //@@ .. cpp:var:: message BatchInput From a514e878dbf02ab00d12a31064756739b73cad8d Mon Sep 17 00:00:00 2001 From: Sai Kiran Polisetty Date: Sat, 13 Jul 2024 20:51:02 +0530 Subject: [PATCH 4/7] Update --- protobuf/model_config.proto | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index 017ee2f..04e6421 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -392,15 +392,14 @@ message ModelInput //@@ bool is_shape_tensor = 6; - //@@ .. cpp:var:: bool allow_ragged_batch - //@@ - //@@ Whether or not the input is allowed to be "ragged" in a dynamically - //@@ created batch. Default is false indicating that two requests will - //@@ only be batched if this tensor has the same shape in both requests. - //@@ True indicates that two requests can be batched even if this tensor - //@@ has a different shape in each request. + //@@ .. 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 allow_ragged_batch = 7; + bool is_non_linear_format_io = 7; //@@ .. cpp:var:: bool optional //@@ @@ -410,14 +409,15 @@ message ModelInput //@@ 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. + //@@ .. cpp:var:: bool allow_ragged_batch + //@@ + //@@ Whether or not the input is allowed to be "ragged" in a dynamically + //@@ created batch. Default is false indicating that two requests will + //@@ only be batched if this tensor has the same shape in both requests. + //@@ True indicates that two requests can be batched even if this tensor + //@@ has a different shape in each request. //@@ - bool is_non_linear_format_io = 9; + bool allow_ragged_batch = 9; } //@@ From 3b0a96a0b7c3925b4842e44b8d1b0136d29c9e2f Mon Sep 17 00:00:00 2001 From: Sai Kiran Polisetty Date: Sun, 14 Jul 2024 17:05:31 +0000 Subject: [PATCH 5/7] Fix pre-commit error --- protobuf/model_config.proto | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index 04e6421..089f363 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -393,10 +393,11 @@ message ModelInput bool is_shape_tensor = 6; //@@ .. 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 + //@@ 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; @@ -472,10 +473,11 @@ message ModelOutput 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 + //@@ 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; From a4bfde410daaba1c70f987d78be219a23b9549b8 Mon Sep 17 00:00:00 2001 From: Sai Kiran Polisetty Date: Sun, 14 Jul 2024 17:07:08 +0000 Subject: [PATCH 6/7] Fix pre-commit error --- protobuf/model_config.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index 089f363..ab34a46 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -397,7 +397,7 @@ message ModelInput //@@ 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 + // underlying //@@ model. //@@ bool is_non_linear_format_io = 7; @@ -477,7 +477,7 @@ message ModelOutput //@@ 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 + // underlying //@@ model. //@@ bool is_non_linear_format_io = 7; From f22e498d6b004fa273bdcd38a92702bfd2b791bd Mon Sep 17 00:00:00 2001 From: Sai Kiran Polisetty Date: Tue, 16 Jul 2024 17:06:23 +0000 Subject: [PATCH 7/7] Update model_config.proto --- protobuf/model_config.proto | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index ab34a46..c27421e 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -392,15 +392,15 @@ message ModelInput //@@ bool is_shape_tensor = 6; - //@@ .. cpp:var:: bool is_non_linear_format_io + //@@ .. cpp:var:: bool allow_ragged_batch //@@ - //@@ 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. + //@@ Whether or not the input is allowed to be "ragged" in a dynamically + //@@ created batch. Default is false indicating that two requests will + //@@ only be batched if this tensor has the same shape in both requests. + //@@ True indicates that two requests can be batched even if this tensor + //@@ has a different shape in each request. //@@ - bool is_non_linear_format_io = 7; + bool allow_ragged_batch = 7; //@@ .. cpp:var:: bool optional //@@ @@ -410,15 +410,14 @@ message ModelInput //@@ bool optional = 8; - //@@ .. cpp:var:: bool allow_ragged_batch + //@@ .. cpp:var:: bool is_non_linear_format_io //@@ - //@@ Whether or not the input is allowed to be "ragged" in a dynamically - //@@ created batch. Default is false indicating that two requests will - //@@ only be batched if this tensor has the same shape in both requests. - //@@ True indicates that two requests can be batched even if this tensor - //@@ has a different shape in each request. + //@@ 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 allow_ragged_batch = 9; + bool is_non_linear_format_io = 9; } //@@ @@ -477,8 +476,7 @@ message ModelOutput //@@ 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. + //@@ underlying model. //@@ bool is_non_linear_format_io = 7; }