Page MenuHomePhabricator

[OpenMP] libomp: implement OpenMP 5.1 nteams-var and teams-thread-limit-var ICVs
ClosedPublic

Authored by AndreyChurbanov on Jan 19 2021, 2:21 PM.

Details

Summary

The change includes OMP_NUM_TEAMS, OMP_TEAMS_THREAD_LIMIT env variables,
omp_set_num_teams, omp_get_max_teams, omp_set_teams_thread_limit,
omp_get_teams_thread_limit routines.

Diff Detail

Event Timeline

AndreyChurbanov requested review of this revision.Jan 19 2021, 2:21 PM

We should replace the OMP_NUM_TEAMS handling in the plugins with this, right? Separate patch or can we do it right away?

hbae added a comment.Jan 22 2021, 7:16 PM

The scope of nteams-var and teams-thread-limit-var is device, so I believe proper handling in plugin should be using extended variable name such as OMP_NUM_TEAMS_DEV[_<device>] as described in OpenMP 5.1 page 75.
I think it is best to leave this up to contributors to each plugins.

1 Each ICV that does not have global scope (see Table 2.3) has a set of device-specific environment
2 variables that extend the variables defined in Table 2.1 with the following syntax:
3 <ENVIRONMENT VARIABLE>_DEV[_<device>]
4 where <ENVIRONMENT VARIABLE> is one of the variables from Table 2.1 and <device> is the
5 device number as specified in the device clause (see Section 2.14).
hbae accepted this revision.Feb 1 2021, 7:42 AM

Looks good to me.

This revision is now accepted and ready to land.Feb 1 2021, 7:42 AM
This revision was landed with ongoing or failed builds.Feb 1 2021, 11:54 AM
This revision was automatically updated to reflect the committed changes.