This repository has been archived by the owner on Feb 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50a8ed6
commit 2aca005
Showing
8 changed files
with
59 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include "llo/opt/plugin_opt.hpp" | ||
#include "llo/opt/multi_opt.hpp" | ||
|
||
#include "llo/generated/grader.hpp" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "opt/graph_edit.hpp" | ||
|
||
#include "llo/opt/const_merge.hpp" | ||
#include "llo/opt/ops_merge.hpp" | ||
#include "llo/opt/one_prune.hpp" | ||
#include "llo/opt/zero_prune.hpp" | ||
|
||
#include "llo/variable.hpp" | ||
|
||
#ifndef LLO_MULTI_OPT_HPP | ||
#define LLO_MULTI_OPT_HPP | ||
|
||
namespace llo | ||
{ | ||
|
||
ade::TensptrT multi_optimize (ade::TensptrT root, | ||
std::vector<opt::EditFuncT> edits = { | ||
const_merge_edit, | ||
zero_prune_edit, | ||
one_prune_edit, | ||
ops_merge_edit, | ||
}); | ||
|
||
} | ||
|
||
#endif // LLO_MULTI_OPT_HPP |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "llo/opt/multi_opt.hpp" | ||
|
||
#ifdef LLO_MULTI_OPT_HPP | ||
|
||
namespace llo | ||
{ | ||
|
||
ade::TensptrT multi_optimize (ade::TensptrT root, | ||
std::vector<opt::EditFuncT> edits) | ||
{ | ||
return opt::graph_edit(root, | ||
[&edits](ade::Opcode opcode, ade::ArgsT args) | ||
{ | ||
ade::TensptrT out; | ||
for (auto it = edits.begin(), et = edits.end(); | ||
it != et && nullptr == out; ++it) | ||
{ | ||
out = (*it)(opcode, args); | ||
} | ||
return out; | ||
}); | ||
} | ||
|
||
} | ||
|
||
#endif |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters