Skip to content

Conversation

@YixingZhang007
Copy link
Contributor

@YixingZhang007 YixingZhang007 commented Dec 29, 2025

In the old offloading model, we supported compiling AOT images for GPU without specifying the device name (without -Xsycl-target-backend=spir64_gen -device pvc). In the new offloading model, this feature is no longer supported and we now enforce that device names must be specified when compiling image AOT for GPU.
The following changes have been made to the SYCL E2E tests:

  1. AOT/multiple-devices.cpp is marked as UNSUPPORTED
  2. NewOffloadDriver/aot-multiple-device.cpp test is added for the new offloading model. This test is a copy of AOT/multiple-devices.cpp with the addition of explicit device names when compiling the AOT fat binary object.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it intended that we will run this test in full on Windows and only compile the tests but not run them on Linux?

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 think this test is currently only being run on Gen 12 Linux in CI, where it's failing for the new offloading model (CI result for new offloading model can be found at https://github.com/intel/llvm/actions/runs/19845783730/job/56863976891?pr=20570) . Since we don't expect this test to be supported on any platform, I am thinking maybe changing it to // UNSUPPORTED: * would likely be a better approach.

@YixingZhang007 YixingZhang007 added the new-offload-model Enables testing with NewOffloadModel. label Dec 29, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

if its UNSUPPORTED: * is it better to just delete the test?

Copy link
Contributor Author

@YixingZhang007 YixingZhang007 Dec 29, 2025

Choose a reason for hiding this comment

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

I'm not entirely sure about this approach because in our previous "new offloading model meeting and sync ..." meeting, I think @YuriPlyakhin mentioned that we should mark this test as unsupported and add an explanation. This is because the feature being tested (AOT compilation for GPU without specifying the device name) is supported in the old offloading model but not in the new offloading model (that was a mistake in the old offloading model and should not be supported). Therefore, I thought we should keep this test so that after we switch to the new offloading model, if users wonder why we no longer support this feature or this test, they can find the explanation in the test. We could also wait until @YuriPlyakhin returns later this week to see if he has additional insights.

Copy link
Contributor

Choose a reason for hiding this comment

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

We don't usually leave disabled tests for removed features, from the meeting I thought the test was still going to run in build-only or something, maybe I misunderstood

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 think Yury's comment below suggested that we should mark this test as UNSUPPORTED: new-offload-model, and the test will be removed after old offloading model support is removed (since this feature is supported for old offloading model but not for new offloading model, and the current default offloading model is still the old offloading model). I have created an UNSUPPORTED-TRACKER at #20988 to track this.

@YixingZhang007
Copy link
Contributor Author

I don't think the current CI failure is caused by the change in this patch. This change only modifies test files AOT/multiple-devices.cpp and NewOffloadDriver/aot-multiple-device.cpp, both of which are passing.

Copy link
Contributor

@YuriPlyakhin YuriPlyakhin left a comment

Choose a reason for hiding this comment

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

LGTM.

One nit I noticed only now: the name of the new test should be aot-multiple-devices - note the s in the end.

Copy link
Contributor

Choose a reason for hiding this comment

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

Note that generic SPIR-V compilation is enabled by default even when AOT GPU or CPU targets are specified.

Where are you seeing this? I tried the old offload model and it seems it only generates the explicitly specified targets.

Copy link
Contributor Author

@YixingZhang007 YixingZhang007 Jan 6, 2026

Choose a reason for hiding this comment

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

When running clang++ -fsycl -fsycl-targets=spir64_x86_64 a.o -o a.out for AOT CPU compilation, I found that clang-offload-wrapper is invoked for both -target=spir64 and -target=spir64_x86_64, even though only spir64_x86_64 is specified in fsycl-targets.

This is also what the test verifies at this line: even though spir64 is not explicitly specified in fsycl-targets, the test still see clang-offload-wrapper{{.*}} -target=spir64 to be called (verified through --check-prefix=CHECK-GENERIC).

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah ok yeah it's because this line is using a pre-generated fat object which contains spir64, that explains it, sorry for the confusion

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

@intel/llvm-gatekeepers please consider merging

@YuriPlyakhin YuriPlyakhin requested a review from sarnex January 6, 2026 16:15
Copy link
Contributor

@sarnex sarnex left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for the explanations!

@sarnex sarnex merged commit 03f7a27 into intel:sycl Jan 6, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-offload-model Enables testing with NewOffloadModel.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants