Description
❓ General Questions
I want to print kv cache value for debug, and I noticed T.evaluate function can help me print some message as below
`
@T.prim_func
def test_evaluate(var_a: T.handle, var_b: T.handle):
T.func_attr({"global_symbol": "test_evaluate", "tir.noalias": T.bool(True)})
n = T.int32()
a = T.match_buffer(var_a, (n,), "float32")
b = T.match_buffer(var_b, (n,), "float32")
T.evaluate(T.call_packed("tvm.contrib.debugger.debug_print", a, "a"))
T.evaluate(T.call_packed("tvm.contrib.debugger.debug_print", b, "b"))
T.evaluate(T.call_packed("tvm.contrib.debugger.debug_print", a.shape[0], "a shape[0]"))
T.evaluate(T.call_packed("tvm.contrib.debugger.debug_print", a.dtype, "a dtype"))
T.evaluate(T.call_packed("tvm.contrib.debugger.debug_print", b.shape[0], "b shape[0]"))
T.evaluate(T.call_packed("tvm.contrib.debugger.debug_print", b.dtype, "b dtype"))
for i in T.serial(n):
b[i] = a[i] + 1.0
`
this test code can print message if I run it alone, but when I use T.evaluate(T.call_packed("tvm.contrib.debugger.debug_print", a, "a")) in python/mlc_llm/nn/kv_cache.py _kv_cache_transpose_append(kv_cache_config: BaseKVConfig) function, after compliation and running, there is no print message. Is there some pipeline delete this line after compilation? If so, how can I modify python/mlc_llm/compiler_pass to allow these message?