Skip to content

Commit df9f5b0

Browse files
author
Jaime Arteaga
authored
[SYCL][UR] Use official device info property for c-slices (#8891)
Spec has now UR_DEVICE_PARTITION_BY_CSLICE, so remove UR_EXT_DEVICE_PARTITION_PROPERTY_FLAG_BY_CSLICE. Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
1 parent 0b13f0a commit df9f5b0

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

sycl/plugins/unified_runtime/pi2ur.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ inline pi_result ur2piInfoValue(ur_device_info_t ParamName,
210210
Map = {
211211
{UR_DEVICE_PARTITION_BY_AFFINITY_DOMAIN,
212212
PI_DEVICE_PARTITION_BY_AFFINITY_DOMAIN},
213-
{UR_EXT_DEVICE_PARTITION_PROPERTY_FLAG_BY_CSLICE,
213+
{UR_DEVICE_PARTITION_BY_CSLICE,
214214
PI_EXT_INTEL_DEVICE_PARTITION_BY_CSLICE},
215215
{(ur_device_partition_property_t)
216216
UR_DEVICE_AFFINITY_DOMAIN_FLAG_NEXT_PARTITIONABLE,
@@ -224,7 +224,7 @@ inline pi_result ur2piInfoValue(ur_device_info_t ParamName,
224224
Map = {
225225
{UR_DEVICE_PARTITION_BY_AFFINITY_DOMAIN,
226226
PI_DEVICE_PARTITION_BY_AFFINITY_DOMAIN},
227-
{UR_EXT_DEVICE_PARTITION_PROPERTY_FLAG_BY_CSLICE,
227+
{UR_DEVICE_PARTITION_BY_CSLICE,
228228
PI_EXT_INTEL_DEVICE_PARTITION_BY_CSLICE},
229229
};
230230
return Value.convertArray(Map);
@@ -550,7 +550,7 @@ inline pi_result piDevicePartition(
550550
{PI_DEVICE_PARTITION_BY_AFFINITY_DOMAIN,
551551
UR_DEVICE_PARTITION_BY_AFFINITY_DOMAIN},
552552
{PI_EXT_INTEL_DEVICE_PARTITION_BY_CSLICE,
553-
UR_EXT_DEVICE_PARTITION_PROPERTY_FLAG_BY_CSLICE},
553+
UR_DEVICE_PARTITION_BY_CSLICE},
554554
};
555555

556556
auto PropertyIt = PropertyMap.find(Properties[0]);

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
582582
if (Device->isCCS()) {
583583
struct {
584584
ur_device_partition_property_t Arr[2];
585-
} PartitionProperties = {{UR_EXT_DEVICE_PARTITION_PROPERTY_FLAG_BY_CSLICE,
586-
ur_device_partition_property_t(0)}};
585+
} PartitionProperties = {
586+
{UR_DEVICE_PARTITION_BY_CSLICE, ur_device_partition_property_t(0)}};
587587
return ReturnValue(PartitionProperties);
588588
}
589589

@@ -1504,7 +1504,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDevicePartition(
15041504
Properties[1] != UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA)) {
15051505
return UR_RESULT_ERROR_INVALID_VALUE;
15061506
}
1507-
} else if (Properties[0] == UR_EXT_DEVICE_PARTITION_PROPERTY_FLAG_BY_CSLICE) {
1507+
} else if (Properties[0] == UR_DEVICE_PARTITION_BY_CSLICE) {
15081508
if (Properties[1] != 0) {
15091509
return UR_RESULT_ERROR_INVALID_VALUE;
15101510
}
@@ -1535,7 +1535,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDevicePartition(
15351535
return 0;
15361536
}
15371537
}
1538-
if (Properties[0] == UR_EXT_DEVICE_PARTITION_PROPERTY_FLAG_BY_CSLICE) {
1538+
if (Properties[0] == UR_DEVICE_PARTITION_BY_CSLICE) {
15391539
// Not a CSlice-based partitioning.
15401540
if (!Device->SubDevices[0]->isCCS()) {
15411541
return 0;

sycl/plugins/unified_runtime/ur/ur.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ const int UR_EXT_USM_CAPS_ATOMIC_ACCESS = 1 << 1;
6060
const int UR_EXT_USM_CAPS_CONCURRENT_ACCESS = 1 << 2;
6161
const int UR_EXT_USM_CAPS_CONCURRENT_ATOMIC_ACCESS = 1 << 3;
6262

63-
const ur_device_partition_property_t
64-
UR_EXT_DEVICE_PARTITION_PROPERTY_FLAG_BY_CSLICE =
65-
ur_device_partition_property_t(UR_DEVICE_PARTITION_FORCE_UINT32 - 1);
66-
6763
// Terminates the process with a catastrophic error message.
6864
[[noreturn]] inline void die(const char *Message) {
6965
std::cerr << "die: " << Message << std::endl;

0 commit comments

Comments
 (0)