-
Notifications
You must be signed in to change notification settings - Fork 808
[NewOffloadDriver] Add AOT device image selection test for new offloading model #20976
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
Merged
sarnex
merged 12 commits into
intel:sycl
from
YixingZhang007:solve_mutiple_device_test_failure
Jan 6, 2026
Merged
Changes from 3 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3bd7d77
add new test aot-multiple-device.cpp
YixingZhang007 1a84904
updating the multiple-device tests
YixingZhang007 991c2db
update multiple-devices.cpp to be // UNSUPPORTED: *
YixingZhang007 f6eadd0
update explanation of the test
YixingZhang007 4894bc0
update aot-multiple-device.cpp for checking all targets compiled for …
YixingZhang007 67b66c3
code clean up
YixingZhang007 73e2add
code clean up
YixingZhang007 8355e49
Resolve comments
YixingZhang007 d2e76a9
code clean up
YixingZhang007 8371846
add back a line that was accidently deleted before
YixingZhang007 f78f966
resolve comments
YixingZhang007 c80b9d9
update the name of the test
YixingZhang007 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| //==--------------- aot-multiple-device.cpp -------------------------------===// | ||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
| // End-to-End test for testing appropriate AOT-compiled device image got | ||
| // selected correctly from a fat binary built for multiple device targets | ||
|
|
||
| // This test is copied from AOT/multiple_devices.cpp | ||
| // and modified to test with the New Offloading Model. | ||
|
|
||
| // REQUIRES: opencl-aot, ocloc, any-device-is-cpu, any-device-is-gpu, target-spir, opencl-cpu-rt | ||
|
|
||
| // Produce a fat object for all targets (generic SPIR-V, CPU, GPU) | ||
| // RUN: %{run-aux} %clangxx --offload-new-driver -fsycl -fsycl-targets=spir64,spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen %gpu_aot_target_opts %S/Inputs/aot.cpp -c -o %t.o | ||
|
|
||
| // AOT image selection with CPU and GPU targets available | ||
| // RUN: %{run-aux} %clangxx --offload-new-driver -fsycl -fsycl-targets=spir64_x86_64,spir64_gen %t.o -o %t_cpu_gpu.out | ||
| // RUN: %{run} %t_cpu_gpu.out | ||
|
|
||
| // AOT image selection with generic SPIR-V and GPU target available | ||
| // RUN: %{run-aux} %clangxx --offload-new-driver -fsycl -fsycl-targets=spir64,spir64_gen %t.o -o %t_spv_gpu.out | ||
| // Check that execution on AOT-compatible devices is unaffected | ||
| // RUN: env ONEAPI_DEVICE_SELECTOR="*:gpu" %{run-unfiltered-devices} %t_spv_gpu.out | ||
|
|
||
| // AOT image selection with generic SPIR-V and CPU target available | ||
| // RUN: %{run-aux} %clangxx --offload-new-driver -fsycl -fsycl-targets=spir64,spir64_x86_64 %t.o -o %t_spv_cpu.out | ||
| // Check that execution on AOT-compatible devices is unaffected | ||
| // RUN: env ONEAPI_DEVICE_SELECTOR="*:cpu" %{run-unfiltered-devices} %t_spv_cpu.out | ||
|
|
||
| // AOT image selection with all targets available (SPIR-V, CPU, GPU) | ||
| // RUN: %{run-aux} %clangxx --offload-new-driver -fsycl -fsycl-targets=spir64,spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen %gpu_aot_target_opts %t.o -o %t_spv_cpu_gpu.out | ||
| // Check that execution on AOT-compatible devices is unaffected | ||
| // RUN: %{run} %t_spv_cpu_gpu.out |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.