2
0

SWDEV-294588 - Enable NV printf DTests

Enable NV printf DTests as many as possible.
Fix the bugs due to behavour difference between
Hip-Rocclr and Cuda.
Add hipLimitPrintfFifoSize.

Change-Id: I3fe6dbc35a7a140a9919df197b7885df83d28049


[ROCm/hip commit: 586165ebc2]
Este cometimento está contido em:
Tao Sang
2021-07-12 22:51:48 -04:00
cometido por Tao Sang
ascendente 2575020a6c
cometimento 71a65de1e4
9 ficheiros modificados com 173 adições e 24 eliminações
+9 -2
Ver ficheiro
@@ -21,8 +21,8 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvidia
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia
* BUILD: %t %s
* TEST: %t
* HIT_END
*/
@@ -31,9 +31,16 @@ THE SOFTWARE.
__global__ void test_kernel() {
printf("%*d\n", 16, 42);
#ifdef __HIP_PLATFORM_AMD__
printf("%.*d\n", 8, 42);
printf("%*.*d\n", -16, 8, 42);
printf("%*.*f %s * %.*s\n", 16, 8, 123.456, "hello", 5, "worldxyz");
#else
// In Cuda, printf doesn't support %.*, %*.*
printf("%.8d\n", 42);
printf("%-16.8d\n", 42);
printf("%16.8f %s * %.5s\n", 123.456, "hello", "worldxyz");
#endif
}
int main(int argc, char **argv) {