From 0404178dfa0cac0910488f3d48e0f9c34479c923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pekka=20J=C3=A4=C3=A4skel=C3=A4inen?= Date: Tue, 11 Jul 2023 17:19:24 +0300 Subject: [PATCH] Add get_sub_group_load_id() to the warpfuncs (#533) This is done to trigger required subgroup size to warp size when there are warp-id-dependent memory accesses in the kernel. This fixes #480 for PoCL-CPU. Co-authored-by: Paulius Velesko --- llvm_passes/HipWarps.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm_passes/HipWarps.cpp b/llvm_passes/HipWarps.cpp index 8426ba571..021547f59 100644 --- a/llvm_passes/HipWarps.cpp +++ b/llvm_passes/HipWarps.cpp @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // LLVM IR pass to handle kernels that are sensitive to warp width. // -// (c) 2022 Pekka Jääskeläinen / Intel +// (c) 2022-2023 Pekka Jääskeläinen / Intel //===----------------------------------------------------------------------===// // // Currently handles kernels that call warp primitives that rely on the @@ -66,7 +66,8 @@ PreservedAnalyses HipWarpsPass::run(Module &Mod, ModuleAnalysisManager &AM) { "_Z23intel_sub_group_shuffleij", "_Z23intel_sub_group_shufflefj", "_Z27intel_sub_group_shuffle_xorij", - "_Z27intel_sub_group_shuffle_xorfj"}; + "_Z27intel_sub_group_shuffle_xorfj", + "_Z22get_sub_group_local_idv"}; bool SensitiveFuncFound = false; for (auto &FuncName : WarpSizeSensitiveFuncNames) {