TVM PrimFunc returning a constant cannot compile

Hi everyone. I’ve been playing with TVM for weeks and am very interested in its low level TIR. When I’m playing with it, I found the below code couldn’t compile and gave me a weird error message. Here is the code

import tvm
from tvm import tir

tvm.build(tir.PrimFunc([], tir.Evaluate(tir.ret(tir.const(0)))))

And the error message says I didn’t pass required variables, but I don’t have any variables… I’d be appreciated if anyone can help me :pray:.

TVMError: Not all Vars are passed in api_args:  'out_ret_value'  'out_ret_tcode'  is not bound to any variables

cc @ziheng can you look into this case?

2 Likes

Hi @UniverseFly , the issue should be fixed by

2 Likes

Thanks! What an instant feedback :grinning_face_with_smiling_eyes: