Skip to content

[SYCL][PI][OpenCL] The case of PI_DEVICE_INFO_ATOMIC_64  #6210

Closed
@zjin-lcf

Description

@zjin-lcf

Does the case need to include double-precision floating-point check (FP64) in the OpenCL plugin interface ?

case PI_DEVICE_INFO_ATOMIC_64: {
   size_t extSize;
   cl_bool result = clGetDeviceInfo(
       cast<cl_device_id>(device), CL_DEVICE_EXTENSIONS, 0, nullptr, &extSize);
   std::string extStr(extSize, '\0');
   result = clGetDeviceInfo(cast<cl_device_id>(device), CL_DEVICE_EXTENSIONS,
                            extSize, &extStr.front(), nullptr);
   if (extStr.find("cl_khr_int64_base_atomics") == std::string::npos ||
       extStr.find("cl_khr_int64_extended_atomics") == std::string::npos)
     result = false;
   else
     result = true;
   std::memcpy(paramValue, &result, sizeof(cl_bool));
   return PI_SUCCESS;
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions