2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
+ * testsuite/libgomp.oacc-c++/c++.exp: Specify
+ "-foffload=$offload_target".
+ * testsuite/libgomp.oacc-c/c.exp: Likewise.
+ * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
+ * testsuite/lib/libgomp.exp
+ (check_effective_target_openacc_nvidia_accel_configured): Remove,
+ as (conceptually) merged into
+ check_effective_target_openacc_nvidia_accel_selected. Adjust all
+ users.
+
* plugin/configfrag.ac: Populate and AC_SUBST offload_targets.
* testsuite/libgomp-test-support.exp.in: Adjust.
* testsuite/lib/libgomp.exp: Likewise. Don't populate
} ]
}
-# Return 1 if configured for 'nvptx' offloading.
-
-proc check_effective_target_openacc_nvidia_accel_configured { } {
- global offload_targets
- if { ![string match "*,nvptx*,*" ",$offload_targets,"] } {
- return 0
- }
- # PR libgomp/65099: Currently, we only support offloading in 64-bit
- # configurations.
- return [is-effective-target lp64]
-}
-
# Return 1 if at least one Nvidia GPU is accessible.
proc check_effective_target_openacc_nvidia_accel_present { } {
}
set tagopt "$tagopt -DACC_MEM_SHARED=$acc_mem_shared"
+ # To avoid compilation overhead, and to keep simple '-foffload=[...]'
+ # handling in test cases, by default only build for the offload target
+ # that we're actually going to test.
+ set tagopt "$tagopt -foffload=$offload_target"
+ # Force usage of the corresponding OpenACC device type.
setenv ACC_DEVICE_TYPE $openacc_device_type
# To get better test coverage for device-specific code that is only
/* { dg-do link } */
-/* { dg-excess-errors "lto1, mkoffload and lto-wrapper fatal errors" { target openacc_nvidia_accel_configured } } */
+/* { dg-excess-errors "lto1, mkoffload and lto-wrapper fatal errors" { target openacc_nvidia_accel_selected } } */
int var;
#pragma acc declare create (var)
void __attribute__((noinline, noclone))
-foo () /* { dg-error "function 'foo' has been referenced in offloaded code but hasn't been marked to be included in the offloaded code" "" { target openacc_nvidia_accel_configured } } */
+foo () /* { dg-error "function 'foo' has been referenced in offloaded code but hasn't been marked to be included in the offloaded code" "" { target openacc_nvidia_accel_selected } } */
{
var++;
}
int gangs_min, gangs_max, workers_min, workers_max, vectors_min, vectors_max;
gangs_min = workers_min = vectors_min = INT_MAX;
gangs_max = workers_max = vectors_max = INT_MIN;
-#pragma acc parallel copy (vectors_actual) /* { dg-warning "using vector_length \\(32\\), ignoring 1" "" { target openacc_nvidia_accel_configured } } */ \
+#pragma acc parallel copy (vectors_actual) /* { dg-warning "using vector_length \\(32\\), ignoring 1" "" { target openacc_nvidia_accel_selected } } */ \
vector_length (VECTORS) /* { dg-warning "'vector_length' value must be positive" "" { target c++ } } */
{
/* We're actually executing with vector_length (1), just the GCC nvptx
int gangs_min, gangs_max, workers_min, workers_max, vectors_min, vectors_max;
gangs_min = workers_min = vectors_min = INT_MAX;
gangs_max = workers_max = vectors_max = INT_MIN;
-#pragma acc parallel copy (workers_actual) /* { dg-warning "using num_workers \\(32\\), ignoring 2097152" "" { target openacc_nvidia_accel_configured } } */ \
+#pragma acc parallel copy (workers_actual) /* { dg-warning "using num_workers \\(32\\), ignoring 2097152" "" { target openacc_nvidia_accel_selected } } */ \
num_workers (WORKERS)
{
if (acc_on_device (acc_device_host))
int gangs_min, gangs_max, workers_min, workers_max, vectors_min, vectors_max;
gangs_min = workers_min = vectors_min = INT_MAX;
gangs_max = workers_max = vectors_max = INT_MIN;
-#pragma acc parallel copy (vectors_actual) /* { dg-warning "using vector_length \\(1024\\), ignoring 2097152" "" { target openacc_nvidia_accel_configured } } */ \
+#pragma acc parallel copy (vectors_actual) /* { dg-warning "using vector_length \\(1024\\), ignoring 2097152" "" { target openacc_nvidia_accel_selected } } */ \
vector_length (VECTORS)
{
if (acc_on_device (acc_device_host))
int gangs_min, gangs_max, workers_min, workers_max, vectors_min, vectors_max;
gangs_min = workers_min = vectors_min = INT_MAX;
gangs_max = workers_max = vectors_max = INT_MIN;
-#pragma acc parallel copy (vectors_actual) /* { dg-warning "using vector_length \\(32\\), ignoring runtime setting" "" { target openacc_nvidia_accel_configured } } */ \
+#pragma acc parallel copy (vectors_actual) /* { dg-warning "using vector_length \\(32\\), ignoring runtime setting" "" { target openacc_nvidia_accel_selected } } */ \
vector_length (vectors)
{
if (acc_on_device (acc_device_host))
int gangs_min, gangs_max, workers_min, workers_max, vectors_min, vectors_max;
gangs_min = workers_min = vectors_min = INT_MAX;
gangs_max = workers_max = vectors_max = INT_MIN;
-#pragma acc parallel copy (gangs_actual, workers_actual, vectors_actual) /* { dg-warning "using vector_length \\(32\\), ignoring 11" "" { target openacc_nvidia_accel_configured } } */ \
+#pragma acc parallel copy (gangs_actual, workers_actual, vectors_actual) /* { dg-warning "using vector_length \\(32\\), ignoring 11" "" { target openacc_nvidia_accel_selected } } */ \
num_gangs (gangs) \
num_workers (WORKERS) \
vector_length (VECTORS)
int
main (void)
{
-#pragma acc parallel vector_length (64) num_workers (16) /* { dg-warning "using num_workers \\(15\\), ignoring 16" "" { target openacc_nvidia_accel_configured } } */
+#pragma acc parallel vector_length (64) num_workers (16) /* { dg-warning "using num_workers \\(15\\), ignoring 16" "" { target openacc_nvidia_accel_selected } } */
{
#pragma acc loop worker
for (unsigned int i = 0; i < 32; i++)
}
set tagopt "$tagopt -DACC_MEM_SHARED=$acc_mem_shared"
+ # To avoid compilation overhead, and to keep simple '-foffload=[...]'
+ # handling in test cases, by default only build for the offload target
+ # that we're actually going to test.
+ set tagopt "$tagopt -foffload=$offload_target"
+ # Force usage of the corresponding OpenACC device type.
setenv ACC_DEVICE_TYPE $openacc_device_type
# To get better test coverage for device-specific code that is only
}
set tagopt "$tagopt -DACC_MEM_SHARED=$acc_mem_shared"
+ # To avoid compilation overhead, and to keep simple '-foffload=[...]'
+ # handling in test cases, by default only build for the offload target
+ # that we're actually going to test.
+ set tagopt "$tagopt -foffload=$offload_target"
+ # Force usage of the corresponding OpenACC device type.
setenv ACC_DEVICE_TYPE $openacc_device_type
# For Fortran we're doing torture testing, as Fortran has far more tests