From 72017475130a8f5d3889199b7c76f67ddfbefed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Mestre?= Date: Mon, 23 Oct 2023 19:23:39 +0100 Subject: [PATCH 1/2] [SPEC] Clarify the BinaryType output of urProgramCreateWithBinary --- include/ur_api.h | 3 +++ scripts/core/program.yml | 1 + source/loader/ur_libapi.cpp | 3 +++ source/ur_api.cpp | 3 +++ 4 files changed, 10 insertions(+) diff --git a/include/ur_api.h b/include/ur_api.h index 1504c0b1b2..ef60563bfa 100644 --- a/include/ur_api.h +++ b/include/ur_api.h @@ -4011,6 +4011,9 @@ urProgramCreateWithIL( /// /// @details /// - The application may call this function from simultaneous threads. +/// - Following a successful call to this entry point, `phProgram` will +/// contain a binary of type ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT for +/// `hDevice`. /// /// @remarks /// _Analogues_ diff --git a/scripts/core/program.yml b/scripts/core/program.yml index acab24c3bd..3336966a64 100644 --- a/scripts/core/program.yml +++ b/scripts/core/program.yml @@ -127,6 +127,7 @@ analogue: - "**clCreateProgramWithBinary**" details: - "The application may call this function from simultaneous threads." + - "Following a successful call to this entry point, `phProgram` will contain a binary of type $X_PROGRAM_BINARY_TYPE_COMPILED_OBJECT for `hDevice`." params: - type: $x_context_handle_t name: hContext diff --git a/source/loader/ur_libapi.cpp b/source/loader/ur_libapi.cpp index 374f193902..2c756ca078 100644 --- a/source/loader/ur_libapi.cpp +++ b/source/loader/ur_libapi.cpp @@ -2882,6 +2882,9 @@ ur_result_t UR_APICALL urProgramCreateWithIL( /// /// @details /// - The application may call this function from simultaneous threads. +/// - Following a successful call to this entry point, `phProgram` will +/// contain a binary of type ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT for +/// `hDevice`. /// /// @remarks /// _Analogues_ diff --git a/source/ur_api.cpp b/source/ur_api.cpp index d465a83cfa..31cd2b8d4f 100644 --- a/source/ur_api.cpp +++ b/source/ur_api.cpp @@ -2447,6 +2447,9 @@ ur_result_t UR_APICALL urProgramCreateWithIL( /// /// @details /// - The application may call this function from simultaneous threads. +/// - Following a successful call to this entry point, `phProgram` will +/// contain a binary of type ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT for +/// `hDevice`. /// /// @remarks /// _Analogues_ From 0736754909cc3e8dfd6fc6b4e1c743c6983b3505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Mestre?= Date: Fri, 8 Dec 2023 13:39:00 +0000 Subject: [PATCH 2/2] Address review comments --- include/ur_api.h | 4 ++-- scripts/core/program.yml | 2 +- source/loader/ur_libapi.cpp | 4 ++-- source/ur_api.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/ur_api.h b/include/ur_api.h index ef60563bfa..9b10c8d2b9 100644 --- a/include/ur_api.h +++ b/include/ur_api.h @@ -4012,8 +4012,8 @@ urProgramCreateWithIL( /// @details /// - The application may call this function from simultaneous threads. /// - Following a successful call to this entry point, `phProgram` will -/// contain a binary of type ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT for -/// `hDevice`. +/// contain a binary of type ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT or +/// ::UR_PROGRAM_BINARY_TYPE_LIBRARY for `hDevice`. /// /// @remarks /// _Analogues_ diff --git a/scripts/core/program.yml b/scripts/core/program.yml index 3336966a64..88b652210b 100644 --- a/scripts/core/program.yml +++ b/scripts/core/program.yml @@ -127,7 +127,7 @@ analogue: - "**clCreateProgramWithBinary**" details: - "The application may call this function from simultaneous threads." - - "Following a successful call to this entry point, `phProgram` will contain a binary of type $X_PROGRAM_BINARY_TYPE_COMPILED_OBJECT for `hDevice`." + - "Following a successful call to this entry point, `phProgram` will contain a binary of type $X_PROGRAM_BINARY_TYPE_COMPILED_OBJECT or $X_PROGRAM_BINARY_TYPE_LIBRARY for `hDevice`." params: - type: $x_context_handle_t name: hContext diff --git a/source/loader/ur_libapi.cpp b/source/loader/ur_libapi.cpp index 2c756ca078..13dd8e6f28 100644 --- a/source/loader/ur_libapi.cpp +++ b/source/loader/ur_libapi.cpp @@ -2883,8 +2883,8 @@ ur_result_t UR_APICALL urProgramCreateWithIL( /// @details /// - The application may call this function from simultaneous threads. /// - Following a successful call to this entry point, `phProgram` will -/// contain a binary of type ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT for -/// `hDevice`. +/// contain a binary of type ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT or +/// ::UR_PROGRAM_BINARY_TYPE_LIBRARY for `hDevice`. /// /// @remarks /// _Analogues_ diff --git a/source/ur_api.cpp b/source/ur_api.cpp index 31cd2b8d4f..e22652645f 100644 --- a/source/ur_api.cpp +++ b/source/ur_api.cpp @@ -2448,8 +2448,8 @@ ur_result_t UR_APICALL urProgramCreateWithIL( /// @details /// - The application may call this function from simultaneous threads. /// - Following a successful call to this entry point, `phProgram` will -/// contain a binary of type ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT for -/// `hDevice`. +/// contain a binary of type ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT or +/// ::UR_PROGRAM_BINARY_TYPE_LIBRARY for `hDevice`. /// /// @remarks /// _Analogues_