Index of every page on this site: llms.txt
All skills
openvinotoolkit avatar

/add-fe-op

@993f33e
Run it yourself

Adds a new operation to OpenVINO Frontend pipelines with translator updates, registration, and tests.

  • 7 files
  • 41.5 KB
  • Updated 6 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/openvinotoolkit/openvino/add-fe-op

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

step1-analysis.md

≈1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Skill: FE Op Analysis

Source: skills/add-fe-op/SKILL.md (Step 1) Agent: fe_agent

When to Use

  • Model conversion fails with a missing translator or unsupported op error from a FE.
  • An operation is absent from the FE op mapping table.
  • Partial support exists (translator file present but registration missing, or vice versa).

Procedure

1. Identify the operation and source framework

From the error context / conversion log, extract:

  • Exact op name:
    • PyTorch: aten::op_name (TorchScript) or aten.op_name.default (FX)
    • TensorFlow: tf.nn.op_name or raw op string (e.g. GatherNd)
    • ONNX: op string (e.g. ScatterND, versioned by opset)
  • Source framework: pytorch, tensorflow, or onnx
  • Version/variant where applicable (ONNX opset, TorchScript vs FX namespace)

2. Check current support state

Browse or clone https://github.com/openvinotoolkit/openvino and run:

PyTorch:

# Translator file
ls src/frontends/pytorch/src/op/<op_name>.cpp

# TorchScript key
grep -n 'aten::<op_name>' src/frontends/pytorch/src/op_table.cpp

# FX key
grep -n 'aten\.<op_name>' src/frontends/pytorch/src/op_table.cpp

TensorFlow:

ls src/frontends/tensorflow/src/op/<op_name>.cpp
grep -n '<OpName>' src/frontends/tensorflow/src/op_table.cpp

ONNX:

ls src/frontends/onnx/src/ops/<op_name>.cpp
grep -rn 'ONNX_OP.*"<OpName>"' src/frontends/onnx/src/ops/

Support states:

State Meaning
full Translator file + registration both present → skip scaffolding
partial One piece missing → repair only that part
missing Nothing exists → full scaffold needed

3. Research the op semantics

Consult official documentation for:

  • Math formula / semantics
  • Inputs, outputs, attributes
  • Data types and broadcasting rules
  • Edge cases (empty tensors, negative indices, etc.)
Framework Reference
PyTorch https://pytorch.org/docs/stable/generated/torch.<op>.html
TensorFlow https://www.tensorflow.org/api_docs/python/tf/
ONNX https://onnx.ai/onnx/operators/

4. Check for equivalent OV core op

Search existing OV ops:

grep -r '<OpName>\|<semantic_keyword>' \
  openvino/src/core/include/openvino/op/ \
  openvino/src/core/include/openvino/opsets/

Decision table:

Situation Action
1:1 match with existing OV op Real translation — proceed
Composition of existing OV ops produces correct semantics Real translation — proceed
No match; decomposing is too slow or inaccurate Escalate to Core Agent
Operation is clearly decomposable via graph transform Decomposable — flag for Transformation Agent

5. Check cross-frontend reuse

If the same op exists in another frontend, reuse its logic rather than duplicating:

grep -rn '<op_name>' src/frontends/ --include="*.cpp"

If a working implementation found in another FE, extract shared translation logic into a common utility header instead of copy-pasting.

Output

Return a structured analysis block:

op_name:           <name>
source_framework:  <pytorch|tensorflow|onnx>
support_state:     <full|partial|missing>
translator_file:   <path or "missing">
registration:
  torchscript_key: <yes|no>   # PyTorch only
  fx_key:          <yes|no>   # PyTorch only
  onnx_op_macro:   <yes|no>   # ONNX only
  tf_table_entry:  <yes|no>   # TF only
math_formula:      <brief description>
inputs:            [<name: type>, ...]
outputs:           [<name: type>, ...]
attributes:        [<name: type = default>, ...]
ov_equivalent:     <op name(s) or "none">
cross_fe_reuse:    <yes|no> — <source path if yes>
action:            <translate|repair|escalate_to_core>
reason:            <why this action was chosen>

Action routing

  • action=translate or action=repair → proceed to fe_op_translation skill.
  • action=escalate_to_core → fill the full escalation payload (see fe_agent.md) and stop. Do not proceed to Translation skill.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 993f33e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 14 hours ago.

Activeupdated 6 months ago

README badge

README badge for openvinotoolkit/openvino/add-fe-op