Kneron

Toolchain Installation Guide

The Kneron Toolchain is a comprehensive software suite for converting, quantizing, and compiling neural networks. It is distributed as a Docker container to ensure a consistent, reproducible environment across all operating systems.

1. Architecture Overview

Understanding how the toolchain works will help you debug issues later.

[ Your Host Machine (Windows/Mac/Linux) ]
|
|-- [ Python Wrapper (pip install) ] <-- You interact with this
|
v
[ Docker Container (kneron/toolchain) ]
|-- Compiler (ONNX -> NEF)
|-- Quantizer (FP32 -> INT8)
|-- Simulator (x86 CPU Inference)

2. System Requirements

ComponentRequirementNotes
CPUx86_64 with AVX2Required for quantization accuracy. Apple M1/M2 users run via Rosetta 2 (slower).
RAM8GB (Min) / 16GB (Rec)Transformer models (KL530) require significantly more memory during compilation.
Disk20GB FreeDocker images are large (~5GB uncompressed).
OSUbuntu 20.04+, Win 10+, macOS 12+Windows users MUST use WSL2 backend for Docker.

3. Installing Docker Desktop

The toolchain requires a running Docker daemon.

4. Installation Methods

Choose the method that fits your workflow.

K-Code Extension (Recommended)

The easiest way to get started. K-Code handles the Docker pull and mounting automatically.

  1. Install "Kneron K-Code" from the VS Code Marketplace.
  2. Open the Kneron sidebar icon.
  3. Click "Initialize Environment".
View K-Code Guide
Command Line Interface

For CI/CD pipelines or headless servers.

pip install kneron-toolchain
kneron install --version latest

5. Verification

Run the environment check script to ensure the container can access your filesystem and CPU.

kneron check --verbose
Success: Output should end with: [OK] Toolchain v0.14.0 is ready. Host mount active.

6. Troubleshooting

Make sure you have started the Docker Desktop application. On Linux, run sudo systemctl start docker.

Go to Docker Settings > Resources > File Sharing and ensure your project drive (C:) is checked.

This is expected. The compiler is x86 binary running via Rosetta 2 emulation. We are working on a native ARM64 build.