Opt_level in tvm.build

Hey I want to ask when I express computation using tensor expression, then schedule it and use tvm.build to build. What’s the optimization level/flag for the build, like is it -O1, -O2 or -O3

k = te.reduce_axis((0, K), "k")
A = te.placeholder((M, K), name="A")
B = te.placeholder((K, N), name="B")
C = te.compute((M, N), lambda m, n: te.sum(A[m, k] * B[k, n], axis=k), name="C")
s = te.create_schedule(C.op)
mmult_navie = tvm.build(s, [A, B, C], target=target, name="mmult_navie")

The TVM build opt level is mentioned in the PassContext class and the default is opt_level=2.

We can set our own opt_level by explicitly creating the PassContext like below:

with tvm.transform.PassContext(opt_level=3):
    mmult_navie = tvm.build(s, [A, B, C], target=target, name="mmult_navie")