What is the output of tvm before outputting to llvm


I know that tvm generates Halide IR. But how does it make all the backends recognizable? For example, the code recognized by llvm and cuda is inconsistent. How can the backend be compiled?


You can read the code in tvm/src/codegen directory, which convert Halide IR to the source/IR of corresponding backend.
For llvm backend, the output is llvm IR.