soiferj opened a new pull request #4919: [Relay][Pass] Don't consider constants 
as free vars in MergeComposite
URL: https://github.com/apache/incubator-tvm/pull/4919
 
 
   Based on my post 
[here](https://discuss.tvm.ai/t/rfc-external-codegen-defining-composite-relay-operators/5470/9),
 if a pattern contains a constant, that constant should not be a parameter to 
the function that `MergeComposite` generates. This is because it is assumed 
that the constant is dealt with internally by the external codegen.
   
   A summary of the fix is: create a new `const_list` which is passed around to 
`ExtractPattern` calls. When creating the final function, we call 
`GetFreeVarsWithoutConst` instead of `FreeVars`, as `FreeVars` also returns 
constants.
   
   @comaniac @mbaret would you be able to take a look?

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


With regards,
Apache Git Services

Reply via email to