Contrib Op Shape Inference Memory Safety

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 getOutputType(index) can run one past the declared outputs at Graph::Resolve.

Microsoft Updated 2.7k repo stars

File contents

microsoft/onnxruntime/tree/main/.github/skills/contrib-op-shape-inference-memory-safety commit e709455b60

Frequently asked questions

npx skillmds@latest add microsoft/contrib-op-shape-inference-memory-safety