[Mlir-commits] [mlir] [AMDGPU] add utils for common usage (PR #75097)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Dec 12 10:55:39 PST 2023


================
@@ -43,6 +43,21 @@ void AMDGPUDialect::initialize() {
       >();
 }
 
+bool amdgpu::AMDGPUDialect::isSharedMemoryAddressSpace(Attribute memorySpace) {
+  if (!memorySpace)
+    return false;
+  if (auto intAttr = llvm::dyn_cast<IntegerAttr>(memorySpace))
+    return intAttr.getInt() == AMDGPUDialect::kSharedMemoryAddressSpace;
----------------
erman-gurses wrote:

Thanks forthe comments, based on the that and some discussions, it will be better bring a new PR that includes swizzling implementation as well. 

https://github.com/llvm/llvm-project/pull/75097


More information about the Mlir-commits mailing list