-
Couldn't load subscription status.
- Fork 15k
[mlir][AMGPU] Replace use of SmallVector with ArrayRef, NFC #163770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mlir][AMGPU] Replace use of SmallVector with ArrayRef, NFC #163770
Conversation
Signed-off-by: Muzammiluddin Syed <[email protected]>
|
@llvm/pr-subscribers-mlir-gpu @llvm/pr-subscribers-backend-amdgpu Author: Muzammil (Muzammiluddin-Syed-ECE) ChangesImproving choice of class used, from SmallVector to ArrayRef (https://llvm.org/docs/ProgrammersManual.html#llvm-adt-arrayref-h). Leftover from #155951. Full diff: https://github.com/llvm/llvm-project/pull/163770.diff 1 Files Affected:
diff --git a/mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp b/mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
index f405d0cc7aa02..feaf9873c97d6 100644
--- a/mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
+++ b/mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
@@ -757,8 +757,8 @@ struct PackScales final : OpRewritePattern<ScaledMFMAOp> {
offset = numElements - 4l;
}
Type scaleSrcElemType = scaleSrcType.getElementType();
- auto newSrcType = VectorType::get(SmallVector<int64_t>({numElements}),
- scaleSrcElemType);
+ auto newSrcType =
+ VectorType::get(ArrayRef<int64_t>{numElements}, scaleSrcElemType);
Value newScaleSrc =
vector::ShapeCastOp::create(rewriter, loc, newSrcType, scaleSrc);
auto extract = vector::ExtractStridedSliceOp::create(
|
|
@llvm/pr-subscribers-mlir-amdgpu Author: Muzammil (Muzammiluddin-Syed-ECE) ChangesImproving choice of class used, from SmallVector to ArrayRef (https://llvm.org/docs/ProgrammersManual.html#llvm-adt-arrayref-h). Leftover from #155951. Full diff: https://github.com/llvm/llvm-project/pull/163770.diff 1 Files Affected:
diff --git a/mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp b/mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
index f405d0cc7aa02..feaf9873c97d6 100644
--- a/mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
+++ b/mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
@@ -757,8 +757,8 @@ struct PackScales final : OpRewritePattern<ScaledMFMAOp> {
offset = numElements - 4l;
}
Type scaleSrcElemType = scaleSrcType.getElementType();
- auto newSrcType = VectorType::get(SmallVector<int64_t>({numElements}),
- scaleSrcElemType);
+ auto newSrcType =
+ VectorType::get(ArrayRef<int64_t>{numElements}, scaleSrcElemType);
Value newScaleSrc =
vector::ShapeCastOp::create(rewriter, loc, newSrcType, scaleSrc);
auto extract = vector::ExtractStridedSliceOp::create(
|
Signed-off-by: Muzammiluddin Syed <[email protected]>
Signed-off-by: Muzammiluddin Syed <[email protected]>
Signed-off-by: Muzammiluddin Syed <[email protected]>
Improving choice of class used, from SmallVector to ArrayRef (https://llvm.org/docs/ProgrammersManual.html#llvm-adt-arrayref-h). Leftover from #155951.