junrushao opened a new pull request, #12628:
URL: https://github.com/apache/tvm/pull/12628
Following up #12520 and #12626, this PR introduces `MergedDatabase`,
which allow users to compose multiple databases so that the high-level
IR could select the best tuning records among them.
The `MergedDatabase` also comes with an extra field `preferred` to allow
users to override tuning records from other databases. A classic usecase
of the `preferred` parameter is through handcrafted schedule functions:
```python
def schedule_fn(sch: tir.Schedule) -> bool:
if "nn_conv2d" in sch.mod.attrs["task_name"]:
handcrafted_scheduling(sch)
return True
return False
with ms.database.MergedDatabase(
databases=[database],
preferred=ms.database.ScheduleFn(schedule_fn),
):
lib = relay.build(...)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]