mindspore.ops.TBERegOp

class mindspore.ops.TBERegOp(op_name)[source]

Class for TBE operator information register.

async_flag(async_flag)[source]

Define the calculation efficiency of the operator, whether the asynchronous calculation is supported.

Parameters

async_flag (bool) – Value of async flag. Default: false.

attr(name=None, param_type=None, value_type=None, value=None, default_value=None, **kwargs)[source]

Register TBE op attribute information.

Parameters
  • name (str) – Name of the attribute. Default: None.

  • param_type (str) – Param type of the attribute. Default: None.

  • value_type (str) – Type of the attribute. Default: None.

  • value (str) – Value of the attribute. Default: None.

  • default_value (str) – Default value of attribute. Default: None.

  • kwargs (dict) – Other information of the attribute.

binfile_name(binfile_name)[source]

Set the binary file name of the operator, it is optional.

Parameters

binfile_name (str) – The binary file name of the operator.

compute_cost(compute_cost)[source]

Define the calculation efficiency of operator, which refers to the value of the cost model in the tiling module.

Parameters

compute_cost (int) – Value of compute cost. Default: 10.

dynamic_format(dynamic_format)[source]

Whether the operator supports dynamic selection of format and dtype or not.

Parameters

dynamic_format (bool) – Value of dynamic format. Default: false.

dynamic_shape(dynamic_shape)[source]

Whether the operator supports dynamic shape.

Parameters

dynamic_shape (bool) – Value of dynamic shape. Default: false.

input(index=None, name=None, need_compile=None, param_type=None, shape=None, **kwargs)[source]

Register TBE op input information.

Parameters
  • index (int) – Order of the input. Default: None.

  • name (str) – Name of the input. Default: None.

  • need_compile (bool) – Whether the input needs to be compiled or not. Default: None.

  • param_type (str) – Type of the input. Default: None.

  • shape (str) – Shape of the input. Default: None.

  • kwargs (dict) – Other information of the input.

kernel_name(kernel_name)[source]

The name of operator kernel.

Parameters

kernel_name (str) – Name of operator kernel.

need_check_supported(need_check_supported)[source]

Whether the operator need check supports.

:param : param need_check_supported: (bool): Value of need_check_supported. Default: false.

op_pattern(pattern=None)[source]

The behavior type of opeator, such as broadcast, reduce and so on.

Parameters

pattern (str) – Value of op pattern.

output(index=None, name=None, need_compile=None, param_type=None, shape=None, **kwargs)[source]

Register TBE op output information.

Parameters
  • index (int) – Order of the output. Default: None.

  • name (str) – Name of the output. Default: None.

  • need_compile (bool) – Whether the output needs to be compiled or not. Default: None.

  • param_type (str) – Type of the output. Default: None.

  • shape (str) – Shape of the output. Default: None.

  • kwargs (dict) – Other information of the output.

partial_flag(partial_flag)[source]

Define the calculation efficiency of operator, whether the partial calculation is supported.

Parameters

partial_flag (bool) – Value of partial flag. Default: true.

reshape_type(reshape_type)[source]

Reshape type of operator.

Parameters

reshape_type (str) – Value of reshape type.