Skip to content

::cuda::device::is_object_from(..., ::cuda::device::address_space::cluster_shared)may be wrong on < SM90 #7243

@bernhardmgruber

Description

@bernhardmgruber

Any address in the shared state space is also part of the cluster shared state space. That is, the cluster shared state space is a superset of the shared state space.

Consider the following program:

#include <cuda/memory>

__global__ void k() {
    __shared__ int i;
    _CCCL_VERIFY(::cuda::device::is_object_from(i, ::cuda::device::address_space::cluster_shared), "");
}

int main() {
    k<<<1, 1>>>();
}

This runs successfully on SM90+, but will fail below SM90, because ::cuda::device::is_object_from(..., ::cuda::device::address_space::cluster_shared) just returns false below SM90. I believe this limits the usability of this function and we should just downgrade the check from cluster_shared to shared below SM90.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions