Skip to content

Commit 7d00610

Browse files
martygrantKornevNikita
authored andcommitted
[UR] Update some naming inconsistencies for UR enums (#17406)
- Renamed `X_SUPPORTED` enums to be consistent with majority of UR enums named `X_SUPPORT` - Renamed some enums to be called `X_SUPPORT` where they return true/false - Renamed `SYCL_PI_CUDA_ENABLE_IMAGE_SUPPORT` to `SYCL_UR_CUDA_ENABLE_IMAGE_SUPPORT`
1 parent 86a974b commit 7d00610

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+271
-251
lines changed

sycl/doc/EnvironmentVariables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ variables in production code.</span>
295295

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

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

sycl/include/sycl/info/device_traits.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ __SYCL_PARAM_TRAITS_SPEC(device, ext_oneapi_max_work_groups_3d, id<3>,
235235
UR_DEVICE_INFO_MAX_WORK_GROUPS_3D)
236236
__SYCL_PARAM_TRAITS_SPEC(device, ext_oneapi_max_global_work_groups, size_t, __SYCL_TRAIT_HANDLED_IN_RT)
237237
__SYCL_PARAM_TRAITS_SPEC(device, ext_oneapi_cuda_cluster_group, bool,
238-
UR_DEVICE_INFO_CLUSTER_LAUNCH_EXP)
238+
UR_DEVICE_INFO_CLUSTER_LAUNCH_SUPPORT_EXP)
239239

240240
#ifdef __SYCL_PARAM_TRAITS_TEMPLATE_SPEC_NEEDS_UNDEF
241241
#undef __SYCL_PARAM_TRAITS_TEMPLATE_SPEC

sycl/source/detail/device_impl.cpp

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ bool device_impl::has(aspect Aspect) const {
507507
ur_bool_t legacy_image_support = false;
508508
bool call_successful =
509509
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
510-
MDevice, UR_DEVICE_INFO_IMAGE_SUPPORTED, sizeof(ur_bool_t),
510+
MDevice, UR_DEVICE_INFO_IMAGE_SUPPORT, sizeof(ur_bool_t),
511511
&legacy_image_support, nullptr) == UR_RESULT_SUCCESS;
512512
return call_successful && legacy_image_support;
513513
}
@@ -587,47 +587,49 @@ bool device_impl::has(aspect Aspect) const {
587587
ur_bool_t support = false;
588588
bool call_successful =
589589
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
590-
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_EXP,
590+
MDevice,
591+
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_SUPPORT_EXP,
591592
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
592593
return call_successful && support;
593594
}
594595
case aspect::ext_oneapi_bindless_sampled_image_fetch_1d: {
595596
ur_bool_t support = false;
596597
bool call_successful =
597598
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
598-
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_EXP,
599+
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_SUPPORT_EXP,
599600
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
600601
return call_successful && support;
601602
}
602603
case aspect::ext_oneapi_bindless_sampled_image_fetch_2d_usm: {
603604
ur_bool_t support = false;
604605
bool call_successful =
605606
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
606-
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_EXP,
607+
MDevice,
608+
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_SUPPORT_EXP,
607609
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
608610
return call_successful && support;
609611
}
610612
case aspect::ext_oneapi_bindless_sampled_image_fetch_2d: {
611613
ur_bool_t support = false;
612614
bool call_successful =
613615
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
614-
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_EXP,
616+
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_SUPPORT_EXP,
615617
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
616618
return call_successful && support;
617619
}
618620
case aspect::ext_oneapi_bindless_sampled_image_fetch_3d: {
619621
ur_bool_t support = false;
620622
bool call_successful =
621623
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
622-
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_EXP,
624+
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_SUPPORT_EXP,
623625
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
624626
return call_successful && support;
625627
}
626628
case aspect::ext_oneapi_bindless_images_gather: {
627629
ur_bool_t support = false;
628630
bool call_successful =
629631
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
630-
MDevice, UR_DEVICE_INFO_BINDLESS_IMAGES_GATHER_EXP,
632+
MDevice, UR_DEVICE_INFO_BINDLESS_IMAGES_GATHER_SUPPORT_EXP,
631633
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
632634
return call_successful && support;
633635
}
@@ -659,23 +661,26 @@ bool device_impl::has(aspect Aspect) const {
659661
ur_bool_t support = false;
660662
bool call_successful =
661663
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
662-
MDevice, UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_EXP,
664+
MDevice,
665+
UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_SUPPORT_EXP,
663666
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
664667
return call_successful && support;
665668
}
666669
case aspect::ext_oneapi_bindless_images_sample_1d_usm: {
667670
ur_bool_t support = false;
668671
bool call_successful =
669672
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
670-
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_EXP,
673+
MDevice,
674+
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_SUPPORT_EXP,
671675
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
672676
return call_successful && support;
673677
}
674678
case aspect::ext_oneapi_bindless_images_sample_2d_usm: {
675679
ur_bool_t support = false;
676680
bool call_successful =
677681
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
678-
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_EXP,
682+
MDevice,
683+
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_SUPPORT_EXP,
679684
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
680685
return call_successful && support;
681686
}

