ibsidorenko commented on code in PR #11228:
URL: https://github.com/apache/tvm/pull/11228#discussion_r872448127
##########
python/tvm/relay/transform/transform.py:
##########
@@ -261,32 +261,39 @@ def LazyGradientInit():
return _ffi_api.LazyGradientInit()
-def FoldConstantExpr(expr, mod):
+def FoldConstantExpr(expr, mod, fold_qnn=False):
"""Fold the constant expressions in a Relay program.
Parameters
----------
expr: Expr
The expression to fold
mod: IRModule
The module the expr lives in (for global calls)
+ fold_qnn: bool
+ Whether to fold constants for QNN operations.
Returns
-------
new_expr: Expr
The expr after Constant Folding
"""
- return _ffi_api.FoldConstantExpr(expr, mod)
+ return _ffi_api.FoldConstantExpr(expr, mod, fold_qnn)
-def FoldConstant():
+def FoldConstant(fold_qnn=False):
"""Fold the constant expressions in a Relay program.
+ Parameters
+ ----------
+ fold_qnn: bool
Review Comment:
Done. Comment was added.
--
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]