Ok so I commented out the `tune_graph()` call and use `sch_log` which is the schedule from `tune_kernels()` ``` with autotvm.apply_graph_best(sch_log): logging.info("Compiling the schedule") with relay.build_config(opt_level=3): graph, lib, params = relay.build_module.build( mod, target=target, params=params) ``` However, now I get some interesting errors:
``` %268 = layout_transform(%267, src_layout="NCHW77c", dst_layout="NCHW11c"); %269 = add(%259, %268) Incompatible broadcast type TensorType([1, 2, (int64)28, (int64)28, 11], int32) and TensorType([1, 0, (int64)28, (int64)28, 11], int32); ; %270 = subtract(%269, 130); %271 = clip(%270, a_min=0f, a_max=255f); %272 = cast(%271, dtype="uint8"); %273 = cast(%272, dtype="int16"); %274 = subtract(%273, meta[relay.Constant][36]); %275 = layout_transform(%274, src_layout="NCHW11c", dst_layout="NCHW40c") an internal invariant was violated while typechecking your program [17:15:34] /Users/alopez/Documents/Code/tvm/src/relay/op/tensor/transform.cc:2328: Check failed: data != nullptr: ... %289 = subtract(%288, meta[relay.Constant][3]); %290 = layout_transform(%289, src_layout="NCHW11c", dst_layout="NCHW8c") an internal invariant was violated while typechecking your program [17:15:34] /Users/alopez/Documents/Code/tvm/src/relay/op/tensor/transform.cc:2328: Check failed: data != nullptr: ``` The internal invariant violation error (`Check failed: data != nullptr:`) happens a lot, almost on every layout transformation. I recalled reading in the forums that there was some issue with the optimization level on those transformations so setting `opt_level=2` finally got the process to work. So heads up, there is something else going on that may cause problems in the future. I'll try to debug what is going on, but I'll have to understand the code base a bit more for me to be effective here. --- [Visit Topic](https://discuss.tvm.ai/t/autotvm-task-extract-from-program-in-tflite/6578/20) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/9ad81b5a07b090e04020863d7877ab13c4e2c27baf6d5b43cfe1533cde93b198).