Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit e00711b

Browse files
committed
update param name
1 parent 302e0ac commit e00711b

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

rfcs/20201027-modular-tensorflow-graph-c-api.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -125,22 +125,22 @@ This section describes user scenarios for plugin graph optimizer.
125125
<img src="20201027-modular-tensorflow-graph-c-api/scenario1.png" height="100"/>
126126
</p>
127127
128-
* **Unsupported scenario**: Plugin can not register multiple graph optimizers.
128+
* **Supported scenario**: Registering graph optimizer without pluggable device.
129129
130-
To simplify multiple optimizers coordination and avoid optimization conflict, multiple optimizers cannot register to the same device type. If more than one optimizer is registered to the same device type, these optimizers's initialization would fail due to registration conflict. Users need to manually select which optimizer they want to use by unloading the conflicting plugin.
131130
<p align="center">
132-
<img src="20201027-modular-tensorflow-graph-c-api/scenario2.png" height="150"/>
131+
<img src="20201027-modular-tensorflow-graph-c-api/scenario3.png" height="100"/>
133132
</p>
134133
135-
* **Undefined scenario**: Registering graph optimizer without pluggable device.
134+
* **Unsupported scenario**: Plugin can not register multiple graph optimizers.
136135
136+
To simplify multiple optimizers coordination and avoid optimization conflict, multiple optimizers cannot register to the same device type. If more than one optimizer is registered to the same device type, these optimizers's initialization would fail due to registration conflict. Users need to manually select which optimizer they want to use by unloading the conflicting plugin.
137137
<p align="center">
138-
<img src="20201027-modular-tensorflow-graph-c-api/scenario3.png" height="100"/>
138+
<img src="20201027-modular-tensorflow-graph-c-api/scenario2.png" height="150"/>
139139
</p>
140140
141141
### Front-end python use case
142142
143-
Flag `use_plugin_optimizers` is provided for front-end python users to control the behaviour of plugin graph optimizers.
143+
Flag `use_plugin_optimizers` is provided for front-end python users to control the plugin graph optimizers.
144144
```python
145145
## TF-1.x
146146
>> from tensorflow.core.protobuf import rewriter_config_pb2
@@ -273,41 +273,41 @@ This API can be used to:
273273
TF_GrapplerItem* TF_GetGrapplerItem(TF_Buffer* buffer);
274274

275275
// Get a set of node names that must be preserved. This includes feed and
276-
// fetch nodes, keep_ops, init_ops. Fills in `max_values` and `storage_size`,
276+
// fetch nodes, keep_ops, init_ops. Fills in `num_values` and `storage_size`,
277277
// they will be used in `TF_GetNodesToPreserveList`
278-
void TF_GetNodesToPreserveSize(TF_GrapplerItem* item, int* max_values,
278+
void TF_GetNodesToPreserveSize(TF_GrapplerItem* item, int* num_values,
279279
int* storage_size);
280280

281281
// Get a set of node names that must be preserved. This includes feed and
282282
// fetch nodes, keep_ops, init_ops. Fills in
283283
// `values` and `lengths`, each of which must point to an array of length at
284-
// least `max_values`.
284+
// least `num_values`.
285285
//
286286
// The elements of values will point to addresses in `storage` which must be at
287-
// least `storage_size` bytes in length. `max_values` and `storage` can be
287+
// least `storage_size` bytes in length. `num_values` and `storage` can be
288288
// obtained from TF_GetNodesToPreserveSize
289289
//
290290
// Fails if storage_size is too small to hold the requested number of strings.
291291
void TF_GetNodesToPreserveList(TF_GrapplerItem* item, void** values,
292-
size_t* lengths, int max_values, void* storage,
292+
size_t* lengths, int num_values, void* storage,
293293
size_t storage_size, TF_Status* status);
294294

295295
// Get a set of node names for fetch nodes. Fills in `values` and `lengths`,
296296
// they will be used in `TF_GetFetchNodesList`
297-
void TF_GetFetchNodesSize(TF_GrapplerItem* item, int* max_values, int* storage_size);
297+
void TF_GetFetchNodesSize(TF_GrapplerItem* item, int* num_values, int* storage_size);
298298

299299

300300
// Get a set of node names for fetch nodes. Fills in
301301
// `values` and `lengths`, each of which must point to an array of length at
302-
// least `max_values`.
302+
// least `num_values`.
303303
//
304304
// The elements of values will point to addresses in `storage` which must be at
305-
// least `storage_size` bytes in length. `max_values` and `storage` can be
305+
// least `storage_size` bytes in length. `num_values` and `storage` can be
306306
// obtained from TF_GetFetchNodesSize
307307
//
308308
// Fails if storage_size is too small to hold the requested number of strings.
309309
void TF_GetFetchNodesList(TF_GrapplerItem* item, void** values, size_t* lengths,
310-
int max_values, void* storage, size_t storage_size,
310+
int num_values, void* storage, size_t storage_size,
311311
TF_Status* status);
312312

313313
// Infer OpInfo::TensorProperties for graph nodes inputs/outputs.

0 commit comments

Comments
 (0)