less than 1 minute read

official notes (中文)

笔记

  • 本章以向量相加为例介绍了如何表示张量程序的抽象, 如何对张量函数进行变换/优化, 如何将抽象转化为可执行的函数.
  • 视频21:30处的例子是错的, 原式调换循环等价, 具体见 https://github.com/mlc-ai/mlc-zh/discussions/12
  • 一些概念的解释:
    • IRModule中的IR是指intermediate representation, tirt是tensor.
    • IRModule是函数的集合, 包含high-level的relay::Function和low-level的tir::PrimFunc.
    • 感觉比较迷的是T.axis.spatial(128, i), 只知道是一个绑定i的迭代器, 没有查到具体的参数说明.
    • TVM IR除了可以用TVMScript创建外, 还可以使用Tensor Expression(视频没讲, Notes最后有).
    • 最后的矩乘例子中我本地设置block_size=64时最优.

踩坑

  • 提供的包只有python3.7/3.8版本
    python3 -m  pip install mlc-ai-nightly -f https://mlc.ai/wheels
    

Tags:

Categories:

Updated:

Comments