tqchen commented on pull request #9848: URL: https://github.com/apache/tvm/pull/9848#issuecomment-1018622458
Thanks @electriclilies let me try to dissect what you said: - C0: Right now device propagation is not fully completed(through WithFields or other mechanisms), as a result funcion->body may not be property setup with the right device choice. - C1: There might be a need to properly annotate the return device type of function, which then can be used to inform, or enforce the planning of functions. Note that C0 and C1 are slightly different. I believe you are talking about C0, but seems there is also a slightly indication of C1(which will imply storing something on the function node). In a fully heterogenous setting, the input and return value might be different. In such cases, "execute on" can become ambiguous and differ from the "result of return value". The current change proposes to use `fn->virtual_device()` as the result of return value. It might be good to document this choice in function and revisit once device propagation is fully compeled. These are high-level discussions for your information and hope that they will help clarifying the semantics of virtual device field. They are not asks about specific kind of implementation. So feel free to take the information and make a call, while documenting the rationales that might help future refactors. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
