Skip to content

Commit 4337f0f

Browse files
authored
[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 8eb31d4 commit 4337f0f

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
@@ -508,7 +508,7 @@ bool device_impl::has(aspect Aspect) const {
508508
ur_bool_t legacy_image_support = false;
509509
bool call_successful =
510510
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
511-
MDevice, UR_DEVICE_INFO_IMAGE_SUPPORTED, sizeof(ur_bool_t),
511+
MDevice, UR_DEVICE_INFO_IMAGE_SUPPORT, sizeof(ur_bool_t),
512512
&legacy_image_support, nullptr) == UR_RESULT_SUCCESS;
513513
return call_successful && legacy_image_support;
514514
}
@@ -588,47 +588,49 @@ bool device_impl::has(aspect Aspect) const {
588588
ur_bool_t support = false;
589589
bool call_successful =
590590
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
591-
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_EXP,
591+
MDevice,
592+
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_SUPPORT_EXP,
592593
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
593594
return call_successful && support;
594595
}
595596
case aspect::ext_oneapi_bindless_sampled_image_fetch_1d: {
596597
ur_bool_t support = false;
597598
bool call_successful =
598599
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
599-
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_EXP,
600+
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_SUPPORT_EXP,
600601
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
601602
return call_successful && support;
602603
}
603604
case aspect::ext_oneapi_bindless_sampled_image_fetch_2d_usm: {
604605
ur_bool_t support = false;
605606
bool call_successful =
606607
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
607-
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_EXP,
608+
MDevice,
609+
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_SUPPORT_EXP,
608610
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
609611
return call_successful && support;
610612
}
611613
case aspect::ext_oneapi_bindless_sampled_image_fetch_2d: {
612614
ur_bool_t support = false;
613615
bool call_successful =
614616
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
615-
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_EXP,
617+
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_SUPPORT_EXP,
616618
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
617619
return call_successful && support;
618620
}
619621
case aspect::ext_oneapi_bindless_sampled_image_fetch_3d: {
620622
ur_bool_t support = false;
621623
bool call_successful =
622624
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
623-
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_EXP,
625+
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_SUPPORT_EXP,
624626
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
625627
return call_successful && support;
626628
}
627629
case aspect::ext_oneapi_bindless_images_gather: {
628630
ur_bool_t support = false;
629631
bool call_successful =
630632
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
631-
MDevice, UR_DEVICE_INFO_BINDLESS_IMAGES_GATHER_EXP,
633+
MDevice, UR_DEVICE_INFO_BINDLESS_IMAGES_GATHER_SUPPORT_EXP,
632634
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
633635
return call_successful && support;
634636
}
@@ -660,23 +662,26 @@ bool device_impl::has(aspect Aspect) const {
660662
ur_bool_t support = false;
661663
bool call_successful =
662664
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
663-
MDevice, UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_EXP,
665+
MDevice,
666+
UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_SUPPORT_EXP,
664667
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
665668
return call_successful && support;
666669
}
667670
case aspect::ext_oneapi_bindless_images_sample_1d_usm: {
668671
ur_bool_t support = false;
669672
bool call_successful =
670673
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
671-
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_EXP,
674+
MDevice,
675+
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_SUPPORT_EXP,
672676
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
673677
return call_successful && support;
674678
}
675679
case aspect::ext_oneapi_bindless_images_sample_2d_usm: {
676680
ur_bool_t support = false;
677681
bool call_successful =
678682
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
679-
MDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_EXP,
683+
MDevice,
684+
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_SUPPORT_EXP,
680685
sizeof(ur_bool_t), &support, nullptr) == UR_RESULT_SUCCESS;
681686
return call_successful && support;
682687
}

sycl/source/detail/scheduler/commands.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3529,7 +3529,7 @@ ur_result_t ExecCGCommand::enqueueImpQueue() {
35293529
Properties.flags = 0;
35303530
if (Barrier->MEventMode ==
35313531
ext::oneapi::experimental::event_mode_enum::low_power)
3532-
Properties.flags |= UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS;
3532+
Properties.flags |= UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS_SUPPORT;
35333533

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

35683568
const AdapterPtr &Adapter = MQueue->getAdapter();
35693569
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)