pull/13505/head
wudenggang 4 years ago
parent ec4d1fbf60
commit b17a558af4

@ -68,7 +68,7 @@ class RegOp:
Args: Args:
op_name (str): Name of op. op_name (str): Name of op.
inputs (list): Inputs inoformation of the op. inputs (list): Inputs information of the op.
outputs (list): Outputs information of the op. outputs (list): Outputs information of the op.
attr_ (list): Attribute information of the op. attr_ (list): Attribute information of the op.
dtype_format_ (list): Dtype and format information of the op. dtype_format_ (list): Dtype and format information of the op.
@ -142,7 +142,7 @@ class RegOp:
Raises: Raises:
TypeError: If the type of value is not list. TypeError: If the type of value is not list.
ValueError: If the size of param list is not equal to the size of key list, or ValueError: If the size of param list is not equal to the size of key list, or
the size of param list is not equal to the size of funtion list. the size of param list is not equal to the size of function list.
""" """
for i in [param_list, key_list, fn_list]: for i in [param_list, key_list, fn_list]:
if not isinstance(i, list): if not isinstance(i, list):
@ -459,7 +459,7 @@ class TBERegOp(RegOp):
def op_pattern(self, pattern=None): def op_pattern(self, pattern=None):
""" """
The behavior type of opeator, such as broadcast, reduce and so on. The behavior type of operator, such as broadcast, reduce and so on.
Args: Args:
pattern (str): Value of op pattern. pattern (str): Value of op pattern.

@ -176,7 +176,7 @@ class Primitive(Primitive_):
Returns: Returns:
A tuple consisting of two elements. The first element indicates whether we should filter out current A tuple consisting of two elements. The first element indicates whether we should filter out current
arguments; the seconde element is the output if we need to filter out the arguments. arguments; the second element is the output if we need to filter out the arguments.
""" """
return (False, None) return (False, None)

@ -423,7 +423,7 @@ class _CostModelContext:
Set costmodel allreduce fusion allreduce bandwidth. Set costmodel allreduce fusion allreduce bandwidth.
Args: Args:
allreduce_bandwidth (int): The bancwidth of AllReduce. allreduce_bandwidth (int): The bandwidth of AllReduce.
Raises: Raises:
ValueError: If context handle is none. ValueError: If context handle is none.

@ -319,7 +319,7 @@ class Profiler:
# whether keep the first step # whether keep the first step
skip_first_step_flag = framework_parser.check_op_name(INIT_OP_NAME) skip_first_step_flag = framework_parser.check_op_name(INIT_OP_NAME)
point_info = framework_parser.point_info point_info = framework_parser.point_info
# recognize inference or traning mode # recognize inference or training mode
is_traning_mode_flag = framework_parser.check_op_name("Gradients") is_traning_mode_flag = framework_parser.check_op_name("Gradients")
# parser the step trace files and save the result to disk # parser the step trace files and save the result to disk
source_path = validate_and_normalize_path(source_path) source_path = validate_and_normalize_path(source_path)

@ -426,7 +426,7 @@ def _convert_image_format(np_tensor, input_format, out_format='HWC'):
def _make_canvas_for_imgs(tensor, col_imgs=8): def _make_canvas_for_imgs(tensor, col_imgs=8):
""" """
Expand the N, show imgs on a canvs. Expand the N, show imgs on a canvas.
Args: Args:
tensor (Tensor): The canvas value. tensor (Tensor): The canvas value.

Loading…
Cancel
Save