Hi Tom,
On 22.02.22 15:43, Tom de Vries wrote:
On 2/17/22 18:24, Tobias Burnus wrote:
--- a/gcc/config/nvptx/t-omp-device
+++ b/gcc/config/nvptx/t-omp-device
@@ -1,4 +1,4 @@
echo kind: gpu > $@
echo arch: nvptx >> $@
- echo isa: sm_30 sm_35 >> $@
+ echo isa: sm_30 sm_35 sm_53 sm_70 sm_75 sm_80 >> $@
I'm not sure I understand how this is used. Is this user-visible? Is
there a libgomp test-case where we can observe a difference?
That's used for OpenMP context selectors like; that way, one can generate,
e.g. one code used with nvptx and one with gcn as with:
#pragma omp declare variant (on_nvptx)
match(construct={target},device={arch(nvptx)})
#pragma omp declare variant (on_gcn)
match(construct={target},device={arch(gcn)})
...
#pragma omp target map(from:v)
v = on ();
which then either calls 'on' or 'on_nvptx' or 'on_gcn'
(from libgomp/testsuite/libgomp.c/target-42.c)
The following testcases use 'arch(nvptx)':
libgomp/testsuite/libgomp.c-c++-common/on_device_arch.h
libgomp/testsuite/libgomp.c/target-42.c
libgomp/testsuite/libgomp.c/usleep.h
libgomp/testsuite/libgomp.fortran/declare-variant-1.f90
For ISA, there is only one run-time test:
libgomp/testsuite/libgomp.c/declare-variant-1.c
but only for x86-64: match (device={isa("avx512f")})
The sm_35 also appears, but only in the compile-time tests:
gcc/testsuite/{c-c++-common,gfortran.dg}/gomp/declare-variant-{9,10}.*
Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht
München, HRB 106955