## Summary
The int_div optimization in `topi.image.resize` was applied
unconditionally
for `nearest_neighbor` + `asymmetric` mode, regardless of rounding
method.
This caused accuracy issues when `rounding_method` is not `"floor"`
(e.g.,
`"round"`, `"round_prefer_ceil"`), because integer division truncates
toward
zero rather than rounding.
**Fix**: Gate the int_div optimization on `rounding_method == "floor"`
or
`rounding_method == ""` (the default, which gets resolved to `"floor"`
for
non-align_corners modes).
- Updates `_resize_2d` in `python/tvm/topi/image/resize.py`
- Updates reference implementation in
`python/tvm/topi/testing/resize_python.py`
- Updates legalize test expected output to reflect the new behavior
* rename resize to resize2d
* refactor resize_2d
* Add resize1d op, normalize attribute names across ops
* normalize resize3d to match the API of 1D and 2D
* fix lint
* fix relay tests from API change
* refactor topi tests, docs
* fix method naming in framework frontends
fix more frontend issues
* refactor resize tests to reuse components, add more coordinate tranform modes to tests
* add cubic resize reference kernel and tests, add relay tests for resize1d
* fix pylint
* fix test typo