ptoas-npu-validation-a5

Build and execute PTOAS A5 kernel validation workflows on NPU or simulator.

30|74|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/hw-native-sys/PTOAS --skill ptoas-npu-validation-a5
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ptoas-npu-validation-a5
Source: https://github.com/hw-native-sys/PTOAS/tree/main/.codex/skills/ptoas-npu-validation-a5
Command: npx skills add https://github.com/hw-native-sys/PTOAS --skill ptoas-npu-validation-a5

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill coordinates the complete PTOAS runtime validation workflow for A5 targets, reducing the manual effort required to generate testcases, build kernel and host binaries, run them on NPU hardware or a simulator, and verify outputs against golden data.

Core Features & Use Cases

  • Testcase Generation: Creates npu_validation projects from PTOAS EmitC sample output and prepares the host runner, kernel wrapper, launch code, and build system.
  • Build and Runtime Validation: Configures and builds testcase binaries, optionally replaces the device kernel with an LLVM or VPTO-generated shared library, and runs validation on an NPU or simulator.
  • Golden and Compare Checks: Generates input data, creates missing expected outputs when required, and validates runtime results with compare.py.
  • Runtime Troubleshooting: Diagnoses common blockers involving PTO_ISA_ROOT, CANN and bisheng setup, simulator libraries, device visibility, permissions, and aclrtSetDevice failures.
  • Use Case: Use this Skill to validate an A5 PTO kernel end to end, determine whether a failure is caused by the generated kernel or the runtime environment, and report the testcase artifacts and first concrete execution blocker.

Quick Start

Use the PTOAS A5 validation skill to generate, build, run, and compare the requested testcase on the available NPU or simulator.

Frequently Asked Questions about ptoas-npu-validation-a5

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate PTOAS kernels on an A5 NPU target?

To validate PTOAS kernels on an A5 NPU target, you generate npu_validation projects from EmitC output, build host and kernel binaries, execute them on NPU hardware or a simulator, and verify runtime results against golden data using compare.py.

What is needed to run A5 NPU simulator validation for PTOAS testcases?

Running A5 NPU simulator validation requires a built PTOAS toolchain, PTO_ISA_ROOT, CANN or bisheng environment setup, simulator libraries, and suitable NPU device or simulator access to build and execute testcases.

How does golden comparison work for PTOAS-generated A5 kernel testcases?

Golden comparison for PTOAS A5 kernels works by generating input data, creating missing expected outputs when required, and validating runtime execution results with compare.py to ensure kernel output correctness.

Why does my PTOAS A5 kernel validation fail with an aclrtSetDevice error?

An aclrtSetDevice failure during PTOAS A5 kernel validation is typically caused by runtime environment blockers involving device visibility, permissions, or incomplete CANN setup, which require troubleshooting diagnostic steps to resolve.

Can I replace the device kernel with an LLVM or VPTO shared library during NPU validation?

Yes, during NPU validation you can optionally replace the device kernel with an LLVM or VPTO-generated shared library to test alternative kernel implementations and compare their runtime execution results against expected golden data.

How do I generate npu_validation projects from PTOAS EmitC sample output?

Generating npu_validation projects from PTOAS EmitC sample output involves preparing the host runner, kernel wrapper, launch code, and build system to create a complete testcase environment ready for execution on NPU or simulator targets.