Skip to content

Commit 7d3c058

Browse files
committed
Merge branch 'main' into review/yang/misalign_access
2 parents 0877049 + 3077fd4 commit 7d3c058

30 files changed

+644
-551
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ set(CMAKE_CXX_STANDARD 17)
2525
set(CMAKE_CXX_STANDARD_REQUIRED YES)
2626

2727
# Build Options
28+
option(UR_BUILD_EXAMPLES "Build example applications." ON)
2829
option(UR_BUILD_TESTS "Build unit tests." ON)
2930
option(UR_BUILD_TOOLS "build ur tools" ON)
3031
option(UR_FORMAT_CPP_STYLE "format code style of C++ sources" OFF)
@@ -258,7 +259,9 @@ install(
258259
EXPORT ${PROJECT_NAME}-targets)
259260

260261
add_subdirectory(source)
261-
add_subdirectory(examples)
262+
if(UR_BUILD_EXAMPLES)
263+
add_subdirectory(examples)
264+
endif()
262265
if(UR_BUILD_TESTS)
263266
add_subdirectory(test)
264267
endif()

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ List of options provided by CMake:
118118

119119
| Name | Description | Values | Default |
120120
| - | - | - | - |
121+
| UR_BUILD_EXAMPLES | Build example applications | ON/OFF | ON |
121122
| UR_BUILD_TESTS | Build the tests | ON/OFF | ON |
122123
| UR_BUILD_TOOLS | Build tools | ON/OFF | ON |
123124
| UR_FORMAT_CPP_STYLE | Format code style | ON/OFF | OFF |

include/ur_api.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5302,7 +5302,9 @@ typedef enum ur_queue_info_t {
53025302
///< The reference count returned should be considered immediately stale.
53035303
///< It is unsuitable for general use in applications. This feature is
53045304
///< provided for identifying memory leaks.
5305-
UR_QUEUE_INFO_SIZE = 5, ///< [uint32_t] The size of the queue
5305+
UR_QUEUE_INFO_SIZE = 5, ///< [uint32_t] The size of the queue on the device. Only a valid query
5306+
///< if the queue was created with the `ON_DEVICE` queue flag, otherwise
5307+
///< `::urQueueGetInfo` will return `::UR_RESULT_ERROR_INVALID_QUEUE`.
53065308
UR_QUEUE_INFO_EMPTY = 6, ///< [::ur_bool_t] return true if the queue was empty at the time of the
53075309
///< query
53085310
/// @cond
@@ -5317,7 +5319,8 @@ typedef uint32_t ur_queue_flags_t;
53175319
typedef enum ur_queue_flag_t {
53185320
UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE = UR_BIT(0), ///< Enable/disable out of order execution
53195321
UR_QUEUE_FLAG_PROFILING_ENABLE = UR_BIT(1), ///< Enable/disable profiling
5320-
UR_QUEUE_FLAG_ON_DEVICE = UR_BIT(2), ///< Is a device queue
5322+
UR_QUEUE_FLAG_ON_DEVICE = UR_BIT(2), ///< Is a device queue. If this is enabled `OUT_OF_ORDER_EXEC_MODE_ENABLE`
5323+
///< must also be enabled.
53215324
UR_QUEUE_FLAG_ON_DEVICE_DEFAULT = UR_BIT(3), ///< Is the default queue for a device
53225325
UR_QUEUE_FLAG_DISCARD_EVENTS = UR_BIT(4), ///< Events will be discarded
53235326
UR_QUEUE_FLAG_PRIORITY_LOW = UR_BIT(5), ///< Low priority queue
@@ -5362,7 +5365,7 @@ typedef enum ur_queue_flag_t {
53625365
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
53635366
/// + `propSize != 0 && pPropValue == NULL`
53645367
/// + `pPropValue == NULL && pPropSizeRet == NULL`
5365-
/// - ::UR_RESULT_ERROR_INVALID_QUEUE
5368+
/// - ::UR_RESULT_ERROR_INVALID_QUEUE - "If `hQueue` isn't a valid queue handle or if `propName` isn't supported by `hQueue`."
53665369
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
53675370
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
53685371
UR_APIEXPORT ur_result_t UR_APICALL

scripts/core/queue.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ etors:
3232
The reference count returned should be considered immediately stale.
3333
It is unsuitable for general use in applications. This feature is provided for identifying memory leaks.
3434
- name: SIZE
35-
desc: "[uint32_t] The size of the queue"
35+
desc: |
36+
[uint32_t] The size of the queue on the device. Only a valid query
37+
if the queue was created with the `ON_DEVICE` queue flag, otherwise
38+
`$xQueueGetInfo` will return `$X_RESULT_ERROR_INVALID_QUEUE`.
3639
- name: EMPTY
3740
desc: "[$x_bool_t] return true if the queue was empty at the time of the query"
3841
--- #--------------------------------------------------------------------------
@@ -49,7 +52,7 @@ etors:
4952
desc: "Enable/disable profiling"
5053
- name: ON_DEVICE
5154
value: "$X_BIT(2)"
52-
desc: "Is a device queue"
55+
desc: "Is a device queue. If this is enabled `OUT_OF_ORDER_EXEC_MODE_ENABLE` must also be enabled."
5356
- name: ON_DEVICE_DEFAULT
5457
value: "$X_BIT(3)"
5558
desc: "Is the default queue for a device"
@@ -108,6 +111,7 @@ returns:
108111
- "`propSize != 0 && pPropValue == NULL`"
109112
- "`pPropValue == NULL && pPropSizeRet == NULL`"
110113
- $X_RESULT_ERROR_INVALID_QUEUE
114+
- "If `hQueue` isn't a valid queue handle or if `propName` isn't supported by `hQueue`."
111115
- $X_RESULT_ERROR_OUT_OF_HOST_MEMORY
112116
- $X_RESULT_ERROR_OUT_OF_RESOURCES
113117
--- #--------------------------------------------------------------------------

source/adapters/cuda/device.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -569,10 +569,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
569569
ur_queue_flag_t(UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE |
570570
UR_QUEUE_FLAG_PROFILING_ENABLE));
571571
case UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES: {
572-
// The mandated minimum capability:
573-
ur_queue_flags_t Capability = UR_QUEUE_FLAG_PROFILING_ENABLE |
574-
UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE;
575-
return ReturnValue(Capability);
572+
return ReturnValue(0);
576573
}
577574
case UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES: {
578575
// The mandated minimum capability:

0 commit comments

Comments
 (0)