mbrookhart opened a new pull request #5693: URL: https://github.com/apache/incubator-tvm/pull/5693
Following up from conversation in #5689, this PR implements these rules for lifting or embedding constants in Partitioned Functions: - Pattern input ExprPattern(relay.const): - Only match constant nodes that contain the same constant value and embed them in the partitioned functions. In this case, the arguments of partitioned functions will be reduced. - Pattern input ConstantPattern: - Only match constant nodes and embed them in the partitioned functions. In this case, the arguments of partitioned functions will be reduced. - Pattern input VarPattern('x'): - Match only the var node with an optional specified name hint. In this case, the arguments of partitioned function is fixed. - Pattern input wildcard: - Match anything. In this case, the arguments of partitioned function is fixed. - Pattern AltPattern: - Match either lhs or rhs. depending on which side matched, recursively apply this matching logic and embed constants appropriately based on the contained pattern. cc @comaniac @mbaret @masahi ---------------------------------------------------------------- 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: us...@infra.apache.org