Skip to content

[SYCL] Add compile target to device image properties #14757

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
merged 3 commits into from
Jul 26, 2024

Conversation

jzc
Copy link
Contributor

@jzc jzc commented Jul 24, 2024

Previously, when compiling with any intel_gpu_* target, the device image only had the generic spir64_gen as its value for the DeviceTargetSpec in its device image, so there was no way to differentiate device images compiled for a specific GPU in the runtime. Now, a new property is added to the image specifying the specific intel_gpu_* value it is compiled for.

@jzc jzc requested a review from a team as a code owner July 24, 2024 20:37
@jzc jzc temporarily deployed to WindowsCILock July 24, 2024 20:39 — with GitHub Actions Inactive
; RUN: FileCheck %s -input-file=%t_intel_gpu_pvc_3.prop -check-prefix=CHECK-PVC-PROP
; RUN: FileCheck %s -input-file=%t_intel_gpu_pvc_4.prop -check-prefix=CHECK-PVC-PROP
; RUN: FileCheck %s -input-file=%t_intel_gpu_pvc_5.prop -check-prefix=CHECK-PVC-PROP
; CHECK-PVC-PROP: compile_target=2|oBAAAAAAAAQauRXZs91ZwV3XwZ3Y
Copy link
Contributor

Choose a reason for hiding this comment

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

Note for reviewers about encoding this information into device image properties instead of re-using a dedicated field within device image data structure: as part of our transition to clang-linker-wrapper will try and unify our device image descriptors with those used in the upstream. There is an equivalent to our properties in there, but there are no dedicated field for device image target. Therefore, here we are using a mechanism that will be easier to transition later.

@jzc jzc temporarily deployed to WindowsCILock July 24, 2024 21:48 — with GitHub Actions Inactive
@jzc jzc temporarily deployed to WindowsCILock July 25, 2024 15:04 — with GitHub Actions Inactive
@jzc jzc temporarily deployed to WindowsCILock July 25, 2024 16:15 — with GitHub Actions Inactive
@AlexeySachkov AlexeySachkov merged commit e38dcdc into intel:sycl Jul 26, 2024
14 checks passed
AlexeySachkov pushed a commit that referenced this pull request Aug 15, 2024
…rty (#14909)

We allow multiple so-called "special" targets to be passed to `-fsycl-targets`, but
without extra information SYCL RT wouldn't be able to select the right AOT-compiled
device image.

#14757 introduced a device image property to specify an exact target
for a device image and this patch made runtime honor that property when selecting
a device image.
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.

2 participants