EXSWHTEC-307 - Implement tests for printf and __hip_hc_<add/sub/mul>8pk device functions (#274)

Change-Id: I4669d3f0f8cc062e75cd2b0a8aeee51868dd5b09
This commit is contained in:
Nives Vukovic
2023-12-07 16:26:55 +00:00
committato da Rakesh Roy
parent 30f427277b
commit 08a41abaad
19 ha cambiato i file con 884 aggiunte e 20 eliminazioni
+17 -2
Vedi File
@@ -1,5 +1,5 @@
/*
Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#include <hip/hip_runtime.h>
#include <hip_test_context.hh>
__global__ void test_kernel() {
printf("%08d\n", 42);
@@ -32,8 +32,23 @@ __global__ void test_kernel() {
printf("%+08d\n", 42);
printf("%-8s\n", "xyzzy");
printf("% i\n", -42);
printf("% i\n", 42);
printf("%-16.8d\n", 42);
printf("%16.8d\n", 42);
printf("%#o\n", 42);
printf("%#x\n", 42);
printf("%#X\n", 42);
#if HT_AMD
printf("%#F\n", 42.);
#else
printf("%#f\n", 42.);
#endif
printf("%#e\n", 42.);
printf("%#E\n", 42.);
printf("%#g\n", 42.);
printf("%#G\n", 42.);
printf("%#a\n", 42.);
printf("%#A\n", 42.);
}
int main() {