About Ascend C

Ascend C is a programming language developed based on CANN for operator development. It supports native C and C++ standards and features both development efficiency and runtime performance. The operator program compiled based on Ascend C runs on the Ascend AI Processor through compiler running and runtime scheduling. With Ascend C, developers can efficiently customize algorithms based on the Ascend AI hardware. More information is available at Ascend C.

Ascend C provides multiple levels of APIs to meet operator development requirements in multi-dimensional scenarios.

  • Basic APIs: C++ library APIs for tensor-based programming, implementing abstraction at the single instruction level and providing flexible control capabilities for underlying operator development.
  • Advanced APIs: APIs encapsulating single-core common algorithms, covering some common compute algorithms (such as convolution and matrix operations) and significantly lowering the threshold for developing complex algorithms.
  • Operator template libraries: provides complete operator implementation reference based on templates, simplifies tiling development, and supports custom extension.
  • Python frontend: The PyAsc programming language provides comprehensive underlying chip programming capabilities based on the native Python APIs and supports the development of high-performance Ascend C operators based on Python APIs.

Quick Start

Progressive Knowledge

Debugging with DumpTensor and printf Profiling and Analysis on the NPU

Concepts and Principles

API Reference

Basic APIs High-Level APIs Utils API

Operator Practice Reference

Ascend C can be used on the following AI processor models:

  • Atlas A3 training products / Atlas A3 inference products
  • Atlas A2 training products / Atlas A2 inference products
  • Atlas 200I/500 A2 inference products
  • Atlas inference products
  • Atlas training products