The GitHub Actions job "Teams" on tvm.git/main has succeeded.
Run started by GitHub user tlopex (triggered by tlopex).

Head commit for run:
a9ce41e5a26c26a72fa2dfcc7788acf24f66ffa3 / Hongyi Wu 
<[email protected]>
[Relax][Frontend][TFLite] Add explicit operator marker handling (#19824)

## Summary

This PR adds explicit Relax TFLite frontend handling for the TFLite
builtin
operator markers from #19519 item H:

- `DELEGATE`
- `PLACEHOLDER_FOR_GREATER_OP_CODES`

These builtins are TFLite marker / pseudo operators rather than ordinary
tensor
operators.  The frontend now recognizes them and raises a targeted
`OpNotImplemented` diagnostic instead of falling through to a generic
unsupported-operator path.

## Design

`DELEGATE` marks delegated TFLite subgraphs, and
`PLACEHOLDER_FOR_GREATER_OP_CODES` is a schema compatibility
placeholder. They
do not have Relax tensor semantics to lower. This PR therefore keeps the
importer conservative:

- both builtin names are added to the TFLite `convert_map`
- both route to a shared `convert_operator_marker` guard
- the guard reports that the marker is not a Relax tensor operator

This makes the unsupported status intentional and discoverable without
mapping
the markers to synthetic Relax ops.

## Tests

The tests manually build minimal TFLite flatbuffers containing each
marker
builtin and assert that import raises the targeted `OpNotImplemented`.

Local validation:

```bash
python -m ruff format \
  python/tvm/relax/frontend/tflite/tflite_frontend.py \
  tests/python/relax/test_frontend_tflite.py

python -m ruff check \
  python/tvm/relax/frontend/tflite/tflite_frontend.py \
  tests/python/relax/test_frontend_tflite.py

python -m pytest \
  tests/python/relax/test_frontend_tflite.py \
  -k operator_marker_unsupported -q
```

Result:

```text
ruff format: 2 files left unchanged
ruff check: All checks passed
operator_marker_unsupported tests: 2 passed, 535 deselected
```

## References

- Issue #19519 item H: TFLite operator markers

Report URL: https://github.com/apache/tvm/actions/runs/27926290624

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to