mirror of git://gcc.gnu.org/git/gcc.git
[PR libgomp/65099] nvptx offloading: only 64-bit configurations are currently supported
Backport trunk r225560: PR libgomp/65099 gcc/ * config/nvptx/mkoffload.c (main): Create an offload image only in 64-bit configurations. libgomp/ * plugin/plugin-nvptx.c (nvptx_get_num_devices): Return 0 if not in a 64-bit configuration. * testsuite/libgomp.oacc-c++/c++.exp: Don't attempt nvidia offloading testing if no such device is available. * testsuite/libgomp.oacc-c/c.exp: Likewise. * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise. From-SVN: r225824
This commit is contained in:
parent
8033f58aff
commit
6789218b36
|
|
@ -1,5 +1,13 @@
|
||||||
2015-07-15 Thomas Schwinge <thomas@codesourcery.com>
|
2015-07-15 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
|
|
||||||
|
Backport trunk r225560:
|
||||||
|
|
||||||
|
2015-07-08 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
|
|
||||||
|
PR libgomp/65099
|
||||||
|
* config/nvptx/mkoffload.c (main): Create an offload image only in
|
||||||
|
64-bit configurations.
|
||||||
|
|
||||||
Backport trunk r222583:
|
Backport trunk r222583:
|
||||||
|
|
||||||
2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
|
2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
|
|
|
||||||
|
|
@ -993,6 +993,16 @@ main (int argc, char **argv)
|
||||||
obstack_ptr_grow (&argv_obstack, argv[ix]);
|
obstack_ptr_grow (&argv_obstack, argv[ix]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ptx_cfile_name = make_temp_file (".c");
|
||||||
|
|
||||||
|
out = fopen (ptx_cfile_name, "w");
|
||||||
|
if (!out)
|
||||||
|
fatal_error (input_location, "cannot open '%s'", ptx_cfile_name);
|
||||||
|
|
||||||
|
/* PR libgomp/65099: Currently, we only support offloading in 64-bit
|
||||||
|
configurations. */
|
||||||
|
if (!target_ilp32)
|
||||||
|
{
|
||||||
ptx_name = make_temp_file (".mkoffload");
|
ptx_name = make_temp_file (".mkoffload");
|
||||||
obstack_ptr_grow (&argv_obstack, "-o");
|
obstack_ptr_grow (&argv_obstack, "-o");
|
||||||
obstack_ptr_grow (&argv_obstack, ptx_name);
|
obstack_ptr_grow (&argv_obstack, ptx_name);
|
||||||
|
|
@ -1017,13 +1027,9 @@ main (int argc, char **argv)
|
||||||
if (!in)
|
if (!in)
|
||||||
fatal_error (input_location, "cannot open intermediate ptx file");
|
fatal_error (input_location, "cannot open intermediate ptx file");
|
||||||
|
|
||||||
ptx_cfile_name = make_temp_file (".c");
|
|
||||||
|
|
||||||
out = fopen (ptx_cfile_name, "w");
|
|
||||||
if (!out)
|
|
||||||
fatal_error (input_location, "cannot open '%s'", ptx_cfile_name);
|
|
||||||
|
|
||||||
process (in, out);
|
process (in, out);
|
||||||
|
}
|
||||||
|
|
||||||
fclose (out);
|
fclose (out);
|
||||||
|
|
||||||
compile_native (ptx_cfile_name, outname, collect_gcc);
|
compile_native (ptx_cfile_name, outname, collect_gcc);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,17 @@
|
||||||
2015-07-15 Thomas Schwinge <thomas@codesourcery.com>
|
2015-07-15 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
|
|
||||||
|
Backport trunk r225560:
|
||||||
|
|
||||||
|
2015-07-08 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
|
|
||||||
|
PR libgomp/65099
|
||||||
|
* plugin/plugin-nvptx.c (nvptx_get_num_devices): Return 0 if not
|
||||||
|
in a 64-bit configuration.
|
||||||
|
* testsuite/libgomp.oacc-c++/c++.exp: Don't attempt nvidia
|
||||||
|
offloading testing if no such device is available.
|
||||||
|
* testsuite/libgomp.oacc-c/c.exp: Likewise.
|
||||||
|
* testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
|
||||||
|
|
||||||
Backport trunk r223801:
|
Backport trunk r223801:
|
||||||
|
|
||||||
2015-05-28 Julian Brown <julian@codesourcery.com>
|
2015-05-28 Julian Brown <julian@codesourcery.com>
|
||||||
|
|
|
||||||
|
|
@ -777,6 +777,11 @@ nvptx_get_num_devices (void)
|
||||||
int n;
|
int n;
|
||||||
CUresult r;
|
CUresult r;
|
||||||
|
|
||||||
|
/* PR libgomp/65099: Currently, we only support offloading in 64-bit
|
||||||
|
configurations. */
|
||||||
|
if (sizeof (void *) != 8)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* This function will be called before the plugin has been initialized in
|
/* This function will be called before the plugin has been initialized in
|
||||||
order to enumerate available devices, but CUDA API routines can't be used
|
order to enumerate available devices, but CUDA API routines can't be used
|
||||||
until cuInit has been called. Just call it now (but don't yet do any
|
until cuInit has been called. Just call it now (but don't yet do any
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,12 @@ if { $lang_test_file_found } {
|
||||||
set acc_mem_shared 0
|
set acc_mem_shared 0
|
||||||
}
|
}
|
||||||
nvidia {
|
nvidia {
|
||||||
|
if { ![check_effective_target_openacc_nvidia_accel_present] } {
|
||||||
|
# Don't bother; execution testing is going to FAIL.
|
||||||
|
untested "$subdir $offload_target_openacc offloading"
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
# Copy ptx file (TEMPORARY)
|
# Copy ptx file (TEMPORARY)
|
||||||
remote_download host $srcdir/libgomp.oacc-c-c++-common/subr.ptx
|
remote_download host $srcdir/libgomp.oacc-c-c++-common/subr.ptx
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,12 @@ foreach offload_target_openacc $offload_targets_s_openacc {
|
||||||
set acc_mem_shared 0
|
set acc_mem_shared 0
|
||||||
}
|
}
|
||||||
nvidia {
|
nvidia {
|
||||||
|
if { ![check_effective_target_openacc_nvidia_accel_present] } {
|
||||||
|
# Don't bother; execution testing is going to FAIL.
|
||||||
|
untested "$subdir $offload_target_openacc offloading"
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
# Copy ptx file (TEMPORARY)
|
# Copy ptx file (TEMPORARY)
|
||||||
remote_download host $srcdir/libgomp.oacc-c-c++-common/subr.ptx
|
remote_download host $srcdir/libgomp.oacc-c-c++-common/subr.ptx
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,12 @@ if { $lang_test_file_found } {
|
||||||
set acc_mem_shared 0
|
set acc_mem_shared 0
|
||||||
}
|
}
|
||||||
nvidia {
|
nvidia {
|
||||||
|
if { ![check_effective_target_openacc_nvidia_accel_present] } {
|
||||||
|
# Don't bother; execution testing is going to FAIL.
|
||||||
|
untested "$subdir $offload_target_openacc offloading"
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
set acc_mem_shared 0
|
set acc_mem_shared 0
|
||||||
}
|
}
|
||||||
default {
|
default {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue