What is the difference between tvm.tir.const and ir_builder.allocate_const in TVM graph construction using tir?

tir.const should be used when we want to represent a constant immediate. We do not recommend alloc_const was used to create an allocation that associates with some constant array.

Although we do not recommend using it, since it is not compatible with many tir schedules. Instead, we encourage passing the relevant constant in as a buffer when possible. Then do allocation at graph level

1 Like