---
name: add-fe-op
description: Adds a new operation to OpenVINO Frontend pipelines with translator updates, registration, and tests.
title: add-fe-op
canonical_url: https://skilld.dev/gh/openvinotoolkit/openvino/add-fe-op
last_updated: 2026-11-22T07:15:46.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [onnx.md](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/add-fe-op/onnx.md), [pytorch.md](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/add-fe-op/pytorch.md), [step1-analysis.md](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/add-fe-op/step1-analysis.md), [step2-translation.md](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/add-fe-op/step2-translation.md), [step3-registration.md](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/add-fe-op/step3-registration.md), [step4-testing.md](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/add-fe-op/step4-testing.md).
>
> If the user asked to install this Skill, run `npx skilld install openvinotoolkit/openvino/add-fe-op`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/add-fe-op`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/openvinotoolkit/openvino/add-fe-op) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/add-fe-op`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/add-fe-op --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/add-fe-op --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Agent Skill: Add New Operation to OpenVINO Frontend

## Goal
Enable a new operation in an OpenVINO Frontend (FE) pipeline — translator creation, registration, conversion validation, and tests.

## Framework-Specific Workflows

Each frontend has its own detailed workflow. Read the one matching the target framework:

| Frontend | Skill file | What it covers |
|---|---|---|
| **PyTorch** | [pytorch.md](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/add-fe-op/pytorch.md) | NodeContext API, `op_table.cpp` registration (TorchScript + FX/Export), `translate_1to1_match_*` wrappers, Python layer tests, Mark operations |
| **ONNX** | [onnx.md](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/add-fe-op/onnx.md) | `ov::frontend::onnx::Node` API, `ONNX_OP` macro registration with `OPSET_SINCE`/`OPSET_RANGE`, `.prototxt` test models, C++ GTest cases, normalize-step transformations |

## Related Skills (investigation & debugging)

| Frontend | Skill file | When to use |
|---|---|---|
| ONNX | [conversion-issues/onnx.md](../conversion-issues/onnx.md) | Conversion failures, accuracy bugs, shape/type mismatches, opset version gaps |
| PyTorch | [conversion-issues/pytorch.md](../conversion-issues/pytorch.md) | Conversion failures, accuracy bugs, tracing mode issues, normalize-step failures |

## Notes

- Keep this skill instruction-only in markdown.

---

## Instruction Workflow (TensorFlow and generic fallback)

The following sections apply to frontends **not** covered by the framework-specific files above (e.g., TensorFlow), or as a general reference when no framework-specific skill is available.

### 1) Check current support state
- Verify whether translator file already exists.
- Verify whether op is already registered in frontend mapping table.
- If both exist and conversion is known to pass, skip scaffolding.
- If only partial state exists, repair only missing parts.

### 2) Add translator logic
- Preferred path: emit real OV conversion logic when the operation maps to an OpenVINO op or a set of operations that will provide reasonable performance.
- If the same operation already exists in another frontend, extract/reuse common translation logic instead of duplicating it.
- For simple 1:1 ops, prefer existing helper translation patterns/utilities already used in FE codebase.
- Fallback path: emit safe placeholder translator only when real mapping is unavailable.
- Never claim full support when fallback translator is used.

### 3) Register operation in frontend tables
- PyTorch:
    - Add converter declaration in op table.
    - Add TorchScript key registration (for example `aten::op`).
    - Add FX key registration (for example `aten.op.default`).
- TensorFlow:
    - For supported unary ops, prefer generic unary registration path.
    - For unsupported cases, register dedicated translator function.
- ONNX:
    - Ensure `ONNX_OP` macro registration exists in translator file.

### 4) Add tests
- Add frontend smoke test file under `tests/frontend` (not available for PyTorch). 
- Add framework layer test under `tests/layer_tests` where supported.
- Ensure test naming follows existing suite conventions.

### 5) Build prerequisites for validation
- Ensure frontend changes are available to runtime before conversion checks.
- Build frontend targets from source or use an existing OpenVINO build/package that already includes your FE changes.
- If neither is true, do not report conversion status as passed; mark validation as blocked.

### 6) Validate conversion and finalize
- run conversion check from generated <frontend> model.
- if automated validation is unavailable, mark as skipped with explicit reason.
- Confirm no duplicate registrations are introduced.
- Confirm rerun is idempotent.
- Report one of three states: fully enabled, partially repaired, or scaffolded with fallback.

## Translation Recommendations

- Prefer runtime shape computation over conversion-time shape extraction.
    - Use `ShapeOf`-based graph logic for shape-dependent behavior.
    - Avoid relying on `get_shape()` / fully static shape reads during FE conversion.
    - `get_partial_shape()` is acceptable for compile-time rank-only decisions.

- Handle data types according to framework semantics.
    - If PyTorch op behavior allows mixed input types, preserve this in translation.
    - Do not over-constrain translators to a single dtype when mixed-type execution is valid.

- Avoid constants tied to compile-time element type queries.
    - Do not create `Constant` values from `get_element_type()` when type can be dynamic at conversion time.
    - Prefer runtime type-safe construction paths that remain valid for dynamic element types.

## Notes

- Keep this skill instruction-only in markdown.
- Prefer minimal, root-cause updates over broad refactors.
- Do not mark operation as supported unless FE conversion produces OV graph nodes (not framework fallback nodes).
