Skip to content

Conversation

@tlopex
Copy link
Member

@tlopex tlopex commented Dec 3, 2025

Overview

This PR updates the MLC course materials to be compatible with TVM latest API changes. This is the first step in modernizing the course content, focusing on API updates. Additional content updates will follow in subsequent PRs.

Changes

API Updates

  1. Compilation API

    • tvm.build()tvm.compile() for TIR modules
    • relax.build()tvm.compile() for Relax modules
    • lib.time_evaluator()lib.mod.time_evaluator() (tvm.compile returns Executable with mod attribute)
  2. Runtime API

    • tvm.nd.array()tvm.runtime.tensor()
    • tvm.nd.empty()tvm.runtime.tensor(np.empty(...))
    • Type annotations: tvm.nd.NDArraytvm.runtime.Tensor
  3. Function Registration

    • @tvm.register_func()@tvm.register_global_func()

Code Fixes

  • Fixed syntax errors in code blocks
  • Updated installation commands (mlc-ai-nightlymlc-ai-nightly-cpu)
  • Fixed pseudo-code syntax issues

Next Steps

In the following PR, I will update repo mlc-zn as well and then include updating outdated usage
(like PyTorch FX->exported_program).

@tlopex
Copy link
Member Author

tlopex commented Dec 3, 2025

cc @tqchen @MasterJH5574

@tlopex tlopex changed the title [Update] Update MLC course materials to TVM 0.23 API [Update] Update MLC course materials to TVM latest API Dec 3, 2025
@MasterJH5574
Copy link
Member

@tlopex Hey Shushi, could you also update this line to -cpu so the github action can run? Right now it fails due to this reason.

- mlc-ai-nightly

@tlopex
Copy link
Member Author

tlopex commented Dec 13, 2025

cc @MasterJH5574

@MasterJH5574 MasterJH5574 merged commit 8d24809 into mlc-ai:main Dec 13, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants