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]
This commit is contained in:
Tao Sang
2021-07-12 22:51:48 -04:00
committed by Tao Sang
parent 2575020a6c
commit 71a65de1e4
9 changed files with 173 additions and 24 deletions
@@ -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
*/
@@ -35,7 +35,11 @@ __global__ void test_kernel() {
printf("%#X\n", 0x42);
printf("%#08x\n", 0x42);
printf("%#f\n", -123.456);
#ifdef __HIP_PLATFORM_AMD__
printf("%#F\n", 123.456);
#else
printf("%#f\n", 123.456); // In Cuda, printf only supports "%cdiouxXpeEfgGaAs"
#endif
printf("%#e\n", 123.456);
printf("%#E\n", -123.456);
printf("%#g\n", -123.456);