[SYCL] add an e2e test that passes for liboffload with L0#21584
Open
EuphoricThinking wants to merge 1 commit intointel:syclfrom
Open
[SYCL] add an e2e test that passes for liboffload with L0#21584EuphoricThinking wants to merge 1 commit intointel:syclfrom
EuphoricThinking wants to merge 1 commit intointel:syclfrom
Conversation
2ac3b22 to
187486d
Compare
f64df32 to
abfe1b4
Compare
abfe1b4 to
3c7b065
Compare
againull
reviewed
Mar 24, 2026
Comment on lines
+1061
to
+1066
| if re.match(r"\[offload:.*", line) and not is_offload_preferred_backend_set: | ||
| if re.match(".*Level[ _]Zero.*", line, re.IGNORECASE): | ||
| offload_assigned_backend = config.backend_to_target["level_zero"] | ||
| is_offload_preferred_backend_set = True | ||
| elif re.match(".*nvidia.*", line, re.IGNORECASE): | ||
| offload_assigned_backend = config.backend_to_target["cuda"] |
Contributor
There was a problem hiding this comment.
I think we can just assign to config.backend_to_target["offload"] directly and get rid of offload_assigned_backend.
Does the logic here depends on the order of devices/backends in sycl-ls output? I.e. if CUDA comes after L0 in the sycl-ls output, then it will be picked as offload backend. Is this the desired behavior?
Comment on lines
+18
to
+20
| // Allocate shared memory bound to the device and context associated to the | ||
| // queue Replacing malloc_shared with malloc_host would yield a correct | ||
| // program that allocated device-visible memory on the host. |
Contributor
There was a problem hiding this comment.
NIT: Comment about malloc_host seems excessive and can be removed.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The liboffload phase 0 program is added as one of SYCL e2e tests. Moreover, lit configuration files are modified so that the liboffload backend is determined according to
sycl-lsoutput, while the backend specified by the user preserves its precedence. When choosing between devices listed bysycl-ls, the Level Zero backend is preferred.