Skip to content

Commit

Permalink
Add get_sub_group_load_id() to the warpfuncs (#533)
Browse files Browse the repository at this point in the history
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 <pvelesko@pglc.io>
  • Loading branch information
pjaaskel and pvelesko authored Jul 11, 2023
1 parent 1b3444c commit 0404178
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions llvm_passes/HipWarps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0404178

Please sign in to comment.