-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modified schedule_dataflow_rewrite.cc to fix Stale Tensor during Dataflow Rewrite #738 #747
Conversation
Tensor sugar_tensor = tensor; | ||
Stage s = operator[](tensor->op); | ||
if (!(s->op.same_as(tensor->op))) | ||
sugar_tensor = s->op.output(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the sugar tensor’s value index instead of 0 when pass to output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add {} to multiple line if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems very strange to blocked at 'test_topi_reduce.test_reduce_map', the only different between "Always use new tensor in its stage when rewrite for cache read #748" is that , the using of sugar tensor is more rigorous, so my change seems be more similar to the origin code . But #748 has passed the test.
…flow Rewrite apache#738 (apache#747) * modified schedule_dataflow_rewrite.cc to fix losing tensor problem * modified schedule_dataflow_rewrite.cc for lint scan * modified schedule_dataflow_rewrite.cc for lint scan * using tensor's value_index to index output of stage op
…flow Rewrite apache#738 (apache#747) * modified schedule_dataflow_rewrite.cc to fix losing tensor problem * modified schedule_dataflow_rewrite.cc for lint scan * modified schedule_dataflow_rewrite.cc for lint scan * using tensor's value_index to index output of stage op
modified cache_read function to solve the ploblem of Stale Tensor during Dataflow Rewrite #738, mapping the tensor to a new sugar_tensor when find the tensor->op is changed.