start_debug

Description

TIK performs debugging in the simulation environment using the tik.tikdb object. Similar to the Python Debugger (PDB), the tikdb supports setting breakpoints, single-step debugging, and printing variables.

The tikdb.start_debug API starts debugging and returns the output result after the debugging is complete.

Prototype

def start_debug(feed_dict, interactive=True)

Parameters

Table 1 Parameter description

Parameter

Input/Output

Description

feed_dict

Input

A dictionary of input data. The keys in the dictionary must correspond to the inputs argument passed to the BuildCCE call.

  • For a Tensor key, the value must have the same shape and data type as the corresponding Tensor.
  • For an InputScalar key, the value must be of the same data type as the corresponding InputScalar.

interactive

Input

If it is set to True, the debugger enters the interactive mode, where the debugger stops waiting for the user's command before executing the first line of TIK DSL statement; otherwise if it is set to False.

Applicability

Atlas 200/300/500 Inference Product

Atlas Training Series Product

Returns

A list of output data. The sequence of the output data is the same as that of the outputs argument passed to the BuildCCE call.

Restrictions

  • When defining a TIK container, disable_debug=False must be added to enable debug.
  • The key name in the input data dictionary must be the same as name defined in the inputs data.
  • value in the input data dictionary must be the same as the data type and shape defined in the inputs data.
  • If interactive is set to True, the interactive mode is used.

Example

feed_dict = {"data_A": data, "data_B": data}
data_C, = tik_instance.tikdb.start_debug(feed_dict=feed_dict, interactive=True)