Skip to content

Commit 5973bd9

Browse files
committed
Use optional and update proto names
Signed-off-by: Kevin Chen <kevinch@nvidia.com>
1 parent cfdb065 commit 5973bd9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

onnx/onnx.in.proto

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ message ShardingSpecProto {
273273
// ShardedDimProto: This describes the sharding spec for a single
274274
// axis of a sharded tensor.
275275
message ShardedDimProto {
276-
int32 axis = 1; // the axis this sharding corresponds to
276+
optional int32 axis = 1; // the axis this sharding corresponds to
277277
// The common-case is described by a single instance of SimpleShardedDimProto
278278
// We use multiple instances to handle cases produced when a sharded
279279
// tensor is reshaped, fusing multiple axes into one.
@@ -282,7 +282,7 @@ message ShardedDimProto {
282282

283283
// SimpleShardedDimProto: Indicates that N blocks are divided into M shards.
284284
// Here, N is allowed to be symbolic, which M is required to be a constant.
285-
message SimpledShardedDimProto {
285+
message SimpleShardedDimProto {
286286
oneof dim {
287287
int64 dim_value = 1;
288288
string dim_param = 2;
@@ -490,17 +490,17 @@ message ModelProto {
490490

491491
// Describes different target configurations for a multi-device use case.
492492
// A model can describe multiple multi-device configurations for execution.
493-
repeated ConfigurationProto configuration = 26;
493+
repeated DeviceConfigurationProto configuration = 26;
494494
};
495495

496-
// ConfigurationProto describes a multi-device configuration for a model.
497-
message ConfigurationProto {
496+
// DeviceConfigurationProto describes a multi-device configuration for a model.
497+
message DeviceConfigurationProto {
498498
// Name of the configuration.
499-
string name = 1;
499+
optional string name = 1;
500500
// Name of the device.
501-
string device = 2;
501+
optional string device = 2;
502502
// Number of devices inside this configuration.
503-
int32 num_devices = 3;
503+
optional int32 num_devices = 3;
504504
}
505505

506506
// StringStringEntryProto follows the pattern for cross-proto-version maps.

0 commit comments

Comments
 (0)