From 454f89af9d6f3525b1df5f9ef9c86df58bf2d4d3 Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Tue, 5 Dec 2023 14:26:25 -0800 Subject: [PATCH] Protect kernel launch syntax from clang-format --- test/gpu_common.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/gpu_common.h b/test/gpu_common.h index 3b4aefc25..f34f1b078 100644 --- a/test/gpu_common.h +++ b/test/gpu_common.h @@ -55,7 +55,10 @@ void run_on_gpu(const Kernel& ker, int n, const Input& in, Output& out) { typename std::decay::type>), dim3(Grids), dim3(Blocks), 0, 0, ker, n, d_in, d_out); #else + // Various versions of clang-format incorrectly add spaces to the kernel launch brackets. + // clang-format off run_on_gpu_meta_kernel<<>>(ker, n, d_in, d_out); + // clang-format on #endif // Pre-launch errors. gpuError_t err = gpuGetLastError();