sycl/source/detail/scheduler/commands.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3503,7 +3503,7 @@ ur_result_t ExecCGCommand::enqueueImpQueue() {
35033503
Properties.flags = 0;
35043504
if (Barrier->MEventMode ==
35053505
ext::oneapi::experimental::event_mode_enum::low_power)
3506-
Properties.flags |= UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS;
3506+
Properties.flags |= UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS_SUPPORT;
35073507

35083508
const AdapterPtr &Adapter = MQueue->getAdapter();
35093509
if (MEvent != nullptr)
@@ -3537,7 +3537,7 @@ ur_result_t ExecCGCommand::enqueueImpQueue() {
35373537
Properties.flags = 0;
35383538
if (Barrier->MEventMode ==
35393539
ext::oneapi::experimental::event_mode_enum::low_power)
3540-
Properties.flags |= UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS;
3540+
Properties.flags |= UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS_SUPPORT;
35413541

35423542
const AdapterPtr &Adapter = MQueue->getAdapter();
35433543
if (MEvent != nullptr)

sycl/source/device.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ bool device::ext_oneapi_can_access_peer(const device &peer,
237237
ur_exp_peer_info_t UrAttr = [&]() {
238238
switch (attr) {
239239
case ext::oneapi::peer_access::access_supported:
240-
return UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED;
240+
return UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORT;
241241
case ext::oneapi::peer_access::atomics_supported:
242-
return UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED;
242+
return UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORT;
243243
}
244244
throw sycl::exception(make_error_code(errc::invalid),
245245
"Unrecognized peer access attribute.");

sycl/test-e2e/format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def get_extra_env(sycl_devices):
287287
)
288288

289289
if "cuda:gpu" in sycl_devices:
290-
extra_env.append("UR_CUDA_ENABLE_IMAGE_SUPPORT=1")
290+
extra_env.append("SYCL_UR_CUDA_ENABLE_IMAGE_SUPPORT=1")
291291

292292
return extra_env
293293

sycl/test-e2e/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ def remove_level_zero_suffix(devices):
774774

775775
env["ONEAPI_DEVICE_SELECTOR"] = sycl_device
776776
if sycl_device.startswith("cuda:"):
777-
env["UR_CUDA_ENABLE_IMAGE_SUPPORT"] = "1"
777+
env["SYCL_UR_CUDA_ENABLE_IMAGE_SUPPORT"] = "1"
778778
# When using the ONEAPI_DEVICE_SELECTOR environment variable, sycl-ls
779779
# prints warnings that might derail a user thinking something is wrong
780780
# with their test run. It's just us filtering here, so silence them unless

sycl/unittests/Extensions/EventMode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ inline ur_result_t after_urEnqueueEventsWaitWithBarrierExt(void *pParams) {
2222

2323
assert(*Params.ppProperties != nullptr);
2424
assert((*Params.ppProperties)->flags &
25-
UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS);
25+
UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS_SUPPORT);
2626

2727
++counter_urEnqueueEventsWaitWithBarrierExt;
2828
return UR_RESULT_SUCCESS;

sycl/unittests/Extensions/USMP2P.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ ur_result_t redefinedPeerAccessGetInfo(void *pParams) {
4242
if (*params.ppPropSizeRet)
4343
**params.ppPropSizeRet = sizeof(int32_t);
4444

45-
if (*params.ppropName == UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED) {
45+
if (*params.ppropName == UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORT) {
4646
check = 1;
47-
} else if (*params.ppropName == UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED) {
47+
} else if (*params.ppropName == UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORT) {
4848
check = 2;
4949
}
5050
return UR_RESULT_SUCCESS;

unified-runtime/include/ur_api.h

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)