Skip to content

Commit

Permalink
Merge pull request #649 from hvdijk/do-not-mix
Browse files Browse the repository at this point in the history
[compiler] Do not mix kernels with different sub-group sizes.
  • Loading branch information
hvdijk authored Jan 22, 2025
2 parents 6f0201f + 56fbaf9 commit 8f542b6
Show file tree
Hide file tree
Showing 6 changed files with 196 additions and 175 deletions.
4 changes: 4 additions & 0 deletions modules/compiler/compiler_pipeline/source/pass_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,9 @@ llvm::BasicBlock *createLoop(llvm::BasicBlock *entry, llvm::BasicBlock *exit,

// Set up all of our user PHIs
for (unsigned i = 0, e = currIVs.size(); i != e; i++) {
// For convenience to callers, permit nullptr and skip over it.
if (!currIVs[i]) continue;

auto *const phi = loopIR.CreatePHI(currIVs[i]->getType(), 2);
llvm::cast<llvm::PHINode>(phi)->addIncoming(currIVs[i],
entryIR.GetInsertBlock());
Expand All @@ -542,6 +545,7 @@ llvm::BasicBlock *createLoop(llvm::BasicBlock *entry, llvm::BasicBlock *exit,

// Update all of our PHIs
for (unsigned i = 0, e = currIVs.size(); i != e; i++) {
if (!currIVs[i]) continue;
llvm::cast<llvm::PHINode>(currIVs[i])->addIncoming(nextIVs[i], latch);
}

Expand Down
Loading

0 comments on commit 8f542b6

Please sign in to comment.