tkonolige opened a new issue #6650: URL: https://github.com/apache/incubator-tvm/issues/6650
When using multiprocessing in python, the spawn start method (default on windows and macOS) causes errors with ansor. These errors are mostly related to serialization of `Object`s which do not expose all data via `VisitAttrs`. There are a couple ways we can fix this. @merrymercy suggests: "1. Fix VisitAttrs. I think this won’t work even if we fix all VisitAttrs because there are pointers in MeasureInput. The json serialization format automatically generated by TVM will be wrong for this case. 2. Use the custom c++ json serializer (https://github.com/tkonolige/incubator-tvm/blob/d5cca8cd32c21f53df40a1be497c382dc473f089/src/auto_scheduler/measure_record.cc#L229-L234) to serialize all arguments of pool.map. I think this is the fasted way with minimal change. 3. move the whole measure.py to c++. This is the most elegant solution in the long term. It can make Ansor fully independent of python and its future changes. But we heavily rely on some things only provided by python or tvm python API, so this solution needs some work." I believe 3. is the best way forward on this as it is a much more reliable solution. ---------------------------------------------------------------- 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: [email protected]
