8 Commits

Author SHA1 Message Date
YinHanke 1e08eb2fa9 [Relax][ONNX][Torch] Add roi_align support and frontend integration (#18936)
## Summary

Add Relax `roi_align` support and wire it through the ONNX and PyTorch
frontends.

## Changes

- add `relax.vision.roi_align`, including attrs, Python wrapper, struct
info inference, and legalization
- add TOPI `roi_align` compute and keep both legacy and aligned ROIAlign
semantics
- support ONNX `RoiAlign`, including `coordinate_transformation_mode`
handling for `output_half_pixel` and `half_pixel`
- support PyTorch `torchvision.ops.roi_align` in the exported-program
frontend, including the `aligned` flag
- add regression tests for Relax op inference, legalization, TVMScript
parsing, ONNX frontend import, and PyTorch frontend import
- add aligned ROIAlign test coverage to make sure sub-pixel RoIs no
longer use the legacy `min=1.0` clamp

## Validation

- `pytest tests/python/relax/test_op_vision.py -k roi_align`
- `pytest tests/python/relax/test_tvmscript_parser_op_vision.py -k
roi_align`
- `pytest tests/python/relax/test_frontend_onnx.py -k roi_align`
- `pytest tests/python/relax/test_frontend_from_exported_program.py -k
roi_align`

This PR completes the Relax/ONNX/Torch roi_align work tracked in #18928.
2026-03-26 10:41:54 -04:00
Tianqi Chen 33dcea1686 [REFACTOR][LINT] Modernize ruff config (#18810)
This PR removes the extra lint violations from the codebase so lint
aligns with the latest style
2026-02-23 07:29:21 -05:00
Tianqi Chen aa2e609136 [LINT] Modernize lint to use pre-commit hooks (#18807)
This PR migrates existing lint to use pre-commit hooks
2026-02-22 11:03:21 -05:00
masahi b7e0cfb6d4 [TOPI, Relay] Support roi_align NHWC layout (#7463)
* begin nhwc roi align

* integrate mode change from upstream

* adding test

* support nhwc shape func

* update strategy

* refactoring test

* refactor test

* refactoring

* fix lint

* update relay op tests
2021-02-18 12:11:17 +09:00
Lily Orth-Smith 564aae0766 [Relay][Topi] Add max mode to ROI align (#7440)
* ROI align with max on cpu passes

* onnx test file was not running gpu testsgit status!

* all passing

* fix lint

* lint again

* lint

* lint

* typo

* remove import

* fix import

* add inf, -inf to hybridscript and respond to comments

* shorten code

* make atol lower
2021-02-17 09:02:33 +09:00
Ritwik Das 38c9eb1a78 Fix Bug in Bilinear Interpolation and Add Deform Conv to PT FrontEnd (#7397)
* Fix Bug in Bilinear Interpolation

* Add NHWC Tests

* clean

* Fix Bug and Add Deformable Conv PyTorch for completeness

* Add Tensor Utils

* Remove stuff

* Include vector

* PR Comments

* Empty Commit for CI

Co-authored-by: Ubuntu <ubuntu@ip-172-31-42-251.us-east-2.compute.internal>
2021-02-04 20:49:07 -08:00
Jared Roesch f13fed55cf [Format] Convert all Python code w/o CI (#6448)
* Add black setup

* Tweak pyproject.toml

* Fix syntax issues

* Fix

* Tweak

* Black all Python code
2020-09-11 22:17:24 +09:00
Tianqi Chen 0a4ee30da7 [REFACTOR] topi -> tvm/topi (#6186)
This PR migrates the topi library as a sub namespace of tvm.
2020-08-02 09:29:29 -07:00