Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/Conversion/TritonGPUToLLVM/Utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,10 @@ SmallVector<Value> unpackLLVector(Location loc, Value llvmVec,

Value packLLVector(Location loc, ValueRange vals, RewriterBase &rewriter) {
assert(vals.size() > 0);
// Return scalar directly instead of creating a 1-element vector
if (vals.size() == 1) {
return vals[0];
}
auto vecType = vec_ty(vals[0].getType(), vals.size());
auto b = TritonLLVMOpBuilder(loc, rewriter);
Value vec = b.undef(vecType);
Expand Down
Loading