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?
when I tried to reuse the .log after auto-tune from Ubuntu on Windows, an error happened：
Traceback (most recent call last):
File “so_check_mmnet_input_384.py”, line 286, in
File “C:\Users\yl2304\tvm\python\tvm\module.py”, line 144, in export_library
fcompile(file_name, files, **kwargs)
File “C:\Users\yl2304\tvm\python\tvm\contrib\cc.py”, line 50, in create_shared
_windows_shared(output, objects, options)
File “C:\Users\yl2304\tvm\python\tvm\contrib\cc.py”, 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: https://llvm.org/For building the linker on your own see: https://lld.llvm.org/#build
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
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 “so_check_mmnet_input_384.py”, line 297, in
loaded_lib = tvm.module.load(libpath)
File “C:\Users\yl2304\tvm\python\tvm\module.py”, line 260, in load
return _LoadFromFile(path, fmt)
File “C:\Users\yl2304\tvm\python\tvm_ffi_ctypes\function.py”, line 210, in call
tvm.ffi.base.TVMError: [12:54:57] C:\Users\yl2304\tvm_temp\src\runtime\dso_module.cc:96: 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
[Task 1/48] Current/Best: 0.00/ 0.00 GFLOPS | Progress: (0/240) | 0.00 s
and I run the tutorial/autotvm/tune_relay_x86.py, it ended abnormally :
[Task 1/12] Current/Best: 0.00/ 0.00 GFLOPS | Progress: (0/400) | 0.00 sTraceback (most recent call last):
File “tune_relay_x86.py”, line 218, in
File “tune_relay_x86.py”, line 191, in tune_and_evaluate
File “tune_relay_x86.py”, line 166, in tune_kernels
File “C:\Users\yl2304\tvm\python\tvm\autotvm\tuner\tuner.py”, line 108, in tune
measure_batch = create_measure_batch(self.task, measure_option)
File “C:\Users\yl2304\tvm\python\tvm\autotvm\measure\measure.py”, line 252, in create_measure_batch
attach_objects = runner.set_task(task)
File “C:\Users\yl2304\tvm\python\tvm\autotvm\measure\measure_methods.py”, line 336, in set_task
File “C:\Users\yl2304\tvm\python\tvm\rpc\server.py”, line 369, in init
self.proc = subprocess.Popen(cmd, preexec_fn=os.setsid)
AttributeError: module ‘os’ has no attribute ‘setsid’