Introduction to TIK
TIK Overview
TIK is a dynamic programming framework based on Python. It is presented as a Python module.
You can call the TIK APIs to create custom operators in Python. Then, the TIK compiler compiles the operators into the binary files of the application that adapts to Ascend AI Processor.
TIK Advantages
TIK enables flexible operator development. TIK code has the following advantages in operator development efficiency and automatic operator performance optimization:
- Parallelization: TIK provides a serializable programming system for operator coding and yields high performance with parallel computing.
- Automatic memory management: Compiler supports auto memory allocation, freeing programmers from the hassle of looking up and managing the address during operator coding.
- Flexibility: Manual scheduling controls data movement and computing processes more accurately, achieving higher performance and maximizing the capability of Ascend AI Processor.
- Debugging support: Unlike the black-box mode of operator verification in other forms, the debug mode of TIK enables developers to quickly locate function problems, greatly shortening the development and commissioning time.
TIK Programming Model
Figure 1 shows the programming workflow using the TIK approach. (1) Develop a TIK operator. (2) Use the TIK API calls to build a Python program corresponding to the operator, that is, TIK DSL. TIK DSL is a kind of DSL to define Cube-based Computing Engine C (CCE-C) program at higher-level abstraction than Code-based Compute Engine (CCE). (3) Use a compiler to generate a CCE-C file (currently, the CCE-C code is invisible to TIK users). (4) Use the CCE compiler for compilation, and an executable program that can run on Ascend AI Processor is generated.
