diff --git a/stdlib/src/memory/pointer.mojo b/stdlib/src/memory/pointer.mojo index 16a4eadd29..007343d63f 100644 --- a/stdlib/src/memory/pointer.mojo +++ b/stdlib/src/memory/pointer.mojo @@ -19,6 +19,8 @@ from memory import Pointer ``` """ +from sys import is_nvidia_gpu + # ===-----------------------------------------------------------------------===# # AddressSpace @@ -36,13 +38,13 @@ struct _GPUAddressSpace(EqualityComparable): """Generic address space.""" alias GLOBAL = AddressSpace(1) """Global address space.""" - alias CONSTANT = AddressSpace(2) + alias CONSTANT = AddressSpace(2) if is_nvidia_gpu() else AddressSpace(4) """Constant address space.""" alias SHARED = AddressSpace(3) """Shared address space.""" alias PARAM = AddressSpace(4) """Param address space.""" - alias LOCAL = AddressSpace(5) + alias LOCAL = AddressSpace(5) if is_nvidia_gpu() else AddressSpace(3) """Local address space.""" @always_inline("nodebug")