Skip to content

[UR] Update some naming inconsistencies for UR enums #17406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2025
Merged
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
2 changes: 1 addition & 1 deletion sycl/doc/EnvironmentVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ variables in production code.</span>

| Environment variable | Values | Description |
| -------------------- | ------ | ----------- |
| `SYCL_PI_CUDA_ENABLE_IMAGE_SUPPORT` (experimental) | Any(\*) | Enable support of images. This option is experimental since the image support is not fully implemented. |
| `SYCL_UR_CUDA_ENABLE_IMAGE_SUPPORT` (experimental) | Any(\*) | Enable support of images. This option is experimental since the image support is not fully implemented. |

`(*) Note: Any means this environment variable is effective when set to any non-null value.`

Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/info/device_traits.def
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ __SYCL_PARAM_TRAITS_SPEC(device, ext_oneapi_max_work_groups_3d, id<3>,
UR_DEVICE_INFO_MAX_WORK_GROUPS_3D)
__SYCL_PARAM_TRAITS_SPEC(device, ext_oneapi_max_global_work_groups, size_t, __SYCL_TRAIT_HANDLED_IN_RT)
__SYCL_PARAM_TRAITS_SPEC(device, ext_oneapi_cuda_cluster_group, bool,
UR_DEVICE_INFO_CLUSTER_LAUNCH_EXP)
UR_DEVICE_INFO_CLUSTER_LAUNCH_SUPPORT_EXP)

