diff --git a/test/smoke-fails/multi-image-long-format/Makefile b/test/smoke-fails/multi-image-long-format/Makefile index 2b649cbb2..022806af6 100644 --- a/test/smoke-fails/multi-image-long-format/Makefile +++ b/test/smoke-fails/multi-image-long-format/Makefile @@ -5,7 +5,7 @@ TESTSRC_MAIN = multi-image.c TESTSRC_AUX = TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX) -OMP_FLAGS = -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa,amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=$(AOMP_GPU) -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx803 +OMP_FLAGS = -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=$(AOMP_GPU) -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx803 CLANG = clang OMP_BIN = $(AOMP)/bin/$(CLANG) CC = $(OMP_BIN) $(VERBOSE) diff --git a/test/smoke-fails/targetid/Makefile b/test/smoke-fails/targetid/Makefile new file mode 100644 index 000000000..1290dc85f --- /dev/null +++ b/test/smoke-fails/targetid/Makefile @@ -0,0 +1,20 @@ +include ../../Makefile.defs + +TESTNAME = targetid +TESTSRC_MAIN = targetid.c +TESTSRC_AUX = +TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX) + +OMP_FLAGS = -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx90a:sramecc-:xnack+ +CLANG = clang +OMP_BIN = $(AOMP)/bin/$(CLANG) +CC = $(OMP_BIN) $(VERBOSE) +#-ccc-print-phases +#"-\#\#\#" + +include ../Makefile.rules +run: $(TESTNAME) + HSA_XNACK=1 ./$(TESTNAME) +# will pass only on machines where xnack+ is configured + + strings $(TESTNAME) |grep -i gfx diff --git a/test/smoke-fails/targetid/targetid.c b/test/smoke-fails/targetid/targetid.c new file mode 100644 index 000000000..e76fe0645 --- /dev/null +++ b/test/smoke-fails/targetid/targetid.c @@ -0,0 +1,20 @@ +#include +#include + +int main(void) { + int isHost = 1; + +#pragma omp target map(tofrom: isHost) + { + isHost = omp_is_initial_device(); + printf("Hello world. %d\n", 100); + for (int i =0; i<5; i++) { + printf("Hello world. iteration %d\n", i); + } + } + + printf("Target region executed on the %s\n", isHost ? "host" : "device"); + + return isHost; +} + diff --git a/test/smoke-fails/targetid_multi_image/Makefile b/test/smoke-fails/targetid_multi_image/Makefile new file mode 100644 index 000000000..a5c833fc1 --- /dev/null +++ b/test/smoke-fails/targetid_multi_image/Makefile @@ -0,0 +1,21 @@ +include ../../Makefile.defs + +TESTNAME = targetid-multi-image +TESTSRC_MAIN = targetid-multi-image.c +TESTSRC_AUX = +TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX) + +OMP_FLAGS = -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx90a:xnack- -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx90a:xnack+ +CLANG = clang +OMP_BIN = $(AOMP)/bin/$(CLANG) +CC = $(OMP_BIN) $(VERBOSE) +#-ccc-print-phases +#"-\#\#\#" + +include ../Makefile.rules +run: $(TESTNAME) + HSA_XNACK=1 ./$(TESTNAME) +# will pass only on machines where xnack+ is configured + + HSA_XNACK=0 ./$(TESTNAME) + strings $(TESTNAME) |grep -i gfx diff --git a/test/smoke-fails/targetid_multi_image/targetid-multi-image.c b/test/smoke-fails/targetid_multi_image/targetid-multi-image.c new file mode 100644 index 000000000..e76fe0645 --- /dev/null +++ b/test/smoke-fails/targetid_multi_image/targetid-multi-image.c @@ -0,0 +1,20 @@ +#include +#include + +int main(void) { + int isHost = 1; + +#pragma omp target map(tofrom: isHost) + { + isHost = omp_is_initial_device(); + printf("Hello world. %d\n", 100); + for (int i =0; i<5; i++) { + printf("Hello world. iteration %d\n", i); + } + } + + printf("Target region executed on the %s\n", isHost ? "host" : "device"); + + return isHost; +} +