areusch commented on pull request #8472: URL: https://github.com/apache/tvm/pull/8472#issuecomment-880994200
@manupa-arm @d-smirnov I believe your primary goal as I understand it is to encode the constant data in TIR so that post-scheduling visitors can modify the IR and the data based on whole-program analysis prior to exporting the model parameters, is that correct? it would be great to capture this in an e.g. RFC or design doc. I agree that `--link-params` constants are a reasonable place to start. I'm not sure what the right IR construct is, but perhaps we could consider it in terms of this longer-term goal rather than the immediate goal of extracting `--link-params` from TIR constants. Traditionally, params were fetched by the executor. With AOT, we now have the option to encode much of the executor logic in TIR; this means though that we need to be careful not to over-complicate the various codegen. I think this latter concern isn't generally a problem if we are judicious with the things we add to TIR. Finally, we need to ensure that post-scheduling visitors won't break given the new TIR nodes. Given constants are not currently encoded in post-schedule TIR, I think the main case we need to consider is when a pass expected to find params by inspecting a PrimFunc param, but now needs to also inspect something else. I agree with @tqchen it would be good to discuss the longer-term vision on the forum or with an RFC, even if it is small. We also need to consider how other executors could be coupled with passes that modify the constant data. We don't want to create special cases in TIR for specific executors when we don't need to. -- 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]
