tvm.transform.PassContext与relay.build_config有何区别 #188
Unanswered
Coder-initial
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
with tvm.transform.PassContext(opt_level=3):
vm_exec = relay.vm.compile(mod, target=target, params=params)
和with relay.build_config(opt_level=3):
intrp = relay.build_module.create_executor('graph', mod, tvm.cpu(0), target)
有什么区别吗,前一个是relay的virtual Machine
vm = VirtualMachine(vm_exec, dev)然后通过vm.run()运行编译后的模型。
后一个使用的是什么,生成直接运行的func吗。这二者有什么区别呢。我感觉都是在relay层级进行的compile
那我应该如何选择呢。
我是TVM刚入门的小白,希望大佬能答疑解惑
Beta Was this translation helpful? Give feedback.
All reactions