From ae98985f5599617be94042f4aa3637d10014ce89 Mon Sep 17 00:00:00 2001 From: Marcin Malagowski Date: Mon, 9 Feb 2026 15:10:55 +0200 Subject: [PATCH] Fix Clang compilation errors with VLA initialization Signed-off-by: David Addison --- src/common.cu | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common.cu b/src/common.cu index f7a3f28..c54684e 100644 --- a/src/common.cu +++ b/src/common.cu @@ -1344,8 +1344,10 @@ testResult_t run() { #if NCCL_VERSION_CODE >= NCCL_VERSION(2,28,0) ncclDevComm devComms[nThreads*nGpus]; #endif - int64_t initGpuMem[nThreads] = {0}; - int64_t bufferMemory[nThreads] = {0}; + int64_t initGpuMem[nThreads]; + int64_t bufferMemory[nThreads]; + memset(initGpuMem, 0, sizeof(initGpuMem)); + memset(bufferMemory, 0, sizeof(bufferMemory)); if (!parallel_init) { // Capture the memory used by the GPUs before initializing the NCCL communicators int64_t* initFreeGpuMem = (int64_t*)calloc(nGpus*3, sizeof(int64_t));