How to call void extern function?


I want to use device api function like “memcpy(src, sdt, length)” with “tvm.call_extern”. But this function expression won’t appear in codegen, because it return void, and be ignored after lower.
So, is there any solution to add this device api?
Thanks for your reply !


You should be able to do that with ir_builder, to emit a statement, and declare memcpy’s return value as int


Thanks, I never pay a attention to the “emit” api, but it really works! This question confuse me all day… Thanks again!