Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

[UX][MetaSchedule] Tuning Interface #203

Closed
7 of 9 tasks
junrushao opened this issue Aug 4, 2022 · 3 comments
Closed
7 of 9 tasks

[UX][MetaSchedule] Tuning Interface #203

junrushao opened this issue Aug 4, 2022 · 3 comments
Labels

Comments

@junrushao
Copy link
Member

junrushao commented Aug 4, 2022

Relax-related

  • S2
  • S4: nop

TIR-related

  • S5
  • S6

MetaSchedule-related

  • S1
  • S3
  • S7
  • S8
  • S9

[Fixed] S1. Tune APIs return Database

Fixed: apache/tvm#12895

The tuning interface should return a ms.Database consistently across TIR and Relax, which could be further applied to Relax compilation pipeline.

[Fixed] S2. ApplyHistoryBest as a context class, but with a potentially better name

Fixed: apache/tvm#12520

with ApplyHistoryBest(database):
  artifact = relax.build(...)

Update: ApplyHistoryBest is removed with respect to making Database with-able:

with database:
  artifact = relax.build(...)

[Fixed] S3. Database.query returns tir.Schedule

Fixed: apache/tvm#12520

Currently it returns IRModule, which is less convenient to deal with when we want to inspect the trace - changing to returning tir.Schedule so that the trace is available.

[NOP] S4. Build a Relax pass to apply database to IRModule

I believe it's already there. CC: @tqchen @sunggg @YuchenJin.

[Fixed] S5. Trace printing should be wrapped with a function.

Fixed: apache/tvm#12507

Current:

>>> print(sch.trace)
b1 = sch.get_block(name="xxx")

Updated:

>>> print(sch.trace)
def schedule(sch):
  b1 = sch.get_block(name="xxx")

[Fixed] S6. Rendering trace with pigment

Fixed: apache/tvm#12507

Adopting the contribution from @ganler.

[Fixed] S7. Create database via work_dir with some auto-detect functionality

Fixed: apache/tvm#12643

Adding API: ms.Database.from_work_dir("/path/to/work_dir/").

Update: it's possible now with:

ms.database("json", work_dir="/path/to/work_dir")
@junrushao junrushao added the UX label Aug 4, 2022
@sunggg
Copy link
Collaborator

sunggg commented Aug 4, 2022

Thank you for the great suggestion!
Regarding S4, yes. We introduced ApplyHistoryBest as a pass and currently we are reviewing a PR for MS Tuning pass.

@junrushao
Copy link
Member Author

junrushao commented Oct 2, 2022

S8. Handle it when excessive errors pop out

Stop tuning or fall back to debug mode

@junrushao
Copy link
Member Author

S9. Use better table format when tuning in Jupyter

@tqchen tqchen closed this as completed Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants