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

[Question]How to implement the barrier-rTask in generated code #373

Open
zqj2333 opened this issue Jan 12, 2022 · 2 comments
Open

[Question]How to implement the barrier-rTask in generated code #373

zqj2333 opened this issue Jan 12, 2022 · 2 comments

Comments

@zqj2333
Copy link

zqj2333 commented Jan 12, 2022

I have generated code of six models mentioned in paper(RAMMER,Figure 11) with nnfusion in branch "osdi20_artifact",I toke a look at these generated code and found that it seems that there is no code about how to implement the barrier-rTask mentioned in paper,
such as:
"step array",
"each rTask use its first thread to increase step array",
"barrier-rTask use its first N thread to poll on the corresponding elements in the step array".

So I want to know how the barrier-rTask reflected in the generated code.

Thanks for your response!

@xysmlx
Copy link
Contributor

xysmlx commented Jan 13, 2022

Hi, the block-level barrier-rTask can be enabled by set -fblockfusion_level=2. It is implemented for CUDA and ROCm in here and here. Because there is still a TODO task that automatically detect active thread blocks to avoid deadlock, the block-level barrier-rTask is not enabled by default. Therefore, you may need to pay attention to the active thread blocks manually to avoid deadlock. Current -fblockfusion_level=1 implementation leverages global kernel launch for barriers.

@zqj2333
Copy link
Author

zqj2333 commented Jan 14, 2022

Hi,
Thank you for your response! I have understood it!

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

No branches or pull requests

2 participants