Compass DSL
1.2

Getting Started

  • Introduction
  • Installation
  • Build and Run Workflow
  • Tutorials
    • Tutorial 0: Quick Start
    • Tutorial 1: Static Add
    • Tutorial 2: Dynamic Add
    • Tutorial 3: Reduce Operator
    • Tutorial 4: LUT Operator
    • Tutorial 5: Quantization Operator

Language Basics

  • Functions
  • Variables
  • Types
  • Mask
  • Expression
  • Statement
  • Flexible/Multiple Width Vector

How-to Guides

  • How to Write a Basic Kernel
  • How to Use Subfunctions
  • How to Use a Pointer
  • How to Use DMA
  • How to Use Mask
  • How to Use RPC
  • How to Use Profiler
  • How to Debug with Python
  • How to Write the Operator Plugin
  • How to Use Macros
  • How to Use Inline Assembly
  • How to use AIFF

Explanation

  • About This Documentation
  • Zhouyi NPU Architecture
  • Compass DSL
  • Python Simulator (PySim)
  • Static and Dynamic Kernel

Reference

  • Builtin API
  • Script API
Compass DSL
  • »
  • Tutorials
  • View page source

Tutorials

The tutorials show how to write an operator using Compass DSL.

  • Tutorial 0: Quick Start
    • 1. Write Basic Compass DSL Function
    • 2. Build the Function
    • 3. Inspect OpenCL C Code
    • 4. Run in Python (PySim)
    • 5. Run on NPU Simulator
    • 6. Run on Remote Hardware Device through RPC
    • 7. Profile
    • Complete Code
  • Tutorial 1: Static Add
    • Inputs & Outputs
    • Use LSRAM
    • Split Data for 4 TECs
    • Use DMA to Move Data
    • Vectorize
    • Build and Run Kernel
    • Complete Code
  • Tutorial 2: Dynamic Add
    • Inputs & Outputs
    • Calculate Elements Number on LSRAM
    • Split Data for TECs
    • Calculation
    • Complete Code
  • Tutorial 3: Reduce Operator
    • Basic Built-in
    • Writing a Max Reduction Operator with 1-Dimensional Data
    • Writing a Max Reduction Operator with 2-Dimensional Data (Alone Row Axis)
    • Complete Code
  • Tutorial 4: LUT Operator
    • Inputs & Outputs
    • Prepare LUT Table
    • Kernel Function
    • Subroutine Call Device Function
    • Complete Code
  • Tutorial 5: Quantization Operator
    • Inputs & Outputs
    • Calculation
    • Upgrade type
    • Operation of Signed and Unsigned
    • Downgrade Type and Pack
    • Complete Code
Previous Next

Copyright © 2024 Arm Technology (China) Co., Ltd.

Built with Sphinx using a theme provided by Read the Docs.