Skip to content

Commit

Permalink
Kedeng/c++17 (apache#11)
Browse files Browse the repository at this point in the history
* Fix build break in c++17

* Update HalideIR patch to workaround vs 2019 build
  • Loading branch information
KeDengMS authored Aug 13, 2021
1 parent eab844a commit a1241a9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions cmake/patches/halideIR.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
diff --git a/src/arithmetic/Interval.cpp b/src/arithmetic/Interval.cpp
index f25a680..6991c25 100644
--- a/src/arithmetic/Interval.cpp
+++ b/src/arithmetic/Interval.cpp
@@ -116,7 +116,7 @@ Interval Interval::make_intersection(const Interval &a, const Interval &b) {
Expr Interval::pos_inf = Variable::make(Handle(), "pos_inf");
Expr Interval::neg_inf = Variable::make(Handle(), "neg_inf");

-
+#if 0
namespace {
void check(Interval result, Interval expected, int line) {
internal_assert(equal(result.min, expected.min) &&
@@ -198,7 +198,7 @@ void interval_test() {

std::cout << "Interval test passed" << std::endl;
}
-
+#endif

}
}
diff --git a/src/ir/IR.cpp b/src/ir/IR.cpp
index 2c8bfa8..2948e88 100644
--- a/src/ir/IR.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/relay/pass/alter_op_layout.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class TransformMemorizerNode : public Node {
public:
// map from (Expr, src_layout, dst_layout) to transformed Expr
using TransformKey = std::tuple<const Node*, std::string, std::string>;
struct key_hash : public std::unary_function<TransformKey , std::size_t> {
struct key_hash {
std::size_t operator()(const TransformKey& k) const {
return dmlc::HashCombine<std::string>(dmlc::HashCombine<std::string>(
std::hash<const Node*>()(std::get<0>(k)), std::get<1>(k)), (std::get<2>(k)));
Expand Down

0 comments on commit a1241a9

Please sign in to comment.