From 582a9a9772e3d35c3e10d43c61a5f56892636f65 Mon Sep 17 00:00:00 2001 From: Katarzyna Kaczmarska Date: Tue, 20 Jan 2026 11:41:08 +0100 Subject: [PATCH 1/3] [SYCL][Test] Update Printf/int.cpp XFAIL comment with CUDA vprintf bug details - Documented that the bug is in CUDA's vprintf syscall, not in SYCL - Added specific failure conditions for %hhd and %hd length modifiers - Verified via pure CUDA reproduction (nvcc 12.6.85) - Bug remains unfixed in CUDA 12.6 through 13.1 Update 1 (Jan 2026) - Added workaround suggestion: use %d for all int-promoted types Related to #14734 --- sycl/test-e2e/Printf/int.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sycl/test-e2e/Printf/int.cpp b/sycl/test-e2e/Printf/int.cpp index 5a46788251412..e5dceb37c115a 100644 --- a/sycl/test-e2e/Printf/int.cpp +++ b/sycl/test-e2e/Printf/int.cpp @@ -5,7 +5,12 @@ // [1]: https://en.cppreference.com/w/cpp/io/c/fprintf // // UNSUPPORTED: target-amd -// FIXME: The 'short' type gets overflown with sporadic values on CUDA. +// FIXME: CUDA's vprintf implementation has a bug with length modifiers %hhd +// and %hd. These modifiers do not work correctly when: +// - They are not the first argument, OR +// - There are multiple such arguments in the format string +// The issue is in CUDA's vprintf syscall implementation, not in our argument +// packing. Workaround: use %d for all int-promoted types (char, short, int). // XFAIL: cuda // XFAIL-TRACKER: https://github.com/intel/llvm/issues/14734 From d94cb751ec42cf1fa719a389b1b283821e71e764 Mon Sep 17 00:00:00 2001 From: Katarzyna Kaczmarska Date: Fri, 6 Feb 2026 09:09:17 +0100 Subject: [PATCH 2/3] [SYCL][Test] Make Printf int test CUDA-friendly --- sycl/test-e2e/Printf/int.cpp | 342 +++++++++++++++++++++++++---------- 1 file changed, 244 insertions(+), 98 deletions(-) diff --git a/sycl/test-e2e/Printf/int.cpp b/sycl/test-e2e/Printf/int.cpp index e5dceb37c115a..2d826c70150d8 100644 --- a/sycl/test-e2e/Printf/int.cpp +++ b/sycl/test-e2e/Printf/int.cpp @@ -5,14 +5,10 @@ // [1]: https://en.cppreference.com/w/cpp/io/c/fprintf // // UNSUPPORTED: target-amd -// FIXME: CUDA's vprintf implementation has a bug with length modifiers %hhd -// and %hd. These modifiers do not work correctly when: -// - They are not the first argument, OR -// - There are multiple such arguments in the format string -// The issue is in CUDA's vprintf syscall implementation, not in our argument -// packing. Workaround: use %d for all int-promoted types (char, short, int). -// XFAIL: cuda -// XFAIL-TRACKER: https://github.com/intel/llvm/issues/14734 +// CUDA device-side printf does not support the hh length modifier and treats +// %hd as double. When running on the CUDA backend, this test avoids hh/%hd and +// uses %d/%i/%o/%x/%X/%u for int-promoted types (char/short) instead. +// See: https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#formatted-output // RUN: %{build} -o %t.out // RUN: %{run} %t.out | FileCheck %s @@ -28,7 +24,7 @@ using namespace sycl; -void do_d_i_test() { // %d, %i signed integer, decimal representation +void do_d_i_test(bool IsCuda) { // %d, %i signed integer, decimal representation // Some reference values constexpr char CHAR_VALUE = 0x7B; // 123 constexpr short SHORT_VALUE = 0x3039; // 12345 @@ -46,16 +42,34 @@ void do_d_i_test() { // %d, %i signed integer, decimal representation size_t zd = LONG_LONG_VALUE; ptrdiff_t td = LONG_LONG_VALUE; - FORMAT_STRING(fmt1) = "Decimal positive values:\n" - "\tsigned char: %hhd\n" - "\tshort: %hd\n" - "\tint: %d\n" - "\tlong: %ld\n" - "\tlong long: %lld\n" - "\tintmax_t: %jd\n" - "\tsigned size_t: %zd\n" - "\tptrdiff_t: %td\n"; - ext::oneapi::experimental::printf(fmt1, hhd, hd, d, ld, lld, jd, zd, td); + FORMAT_STRING(fmt1_default) = "Decimal positive values:\n" + "\tsigned char: %hhd\n" + "\tshort: %hd\n" + "\tint: %d\n" + "\tlong: %ld\n" + "\tlong long: %lld\n" + "\tintmax_t: %jd\n" + "\tsigned size_t: %zd\n" + "\tptrdiff_t: %td\n"; + FORMAT_STRING(fmt1_cuda) = "Decimal positive values:\n" + "\tsigned char: %d\n" + "\tshort: %d\n" + "\tint: %d\n" + "\tlong: %ld\n" + "\tlong long: %lld\n" + "\tintmax_t: %lld\n" + "\tsigned size_t: %lld\n" + "\tptrdiff_t: %lld\n"; + if (IsCuda) { + ext::oneapi::experimental::printf(fmt1_cuda, static_cast(hhd), + static_cast(hd), d, ld, lld, + static_cast(jd), + static_cast(zd), + static_cast(td)); + } else { + ext::oneapi::experimental::printf(fmt1_default, hhd, hd, d, ld, lld, jd, + zd, td); + } // CHECK: Decimal positive values: // CHECK-NEXT: signed char: 123 // CHECK-NEXT: short: 12345 @@ -66,16 +80,34 @@ void do_d_i_test() { // %d, %i signed integer, decimal representation // CHECK-NEXT: signed size_t: 1234567891011121314 // CHECK-NEXT: ptrdiff_t: 1234567891011121314 - FORMAT_STRING(fmt2) = "Integer positive values:\n" - "\tsigned char: %hhi\n" - "\tshort: %hi\n" - "\tint: %i\n" - "\tlong: %li\n" - "\tlong long: %lli\n" - "\tintmax_t: %ji\n" - "\tsigned size_t: %zi\n" - "\tptrdiff_t: %ti\n"; - ext::oneapi::experimental::printf(fmt2, hhd, hd, d, ld, lld, jd, zd, td); + FORMAT_STRING(fmt2_default) = "Integer positive values:\n" + "\tsigned char: %hhi\n" + "\tshort: %hi\n" + "\tint: %i\n" + "\tlong: %li\n" + "\tlong long: %lli\n" + "\tintmax_t: %ji\n" + "\tsigned size_t: %zi\n" + "\tptrdiff_t: %ti\n"; + FORMAT_STRING(fmt2_cuda) = "Integer positive values:\n" + "\tsigned char: %i\n" + "\tshort: %i\n" + "\tint: %i\n" + "\tlong: %li\n" + "\tlong long: %lli\n" + "\tintmax_t: %lli\n" + "\tsigned size_t: %lli\n" + "\tptrdiff_t: %lli\n"; + if (IsCuda) { + ext::oneapi::experimental::printf(fmt2_cuda, static_cast(hhd), + static_cast(hd), d, ld, lld, + static_cast(jd), + static_cast(zd), + static_cast(td)); + } else { + ext::oneapi::experimental::printf(fmt2_default, hhd, hd, d, ld, lld, jd, + zd, td); + } // CHECK: Integer positive values: // CHECK-NEXT: signed char: 123 // CHECK-NEXT: short: 12345 @@ -95,16 +127,34 @@ void do_d_i_test() { // %d, %i signed integer, decimal representation zd = -zd; td = -td; - FORMAT_STRING(fmt3) = "Decimal negative values:\n" - "\tsigned char: %hhd\n" - "\tshort: %hd\n" - "\tint: %d\n" - "\tlong: %ld\n" - "\tlong long: %lld\n" - "\tintmax_t: %jd\n" - "\tsigned size_t: %zd\n" - "\tptrdiff_t: %td\n"; - ext::oneapi::experimental::printf(fmt3, hhd, hd, d, ld, lld, jd, zd, td); + FORMAT_STRING(fmt3_default) = "Decimal negative values:\n" + "\tsigned char: %hhd\n" + "\tshort: %hd\n" + "\tint: %d\n" + "\tlong: %ld\n" + "\tlong long: %lld\n" + "\tintmax_t: %jd\n" + "\tsigned size_t: %zd\n" + "\tptrdiff_t: %td\n"; + FORMAT_STRING(fmt3_cuda) = "Decimal negative values:\n" + "\tsigned char: %d\n" + "\tshort: %d\n" + "\tint: %d\n" + "\tlong: %ld\n" + "\tlong long: %lld\n" + "\tintmax_t: %lld\n" + "\tsigned size_t: %lld\n" + "\tptrdiff_t: %lld\n"; + if (IsCuda) { + ext::oneapi::experimental::printf(fmt3_cuda, static_cast(hhd), + static_cast(hd), d, ld, lld, + static_cast(jd), + static_cast(zd), + static_cast(td)); + } else { + ext::oneapi::experimental::printf(fmt3_default, hhd, hd, d, ld, lld, jd, + zd, td); + } // CHECK: Decimal negative values: // CHECK-NEXT: signed char: -123 // CHECK-NEXT: short: -12345 @@ -115,16 +165,34 @@ void do_d_i_test() { // %d, %i signed integer, decimal representation // CHECK-NEXT: signed size_t: -1234567891011121314 // CHECK-NEXT: ptrdiff_t: -1234567891011121314 - FORMAT_STRING(fmt4) = "Integer negative values:\n" - "\tsigned char: %hhi\n" - "\tshort: %hi\n" - "\tint: %i\n" - "\tlong: %li\n" - "\tlong long: %lli\n" - "\tintmax_t: %ji\n" - "\tsigned size_t: %zi\n" - "\tptrdiff_t: %ti\n"; - ext::oneapi::experimental::printf(fmt4, hhd, hd, d, ld, lld, jd, zd, td); + FORMAT_STRING(fmt4_default) = "Integer negative values:\n" + "\tsigned char: %hhi\n" + "\tshort: %hi\n" + "\tint: %i\n" + "\tlong: %li\n" + "\tlong long: %lli\n" + "\tintmax_t: %ji\n" + "\tsigned size_t: %zi\n" + "\tptrdiff_t: %ti\n"; + FORMAT_STRING(fmt4_cuda) = "Integer negative values:\n" + "\tsigned char: %i\n" + "\tshort: %i\n" + "\tint: %i\n" + "\tlong: %li\n" + "\tlong long: %lli\n" + "\tintmax_t: %lli\n" + "\tsigned size_t: %lli\n" + "\tptrdiff_t: %lli\n"; + if (IsCuda) { + ext::oneapi::experimental::printf(fmt4_cuda, static_cast(hhd), + static_cast(hd), d, ld, lld, + static_cast(jd), + static_cast(zd), + static_cast(td)); + } else { + ext::oneapi::experimental::printf(fmt4_default, hhd, hd, d, ld, lld, jd, + zd, td); + } // CHECK: Integer negative values: // CHECK-NEXT: signed char: -123 // CHECK-NEXT: short: -12345 @@ -136,7 +204,7 @@ void do_d_i_test() { // %d, %i signed integer, decimal representation // CHECK-NEXT: ptrdiff_t: -1234567891011121314 } -void do_o_test() { // %o unsigned integer, octal representation +void do_o_test(bool IsCuda) { // %o unsigned integer, octal representation // Some reference values constexpr unsigned char CHAR_VALUE = 0123; constexpr unsigned short SHORT_VALUE = 0123456; @@ -153,16 +221,35 @@ void do_o_test() { // %o unsigned integer, octal representation size_t zo = LONG_LONG_VALUE; ptrdiff_t to = LONG_LONG_VALUE; - FORMAT_STRING(fmt1) = "Octal:\n" - "\tunsigned char: %hho\n" - "\tunsigned short: %ho\n" - "\tunsigned int: %o\n" - "\tunsigned long: %lo\n" - "\tunsigned long long: %llo\n" - "\tuintmax_t: %jo\n" - "\tsize_t: %zo\n" - "\tptrdiff_t (unsigned version): %to\n"; - ext::oneapi::experimental::printf(fmt1, hho, ho, o, lo, llo, jo, zo, to); + FORMAT_STRING(fmt1_default) = "Octal:\n" + "\tunsigned char: %hho\n" + "\tunsigned short: %ho\n" + "\tunsigned int: %o\n" + "\tunsigned long: %lo\n" + "\tunsigned long long: %llo\n" + "\tuintmax_t: %jo\n" + "\tsize_t: %zo\n" + "\tptrdiff_t (unsigned version): %to\n"; + FORMAT_STRING(fmt1_cuda) = "Octal:\n" + "\tunsigned char: %o\n" + "\tunsigned short: %o\n" + "\tunsigned int: %o\n" + "\tunsigned long: %lo\n" + "\tunsigned long long: %llo\n" + "\tuintmax_t: %llo\n" + "\tsize_t: %llo\n" + "\tptrdiff_t (unsigned version): %llo\n"; + if (IsCuda) { + ext::oneapi::experimental::printf( + fmt1_cuda, static_cast(hho), + static_cast(ho), o, lo, llo, + static_cast(jo), + static_cast(zo), + static_cast(to)); + } else { + ext::oneapi::experimental::printf(fmt1_default, hho, ho, o, lo, llo, jo, zo, + to); + } // CHECK: Octal: // CHECK-NEXT: unsigned char: 123 // CHECK-NEXT: unsigned short: 123456 @@ -174,7 +261,7 @@ void do_o_test() { // %o unsigned integer, octal representation // CHECK-NEXT: ptrdiff_t (unsigned version): 1234567012345670123456 } -void do_x_test() { // %x, %X unsigned integer, hexadecimal representation +void do_x_test(bool IsCuda) { // %x, %X unsigned integer, hexadecimal representation // Some reference values constexpr unsigned char CHAR_VALUE = 0x12; constexpr unsigned short SHORT_VALUE = 0x1234; @@ -191,16 +278,35 @@ void do_x_test() { // %x, %X unsigned integer, hexadecimal representation size_t zx = LONG_LONG_VALUE; ptrdiff_t tx = LONG_LONG_VALUE; - FORMAT_STRING(fmt1) = "Hexadecimal:\n" - "\tunsigned char: %hhx\n" - "\tunsigned short: %hx\n" - "\tunsigned int: %x\n" - "\tunsigned long: %lx\n" - "\tunsigned long long: %llx\n" - "\tuintmax_t: %jx\n" - "\tsize_t: %zx\n" - "\tptrdiff_t: %tx\n"; - ext::oneapi::experimental::printf(fmt1, hhx, hx, x, lx, llx, jx, zx, tx); + FORMAT_STRING(fmt1_default) = "Hexadecimal:\n" + "\tunsigned char: %hhx\n" + "\tunsigned short: %hx\n" + "\tunsigned int: %x\n" + "\tunsigned long: %lx\n" + "\tunsigned long long: %llx\n" + "\tuintmax_t: %jx\n" + "\tsize_t: %zx\n" + "\tptrdiff_t: %tx\n"; + FORMAT_STRING(fmt1_cuda) = "Hexadecimal:\n" + "\tunsigned char: %x\n" + "\tunsigned short: %x\n" + "\tunsigned int: %x\n" + "\tunsigned long: %lx\n" + "\tunsigned long long: %llx\n" + "\tuintmax_t: %llx\n" + "\tsize_t: %llx\n" + "\tptrdiff_t: %llx\n"; + if (IsCuda) { + ext::oneapi::experimental::printf( + fmt1_cuda, static_cast(hhx), + static_cast(hx), x, lx, llx, + static_cast(jx), + static_cast(zx), + static_cast(tx)); + } else { + ext::oneapi::experimental::printf(fmt1_default, hhx, hx, x, lx, llx, jx, zx, + tx); + } // CHECK: Hexadecimal: // CHECK-NEXT: unsigned char: 12 // CHECK-NEXT: unsigned short: 1234 @@ -211,16 +317,35 @@ void do_x_test() { // %x, %X unsigned integer, hexadecimal representation // CHECK-NEXT: size_t: 123456789abcdef0 // CHECK-NEXT: ptrdiff_t: 123456789abcdef0 - FORMAT_STRING(fmt2) = "Hexadecimal (capital letters):\n" - "\tunsigned char: %hhX\n" - "\tunsigned short: %hX\n" - "\tunsigned int: %X\n" - "\tunsigned long: %lX\n" - "\tunsigned long long: %llX\n" - "\tuintmax_t: %jX\n" - "\tsize_t: %zX\n" - "\tptrdiff_t: %tX\n"; - ext::oneapi::experimental::printf(fmt2, hhx, hx, x, lx, llx, jx, zx, tx); + FORMAT_STRING(fmt2_default) = "Hexadecimal (capital letters):\n" + "\tunsigned char: %hhX\n" + "\tunsigned short: %hX\n" + "\tunsigned int: %X\n" + "\tunsigned long: %lX\n" + "\tunsigned long long: %llX\n" + "\tuintmax_t: %jX\n" + "\tsize_t: %zX\n" + "\tptrdiff_t: %tX\n"; + FORMAT_STRING(fmt2_cuda) = "Hexadecimal (capital letters):\n" + "\tunsigned char: %X\n" + "\tunsigned short: %X\n" + "\tunsigned int: %X\n" + "\tunsigned long: %lX\n" + "\tunsigned long long: %llX\n" + "\tuintmax_t: %llX\n" + "\tsize_t: %llX\n" + "\tptrdiff_t: %llX\n"; + if (IsCuda) { + ext::oneapi::experimental::printf( + fmt2_cuda, static_cast(hhx), + static_cast(hx), x, lx, llx, + static_cast(jx), + static_cast(zx), + static_cast(tx)); + } else { + ext::oneapi::experimental::printf(fmt2_default, hhx, hx, x, lx, llx, jx, zx, + tx); + } // CHECK: Hexadecimal (capital letters): // CHECK-NEXT: unsigned char: 12 // CHECK-NEXT: unsigned short: 1234 @@ -232,7 +357,7 @@ void do_x_test() { // %x, %X unsigned integer, hexadecimal representation // CHECK-NEXT: ptrdiff_t: 123456789ABCDEF0 } -void do_u_test() { // %u unsigned integer, decimal representation +void do_u_test(bool IsCuda) { // %u unsigned integer, decimal representation // Some reference values constexpr char CHAR_VALUE = 0x7B; // 123 constexpr short SHORT_VALUE = 0x3039; // 12345 @@ -250,16 +375,35 @@ void do_u_test() { // %u unsigned integer, decimal representation size_t zu = LONG_LONG_VALUE; ptrdiff_t tu = LONG_LONG_VALUE; - FORMAT_STRING(fmt1) = "Unsigned decimal:\n" - "\tunsigned char: %hhu\n" - "\tunsigned short: %hu\n" - "\tunsigned int: %u\n" - "\tunsigned long: %lu\n" - "\tunsigned long long: %llu\n" - "\tuintmax_t: %ju\n" - "\tsize_t: %zu\n" - "\tptrdiff_t: %tu\n"; - ext::oneapi::experimental::printf(fmt1, hhu, hu, u, lu, llu, ju, zu, tu); + FORMAT_STRING(fmt1_default) = "Unsigned decimal:\n" + "\tunsigned char: %hhu\n" + "\tunsigned short: %hu\n" + "\tunsigned int: %u\n" + "\tunsigned long: %lu\n" + "\tunsigned long long: %llu\n" + "\tuintmax_t: %ju\n" + "\tsize_t: %zu\n" + "\tptrdiff_t: %tu\n"; + FORMAT_STRING(fmt1_cuda) = "Unsigned decimal:\n" + "\tunsigned char: %u\n" + "\tunsigned short: %u\n" + "\tunsigned int: %u\n" + "\tunsigned long: %lu\n" + "\tunsigned long long: %llu\n" + "\tuintmax_t: %llu\n" + "\tsize_t: %llu\n" + "\tptrdiff_t: %llu\n"; + if (IsCuda) { + ext::oneapi::experimental::printf( + fmt1_cuda, static_cast(hhu), + static_cast(hu), u, lu, llu, + static_cast(ju), + static_cast(zu), + static_cast(tu)); + } else { + ext::oneapi::experimental::printf(fmt1_default, hhu, hu, u, lu, llu, ju, zu, + tu); + } // CHECK: Unsigned decimal: // CHECK-NEXT: unsigned char: 123 // CHECK-NEXT: unsigned short: 12345 @@ -276,12 +420,14 @@ class IntTest; int main() { queue q; - q.submit([](handler &cgh) { - cgh.single_task([]() { - do_d_i_test(); - do_o_test(); - do_x_test(); - do_u_test(); + const bool IsCuda = (q.get_backend() == backend::ext_oneapi_cuda); + + q.submit([&](handler &cgh) { + cgh.single_task([=]() { + do_d_i_test(IsCuda); + do_o_test(IsCuda); + do_x_test(IsCuda); + do_u_test(IsCuda); }); }); q.wait(); From 4a2a797b18e1c2cf884927df45ca0c135329dc17 Mon Sep 17 00:00:00 2001 From: Katarzyna Kaczmarska Date: Fri, 6 Feb 2026 09:09:17 +0100 Subject: [PATCH 3/3] [SYCL][Test] Make Printf int test CUDA-friendly --- sycl/test-e2e/Printf/int.cpp | 102 +++++++++++++++++------------------ 1 file changed, 48 insertions(+), 54 deletions(-) diff --git a/sycl/test-e2e/Printf/int.cpp b/sycl/test-e2e/Printf/int.cpp index 2d826c70150d8..2af772e9d903d 100644 --- a/sycl/test-e2e/Printf/int.cpp +++ b/sycl/test-e2e/Printf/int.cpp @@ -8,7 +8,8 @@ // CUDA device-side printf does not support the hh length modifier and treats // %hd as double. When running on the CUDA backend, this test avoids hh/%hd and // uses %d/%i/%o/%x/%X/%u for int-promoted types (char/short) instead. -// See: https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#formatted-output +// See: +// https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#formatted-output // RUN: %{build} -o %t.out // RUN: %{run} %t.out | FileCheck %s @@ -61,14 +62,13 @@ void do_d_i_test(bool IsCuda) { // %d, %i signed integer, decimal representation "\tsigned size_t: %lld\n" "\tptrdiff_t: %lld\n"; if (IsCuda) { - ext::oneapi::experimental::printf(fmt1_cuda, static_cast(hhd), - static_cast(hd), d, ld, lld, - static_cast(jd), - static_cast(zd), - static_cast(td)); + ext::oneapi::experimental::printf( + fmt1_cuda, static_cast(hhd), static_cast(hd), d, ld, lld, + static_cast(jd), static_cast(zd), + static_cast(td)); } else { - ext::oneapi::experimental::printf(fmt1_default, hhd, hd, d, ld, lld, jd, - zd, td); + ext::oneapi::experimental::printf(fmt1_default, hhd, hd, d, ld, lld, jd, zd, + td); } // CHECK: Decimal positive values: // CHECK-NEXT: signed char: 123 @@ -99,14 +99,13 @@ void do_d_i_test(bool IsCuda) { // %d, %i signed integer, decimal representation "\tsigned size_t: %lli\n" "\tptrdiff_t: %lli\n"; if (IsCuda) { - ext::oneapi::experimental::printf(fmt2_cuda, static_cast(hhd), - static_cast(hd), d, ld, lld, - static_cast(jd), - static_cast(zd), - static_cast(td)); + ext::oneapi::experimental::printf( + fmt2_cuda, static_cast(hhd), static_cast(hd), d, ld, lld, + static_cast(jd), static_cast(zd), + static_cast(td)); } else { - ext::oneapi::experimental::printf(fmt2_default, hhd, hd, d, ld, lld, jd, - zd, td); + ext::oneapi::experimental::printf(fmt2_default, hhd, hd, d, ld, lld, jd, zd, + td); } // CHECK: Integer positive values: // CHECK-NEXT: signed char: 123 @@ -146,14 +145,13 @@ void do_d_i_test(bool IsCuda) { // %d, %i signed integer, decimal representation "\tsigned size_t: %lld\n" "\tptrdiff_t: %lld\n"; if (IsCuda) { - ext::oneapi::experimental::printf(fmt3_cuda, static_cast(hhd), - static_cast(hd), d, ld, lld, - static_cast(jd), - static_cast(zd), - static_cast(td)); + ext::oneapi::experimental::printf( + fmt3_cuda, static_cast(hhd), static_cast(hd), d, ld, lld, + static_cast(jd), static_cast(zd), + static_cast(td)); } else { - ext::oneapi::experimental::printf(fmt3_default, hhd, hd, d, ld, lld, jd, - zd, td); + ext::oneapi::experimental::printf(fmt3_default, hhd, hd, d, ld, lld, jd, zd, + td); } // CHECK: Decimal negative values: // CHECK-NEXT: signed char: -123 @@ -184,14 +182,13 @@ void do_d_i_test(bool IsCuda) { // %d, %i signed integer, decimal representation "\tsigned size_t: %lli\n" "\tptrdiff_t: %lli\n"; if (IsCuda) { - ext::oneapi::experimental::printf(fmt4_cuda, static_cast(hhd), - static_cast(hd), d, ld, lld, - static_cast(jd), - static_cast(zd), - static_cast(td)); + ext::oneapi::experimental::printf( + fmt4_cuda, static_cast(hhd), static_cast(hd), d, ld, lld, + static_cast(jd), static_cast(zd), + static_cast(td)); } else { - ext::oneapi::experimental::printf(fmt4_default, hhd, hd, d, ld, lld, jd, - zd, td); + ext::oneapi::experimental::printf(fmt4_default, hhd, hd, d, ld, lld, jd, zd, + td); } // CHECK: Integer negative values: // CHECK-NEXT: signed char: -123 @@ -240,12 +237,11 @@ void do_o_test(bool IsCuda) { // %o unsigned integer, octal representation "\tsize_t: %llo\n" "\tptrdiff_t (unsigned version): %llo\n"; if (IsCuda) { - ext::oneapi::experimental::printf( - fmt1_cuda, static_cast(hho), - static_cast(ho), o, lo, llo, - static_cast(jo), - static_cast(zo), - static_cast(to)); + ext::oneapi::experimental::printf(fmt1_cuda, static_cast(hho), + static_cast(ho), o, lo, llo, + static_cast(jo), + static_cast(zo), + static_cast(to)); } else { ext::oneapi::experimental::printf(fmt1_default, hho, ho, o, lo, llo, jo, zo, to); @@ -261,7 +257,8 @@ void do_o_test(bool IsCuda) { // %o unsigned integer, octal representation // CHECK-NEXT: ptrdiff_t (unsigned version): 1234567012345670123456 } -void do_x_test(bool IsCuda) { // %x, %X unsigned integer, hexadecimal representation +void do_x_test( + bool IsCuda) { // %x, %X unsigned integer, hexadecimal representation // Some reference values constexpr unsigned char CHAR_VALUE = 0x12; constexpr unsigned short SHORT_VALUE = 0x1234; @@ -297,12 +294,11 @@ void do_x_test(bool IsCuda) { // %x, %X unsigned integer, hexadecimal representa "\tsize_t: %llx\n" "\tptrdiff_t: %llx\n"; if (IsCuda) { - ext::oneapi::experimental::printf( - fmt1_cuda, static_cast(hhx), - static_cast(hx), x, lx, llx, - static_cast(jx), - static_cast(zx), - static_cast(tx)); + ext::oneapi::experimental::printf(fmt1_cuda, static_cast(hhx), + static_cast(hx), x, lx, llx, + static_cast(jx), + static_cast(zx), + static_cast(tx)); } else { ext::oneapi::experimental::printf(fmt1_default, hhx, hx, x, lx, llx, jx, zx, tx); @@ -336,12 +332,11 @@ void do_x_test(bool IsCuda) { // %x, %X unsigned integer, hexadecimal representa "\tsize_t: %llX\n" "\tptrdiff_t: %llX\n"; if (IsCuda) { - ext::oneapi::experimental::printf( - fmt2_cuda, static_cast(hhx), - static_cast(hx), x, lx, llx, - static_cast(jx), - static_cast(zx), - static_cast(tx)); + ext::oneapi::experimental::printf(fmt2_cuda, static_cast(hhx), + static_cast(hx), x, lx, llx, + static_cast(jx), + static_cast(zx), + static_cast(tx)); } else { ext::oneapi::experimental::printf(fmt2_default, hhx, hx, x, lx, llx, jx, zx, tx); @@ -394,12 +389,11 @@ void do_u_test(bool IsCuda) { // %u unsigned integer, decimal representation "\tsize_t: %llu\n" "\tptrdiff_t: %llu\n"; if (IsCuda) { - ext::oneapi::experimental::printf( - fmt1_cuda, static_cast(hhu), - static_cast(hu), u, lu, llu, - static_cast(ju), - static_cast(zu), - static_cast(tu)); + ext::oneapi::experimental::printf(fmt1_cuda, static_cast(hhu), + static_cast(hu), u, lu, llu, + static_cast(ju), + static_cast(zu), + static_cast(tu)); } else { ext::oneapi::experimental::printf(fmt1_default, hhu, hu, u, lu, llu, ju, zu, tu);