Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL] test update: support single tile PVC #12716

Closed

Conversation

cperkinsintel
Copy link
Contributor

A few of our tests assume that a given PVC installation always has multiple tiles available, which is not true. Putting appropriate guards into those tests.

std::cout << "IsPVC: " << IsPVC(d) << std::endl;
if (IsPVC(d)) {
std::cout << "IsPVC: " << IsPVC_MultiTiles(d) << std::endl;
if (IsPVC_MultiTiles(d)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should adjust the test to check that even 1T cards can be partitioned by CSlice.

Comment on lines +34 to +35
// PVC-1T (one tile) does not support partitioning by affinity domain,
// which this test requires
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should support it in SYCL_PI_LEVEL_ZERO_EXPOSE_CSLICE_IN_AFFINITY_PARTITIONING=1 mode still, shouldn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dunno. But if get_info<> returns that it is supported, then the test should be correct regardless.

@@ -1,15 +1,18 @@
// REQUIRES: gpu-intel-pvc, level_zero
// REQUIRES: aspect-ext_intel_device_id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need that? We already have REQUIRES: gpu-intel-pvc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. I was keeping the IsPVC() test the same for all three of these and it retrieves the device_id.

Comment on lines +126 to +131
// PVC-1T does not support partition by affinity domain
if (!IsPVC_MultiTiles(d)) {
std::cout << expected_output << std::endl; // trick FileCheck
return 0;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid that if we stop supporting multi-tile cards, the test would keep passing. Do we know if PVC-1T and PVC-2T differ in their device id? If so, can we use that instead of isPartitionableByAffinityDomain query?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only have access to the a PVC-1T, but the IsPVC() test retrieves the device_id and verifies it with a mask. It is returning true for both PVC-1T and PVC-2T. It's possible that they differ in the range of that mask, but I haven't verified that by hand. But rather than key off of some poorly understood device id, I think it's better to do as we are here: actually check that the the AffinityDomain partitioning is available. The test needs it, so its correct to check it.

@kbenzie
Copy link
Contributor

kbenzie commented Feb 15, 2024

I'm wondering if the code-owner for files should be the L0 team? I believe the intent of UR team being made code-owner for this test directory is that it would eventually be superceeded by UR testing but I'm not sure if that makes sense for these tests or not?

@aelovikov-intel
Copy link
Contributor

I'm wondering if the code-owner for files should be the L0 team? I believe the intent of UR team being made code-owner for this test directory is that it would eventually be superceeded by UR testing but I'm not sure if that makes sense for these tests or not?

When the feature was first implemented, most of the logic was in plugins/level_zero/pi_level_zero.cpp (https://github.com/intel/llvm/pull/7626/files#diff-15dd1eb076d2164bd9e87d9057f05f652a716498e8cdf5975e564c65309a0985). I believe that that code belongs to UR and as such the test should be owned by it.

Copy link
Contributor

@kbenzie kbenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UR LGTM

@cperkinsintel cperkinsintel marked this pull request as draft March 6, 2024 02:28
@cperkinsintel
Copy link
Contributor Author

closing in favor of #13067

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants