You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/05/24 16:07:12 UTC

[GitHub] [tvm] lunar-walker opened a new issue #8118: Can't pickle local object 'default_module_loader..default_module_loader_mgr' while autotuning in Windows 10

lunar-walker opened a new issue #8118:
URL: https://github.com/apache/tvm/issues/8118


   
   Hi,
   I have successfully built TVM (latest 0.8 source from git) on windows 10 x 64. However, while trying to optimize a model (pretrained, insightface arcface r34_v1) through autotune, i encountered 
   AttributeError: Can't pickle local object 'default_module_loader.<locals>.default_module_loader_mgr'
   
   Issue seems to be in tvm/autotvm/measure/measure_methods.py: Method default_module_loader(pre_load_function=None) which contains an inner function def default_module_loader_mgr(remote_kwargs, build_result). Can we rewrite default_module_loader so that it doesn't contain an inner function, thus making it picklable.
   
   Complete error stack is as under:-
   python ..\tune_relay_x86.py
   Extract tasks...
   [20:45:17] C:\Jenkins\workspace\mxnet-tag\mxnet\src\nnvm\legacy_json_util.cc:209: Loading symbol saved by previous version v0.12.1. Attempting to upgrade...
   [20:45:17] C:\Jenkins\workspace\mxnet-tag\mxnet\src\nnvm\legacy_json_util.cc:217: Symbol successfully upgraded!
   Tuning...
   [Task  1/17]  Current/Best:    0.00/   0.00 GFLOPS | Progress: (0/800) | 0.00 s
   [INFO] Tracker binded to 0.0.0.0 9000    # Print message added by me to confirm if tracker is being binded successfully
   
   [INFO] Server binded to 0.0.0.0 9001     # Print message added by me to confirm if server is being binded successfully
   Traceback (most recent call last):
     File "..\tune_relay_x86.py", line 142, in <module>
       tune_and_evaluate(tuning_option)
     File "..\tune_relay_x86.py", line 86, in tune_and_evaluate
       tune_kernels(tasks, **tuning_opt)
     File "..\tune_relay_x86.py", line 68, in tune_kernels
       autotvm.callback.log_to_file(log_filename)])
     File "D:\miniconda3\envs\insight-kera\lib\site-packages\tvm\autotvm\tuner\tuner.py", line 133, in tune
       results = measure_batch(inputs)
     File "D:\miniconda3\envs\insight-kera\lib\site-packages\tvm\autotvm\measure\measure.py", line 266, in measure_batch
       results = runner.run(measure_inputs, build_results)
     File "D:\miniconda3\envs\insight-kera\lib\site-packages\tvm\autotvm\measure\measure_methods.py", line 314, in run
       module_loader,
     File "D:\miniconda3\envs\insight-kera\lib\site-packages\tvm\autotvm\measure\local_executor.py", line 156, in submit
       process.start()
     File "D:\miniconda3\envs\insight-kera\lib\multiprocessing\process.py", line 112, in start
       self._popen = self._Popen(self)
     File "D:\miniconda3\envs\insight-kera\lib\multiprocessing\context.py", line 223, in _Popen
       return _default_context.get_context().Process._Popen(process_obj)
     File "D:\miniconda3\envs\insight-kera\lib\multiprocessing\context.py", line 322, in _Popen
       return Popen(process_obj)
     File "D:\miniconda3\envs\insight-kera\lib\multiprocessing\popen_spawn_win32.py", line 89, in __init__
       reduction.dump(process_obj, to_child)
     File "D:\miniconda3\envs\insight-kera\lib\multiprocessing\reduction.py", line 60, in dump
       ForkingPickler(file, protocol).dump(obj)
   **AttributeError: Can't pickle local object 'default_module_loader.<locals>.default_module_loader_mgr'**
    Done.
   
   (insight-kera) D:\code\tvmmodels>Traceback (most recent call last):
     File "<string>", line 1, in <module>
     File "D:\miniconda3\envs\insight-kera\lib\multiprocessing\spawn.py", line 105, in spawn_main
       exitcode = _main(fd)
     File "D:\miniconda3\envs\insight-kera\lib\multiprocessing\spawn.py", line 115, in _main
       self = reduction.pickle.load(from_parent)
   EOFError: Ran out of input
   
   complete script is as https://gist.github.com/lunar-walker/48e969934663e1634d852f000ec4d73c
   
   Thanks for help...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] tkonolige commented on issue #8118: Can't pickle local object 'default_module_loader..default_module_loader_mgr' while autotuning in Windows 10

Posted by GitBox <gi...@apache.org>.
tkonolige commented on issue #8118:
URL: https://github.com/apache/tvm/issues/8118#issuecomment-849123786


   Tuning is not currently supported on windows. Sorry.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] tqchen commented on issue #8118: Can't pickle local object 'default_module_loader..default_module_loader_mgr' while autotuning in Windows 10

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #8118:
URL: https://github.com/apache/tvm/issues/8118#issuecomment-854705087


   Thanks for asking the question, you are more than welcomed to continue the topic on https://discuss.tvm.apache.org/. You can however, setup an RPC server on windows and run tuning from linux via cross compilation, please see https://discuss.tvm.apache.org/t/cross-compilation-for-windows/7698 for the an example 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] tqchen closed issue #8118: Can't pickle local object 'default_module_loader..default_module_loader_mgr' while autotuning in Windows 10

Posted by GitBox <gi...@apache.org>.
tqchen closed issue #8118:
URL: https://github.com/apache/tvm/issues/8118


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org