# Flash Ubuntu image to NVMe
sudo dd if=ubuntu-26.04-k3.img of=/dev/nvme0n1 bs=4M
sync
# First boot configuration
sudo apt update && sudo apt upgrade -y
sudo apt install python3-pip cmake ninja-build
# Install Ollama (RISC-V native)
curl -fsSL https://ollama.com/install.sh | sh
# Run a 7B model (very fast on K3)
ollama run llama3.2:7b
# Run a 13B model
ollama run llama3.2:13b
# Run a 30B model (K3 can handle this!)
ollama run qwen2.5:32b
# Expected: >10 tokens/s
import k3_ai as ai
import numpy as np
# Initialize AI engine
engine = ai.Engine(device='a100')
# Load YOLOv8 model
model = ai.Model('yolov8s.kmodel')
# Real-time detection from camera
cap = ai.Camera(0, resolution=(1920, 1080))
while True:
frame = cap.read()
detections = model.infer(frame, threshold=0.5)
for det in detections:
print(f"{det.label}: {det.confidence:.2f} at {det.bbox}")
frame = ai.draw_bbox(frame, det)
ai.imshow(frame)
import k3_npu
# Allocate NPU buffer
buf = k3_npu.Buffer(shape=(1, 3, 640, 640), dtype='float16')
# Run inference on A100 cores
result = k3_npu.infer(
model='yolov8s.bin',
input=buf,
cores=8, # Use all 8 A100 cores
precision='fp16'
)
print(f"Inference time: {result.latency_ms:.1f} ms")
print(f"Throughput: {1000/result.latency_ms:.1f} FPS")
The K3 is pin-compatible with NVIDIA Jetson Orin Nano:
| Feature | Jetson Orin Nano | K3 |
|---|---|---|
| CPU | 6x ARM A78 | 8x RISC-V X100 |
| AI | 40 TOPS | 60 TOPS |
| Memory | 8GB LPDDR5 | Up to 32GB LPDDR5 |
| TDP | 7-15W | 15-25W |
| ISA | Proprietary ARM | Open RISC-V |
| License | $ royalty | Free |
# Install ROS2 on K3 Ubuntu
sudo apt install ros-humble-desktop
# ROS2 node with K3 AI
ros2 run k3_vision yolov8_detector --ros-args -p device:=0
# K3 supports hardware virtualization
sudo apt install qemu-system-riscv64
# Run VM
qemu-system-riscv64 -machine virt -m 4G -smp 4 -drive file=vm.img,format=qcow2 -bios /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.bin