tqchen commented on PR #18055:
URL: https://github.com/apache/tvm/pull/18055#issuecomment-2973027265

   after reading the comments so far on host/device function info split and the 
compiler phases:
   
   - S0: In the beginning(before SplitHostDevice), we don't distinguish 
host/device function, a function can contain kernels
   - S1: The host/device function split becomes clear after the SplitHostDevice 
pass. currently in the case of single device launch:
      - global kernel are annotated as DeviceKernelLaunch calling conv
      - host ones are annotated as others
   
   After we enable the compiler to handle device function, one thing we first 
need to ensure is what is the behavior after S1. Would be useful to clarify in 
the PR with comments.
   
   Summarizing the logic so far:
   
   - Before S0 seems the decision is to not distinguish between host/device 
function and implicit
   - Such distinction should become clear after S1, by checking the target 
annotation of each function that marks the default convention.
       - Because of the implicitness, we may need to cross check the current 
bebehavior of SplitHostDevice, for rare cases where say both host and device 
calls the same function : in such cases we may either
           - S0a: place constraint and report an error
           - S0b: have SplitHostDevice pass manually duplicate such function 
and mark the target
   
   In both cases, would be good to enhance splithostdevice testcases to ensure 
target field is clear after S1
   
    


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

Reply via email to