#ifdef __SYCL_PARAM_TRAITS_TEMPLATE_SPEC_NEEDS_UNDEF
#undef __SYCL_PARAM_TRAITS_TEMPLATE_SPEC
Expand Down
25 changes: 15 additions & 10 deletions sycl/source/detail/device_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ bool device_impl::has(aspect Aspect) const {
ur_bool_t legacy_image_support = false;
bool call_successful =
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
MDevice, UR_DEVICE_INFO_IMAGE_SUPPORTED, sizeof(ur_bool_t),
MDevice, UR_DEVICE_INFO_IMAGE_SUPPORT, sizeof(ur_bool_t),
&legacy_image_support, nullptr) == UR_RESULT_SUCCESS;
return call_successful && legacy_image_support;
}
Expand Down Expand Up @@ -588,47 +588,49 @@ bool device_impl::has(aspect Aspect) const {
ur_bool_t support = false;
bool call_successful =
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_EXP,
MDevice,
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_SUPPORT_EXP,
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
return call_successful && support;
}
case aspect::ext_oneapi_bindless_sampled_image_fetch_1d: {
ur_bool_t support = false;
bool call_successful =
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_EXP,
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_SUPPORT_EXP,
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
return call_successful && support;
}
case aspect::ext_oneapi_bindless_sampled_image_fetch_2d_usm: {
ur_bool_t support = false;
bool call_successful =
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_EXP,
MDevice,
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_SUPPORT_EXP,
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
return call_successful && support;
}
case aspect::ext_oneapi_bindless_sampled_image_fetch_2d: {
ur_bool_t support = false;
bool call_successful =
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_EXP,
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_SUPPORT_EXP,
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
return call_successful && support;
}
case aspect::ext_oneapi_bindless_sampled_image_fetch_3d: {
ur_bool_t support = false;
bool call_successful =
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_EXP,
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_SUPPORT_EXP,
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
return call_successful && support;
}
case aspect::ext_oneapi_bindless_images_gather: {
ur_bool_t support = false;
bool call_successful =
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
MDevice, UR_DEVICE_INFO_BINDLESS_IMAGES_GATHER_EXP,
MDevice, UR_DEVICE_INFO_BINDLESS_IMAGES_GATHER_SUPPORT_EXP,
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
return call_successful && support;
}
Expand Down Expand Up @@ -660,23 +662,26 @@ bool device_impl::has(aspect Aspect) const {
ur_bool_t support = false;
bool call_successful =
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
MDevice, UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_EXP,
MDevice,
UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_SUPPORT_EXP,
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
return call_successful && support;
}
case aspect::ext_oneapi_bindless_images_sample_1d_usm: {
ur_bool_t support = false;
bool call_successful =
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_EXP,
MDevice,
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_SUPPORT_EXP,
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
return call_successful && support;
}
case aspect::ext_oneapi_bindless_images_sample_2d_usm: {
ur_bool_t support = false;
bool call_successful =
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_EXP,
MDevice,
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_SUPPORT_EXP,
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
return call_successful && support;
}
Expand Down
4 changes: 2 additions & 2 deletions sycl/source/detail/scheduler/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3529,7 +3529,7 @@ ur_result_t ExecCGCommand::enqueueImpQueue() {
Properties.flags = 0;
if (Barrier->MEventMode ==
ext::oneapi::experimental::event_mode_enum::low_power)
Properties.flags |= UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS;
Properties.flags |= UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS_SUPPORT;

const AdapterPtr &Adapter = MQueue->getAdapter();
if (MEvent != nullptr)
Expand Down Expand Up @@ -3563,7 +3563,7 @@ ur_result_t ExecCGCommand::enqueueImpQueue() {
Properties.flags = 0;
if (Barrier->MEventMode ==
ext::oneapi::experimental::event_mode_enum::low_power)
Properties.flags |= UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS;
Properties.flags |= UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS_SUPPORT;

const AdapterPtr &Adapter = MQueue->getAdapter();
if (MEvent != nullptr)
Expand Down
4 changes: 2 additions & 2 deletions sycl/source/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ bool device::ext_oneapi_can_access_peer(const device &peer,
ur_exp_peer_info_t UrAttr = [&]() {
switch (attr) {
case ext::oneapi::peer_access::access_supported:
return UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED;
return UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORT;
case ext::oneapi::peer_access::atomics_supported:
return UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED;
return UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORT;
}
throw sycl::exception(make_error_code(errc::invalid),
"Unrecognized peer access attribute.");
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def get_extra_env(sycl_devices):
)

if "cuda:gpu" in sycl_devices:
extra_env.append("UR_CUDA_ENABLE_IMAGE_SUPPORT=1")
extra_env.append("SYCL_UR_CUDA_ENABLE_IMAGE_SUPPORT=1")

return extra_env

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ def remove_level_zero_suffix(devices):

env["ONEAPI_DEVICE_SELECTOR"] = sycl_device
if sycl_device.startswith("cuda:"):
env["UR_CUDA_ENABLE_IMAGE_SUPPORT"] = "1"
env["SYCL_UR_CUDA_ENABLE_IMAGE_SUPPORT"] = "1"
# When using the ONEAPI_DEVICE_SELECTOR environment variable, sycl-ls
# prints warnings that might derail a user thinking something is wrong
# with their test run. It's just us filtering here, so silence them unless
Expand Down
2 changes: 1 addition & 1 deletion sycl/unittests/Extensions/EventMode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ inline ur_result_t after_urEnqueueEventsWaitWithBarrierExt(void *pParams) {

assert(*Params.ppProperties != nullptr);
assert((*Params.ppProperties)->flags &
UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS);
UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS_SUPPORT);

++counter_urEnqueueEventsWaitWithBarrierExt;
return UR_RESULT_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions sycl/unittests/Extensions/USMP2P.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ ur_result_t redefinedPeerAccessGetInfo(void *pParams) {
if (*params.ppPropSizeRet)
**params.ppPropSizeRet = sizeof(int32_t);

if (*params.ppropName == UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED) {
if (*params.ppropName == UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORT) {
check = 1;
} else if (*params.ppropName == UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED) {
} else if (*params.ppropName == UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORT) {
check = 2;
}
return UR_RESULT_SUCCESS;
Expand Down
38 changes: 19 additions & 19 deletions unified-runtime/include/ur_api.h

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

Loading