Skip to content

Commit

Permalink
[skip ci] revert
Browse files Browse the repository at this point in the history
  • Loading branch information
archibate committed Aug 28, 2020
1 parent daa264b commit 10d85db
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion python/taichi/lang/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ def mul(a, b):
@binary
def mod(a, b):
def expr_python_mod(a, b):
# a % b = (a // b) * b - a
quotient = Expr(ti_core.expr_floordiv(a, b))
multiply = Expr(ti_core.expr_mul(b, quotient.ptr))
return ti_core.expr_sub(a, multiply.ptr)
Expand Down
2 changes: 2 additions & 0 deletions taichi/python/export_lang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,9 +575,11 @@ void export_lang(py::module &m) {
m.def("host_arch", host_arch);

m.def("set_lib_dir", [&](const std::string &dir) {
TI_INFO("set_lib_dir: [{}]", dir);
compiled_lib_dir = dir;
});
m.def("set_tmp_dir", [&](const std::string &dir) {
TI_INFO("set_tmp_dir: [{}]", dir);
runtime_tmp_dir = dir;
});
m.def("get_runtime_dir", get_runtime_dir);
Expand Down
4 changes: 1 addition & 3 deletions taichi/transforms/type_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ class TypeCheck : public IRVisitor {

void visit(IfStmt *if_stmt) {
// TODO: use DataType::u1 when it's supported
TI_ASSERT_INFO(if_stmt->cond->ret_type.data_type == DataType::i32,
"`if` conditions must be of type int32, consider using `if x != 0:` "
"instead of `if x:` for float values.");
TI_ASSERT(if_stmt->cond->ret_type.data_type == DataType::i32);
if (if_stmt->true_statements)
if_stmt->true_statements->accept(this);
if (if_stmt->false_statements) {
Expand Down

0 comments on commit 10d85db

Please sign in to comment.