This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch unity
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/unity by this push:
new efa6cdcc6b [Unity] Avoid overloaded-virtual warnings (#15382)
efa6cdcc6b is described below
commit efa6cdcc6b755dcf80a55f5662a3183b4c31ab4a
Author: Anirudh Sundar Subramaniam <[email protected]>
AuthorDate: Sat Jul 22 01:26:20 2023 +0530
[Unity] Avoid overloaded-virtual warnings (#15382)
This patch fixes a couple of build warnings `-Woverloaded-virtual` that
come up due to the `VisitExpr_` definitions
---
src/relax/distributed/transform/propagate_sharding.cc | 2 ++
src/relax/transform/remove_purity_checking.cc | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/relax/distributed/transform/propagate_sharding.cc
b/src/relax/distributed/transform/propagate_sharding.cc
index 5f6792c152..676274a6fc 100644
--- a/src/relax/distributed/transform/propagate_sharding.cc
+++ b/src/relax/distributed/transform/propagate_sharding.cc
@@ -325,6 +325,8 @@ class DistributedIRBuilder : public ExprMutator {
}
private:
+ using ExprMutator::VisitExpr_;
+
Expr RewriteInputTensorAndConstant(Expr tensor) {
const auto* sinfo = GetStructInfoAs<TensorStructInfoNode>(tensor);
int ndim = sinfo->ndim;
diff --git a/src/relax/transform/remove_purity_checking.cc
b/src/relax/transform/remove_purity_checking.cc
index a8719c9d90..f190968d9d 100644
--- a/src/relax/transform/remove_purity_checking.cc
+++ b/src/relax/transform/remove_purity_checking.cc
@@ -30,6 +30,8 @@ namespace relax {
class PurityRemover : public ExprMutator {
public:
+ using ExprMutator::VisitExpr_;
+
Function RemovePurity(Function func) {
bool purity = func->is_pure;
auto ret = func;