Accelerators with fixed thread-counts will break if nested teams are expected
to have multiple threads each.
libgomp/ChangeLog:
2020-09-29 Andrew Stubbs <ams@codesourcery.com>
* parallel.c (gomp_resolve_num_threads): Ignore nest_var on nvptx
and amdgcn targets.
if (specified == 1)
return 1;
- else if (thr->ts.active_level >= 1 && !icv->nest_var)
+
+ if (thr->ts.active_level >= 1
+ /* Accelerators with fixed thread counts require this to return 1 for
+ nested parallel regions. */
+#if !defined(__AMDGCN__) && !defined(__nvptx__)
+ && !icv->nest_var
+#endif
+ )
return 1;
else if (thr->ts.active_level >= gomp_max_active_levels_var)
return 1;