forked from mindspore-Ecosystem/mindspore
!22321 Update save_graph_paths in context
Merge pull request !22321 from huanghui/code_docs_save_graphs
This commit is contained in:
commit
a27e714c41
|
@ -566,11 +566,9 @@ def set_context(**kwargs):
|
|||
save_graphs (bool): Whether to save graphs. Default: False.
|
||||
save_graphs_path (str): Path to save graphs. Default: ".".
|
||||
|
||||
If the program is executed in the parallel mode, `save_graphs_path` should consist of the path and the
|
||||
current device id, to ensure that writing file conflicts won't happen when the different processes try to
|
||||
create the files in the same directory. For example, the `device_id` can be generated by
|
||||
`device_id = os.getenv("DEVICE_ID")` and the `save_graphs_path` can be set by
|
||||
`context.set_context(save_graphs_path="path/to/ir/files"+device_id)`.
|
||||
Graphs will be saved to the directory of `save_graphs_path/rank_${rank_id}/ir_dump`.
|
||||
When distributed training, `rank_id` is the ID of the current device in the cluster.
|
||||
Otherwise, `rank_id` is `0`.
|
||||
enable_graph_kernel (bool): Whether to enable graph kernel fusion to optimize network execution performance.
|
||||
Default: False.
|
||||
graph_kernel_flags (str): Optimization options of graph kernel fusion. Experienced user only.
|
||||
|
|
Loading…
Reference in New Issue