Closed
Description
So far we are implementing reduction as
init(C)
for rx in reduce_range_x:
for ry in reduce_range_y:
update(C, reduce_value)
This may not be desirable, especially when there is no reset(init) intrinsic available. So alternatively, we can do
for rx in reduce_range_x:
for ry in reduce_range_y:
if likely(rx == 0) and likely(ry == 0):
compute(C, reduce_value)
else:
update(C, reduce_value)
The subsequent loop split process will peel the loop to remove the likely condition when possible.
For now, we can enable this mode, when user did not provide init intrinsic in tensor_intrin
, but provided compute and update intrinsic