Chip
Function
Processor abstraction, which is instantiated and used in the with statement to explicitly model a type of the Ascend AI Processor.
Prototype
1 | class Chip(name, debug_mode=False) |
Parameters
Parameter |
Input Type |
Description |
|---|---|---|
name |
string |
Processor name. Currently, most data is collected based on the |
debug_mode |
bool |
Whether to enable the debug mode. The default value is False.
NOTE:
After the debug mode is enabled, you can view the instructions that are not properly executed, but no output is generated. |
Members
Constraints
This class needs to be initialized under the with statement.
Example
1 2 3 4 5 | from mskpp import Chip # For details about how to view the Ascend AI Processor type of the current device, see the following description. with Chip ("Ascendxxxyy") as chip: # Ascendxxxyy needs to be replaced with the actual processor type. chip.enable_trace() # Call this function to enable the operator simulation pipeline function and generate a pipeline chart file. chip.enable_metrics() # Call this function to enable the single instruction and pipeline information, and generate the transfer pipeline statistics, instruction information statistics, and instruction proportion pie chart. |
Products except for