[clang] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space. (PR #135444)
Alex MacLean via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 15 15:46:37 PDT 2025
================
@@ -982,8 +982,9 @@ void NVPTXDAGToDAGISel::SelectAddrSpaceCast(SDNode *N) {
case ADDRESS_SPACE_SHARED:
Opc = TM.is64Bit() ? NVPTX::cvta_shared_64 : NVPTX::cvta_shared;
break;
- case ADDRESS_SPACE_DSHARED:
- Opc = TM.is64Bit() ? NVPTX::cvta_dshared_64 : NVPTX::cvta_dshared;
+ case ADDRESS_SPACE_SHARED_CLUSTER:
+ Opc = TM.is64Bit() ? NVPTX::cvta_shared_cluster_64
+ : NVPTX::cvta_shared_cluster;
----------------
AlexMaclean wrote:
The check here is for `TM.is64Bit()` not whether shared memory is 64 or 32 bits. What matters for cvta is the size of the generic pointers, which I think is always 64, right? If that is the case we'll never want the 32-bit variant. Even if there is something I'm missing and there are cases where we would want the 32 bit variant, we should still be checking PTX and SM version here and throwing an error as needed.
https://github.com/llvm/llvm-project/pull/135444
More information about the llvm-commits
mailing list