Comments (3)
In this case, multiple branches in metadirective need to be executed concurrently. Therefore, we may need a new modifier in when and default clauses to indicate this intention.
The condition evaluation updates the controlling variable in the loop so that different branches can pick up their own partial workload.
In the following example, joint
means as long as the condition is met, this branch will be executed. The variables in this clause means that the branch will have a private copy of those variables so that it can work on its own share of loop iterations.
#define CPU 0
#define GPU 1
#pragma omp metadirective \
when(joint(start, end), condition(model(N, GPU, &start, &end) == 1) : target teams distribute parallel for) \
when(joint(start, end), condition(model(N, CPU, &start, &end) == 0) : parallel for)
for (i = start; i < end; i++)
... // loop body
from llnl-work-notes.
The description of ODDC model has been added to Overleaf.
from llnl-work-notes.
The implementation of ODDC has been added to GitHub.
https://github.com/ouankou/whiteboard/blob/master/openmp/stencil_oddc_metadirective.c
Based on the testing results on Pascal:
For smaller problem sizes, such as 16 and 32, the overhead and incorrect prediction of CPU/GPU performance make the ODDC model less useful.
For a medium problem size, such as 512, ODDC is as fast as FPM.
For larger problem sizes, such as 2048 and 4096, ODDC is faster than FPM. However, it's still not the optimal performance as expected. The reason is that ODDC can correctly find out whether CPU or GPU is faster, but not how exactly faster it is. However, to split the workload properly, ODDC needs to know the accurate performance data of CPU and GPU. Otherwise, it will miscalculate the balanced working time of CPU and GPU.
According to the breakdown of ODDC time cost, we can see that the bottleneck is CPU computing. The predicted CPU performance from ODDC is higher than the ground truth. Therefore, it assigns more workload to CPU incorrectly. GPU has to stay idle to wait for CPU.
If we manually assign the workload, the ODDC could be even faster. For larger problem sizes, CPU should take 25% workload while GPU takes 75%. In current ODDC model, CPU takes about 40%.
from llnl-work-notes.
Related Issues (20)
- Test Stencil on Pascal HOT 3
- Create a metadirective guiding model named constant performance modeling HOT 1
- Test 2D stencil on Surface HOT 1
- Compare the performance of CPM HOT 1
- Compare FPM performance HOT 2
- Add CPM, FPM and ODDC related works to Overleaf
- Regenerate CPM and FPM testing results on Surface, Pascal and Lassen HOT 1
- Add the improvements to FreeCC since last publication to Overleaf HOT 1
- Provide a new metric to compare the models being evaluated HOT 9
- Add a feature in FreeCC to pass a file from container to the host HOT 1
- Find in ROSE where exactly Clang is called to create its own AST
- Revise ODDC description HOT 1
- Add Clang/LLVM background to FreeCC paper on Overleaf HOT 1
- Add ROSE background to FreeCC paper on Overleaf HOT 1
- Complete the TODO items in the FreeCC paper HOT 1
- Review the pull requests to FreeCC HOT 1
- Read the modeling papers from Dr. Liao and maybe use some of them
- Regenerate the table of detailed results HOT 1
- Rearrange the diagrams of testing results HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llnl-work-notes.