I’m wondering if there are any TopHub-like workflows that have been created for Ansor yet? I’m looking at tuning reuse.
E.g. if I look at the tuning config I produce for MobileNetV2 mobilenet-NCHW-B1-llvm.json
, I can see entries such as:
{"i": [["[\"0abeaf8a7df88ad015de76910b5779a1\"]", "llvm -keys=cpu -link-params=0 -mcpu=core-avx2", [8, 64, 64, 0, 0, 0, 0, 0], "", 2], [[], [["SP", 2, 0, 1, [1, 1, 1], 1], ["SP", 2, 4, 1000, [25, 2, 4], 1], ["SP", 2, 8, 1280, [16], 1], ["RE", 2, [0, 4, 1, 5, 8, 2, 6, 9, 3, 7]], ["FSP", 4, 0, 0, 2], ["FSP", 4, 3, 1, 2], ["RE", 4, [0, 3, 1, 4, 2, 5]], ["CA", 2, 4, 3], ["FU", 4, [0, 1, 2, 3]], ["AN", 4, 0, 3], ["PR", 2, 0, "auto_unroll_max_step$64"]]]], "r": [[0.000296812, 0.000293744, 0.000262426, 0.000270827, 0.000182757, 0.000185249, 0.000183439, 0.000183809, 0.000186335, 0.000268723], 0, 0.881661, 1611833413], "v": "v0.5"}
Which is somewhat similar to an equivalent entry from the autoTVM logfile for MobileNetV2:
{"input": ["llvm -keys=cpu -link-params=0 -mcpu=core-avx2", "conv2d_NCHWc.x86", [["TENSOR", [1, 320, 7, 7], "float32"], ["TENSOR", [1280, 320, 1, 1], "float32"], [1, 1], [0, 0, 0, 0], [1, 1], "NCHW", "NCHW", "float32"], {}], "config": {"index": 1996, "code_hash": null, "entity": [["tile_ic", "sp", [-1, 32]], ["tile_oc", "sp", [-1, 640]], ["tile_ow", "sp", [-1, 7]], ["tile_oh", "ot", 2]]}, "result": [[1000000000.0], 6, 10, 1611932834.9044788], "version": 0.2, "tvm_version": "0.8.dev0"}
I’m wondering for Ansor, if I had a network which had some layers identical to MobileNetV2, how I would parse the MobileNetV2 Ansor log file to use the tuning parameters for those shared layers.
The Ansor log format doesn’t seem to be canonicalised yet.