Skip to content

[mlir] Construct SmallVector with ArrayRef (NFC) #134023

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

Merged

Conversation

kazutakahirata
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Apr 2, 2025

@llvm/pr-subscribers-mlir

Author: Kazu Hirata (kazutakahirata)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/134023.diff

1 Files Affected:

  • (modified) mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp (+1-1)
diff --git a/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp b/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
index 78c242571935c..6868c393f99e6 100644
--- a/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
+++ b/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
@@ -301,7 +301,7 @@ LogicalResult TensorDescType::verify(
 
     // For 1D tensor, pad the shape with an outer unit dimension to allow common
     // validation logic.
-    SmallVector<int64_t> tensorShape(shape.begin(), shape.end());
+    SmallVector<int64_t> tensorShape(shape);
     if (rank == 1)
       tensorShape = {1, tensorShape.back()};
 

@llvmbot
Copy link
Member

llvmbot commented Apr 2, 2025

@llvm/pr-subscribers-mlir-gpu

Author: Kazu Hirata (kazutakahirata)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/134023.diff

1 Files Affected:

  • (modified) mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp (+1-1)
diff --git a/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp b/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
index 78c242571935c..6868c393f99e6 100644
--- a/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
+++ b/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
@@ -301,7 +301,7 @@ LogicalResult TensorDescType::verify(
 
     // For 1D tensor, pad the shape with an outer unit dimension to allow common
     // validation logic.
-    SmallVector<int64_t> tensorShape(shape.begin(), shape.end());
+    SmallVector<int64_t> tensorShape(shape);
     if (rank == 1)
       tensorShape = {1, tensorShape.back()};
 

@kazutakahirata kazutakahirata requested a review from adam-smnk April 2, 2025 03:24
@kazutakahirata kazutakahirata merged commit f1025c0 into llvm:main Apr 2, 2025
14 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_001_range_SmallVector_mlir branch April 2, 2025 05:00
Ankur-0429 pushed a commit to Ankur-0429/llvm-project that referenced this pull request Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants