Skip to content
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

Merged
merged 6 commits into from
Jan 3, 2018

Conversation

libing4752
Copy link
Contributor

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.

Tensor sugar_tensor = tensor;
Stage s = operator[](tensor->op);
if (!(s->op.same_as(tensor->op)))
sugar_tensor = s->op.output(0);
Copy link
Member

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

Copy link
Member

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

Copy link
Contributor Author

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.

@tqchen tqchen merged commit 2335fda into apache:master Jan 3, 2018
tqchen pushed a commit to tqchen/tvm that referenced this pull request Jul 6, 2018
…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
sergei-mironov pushed a commit to sergei-mironov/tvm that referenced this pull request Aug 8, 2018
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants