-
Notifications
You must be signed in to change notification settings - Fork 750
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
[ESIMD] Add set_kernel_properties API and use_double_grf property. #6182
Merged
Merged
Changes from 2 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2e1f97b
[ESIMD] Add set_kernel_properties API and use_double_grf property.
kbobrovs 878cbe3
address review comments
kbobrovs 62879a7
Merge remote-tracking branch 'intel/sycl' into double_grf
kbobrovs 1b5b29f
merge with upstream, move double GRF prop detection into a pass
kbobrovs 4dd50e5
Merge remote-tracking branch 'intel/sycl' into double_grf
kbobrovs 4cda64f
Fix properties propagation
kbobrovs d77bf6e
Fix test failures
kbobrovs c6710c5
clang-format
kbobrovs c8f61b8
Fix Linux build, remove old PM-related code, add specific kernel prop…
kbobrovs 0db3b87
fix typo in comment
kbobrovs b0e8621
Merge remote-tracking branch 'intel/sycl' into double_grf
kbobrovs 9c1e483
One more _NDEBUG -> NDEBUG
kbobrovs 830619e
- When doing nested split of a module, the entry point is now limited to
kbobrovs 6b059f7
Fix/add more comments.
kbobrovs 3918b02
remove unneeded change
kbobrovs 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
There are no files selected for viewing
This file contains 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
69 changes: 69 additions & 0 deletions
69
llvm/test/tools/sycl-post-link/sycl-esimd/sycl-esimd-double-grf.ll
This file contains 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,69 @@ | ||
; This test checks handling of the | ||
; set_kernel_properties(kernel_properties::use_double_grf); | ||
; by the post-link-tool: | ||
; - ESIMD/SYCL splitting happens as usual | ||
; - ESIMD module is further split into callgraphs for entry points requesting | ||
; "double GRF" and callgraphs for entry points which are not | ||
; - Compiler adds 'isDoubleGRFEsimdImage' property to the ESIMD device binary | ||
; images requesting "double GRF" | ||
|
||
; RUN: sycl-post-link -split=source -symbols -split-esimd -lower-esimd -S %s -o %t.table | ||
; RUN: FileCheck %s -input-file=%t.table | ||
; RUN: FileCheck %s -input-file=%t_esimd_x2grf_0.ll --check-prefixes CHECK-ESIMD-2xGRF-IR | ||
; RUN: FileCheck %s -input-file=%t_esimd_x2grf_0.prop --check-prefixes CHECK-ESIMD-2xGRF-PROP | ||
; RUN: FileCheck %s -input-file=%t_0.sym --check-prefixes CHECK-SYCL-SYM | ||
; RUN: FileCheck %s -input-file=%t_esimd_0.sym --check-prefixes CHECK-ESIMD-SYM | ||
; RUN: FileCheck %s -input-file=%t_esimd_x2grf_0.sym --check-prefixes CHECK-ESIMD-2xGRF-SYM | ||
|
||
; CHECK: [Code|Properties|Symbols] | ||
; CHECK: {{.*}}esimd_0.ll|{{.*}}esimd_0.prop|{{.*}}esimd_0.sym | ||
; CHECK: {{.*}}esimd_x2grf_0.ll|{{.*}}esimd_x2grf_0.prop|{{.*}}esimd_x2grf_0.sym | ||
; CHECK: {{.*}}_0.ll|{{.*}}_0.prop|{{.*}}_0.sym | ||
|
||
; CHECK-ESIMD-2xGRF-PROP: isEsimdImage=1|1 | ||
; CHECK-ESIMD-2xGRF-PROP: isDoubleGRFEsimdImage=1|1 | ||
|
||
; CHECK-SYCL-SYM: __SYCL_kernel | ||
; CHECK-SYCL-SYM-EMPTY: | ||
|
||
; CHECK-ESIMD-SYM: __ESIMD_kernel | ||
; CHECK-ESIMD-SYM-EMPTY: | ||
asudarsa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
; CHECK-ESIMD-2xGRF-SYM: __ESIMD_double_grf_kernel | ||
; CHECK-ESIMD-2xGRF-SYM-EMPTY: | ||
|
||
; ModuleID = 'double_grf.bc' | ||
source_filename = "llvm-link" | ||
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" | ||
target triple = "spir64-unknown-unknown" | ||
|
||
define weak_odr dso_local spir_kernel void @__SYCL_kernel() #0 { | ||
entry: | ||
ret void | ||
} | ||
|
||
define weak_odr dso_local spir_kernel void @__ESIMD_kernel() #0 !sycl_explicit_simd !0 !intel_reqd_sub_group_size !1 { | ||
entry: | ||
ret void | ||
} | ||
|
||
define dso_local spir_func void @_Z17double_grf_markerv() { | ||
entry: | ||
call spir_func void @_Z29__esimd_set_kernel_propertiesi(i32 noundef 0) | ||
; -- Check that ESIMD lowering removed the marker call above: | ||
; CHECK-ESIMD-2xGRF-IR-NOT: {{.*}} @_Z29__esimd_set_kernel_propertiesi | ||
ret void | ||
} | ||
|
||
declare dso_local spir_func void @_Z29__esimd_set_kernel_propertiesi(i32 noundef) | ||
|
||
define weak_odr dso_local spir_kernel void @__ESIMD_double_grf_kernel() #0 !sycl_explicit_simd !0 !intel_reqd_sub_group_size !1 { | ||
entry: | ||
call spir_func void @_Z17double_grf_markerv() | ||
ret void | ||
} | ||
|
||
attributes #0 = { "sycl-module-id"="a.cpp" } | ||
|
||
!0 = !{} | ||
!1 = !{i32 1} |
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.
This refactors the original
updateGenXMDNodes
:traverseCallgraphUp
above. This functor represents call graph action.