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
7 changes: 5 additions & 2 deletions unified-runtime/include/unified-runtime/ur_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -2142,8 +2142,11 @@ typedef enum ur_device_info_t {
/// [uint32_t] max number of image objects arguments of a kernel declared
/// with the write_only qualifier
UR_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS = 31,
/// [uint32_t] max number of image objects arguments of a kernel declared
/// with the read_write qualifier
/// [uint32_t][optional-query] max number of image objects arguments of a
/// kernel declared with the read_write qualifier. This query is optional
/// because not all adapters support read-write image arguments. For
/// example, CUDA has separate texture (read-only) and surface
/// (write-only) objects, but no combined read-write image type.
UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS = 32,
/// [size_t] max width of Image2D object
UR_DEVICE_INFO_IMAGE2D_MAX_WIDTH = 33,
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 @@ -265,7 +265,7 @@ etors:
- name: MAX_WRITE_IMAGE_ARGS
desc: "[uint32_t] max number of image objects arguments of a kernel declared with the write_only qualifier"
- name: MAX_READ_WRITE_IMAGE_ARGS
desc: "[uint32_t] max number of image objects arguments of a kernel declared with the read_write qualifier"
desc: "[uint32_t][optional-query] max number of image objects arguments of a kernel declared with the read_write qualifier. This query is optional because not all adapters support read-write image arguments. For example, CUDA has separate texture (read-only) and surface (write-only) objects, but no combined read-write image type."
- name: IMAGE2D_MAX_WIDTH
desc: "[size_t] max width of Image2D object"
- name: IMAGE2D_MAX_HEIGHT
Expand Down
1 change: 1 addition & 0 deletions unified-runtime/source/adapters/native_cpu/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
case UR_DEVICE_INFO_GLOBAL_MEM_FREE:
case UR_DEVICE_INFO_MAX_MEMORY_BANDWIDTH:
case UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP:
case UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS:
case UR_DEVICE_INFO_IP_VERSION:
case UR_DEVICE_INFO_CURRENT_CLOCK_THROTTLE_REASONS:
case UR_DEVICE_INFO_FAN_SPEED:
Expand Down
5 changes: 3 additions & 2 deletions unified-runtime/test/conformance/device/urDeviceGetInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,10 @@ TEST_P(urDeviceGetInfoTest, SuccessMaxWriteImageArgs) {
property_value);
}

// Optional query: CUDA has separate texture (read-only) and surface
// (write-only) objects but no combined read-write image type.
// NativeCPU has no image support.
TEST_P(urDeviceGetInfoTest, SuccessMaxReadWriteImageArgs) {
UUR_KNOWN_FAILURE_ON(uur::CUDA{}, uur::NativeCPU{});

size_t property_size = 0;
const ur_device_info_t property_name =
UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading