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

Commit a8b679e

Browse files
committed
Fix typos
1 parent 444b95f commit a8b679e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,17 @@ This API can be used to:
164164
}
165165
```
166166
167-
When multiple plugins are successfully registered and running for a graph, their recommended configurations may differ with each other. If any of the config has turned off the optimizer, the optimizer will be disabled. The following table lists all possible scenarios. In the table, plugin's config is represented by tristates, `ON` means turn on optimizer, `OFF` means turn off optimzier, and `DEFAULT` means uses proper's config.
167+
When multiple plugins are successfully registered and running for a graph, their recommended configurations may differ with each other. If any of the config has turned off the optimizer, the optimizer will be disabled. The following table lists all possible scenarios. In the table, plugin's config is represented by tristates, `ON` means turn on optimizer, `OFF` means turn off optimizer, and `DEFAULT` means uses proper's config.
168168
169169
| Proper's config | Plugin1's config | Plugin2's config | Final config | Notes|
170170
|:-------------- |:-------------- |:-------------- |:-------------- |:-------------- |
171171
| ON | ON/DEFAULT | ON/DEFAULT | **ON**| The optimizer is enabled. |
172172
| ON | OFF | OFF | **OFF**| The optimizer is disabled, unless users manually unload the plugin. Grappler prints warnings to remind users that config has been changed based on plugin's config.|
173-
| ON | ON/DEFAULT | OFF | **OFF**| The optimizer is disabled if at least one plugin turns off it. Grappler prints warnings to remind users that config has been changed based on plugin's config, and potention performance regression may happen due to the conflict configs.|
173+
| ON | ON/DEFAULT | OFF | **OFF**| The optimizer is disabled if at least one plugin turns it off. Grappler prints warnings to remind users that config has been changed based on plugin's config, and potention performance regression may happen due to the conflict configs.|
174174
| ON | OFF | ON/DEFAULT | **OFF**| Same as previous scenario.|
175-
| OFF | ON/DEFAULT/OFF | ON/DEFAULT/OFF | **OFF**| The optimizer is always disabled when user turns off it. |
175+
| OFF | ON/DEFAULT/OFF | ON/DEFAULT/OFF | **OFF**| The optimizer is always disabled when user turns it off. |
176+
177+
Plugins should also run a set of performance benchmarks to ensure that turning off some existing optimizers doesn't cause nontrivial performance degradations.
176178
177179
### Versioning Strategy and Stability
178180
@@ -237,11 +239,11 @@ This API can be used to:
237239
void* ext; // reserved for future use
238240
void* (*create_func)();
239241
void (*optimize_func)(void*, TF_Buffer*, TF_Buffer*);
240-
void (*destory_func)(void*);
242+
void (*destroy_func)(void*);
241243
} TP_Optimizer;
242244
243245
#define TP_OPTIMIZER_STRUCT_SIZE \
244-
TF_OFFSET_OF_END(TP_Optimizer, destory_func)
246+
TF_OFFSET_OF_END(TP_Optimizer, destroy_func)
245247
246248
typedef struct TP_OptimizerRegistrationParams {
247249
size_t struct_size;
@@ -403,7 +405,7 @@ This API can be used to:
403405
auto* optimizer = new PluginOptimizer;
404406
return (void*)optimizer;
405407
}
406-
static void P_Destory(void* optimizer) {
408+
static void P_Destroy(void* optimizer) {
407409
delete static_cast<PluginOptimizer*>(optimizer);
408410
}
409411
static void P_Optimize(
@@ -463,7 +465,7 @@ This API can be used to:
463465
// Set functions to create a new optimizer.
464466
params->optimizer->create_func = P_Create;
465467
params->optimizer->optimize_func = P_Optimize;
466-
params->optimizer->destory_func = P_Destory;
468+
params->optimizer->destroy_func = P_Destroy;
467469
}
468470
```
469471

0 commit comments

Comments
 (0)