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

Head commit for run:
fb6453a817264efd5b2e19c8b3a118e6b383725b / Soowon Jeong <[email protected]>
[Relax][TFLite] Fix `MIRROR_PAD`/`ONE_HOT` converters and add tests for `PAD`, 
`PADV2`, `MIRROR_PAD`, `TOPK_V2`, `ONE_HOT` (#19373)

Part of #18971

Two bugs in the TFLite Relax frontend converters are fixed, and unit
tests
are added for the **Padding / Sparse / Other** category operators
claimed in
that tracking issue.

## Bug fixes

### `convert_mirror_pad`
Called `relax.op.nn.mirror_pad` which does not exist in the Relax op
namespace. Replaced with `relax.op.nn.pad` using `pad_mode="reflect"`
for
REFLECT mode (the modes are semantically equivalent). SYMMETRIC mode
raises
`OpAttributeUnImplemented` as there is no direct Relax equivalent.

### `convert_one_hot`
- `on_value` and `off_value` were passed as `Expr` (constant tensor
nodes),
  but `relax.op.one_hot` requires `PrimValue` arguments.
- An extra `dtype` positional argument was passed, which the function
  signature does not accept.

Fixed by extracting the scalar from each tensor buffer and wrapping it
in
`relax.PrimValue` with the correct dtype via `tvm.tirx.FloatImm` /
`tvm.tirx.IntImm`.

## Tests added

Each test uses the `verify()` + `tf.Module` pattern and includes an
explicit
expected IRModule verified with `tvm.ir.assert_structural_equal`.

| Operator | TFLite op | Notes |
|----------|-----------|-------|
| `test_pad` | `PAD` | constant zero padding |
| `test_pad_v2` | `PADV2` | explicit `constant_values=5.0` |
| `test_mirror_pad` | `MIRROR_PAD` | REFLECT mode |
| `test_topk_v2` | `TOPK_V2` | returns top-k values |
| `test_one_hot` | `ONE_HOT` | float32 on/off values, depth=4 |

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

With regards,
GitHub Actions via GitBox


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

Reply via email to