Distribute/Teams/Threads/Offloading

Discuss the OpenMP 4.0 API Specifications released July 2013 (Read Only)

Distribute/Teams/Threads/Offloading

Postby kmcdaniel1985 » Fri Jul 10, 2015 7:08 am

Been reading through spec and examples and feel like I am missing something critical here.

For Off-Loading, how specific does one have to be in the declarations to utilize the max potential of GPU? I want to present a few scenarios and would like to get feedback.

Environment1:
Single CPU with four cores and a Single Discrete graphics card. Does one simply do the following?
#pragma target
#pragma omp parallel for
{work}

Dual Discrete Cards (SLI/CROSSFIRE)
#pragma target
#pragma omp parallel for
{work}

Single CPU with four cores and 4 GPUs with shared memory (think APU):
#pragma target
#pragma om parallel for
{work}

would this distribute the work between the 4 GPUs? Should each of the GPUs be registered as a separate 'device' in the case of an APU? Should OpenMP4.0 handle auto distribution of work? Reason why I ask, is it seems less portable/optimal to have to explicitly specify for each architecture the distribute, teams, and thread directive. By default, wouldn't you want OMP4.0 to try to make full utilization of any device work was off loaded to? I would assume this to be the case, with options there only to do the opposite, limit the full utilization of a accelerator.

In regards to the dual discrete cards in sli, I would assume you would not have to reference them as separate devices due to them being treated as one device. That being said, if they weren't in SLI/Crossfire mode, then you would have to reference them individually as Device 0 and Device 1, correct? Going back to them being in SLI/Crossfire mode, question above still applies. Will OpenMP 4.0 by default attempt to utilize all of the hardware capacity/functionality?

I guess final question is, does OpenMP 4.0 truly handle all those decisions or would this be more on the compiler implementation of OpenMP 4.0 support?

The more I dig into OpenMP 4.0, I feel like the more questions I have. I wish the documentation was a bit more clear. If there was a technical doc that explained the back end mechanisms that I could find, that would be even better.
kmcdaniel1985
 
Posts: 9
Joined: Wed Jun 17, 2015 2:12 pm

Return to OpenMP 4.0 API Specifications

Who is online

Users browsing this forum: No registered users and 1 guest