Name Strings

cl_loader_info

Contact

Please see the Issues list in the Khronos OpenCL-Docs repository:
https://github.com/KhronosGroup/OpenCL-Docs

Contributors

Vincent Danjean, Université Grenoble Alpes
Brice Videau, Argonne National Laboratory

Notice

Copyright (c) 2023 The Khronos Group Inc.

Status

Final Draft

Version

Built On: 2023-03-03
Version: 1.0.0

Dependencies

This extension is written against the OpenCL Specification Version 1.0, Revision 1.

This extension requires OpenCL 1.0.

Overview

This extension describes the cl_loader_info loader extension which defines a simple mechanism through which an OpenCL installable client driver loader (ICD Loader) may report loader specific meta-data such as version or vendor.

New API Functions

cl_int clGetICDLoaderInfoOCLICD(cl_icdl_info  param_name,
                                size_t        param_value_size,
                                void         *param_value,
                                size_t       *param_value_size_ret);

New API Types

typedef cl_uint cl_icdl_info;

New API Enums

Accepted as param_name to the function clGetICDLoaderInfoOCLICD:

#define CL_ICDL_OCL_VERSION 1
#define CL_ICDL_VERSION     2
#define CL_ICDL_NAME        3
#define CL_ICDL_VENDOR      4

Note that for backward compatibility reasons, the enum values do not follow OpenCL enum values attribution.

Modifications to the OpenCL API Specification

Information concerning an OpenCL ICD Loader can be obtained with the function:
cl_int clGetICDLoaderInfoOCLICD(cl_icdl_info  param_name,
                                size_t        param_value_size,
                                void         *param_value,
                                size_t       *param_value_size_ret);
  • param_name is an enumeration constant that identifies the ICD loader information being queried. It can be one of the following values as specified in the ICD Loader Queries table.

  • param_value_size specifies the size in bytes of memory pointed to by param_value. This size in bytes must be ≥ to the size of return type specified in the ICD Loader Queries table.

  • param_value is a pointer to memory location where appropriate values for a given param_name, as specified in the ICD Loader Queries Queries table, will be returned. If param_value is NULL, it is ignored.

  • param_value_size_ret returns the actual size in bytes of data being queried by param_name. If param_value_size_ret is NULL, it is ignored.

The information that can be queried using clGetICDLoaderInfoOCLICD is specified in the ICD Loader Queries table.

Table 1. List of supported param_names by [clGetICDLoaderInfoOCLICD]
ICD Loader Info Return Type Description

CL_ICDL_OCL_VERSION

char[]

OpenCL version supported by the ICD Loader

CL_ICDL_VERSION

char[]

ICD Loader version string

CL_ICDL_NAME

char[]

ICD Loader name string

CL_ICDL_VENDOR

char[]

ICD Loader vendor string

clGetICDLoaderInfoOCLICD returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors.

  • CL_INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is < size of return type as specified in the ICD Loader Queries table, and param_value is not a NULL value.

Conformance tests

  1. The new clGetICDLoaderInfoOCLICD entrypoint must be called and succeed.

  2. The value returned for CL_ICDL_OCL_VERSION must repect the OpenCL version string format.

Issues

  1. Should this extension be a regular extension?

    RESOLVED: Yes. This is a userfacing extension.

Version History

Version Date Author Changes

1.0.0

2023-03-01

Brice Videau

Initial revision