This is a tricky question. Theoretically you only need to build the module again without `apply_history_best` and measure its latency. However, if you build the same module twice, the compiler engine will use the previous built programs to reduce the build time in the second time. This can be resolved by adding the following lines:
```python from tvm.relay.backend import compile_engine ... compile_engine.get().clear() with apply_history_best(...): graph, lib, params = relay.build_module.build(mod, target=target, params=params) runtime1 = graph_runtime.create(graph, lib, dev_ctx) compile_engine.get().clear() graph, lib, params = relay.build_module.build(mod, target=target, params=params) runtime2 = graph_runtime.create(graph, lib, dev_ctx) ``` The whole idea is to clean the cache in compiler engine and make sure it builds the module from scratch. --- [Visit Topic](https://discuss.tvm.ai/t/how-to-reset-relay-to-use-the-default-config/6642/2) 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/4f503e225a9048043ab89fc80dfed35c356a7d37fe26338e74ae4c6987d47bbd).
