pypto-loop-view

Enforce compile-time constant shapes for pypto.view inside pypto.loop kernels.

258|48|Updated Jun 22, 2020
One-click install
npx skills add https://github.com/mindspore-ai/akg --skill pypto-loop-view-mindspore-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pypto-loop-view
Source: https://github.com/mindspore-ai/akg/tree/main/akg_agents/python/akg_agents/op/resources/skills/pypto/guides/pypto-loop-view
Command: npx skills add https://github.com/mindspore-ai/akg --skill pypto-loop-view-mindspore-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces compile-time constant shapes for pypto.view inside pypto.loop kernels to prevent runtime shape errors and ensure deterministic execution.

Core Features & Use Cases

  • Compile-time shape enforcement: pypto.view shapes must be literals or closure constants.
  • Loop-driven kernel safety: reliable operation for matmul, norm, elementwise, and related patterns where deterministic shapes are required.
  • Clear guidance for loop tail handling: supports full-iterations and tail cases with compile-time constants.

Quick Start

Define a kernel using a compile-time constant loop count and use pypto.view with fixed shapes inside the loop.

Frequently Asked Questions about pypto-loop-view

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

FAQPage Schema
How do I enforce compile-time constant shapes for loop-driven kernels?

Enforce compile-time constant shapes for loop-driven kernels by defining pypto.view with literal dimensions or closure constants inside pypto.loop. This ensures deterministic execution for matmul, norm, and elementwise patterns.

Why do I get runtime shape errors inside pypto.loop kernels?

Runtime shape errors inside pypto.loop kernels occur when pypto.view uses non-constant shapes. Prevent these errors by restricting view shapes to compile-time constants so loop counts and derived dimensions are treated as closures.

How do I handle loop tail cases with compile-time constants in pypto?

Handle loop tail cases in pypto by applying compile-time constants to view shapes for both full-iterations and tail-handling strategies. This maintains deterministic shapes and prevents runtime errors during partial loop iterations.

Can I use dynamic runtime values for pypto.view shapes inside pypto.loop?

Dynamic runtime values for pypto.view shapes inside pypto.loop are not supported. You must use compile-time constant literals or closure constants to limit the scope and ensure deterministic execution for matmul and elementwise patterns.

When do I need compile-time view shapes for loop-driven DSL patterns?

You need compile-time view shapes for loop-driven DSL patterns when deterministic shapes are required for operations like matmul, norm, and elementwise processing. This ensures reliable kernel safety and prevents runtime shape errors.