Browse Source

!2477 Add descriptin for graph kernel switch

Merge pull request !2477 from ddwolf/add_desc_for_graph_kernel
tags/v0.6.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
08ff9099ed
2 changed files with 4 additions and 2 deletions
  1. +3
    -1
      mindspore/context.py
  2. +1
    -1
      mindspore/nn/cell.py

+ 3
- 1
mindspore/context.py View File

@@ -510,7 +510,7 @@ def reset_auto_parallel_context():
save_graphs_path=str, save_ms_model=bool, save_ms_model_path=str, enable_dump=bool,
save_dump_path=str, enable_reduce_precision=bool, variable_memory_max_size=str,
enable_profiling=bool, profiling_options=str, enable_auto_mixed_precision=bool,
check_bprop=bool, max_device_memory=str, print_file_path=str)
enable_graph_kernel=bool, check_bprop=bool, max_device_memory=str, print_file_path=str)
def set_context(**kwargs):
"""
Sets context for running environment.
@@ -538,6 +538,8 @@ def set_context(**kwargs):
save_ms_model_path (str): Path to save converted lite model. Default: "."
save_graphs_path (str): Path to save graphs. Default: "."
enable_auto_mixed_precision (bool): Whether to enable auto mixed precision. Default: True.
enable_graph_kernel (bool): Whether to enable composition of basic primitives. These primitives would be
compiled into a fused kernel automatically. Default: False.
reserve_class_name_in_scope (bool) : Whether to save the network class name in the scope. Default: True.
enable_reduce_precision (bool): Whether to enable precision reduction. Default: True.
enable_dump (bool): Whether to enable dump. Default: False.


+ 1
- 1
mindspore/nn/cell.py View File

@@ -822,7 +822,7 @@ class GraphKernel(Cell):
"""
Base class for GraphKernel.

A `GraphKernel` a composite of basic primitives and can be compiled into a fused kernel automaticly when
A `GraphKernel` a composite of basic primitives and can be compiled into a fused kernel automatically when
context.set_context(enable_graph_kernel=True).

Examples:


Loading…
Cancel
Save