Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions unified-runtime/include/unified-runtime/ur_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -2204,8 +2204,7 @@ typedef enum ur_device_info_t {
/// It is unsuitable for general use in applications. This feature is
/// provided for identifying memory leaks.
UR_DEVICE_INFO_REFERENCE_COUNT = 64,
/// [char[]][optional-query] null-terminated IL version. Optional as not
/// all adapters support IL (e.g., NativeCPU).
/// [char[]][optional-query] null-terminated IL version.
UR_DEVICE_INFO_IL_VERSION = 65,
/// [char[]] null-terminated device name
UR_DEVICE_INFO_NAME = 66,
Expand Down
2 changes: 1 addition & 1 deletion unified-runtime/scripts/core/device.yml
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ etors:
The reference count returned should be considered immediately stale.
It is unsuitable for general use in applications. This feature is provided for identifying memory leaks.
- name: IL_VERSION
desc: "[char[]][optional-query] null-terminated IL version. Optional as not all adapters support IL (e.g., NativeCPU)."
desc: "[char[]][optional-query] null-terminated IL version."
- name: NAME
desc: "[char[]] null-terminated device name"
- name: VENDOR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,16 @@ inline bool stringPropertyIsValid(const char *property,
#define EXPECT_SUCCESS(ACTUAL) EXPECT_EQ_RESULT(UR_RESULT_SUCCESS, ACTUAL)
#endif

// This macro is intended to be used for the first call to a GetInfo query, it
// gracefully handles cases where the adapter doesn't support a query marked
// [optional-query] in the spec by returning early.
// Handles optional queries by skipping the test if the adapter doesn't support them.
#ifndef ASSERT_SUCCESS_OR_OPTIONAL_QUERY
#define ASSERT_SUCCESS_OR_OPTIONAL_QUERY(CALL, QUERY) \
do { \
auto result = CALL; \
if (result != UR_RESULT_SUCCESS) { \
ASSERT_EQ_RESULT(result, UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION); \
ASSERT_TRUE(uur::isQueryOptional(QUERY)); \
return; \
GTEST_SKIP() << "Query " << #QUERY \
<< " is not supported by this adapter"; \
} \
} while (0)
#endif
Expand Down
Loading