Re: [PATCH v3 03/12] libgomp: runtime support for target_device selector

2024-09-21 Thread Tobias Burnus
On Sunday, September 22, 2024, Sandra Loosemore wrote: > […] I think the predicate of the more general case for > > target_device={device_num (NUM), kind(KIND), arch(ARCH), isa(ISA)} > > can be expressed (using GCC statement expression syntax) as > > ({ >int matches; >#pragma omp target de

Re: [PATCH v3 03/12] libgomp: runtime support for target_device selector

2024-09-21 Thread Sandra Loosemore
On 9/9/24 04:46, Tobias Burnus wrote: I wonder whether we should do something like the following. [The following is a mix between compile code and generated code, for illustrative purpose.] Inside the compiler do: #ifndef ACCEL_COMPILER intr = 0; if (targetm.omp.device_kind_arch_isa != NULL

Re: [PATCH v3 03/12] libgomp: runtime support for target_device selector

2024-09-09 Thread Tobias Burnus
Hi all, Jakub Jelinek wrote: On Sat, Jul 20, 2024 at 02:42:22PM -0600, Sandra Loosemore wrote: This patch implements the libgomp runtime support for the dynamic target_device selector via the GOMP_evaluate_target_device function. […] Now for kind, isa and arch traits in the target_device set

Re: [PATCH v3 03/12] libgomp: runtime support for target_device selector

2024-08-14 Thread Jakub Jelinek
On Wed, Aug 14, 2024 at 12:25:23PM +0200, Jakub Jelinek wrote: > Now, at least in 5.2 I don't see a restriction that target_device trait > can't be used inside of selectors in a target region. > IMHO that is a bug in the standard. E.g. it says that > "The expression of a device_num trait must eval

Re: [PATCH v3 03/12] libgomp: runtime support for target_device selector

2024-08-14 Thread Jakub Jelinek
On Sat, Jul 20, 2024 at 02:42:22PM -0600, Sandra Loosemore wrote: > This patch implements the libgomp runtime support for the dynamic > target_device selector via the GOMP_evaluate_target_device function. For kind, isa and arch traits in the device sets we decide based on compiler flags and overri

[PATCH v3 03/12] libgomp: runtime support for target_device selector

2024-07-20 Thread Sandra Loosemore
This patch implements the libgomp runtime support for the dynamic target_device selector via the GOMP_evaluate_target_device function. include/ChangeLog * cuda/cuda.h (CUdevice_attribute): Add definitions for CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR and CU_DEVICE_ATTRIB