Can we reuse the .log file on windows which is generated after autotune on ubuntu


can we reuse the .log file on windows which is generated after autotune on ubuntu, so that we don’t need to do the autotune again on windows?


Theoretically you can as long as the device architecture is the same.
cc: @kevinthesun


when I tried to reuse the .log after auto-tune from Ubuntu on Windows, an error happened:
Traceback (most recent call last):

File “”, line 286, in

File “C:\Users\yl2304\tvm\python\tvm\”, line 144, in export_library
fcompile(file_name, files, **kwargs)

File “C:\Users\yl2304\tvm\python\tvm\contrib\”, line 50, in create_shared
_windows_shared(output, objects, options)

File “C:\Users\yl2304\tvm\python\tvm\contrib\”, line 188, in _windows_shared
raise RuntimeError(“Can not find the LLVM linker for Windows (lld-link.exe).”

RuntimeError: Can not find the LLVM linker for Windows (lld-link.exe).Make sure it’s installed and the installation directory is in the %PATH% environment variable. Prebuilt binaries can be found at: building the linker on your own see:

does it means that I need to download the pre-built LLVM in order to generate .dll when lib.export_library(libpath)?

or do I need to build llvm from source including the LLD in order to generate .dll for windows?
Thanks a lot! cc: @kevinthesun


after I install the pre-built llvm, it successfully generated the .dll file and results are good but the problem is the speed is very slow on Windows about 139ms/frame comapared 40ms /frame on Ubuntu.

PS: this result came from reusing .log from auto-tune on Ubuntu

cc: @kevinthesun
image matting


That’s an interesting issue. Could you run AutoTVM on Windows and see how large the gap is?


one reason for the gap between Ubuntu and Windows, I think, may be caused by LLVM build. On Ubuntu, .log was generated by autu-tune by using two cpu cores and the LLVM was pre-built with OpenOmp, but on Windows, the llvm was built from source which I didn’t add the OpenOmp.


Thanks a lot!


You can try to compile on ubuntu and export library. Then load library on windows.


thanks a lot!

I tried to generate the .dll by lib.export_library("…/deploy.dll") on Ubuntu and then tried to loaded the lib by
loaded_lib = tvm.module.load(libpath) on Windows, but the error occurred, C:\Users\yl2304\tvm_data\deploy.dll,没有被指定在Windows上运行,或者它包含错误,请尝试使用原始安装介质重新安装程序

Traceback (most recent call last):

File “”, line 297, in
loaded_lib = tvm.module.load(libpath)

File “C:\Users\yl2304\tvm\python\tvm\”, line 260, in load
return _LoadFromFile(path, fmt)

File “C:\Users\yl2304\tvm\python\tvm_ffi_ctypes\”, line 210, in call
raise get_last_ffi_error()

tvm.ffi.base.TVMError: [12:54:57] C:\Users\yl2304\tvm_temp\src\runtime\ Check failed: lib_handle != nullptr: Failed to load dynamic shared library …/deploy.dll


when I tried to autotune the network on Windows, it’s weird that the phython script was hung on without any response

op_name:% conv2d
debug: []
[Task 1/48] Current/Best: 0.00/ 0.00 GFLOPS | Progress: (0/240) | 0.00 s

and I run the tutorial/autotvm/, it ended abnormally :

[Task 1/12] Current/Best: 0.00/ 0.00 GFLOPS | Progress: (0/400) | 0.00 sTraceback (most recent call last):

File “”, line 218, in

File “”, line 191, in tune_and_evaluate
tune_kernels(tasks, **tuning_opt)

File “”, line 166, in tune_kernels

File “C:\Users\yl2304\tvm\python\tvm\autotvm\tuner\”, line 108, in tune
measure_batch = create_measure_batch(self.task, measure_option)

File “C:\Users\yl2304\tvm\python\tvm\autotvm\measure\”, line 252, in create_measure_batch
attach_objects = runner.set_task(task)

File “C:\Users\yl2304\tvm\python\tvm\autotvm\measure\”, line 336, in set_task
tracker_addr=(, tracker.port))

File “C:\Users\yl2304\tvm\python\tvm\rpc\”, line 369, in init
self.proc = subprocess.Popen(cmd, preexec_fn=os.setsid)

AttributeError: module ‘os’ has no attribute ‘setsid’

cc @comaniac