Skip to content

Commit

Permalink
Some of our PVC tests were assuming multiple tiles, but that is not t…
Browse files Browse the repository at this point in the history
…he case in all installations.
  • Loading branch information
cperkinsintel committed Feb 14, 2024
1 parent a231ca5 commit ba058de
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
12 changes: 6 additions & 6 deletions sycl/test-e2e/Plugin/level_zero_ext_intel_cslice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ bool IsPVC(device &d) {
return masked_device_id == 0xbd0 || masked_device_id == 0xb60;
}

bool IsPVC_2T(device &d) {
// PVC-1T does not support partitioning by affinity domain,
// while PVC-2T does.
bool IsPVC_MultiTiles(device &d) {
// PVC-1T (one tile) does not support partitioning by affinity domain,
// which this test requires
if (!isPartitionableByAffinityDomain(d))
return false;

Expand All @@ -65,8 +65,8 @@ bool IsPVC_2T(device &d) {
void test_pvc(device &d) {
std::cout << "Test PVC Begin" << std::endl;
// CHECK-PVC: Test PVC Begin
std::cout << "IsPVC: " << IsPVC_2T(d) << std::endl;
if (IsPVC_2T(d)) {
std::cout << "IsPVC: " << IsPVC_MultiTiles(d) << std::endl;
if (IsPVC_MultiTiles(d)) {
assert(isPartitionableByAffinityDomain(d));
assert(!isPartitionableByCSlice(d));
{
Expand Down Expand Up @@ -155,7 +155,7 @@ void test_pvc(device &d) {
}

void test_non_pvc(device &d) {
if (IsPVC_2T(d))
if (IsPVC_MultiTiles(d))
return;

// Non-PVC devices are not partitionable by CSlice at any level of
Expand Down
8 changes: 4 additions & 4 deletions sycl/test-e2e/Plugin/level_zero_ext_intel_queue_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ bool IsPVC(device &d) {
return masked_device_id == 0xbd0 || masked_device_id == 0xb60;
}

bool IsPVC_2T(device &d) {
// PVC-1T does not support partitioning by affinity domain,
// while PVC-2T does.
bool IsPVC_MultiTiles(device &d) {
// PVC-1T (one tile) does not support partitioning by affinity domain,
// which this test requires
if (!isPartitionableByAffinityDomain(d))
return false;

Expand All @@ -42,7 +42,7 @@ bool IsPVC_2T(device &d) {
void test_pvc(device &d) {
std::cout << "Test PVC Begin" << std::endl;
// CHECK-PVC: Test PVC Begin
bool IsPVC = IsPVC_2T(d);
bool IsPVC = IsPVC_MultiTiles(d);
std::cout << "IsPVC: " << std::boolalpha << IsPVC << std::endl;
if (IsPVC) {
assert(d.get_info<ext::intel::info::device::max_compute_queue_indices>() ==
Expand Down
13 changes: 9 additions & 4 deletions sycl/test-e2e/Plugin/level_zero_sub_sub_device.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
// REQUIRES: gpu-intel-pvc, level_zero
// REQUIRES: aspect-ext_intel_device_id

// RUN: %{build} %level_zero_options -o %t.out
// RUN: env UR_L0_DEBUG=1 env ZEX_NUMBER_OF_CCS=0:4 %{run} %t.out 2>&1 | FileCheck %s
// RUN: env ZEX_NUMBER_OF_CCS=0:4 %{run} %t.out

// Check that queues created on sub-sub-devices are going to specific compute
// engines:
auto constexpr expected_output = R"===(
// CHECK: [getZeQueue]: create queue ordinal = 0, index = 0 (round robin in [0, 0])
// CHECK: [getZeQueue]: create queue ordinal = 0, index = 1 (round robin in [1, 1])
// CHECK: [getZeQueue]: create queue ordinal = 0, index = 2 (round robin in [2, 2])
// CHECK: [getZeQueue]: create queue ordinal = 0, index = 3 (round robin in [3, 3])
)===";

#include <chrono>
#include <cmath>
Expand Down Expand Up @@ -41,9 +44,9 @@ bool IsPVC(device &d) {
return masked_device_id == 0xbd0 || masked_device_id == 0xb60;
}

bool IsPVC_2T(device &d) {
// PVC-1T does not support partitioning by affinity domain,
// while PVC-2T does.
bool IsPVC_MultiTiles(device &d) {
// PVC-1T (one tile) does not support partitioning by affinity domain,
// which this test requires
if (!isPartitionableByAffinityDomain(d))
return false;

Expand Down Expand Up @@ -121,8 +124,10 @@ int main(void) {
device d;

// PVC-1T does not support partition by affinity domain
if (!IsPVC_2T(d))
if (!IsPVC_MultiTiles(d)) {
std::cout << expected_output << std::endl; // trick FileCheck
return 0;
}

// watch out device here
auto subdevices = d.create_sub_devices<
Expand Down

0 comments on commit ba058de

Please sign in to comment.