Skip to content

Commit

Permalink
[Intel] Add getThreadsPerWarpForOperand to DpasEncodingAttr
Browse files Browse the repository at this point in the history
Signed-off-by: Whitney Tsang <[email protected]>
  • Loading branch information
whitneywhtsang committed Dec 26, 2024
1 parent a3c58e3 commit 1133103
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ along the row (resp. col) dimension.
SmallVector<unsigned> getSizePerThreadForOperand(int kWidth, OpIdx opIdx) const;
SmallVector<unsigned> getElemsPerThreadForOperands(ArrayRef<int64_t> shape, Type eltTy, OpIdx opIdx) const;
SmallVector<unsigned> getRepOrderForOperand(OpIdx opIdx) const;
SmallVector<unsigned> getThreadsPerWarpForOperand(int opIdx) const;
unsigned getTotalElemsPerThreadForOperand(ArrayRef<int64_t> shape, Type eltTy, int kWidth, OpIdx opIdx) const;

// Forwarder functions for casting unsigned to OpIdx.
Expand Down
7 changes: 7 additions & 0 deletions third_party/intel/lib/Dialect/TritonIntelGPU/IR/Dialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ DpasEncodingAttr::getRepOrderForOperand(OpIdx opIdx) const {
return getOrderForDotOperand(unsigned(opIdx), rank, /*kMajor*/ true);
}

SmallVector<unsigned>
DpasEncodingAttr::getThreadsPerWarpForOperand(int opIdx) const {
llvm::report_fatal_error(
"getThreadsPerWarpForOperand not implemented for DpasEncodingAttr");
return {};
}

SmallVector<unsigned>
DpasEncodingAttr::getElemsPerThread(ArrayRef<int64_t> shape, Type eltTy) const {
size_t rank = shape.size();
Expand Down

0 comments on commit 1133103

Please sign in to comment.