Skip to content

Commit

Permalink
fix build for gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
MarisaKirisame committed Dec 28, 2018
1 parent 9c7cd9a commit 10185c7
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/relay/pass/to_anf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -286,26 +286,22 @@ class CalcScope : ExprFunctor<void(const Expr&)> {

class Fill : ExprFunctor<Expr(const Expr&, const Var&)> {
public:
static Expr ToANF(const DependentGraph& dg,
const ExprScopeMap& esm,
static Expr ToANF(const ExprScopeMap& esm,
const Module& m,
std::set<GlobalVar>* gv,
const Expr& e) {
Fill fi(dg, esm, m, gv);
Fill fi(esm, m, gv);
return esm.global_scope->ll->Get(fi.VisitExpr(e));
}

private:
const DependentGraph& dg_;
const ExprScopeMap& esm_;
Module mod_;
std::set<GlobalVar>* visited_;

Fill(const DependentGraph& dg,
const ExprScopeMap& esm,
Fill(const ExprScopeMap& esm,
Module mod,
std::set<GlobalVar>* visited) :
dg_(dg),
esm_(esm),
mod_(mod),
visited_(visited) { }
Expand Down Expand Up @@ -408,7 +404,7 @@ Expr ToANFAux(const Expr& e, const Module& m, std::set<GlobalVar>* gv) {
DependentGraph dg = ExprDep::Dependency(e);
std::vector<Expr> topo = Topo::Sort(dg);
ExprScopeMap esm = CalcScope::Calculate(dg, topo);
return Fill::ToANF(dg, esm, m, gv, e);
return Fill::ToANF(esm, m, gv, e);
}

Expr ToANF(const Expr& e, const Module& m, std::set<GlobalVar>* gv) {
Expand Down

0 comments on commit 10185c7

Please sign in to comment.