tvm
tvm copied to clipboard
[Relax][UnitTest] Validate IRModule with multiple targets
This commit adds a unit test to verify that a single IRModule can contain functions that will be used on multiple distinct targets. Previously, this test case caused errors when running the LegalizeOps and ApplyDefaultSchedule transforms.
This PR adds a unit test validating an end-to-end compilation. On main, this end-to-end test encounters the errors resolved in PRs https://github.com/apache/tvm/pull/16958 and https://github.com/apache/tvm/pull/16959.
This current PR branch includes these two fixes, and is marked as a draft until the bugfix PRs land.
This PR is now rebased on top of the prerequisite PRs #16958 and #16959, and is ready for review. It does not add any functionality in itself, but adds a test to validate expected behavior for compilation of a Relax IRModule containing multiple targets.