You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
作业链接:
https://github.com/GeLee-Q/TVM_Practice/blob/master/MLC_HW_01.ipynb
画图函数的Bug:
colab
中会报错实践1 :从
Pytorch
中迁移模型:问题1:
tvm.topi.nn.pool2d
的文档并没有指定dilation
的参数格式从结果倒推来看是
(*list/tuple of two ints*)
实践2 :
问题1:
emit
&call_tir
如何混合调用torch由于作业和文档并没有详细解释
blockbuilder
如何使用,但是助教和同学们热心讨论解决了这个问题。参考讨论 mlc-ai/mlc-en#31
lv1_0 = bb.emit(relax.op.call_tir(relax.extern("env.conv2d"), (x, conv2d_weight),(4, 32, 26, 26), dtype="float32"))
问题2 : Torch 的内存指向问题
问题:如果直接
out_torch = torch.nn.functional.conv2d(...)
, 那out_torch指向的内存地址将产生变化,意味着out_torch
不再指向out
预期的地址。mlc-ai/mlc-en#31 (reply in thread)
谢谢这位同学的热心解答:
mlc-ai/mlc-en#31 (reply in thread)
实践3 : 端到端模型中的程序变换
问题1: 循环的fuse ,spilt
需要参考答案对循环进行切分,然后混合
参考这位同学的切分方法 Question concerning assignment 4, with respect to `Section 4` mlc-en#32
问题2 : parallel & vectorize
在上一个写
TensorIR
的作业里就注意到parallel
操作需要放在decompose_reduction
前面. 参考助教和同学们的讨论做这个作业的时候发现, 在变换的结尾部分,无论如何都没法去vectorize
i2_1_i3_1_fused
参考 parallel 的文档 和 vectorize 的文档
发现二者的要求近乎一模一样,所以这才感觉过来,这两个操作可能都要放到
decompose_reduction
前面去。 果然,最后去处理
decompose_reduction
让变换和标答近乎一致了。Beta Was this translation helpful? Give feedback.
All reactions