[clang] [libclc] [libclc] Enable 64-bit atomics for nvptx64 (PR #213691)
Wenju He via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 3 19:59:19 PDT 2026
================
@@ -159,6 +159,13 @@ class LLVM_LIBRARY_VISIBILITY NVPTXTargetInfo : public TargetInfo {
Opts["cl_khr_global_int32_extended_atomics"] = true;
Opts["cl_khr_local_int32_base_atomics"] = true;
Opts["cl_khr_local_int32_extended_atomics"] = true;
+ // PTX supports 64-bit atomics natively on 64-bit targets even though the
+ // NVIDIA OpenCL runtime does not report these extensions. libclc needs
----------------
wenju-he wrote:
perhaps the comment is outdated, my local run of OpenCL-CTS computeinfo on H100 shows that cl_khr_int64_base_atomics and cl_khr_int64_extended_atomics are supported
```
CL_PLATFORM_VERSION == "OpenCL 3.0 CUDA 12.8.90"
CL_PLATFORM_PROFILE == "FULL_PROFILE"
CL_PLATFORM_NAME == "NVIDIA CUDA"
CL_PLATFORM_VENDOR == "NVIDIA Corporation"
CL_PLATFORM_EXTENSIONS == "cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_icd cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_khr_gl_event cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_nv_kernel_attribute cl_khr_device_uuid cl_khr_pci_bus_info cl_khr_external_semaphore cl_khr_external_memory cl_khr_external_semaphore_opaque_fd cl_khr_external_memory_opaque_fd cl_khr_semaphore"
```
https://github.com/llvm/llvm-project/pull/213691
More information about the cfe-commits
mailing list