Skip to content

Repository files navigation

PTO Runtime - Task Runtime Execution Framework

Modular runtime for building and executing task dependency graphs on Ascend devices with coordinated AICPU and AICore execution. Three independently compiled programs (Host .so, AICPU .so, AICore .o) work together through clearly defined APIs.

Quick Start

# Clone the repository
git clone <repo-url>cd simpler
# Install (venv recommended — see `.claude/rules/venv-isolation.md`)
pip install --no-build-isolation -e '.[test]'# Run the vector example (simulation, no hardware required)
python examples/a2a3/tensormap_and_ringbuffer/vector_example/test_vector_example.py -p a2a3sim

PTO ISA headers are automatically cloned on first run. See Getting Started for manual setup and troubleshooting.

Platforms

PlatformDescriptionRequirements
a2a3Real Ascend A2/A3 hardwareCANN toolkit (ccec, aarch64 cross-compiler)
a2a3simThread-based A2/A3 simulationgcc/g++ only (no Ascend SDK needed)
a5Real Ascend A5 hardwareCANN toolkit (ccec, aarch64 cross-compiler)
a5simThread-based A5 simulationgcc/g++ only (no Ascend SDK needed)

Runtime Variants

Two runtimes under src/{arch}/runtime/, each with a different graph-building strategy:

RuntimeGraph built onUse case
host_build_graphHost CPUDevelopment, debugging
tensormap_and_ringbufferAICPU (device)Production workloads

See runtime docs per arch: a2a3, a5.

Testing

# Simulation scene tests (no hardware)
pytest examples tests/st --platform a2a3sim
# Hardware scene tests (requires Ascend device)
pytest examples tests/st --platform a2a3 --device 4-7
# Python unit tests
pytest tests/ut -m "not requires_hardware" -v
# C++ unit tests
cmake -B tests/ut/cpp/build -S tests/ut/cpp && cmake --build tests/ut/cpp/build && ctest --test-dir tests/ut/cpp/build --output-on-failure

See Testing Guide for details.

Environment Setup

source /usr/local/Ascend/ascend-toolkit/latest/bin/setenv.bash
export ASCEND_HOME_PATH=/usr/local/Ascend/ascend-toolkit/latest

Documentation

DocumentDescription
Chip-Level ArchitectureL2 single-chip: three-program model (host/AICPU/AICore), API layers, handshake protocol
Hierarchical Level RuntimeL0–L6 level model, component composition (Orchestrator / Scheduler / Worker)
Task FlowEnd-to-end data flow: Callable / TaskArgs / CallConfig handles, IWorker interface
OrchestratorDAG submission internals: submit flow, TensorMap, Scope, Ring, task state machine
SchedulerDAG dispatch internals: wiring/ready/completion queues, dispatch loop
Worker ManagerWorker pool, WorkerThread, THREAD/PROCESS modes, fork + mailbox mechanics
Getting StartedSetup, prerequisites, build process, configuration
Developer GuideDirectory structure, role ownership, conventions
Testing GuideCI pipeline, test types, writing new tests

Per-arch docs

Documenta2a3 archa5 arch
Runtimesa2a3/docs/runtimes.mda5/docs/runtimes.md
Platforma2a3/docs/platform.mda5/docs/platform.md

License

This project is licensed under the CANN Open Software License Agreement Version 2.0. See the LICENSE file for the full license text.

References

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages