Skip to content

Commit a6f5ca4

Browse files
Remove remaining dregs of tuple_select (oops) (#8329)
* Remove remaining dregs of tuple_select (oops) * Update tuple_select.py
1 parent a4a7531 commit a6f5ca4

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

python_bindings/src/halide/halide_/PyIROperator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void define_operators(py::module &m) {
9090
// We don't want to throw an error here, since the catch(...) would catch it,
9191
// and it would be hard to distinguish from other errors. Just set the string here
9292
// and jump to the error reporter outside the catch.
93-
tuple_error_msg = "tuple_select() may not mix Expr and Tuple for the condition elements.";
93+
tuple_error_msg = "select() on Tuples may not mix Expr and Tuple for the condition elements.";
9494
goto handle_tuple_error;
9595
}
9696

python_bindings/test/correctness/tuple_select.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def test_tuple_select():
7272
# fmt: on
7373
except hl.HalideError as e:
7474
assert (
75-
"select() may not mix Expr and Tuple for the condition elements."
75+
"select() on Tuples may not mix Expr and Tuple for the condition elements."
7676
in str(e)
7777
)
7878
else:

src/IROperator.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,10 +1516,6 @@ Expr select(Expr condition, Expr true_value, Expr false_value) {
15161516
return Select::make(std::move(condition), std::move(true_value), std::move(false_value));
15171517
}
15181518

1519-
Tuple tuple_select(const Tuple &condition, const Tuple &true_value, const Tuple &false_value) {
1520-
return select(condition, true_value, false_value);
1521-
}
1522-
15231519
Tuple select(const Tuple &condition, const Tuple &true_value, const Tuple &false_value) {
15241520
user_assert(condition.size() == true_value.size() && true_value.size() == false_value.size())
15251521
<< "select() on Tuples requires all Tuples to have identical sizes.";
@@ -1530,10 +1526,6 @@ Tuple select(const Tuple &condition, const Tuple &true_value, const Tuple &false
15301526
return result;
15311527
}
15321528

1533-
Tuple tuple_select(const Expr &condition, const Tuple &true_value, const Tuple &false_value) {
1534-
return select(condition, true_value, false_value);
1535-
}
1536-
15371529
Tuple select(const Expr &condition, const Tuple &true_value, const Tuple &false_value) {
15381530
user_assert(true_value.size() == false_value.size())
15391531
<< "select() on Tuples requires all Tuples to have identical sizes.";

0 commit comments

Comments
 (0)