dlexplorer commented on pull request #7387:
URL: https://github.com/apache/tvm/pull/7387#issuecomment-772864377


   > @dlexplorer looks like the CI failed at the RPC runner. Please check if 
your changes could pass the unit tests locally first (not in the anaconda).
   
   @comaniac I see some inconsistency in workload content. It can store 
   * workload key->list of tensors (the way of tasks generated through 
auto_scheduler.extract_tasks)
   * function name-> function
   If we have the first case, the list of tensors can be serialized 
successfully using SaveJSON
   If we have second case, exactly what happens in test, the function 
matmul_auto_scheduler_test is registered, then it canno tbe serialized using 
SaveJSON.
   
   And I suspect it cannot be serialized without some processing.
   On the other hand, the process of measure assume creation of second process 
and passing the task for measure in the second process. The object should be 
serializable. I believe eveything work with cpython and functino by the same 
reason as with workload id/list of tensor. content of the task is not 
serialized, due to implementation of cpython process just forks and all objects 
are on the same place as in original process.
   
   I can add workaround - to verify the type of the content and if it is a list 
of tensors, apply SaveJSON, in other case do not call. And in deserialize I can 
also verify value and call LoadJSON only if it has string type.
   
   But it is a design issue if we can have situation when we have object which 
should be passed to another process and which cannot be serialized.
   
   Can we process/modify function somehow to be serialized?
   Is function usecase happen only in tests? or it is assumed that it will be 
used in real life as well?


----------------------------------------------------------------
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]


Reply via email to