Lunderberg commented on PR #14901: URL: https://github.com/apache/tvm/pull/14901#issuecomment-1599161539
> So I wonder if we should revert some of the changes in the device codegen(nvptx, rocm) and only support subroutine rewriting in host side. cc @Lunderberg @tqchen Forgot to respond to this part. That is the intent, that the LLVM subroutines are supported only on the host side. The primary change to nvptx/rocm were (a) to make sure they could provide the `GlobalVar` when delegating to `CodeGenLLVM::AddFunction` and (b) to call `DeclareFunction` prior to `AddFunction`. If we want to explicitly prevent TIR-to-TIR calls in nvptx/rocm, we could revert the changes of type (b) without impacting the changes of type(a). I suppose we could also move the callee resolution into `CodeGenLLVM::Finish`, since that would avoid the need for `DeclareFunction` altogether, but that would be a larger change. -- 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]
