From 94e21fdd65916d8e2e78d9131687c2a829c55889 Mon Sep 17 00:00:00 2001 From: Brice Videau Date: Fri, 3 Mar 2023 15:22:51 -0600 Subject: [PATCH 1/2] Added cl_loader_info extension to registry. --- extensions/clext.php | 2 + extensions/loader/cl_loader_info.html | 1157 +++++++++++++++++++++++++ extensions/registry.py | 5 + 3 files changed, 1164 insertions(+) create mode 100644 extensions/loader/cl_loader_info.html diff --git a/extensions/clext.php b/extensions/clext.php index 17cdc16d..caae768a 100644 --- a/extensions/clext.php +++ b/extensions/clext.php @@ -123,6 +123,8 @@
  • cl_intel_va_api_media_sharing
  • +
  • cl_loader_info +
  • cl_nv_compiler_options
  • cl_nv_d3d10_sharing diff --git a/extensions/loader/cl_loader_info.html b/extensions/loader/cl_loader_info.html new file mode 100644 index 00000000..ff8aa666 --- /dev/null +++ b/extensions/loader/cl_loader_info.html @@ -0,0 +1,1157 @@ + + + + + + + + +cl_loader_info + + + + + + + + + + +
    +
    +

    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 InfoReturn TypeDescription

    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. +
    3. +

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

      +
    4. +
    +
    +
    +
    +
    +

    Issues

    +
    +
    +
      +
    1. +

      Should this extension be a regular extension?

      +
      +
      +
      +

      RESOLVED: Yes. This is a userfacing extension.

      +
      +
      +
      +
    2. +
    +
    +
    +
    +
    +

    Version History

    +
    + ++++++ + + + + + + + + + + + + + + + + +
    VersionDateAuthorChanges

    1.0.0

    2023-03-01

    Brice Videau

    Initial revision

    +
    +
    +
    + + + + + \ No newline at end of file diff --git a/extensions/registry.py b/extensions/registry.py index b2204e68..c956273a 100644 --- a/extensions/registry.py +++ b/extensions/registry.py @@ -701,4 +701,9 @@ 'flags' : { 'public' }, 'url' : 'extensions/pocl/cl_pocl_content_size.html', }, + 'cl_loader_info' : { + 'number' : 77, + 'flags' : { 'public' }, + 'url' : 'extensions/loader/cl_loader_info.html', + }, } From 3acbff7b0e9bded5934d4b2c1c0e2e4eaeee649f Mon Sep 17 00:00:00 2001 From: Brice Videau Date: Mon, 13 Mar 2023 10:27:54 -0500 Subject: [PATCH 2/2] Rebuilt on clean git tree. --- extensions/loader/cl_loader_info.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/loader/cl_loader_info.html b/extensions/loader/cl_loader_info.html index ff8aa666..1ef46883 100644 --- a/extensions/loader/cl_loader_info.html +++ b/extensions/loader/cl_loader_info.html @@ -857,9 +857,9 @@

    cl_loader_info

    Khronos® OpenCL Working Group
    -version v3.0.13-6-ge120cc4-dirty, -Fri, 03 Mar 2023 21:10:46 +0000 -
    from git branch: cl_icdl commit: e120cc4d245487063697d1526674c2c396d3d93d +version v3.0.13-7-g1a8a3b3, +Mon, 13 Mar 2023 15:26:13 +0000 +
    from git branch: cl_icdl commit: 1a8a3b321d91a4cf07049e2d24e280d0225b5877
    @@ -1147,7 +1147,7 @@

    Version