[codegen] shift: added sketch for shift-convolution backpropagation

This commit is contained in:
Philippe Tillet
2019-07-02 16:39:07 -07:00
parent 6cfb575d29
commit 8fc253946c
16 changed files with 231 additions and 107 deletions

View File

@@ -53,8 +53,6 @@ void node::implicit_cast(ir::builder &builder, ir::value *&lhs, ir::value *&rhs,
ir::type *right_ty = rhs->get_type()->get_scalar_ty();
// One operand is pointer
if(left_ty->is_pointer_ty() || right_ty->is_pointer_ty()){
if(left_ty->is_pointer_ty() && right_ty->is_pointer_ty())
throw std::runtime_error("invalid operands");
if(right_ty->is_pointer_ty())
std::swap(lhs, rhs);
is_ptr = true;