Skip to content

Commit 2ba8e05

Browse files
authored
[SYCL] Added numa affinity partitioning support to Level Zero (#3052)
Added numa affinity partitioning support to Level Zero. This aligns Level Zero support with OpenCL support. Signed-off-by: Gail Lyons <[email protected]>
1 parent fed2d47 commit 2ba8e05

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,7 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
14751475
}
14761476
case PI_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN:
14771477
return ReturnValue(pi_device_affinity_domain{
1478+
PI_DEVICE_AFFINITY_DOMAIN_NUMA |
14781479
PI_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE});
14791480
case PI_DEVICE_INFO_PARTITION_TYPE: {
14801481
if (Device->IsSubDevice) {
@@ -1767,7 +1768,8 @@ pi_result piDevicePartition(pi_device Device,
17671768
pi_uint32 *OutNumDevices) {
17681769
// Other partitioning ways are not supported by Level Zero
17691770
if (Properties[0] != PI_DEVICE_PARTITION_BY_AFFINITY_DOMAIN ||
1770-
Properties[1] != PI_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE) {
1771+
(Properties[1] != PI_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE &&
1772+
Properties[1] != PI_DEVICE_AFFINITY_DOMAIN_NUMA)) {
17711773
return PI_INVALID_VALUE;
17721774
}
17731775

0 commit comments

Comments
 (0)