Favicon of contrib-op-shape-inference-memory-safety

contrib-op-shape-inference-memory-safety Skill

AI Agent SkillC++Open source

Audit and fix out-of-range output writes in ONNX Runtime operator shape-inference functions. Use when reviewing or fixing a contrib (or standard) op TypeAndShapeInference where a getNumOutputs() guard precedes a write to a higher output index - optional trailing outputs make a smaller output count schema-valid, so getO Published by microsoft in onnxruntime.

What is contrib-op-shape-inference-memory-safety Skill?

Audit and fix out-of-range output writes in ONNX Runtime operator shape-inference functions. Use when reviewing or fixing a contrib (or standard) op TypeAndShapeInference where a getNumOutputs() guard precedes a write to a higher output index - optional trailing outputs make a smaller output count schema-valid, so getO Published by microsoft in onnxruntime. This profile combines repository metadata with install, compatibility, and usage signals so developers can quickly decide whether it fits their agent workflow before opening the source repository.

Trust signal
95/100
Maintenance signal
90/100
Adoption signal
100/100

Automated repository signals based on public metadata such as recency, license, installation evidence, and adoption. These are not a security audit or endorsement.

Key capabilities

  • Includes SKILL.md support
  • Reusable instructions support
  • Security review
  • Writing
  • Security review use cases
  • Writing use cases

Technical details

Copy skill directory
  • Install or run with Copy skill directory

When to use contrib-op-shape-inference-memory-safety Skill

  • Use it for security review.
  • Use it for writing.

Built with

C++Copy skill directory

Editorial notes

Source

  • Creator: microsoft
  • Repository: microsoft/onnxruntime
  • Skill file: .agents/skills/contrib-op-shape-inference-memory-safety/SKILL.md

What it does

Audit and fix out-of-range output writes in ONNX Runtime operator shape-inference functions. Use when reviewing or fixing a contrib (or standard) op TypeAndShapeInference where a getNumOutputs() guard precedes a write to a higher output index - optional trailing outputs make a smaller output count schema-valid, so getO

Skill instructions

Contrib-Op Shape-Inference Output-Index Safety Reusable method for finding and fixing the bug class where an operator's TypeAndShapeInference function guards an output write with getNumOutputs() N but then writes an output index greater than N. For a node that declares fewer outputs, the written index is past the end of the inference context's output vector. Scope: schema-level shape inference in onnxruntime/core/graph/contribops/.cc and shapeinferencefunctions.cc. This runs once during Graph::Resolve (model-load time), EP-agnostic - there is no per-EP (CPU/CUDA/ROCm) kernel duplicate of this code to chase. Op kernels allocate outputs via the bounds-safe OpKernelContext::Output(index) and are a separate concern. 1. The pattern cpp // onnxruntime/core/graph/contribops/bertdefs.cc (before) propagateElemTypeFromInputToOutput(ctx, 0, 0); if (ctx.getNumOutputs() 1) { // guard says " 1" propagateElemTypeFromInputToOutput(ctx, 0, 1); propagateElemTypeFromInputToOutput(ctx, 0, 2); // but write

Explore related resources

Frequently asked questions

What is contrib-op-shape-inference-memory-safety?

contrib-op-shape-inference-memory-safety is a open-source AI agent skill with Copy skill directory. Audit and fix out-of-range output writes in ONNX Runtime operator shape-inference functions.

Who is contrib-op-shape-inference-memory-safety best for?

contrib-op-shape-inference-memory-safety is best for reusing agent instructions, scripts, and references, security review workflows, writing workflows.

How do I install contrib-op-shape-inference-memory-safety?

Install or run contrib-op-shape-inference-memory-safety using Copy skill directory. Check contrib-op-shape-inference-memory-safety for the latest setup command.

Is contrib-op-shape-inference-memory-safety actively maintained?

contrib-op-shape-inference-memory-safety may need a closer maintenance check before production use.

Share:

Stars
21,083
Forks
4,049
Last commit
9 days ago
Repository age
8 years
License
MIT

Auto-fetched from GitHub.

Ad
Favicon

 

  
 

Similar to contrib-op-shape-inference-memory-safety