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.
[SYCL][Driver]Enable multiple third-party targets for SYCL AOT. #18145
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
base: sycl
Are you sure you want to change the base?
[SYCL][Driver]Enable multiple third-party targets for SYCL AOT. #18145
Changes from all commits
9bbedff
d5c973e
47f4bf9
8f345da
61bedb3
ea5846b
abba8d7
a175c1b
f17119d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
What is the behavior if user combines "special" target triples with "generic" target triples defined above?
I.e. something like
-fsycl-targets=spir64_gen,intel_gpu_ptl_u
?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.
@AlexeySachkov
Ideally, for,
-fsycl-targets=spir64_gen,intel_gpu_ptl_u
, we would provide the target GPU device via-Xsycl-target-backend=spir64_gen "-device <device-name>"
forspir64_gen
AOT targets.For the example,
-fsycl-targets=spir64_gen,intel_gpu_ptl_u
, ptl_u is passed as the target device for SYCL device compilation and ocloc call. Since no specific GPU device is provided for spir64_gen AOT target, no device info is passed to theSYCL
device compilation step and theocloc
call.Example:
device = ptl_u
No device info passed (fsycl-targets=spir64_gen)
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 the idea is that these values must be aligned with values from sycl_ext_oneapi_device_architecture (link).
Change in this PR can confuse our customers as there is no "amdgcn-amd-amdhsa" in sycl_ext_oneapi_device_architecture
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.
@dm-vodopyanov
The test files were updated because these lines from lit.cfg.py were adding
"-Xsycl-target-backend=amdgcn-amd-amdhsa", "--offload-arch=gfx906"
options in addition to the existing driver options in the RUN command in the test files.This was resulting in either :
(error: Duplicate targets are not allowed)
orclang: error: cannot specify -o when generating multiple output files
Additionally, all the matrix related tests have
joint_matrix
usage, where thejoint_matrix
API is only supported by the Intel, CUDA and HIP (GFX90A
) backends.Hence I updated the default AMD GPU device to be
GFX90A
.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.
Ok, thanks for explanation, LGTM
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.
Why don't we just drop that
lit.cfg.py
hardcode for--offload-arch
in favor of--fsycl-targets
?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.
When I removed the hardcoded check, there were about ~60 tests failing with the error :
clang: error: missing AMDGPU architecture for SYCL offloading; specify it with '-Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=<arch-name>'
.Hence they were not removed.