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

[async] Optimization stage 1 #994

Merged
merged 8 commits into from
May 15, 2020
Merged

Conversation

yuanming-hu
Copy link
Member

@yuanming-hu yuanming-hu requested a review from xumingkuan May 15, 2020 20:34
Copy link
Contributor

@xumingkuan xumingkuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment on lines -121 to +123
irpass::typecheck(new_root.get());
irpass::typecheck(new_root.get(), kernel);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this pass is probably unnecessary...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...since all ret_types are cloned.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this in for now and let's get rid of all kernel parameters and this type check after #988 is done.

@yuanming-hu yuanming-hu merged commit 333c86c into taichi-dev:master May 15, 2020
// We do not fuse serial kernels for now since they can be SNode accessors
bool are_both_serial = task_a->task_type == OffloadedStmt::serial &&
task_b->task_type == OffloadedStmt::serial;
bool same_kernel = task_queue[i].kernel == task_queue[i + 1].kernel;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, thanks to #915, I realized that kernel fusion has some preconditions.. For example, i don't think clear and listgen are easily fusable, because the latter depends on the fact that all threads would observe the result of clear.

While I don't think this change would fuse those kernels, I'd like to confirm that: kernel fusion would only be done if the later kernel doesn't rely on the kernel boundary being a barrier?

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.

4 participants