From 6c89c64ef740b7b9c8b7782bedf62705f9b160fe Mon Sep 17 00:00:00 2001 From: NyanCatTW1 <17372086+NyanCatTW1@users.noreply.github.com> Date: Thu, 9 May 2024 00:01:13 +0800 Subject: [PATCH] vprintf minor fixes --- ptx/lib/zluda_ptx_impl.bc | Bin 232464 -> 232464 bytes ptx/lib/zluda_ptx_impl.cpp | 6 ++++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ptx/lib/zluda_ptx_impl.bc b/ptx/lib/zluda_ptx_impl.bc index a6ddfdaaee3b32a33f7a5a9b50f6e9b4b947b2d5..fec881a63b2759bcad291163e4ff3b21393bbd7b 100644 GIT binary patch delta 27 jcmbO*gKxqNzJ?aYEljr4*l*n7=wM`E*zPio>C9IEke~{i delta 27 jcmbO*gKxqNzJ?aYEljr4*iSSt+)z+p+wL-r>C9IEkckSs diff --git a/ptx/lib/zluda_ptx_impl.cpp b/ptx/lib/zluda_ptx_impl.cpp index 7c6600f..bea4202 100644 --- a/ptx/lib/zluda_ptx_impl.cpp +++ b/ptx/lib/zluda_ptx_impl.cpp @@ -1406,7 +1406,7 @@ extern "C" } // %s uses __ockl_printf_append_string_n - // https://github.com/ROCm/clr/blob/5a715ed160c69a2deebac187a0368900a774f3e8/hipamd/include/hip/amd_detail/hip_assert.h#L73 + // https://github.com/ROCm/ROCm-Device-Libs/blob/rocm-5.7.x/ockl/src/services.cl#L343 if (*s == 's') { s++; @@ -1437,6 +1437,7 @@ extern "C" { s += specifier_with_length; } else { + // Assume the unknown character is a sub-specifier and move on s++; continue; } @@ -1450,7 +1451,8 @@ extern "C" break; } } - return (uint32_t)__ockl_printf_append_args(handle, 0, 0, 0, 0, 0, 0, 0, 0, 1); + __ockl_printf_append_args(handle, 0, 0, 0, 0, 0, 0, 0, 0, 1); + return 1; } int64_t __ockl_mul_hi_i64(int64_t x, int64_t y) __attribute__((device));