diff --git a/src/Derivative.cpp b/src/Derivative.cpp index c536eeea92ae..08a1c617ca00 100644 --- a/src/Derivative.cpp +++ b/src/Derivative.cpp @@ -740,7 +740,6 @@ void ReverseAccumulationVisitor::propagate_adjoints( update_args, i); } - int count = 0; // Traverse the expressions in reverse order for (auto it = expr_list.rbegin(); it != expr_list.rend(); it++) { if (it->type().is_handle()) { @@ -749,7 +748,6 @@ void ReverseAccumulationVisitor::propagate_adjoints( } // Propagate adjoints it->accept(this); - count++; } } } diff --git a/src/FuseGPUThreadLoops.cpp b/src/FuseGPUThreadLoops.cpp index cd65a32618f5..1f1b9f05d4ec 100644 --- a/src/FuseGPUThreadLoops.cpp +++ b/src/FuseGPUThreadLoops.cpp @@ -1188,7 +1188,7 @@ class ExtractRegisterAllocations : public IRMutator { Stmt rewrap(Stmt body, const string &loop_var) { for (RegisterAllocation &alloc : allocations) { - if ((!loop_var.empty() && ends_with(alloc.loop_var, loop_var)) | + if ((!loop_var.empty() && ends_with(alloc.loop_var, loop_var)) || (loop_var.empty() && alloc.loop_var.empty())) { body = Allocate::make(alloc.name, alloc.type, alloc.memory_type, {alloc.size}, const_true(), body); }