-
Notifications
You must be signed in to change notification settings - Fork 795
[SYCL] Fix sycl-post-link when no split and symbols are requested. #1454
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| ; This test checks that the post-link tool produces a correct resulting file | ||
| ; table and a symbol file for an input module with two kernels when no code | ||
| ; splitting is requested. | ||
| ; | ||
| ; RUN: sycl-post-link -symbols -spec-const=rt -S %s -o %T/files.table | ||
| ; RUN: FileCheck %s -input-file=%T/files.table --check-prefixes CHECK-TABLE | ||
| ; RUN: FileCheck %s -input-file=%T/files_0.sym --match-full-lines --check-prefixes CHECK-SYM | ||
|
|
||
| define dso_local spir_kernel void @KERNEL_AAA() { | ||
| ; CHECK-SYM-NOT: {{[a-zA-Z0-9._@]+}} | ||
| ; CHECK-SYM: KERNEL_AAA | ||
| entry: | ||
| ret void | ||
| } | ||
|
|
||
| define dso_local spir_kernel void @KERNEL_BBB() { | ||
| ; CHECK-SYM-NEXT: KERNEL_BBB | ||
| ; CHECK-SYM-EMPTY: | ||
| entry: | ||
| ret void | ||
| } | ||
|
|
||
| ; CHECK-TABLE: [Code|Properties|Symbols] | ||
| ; CHECK-TABLE-NEXT: {{.*}}files_0.sym | ||
| ; CHECK-TABLE-EMPTY: | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -121,23 +121,45 @@ static void writeToFile(std::string Filename, std::string Content) { | |||||||||
| OS.close(); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| // Describes scope covered by each entry in the module-kernel map populated by | ||||||||||
| // the function below. | ||||||||||
|
||||||||||
| // Describes scope covered by each entry in the module-kernel map populated by | |
| // the function below. | |
| // Describes scope covered by each entry in the module-kernel map populated by | |
| // the collectKernelModuleMap function. |
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
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
Outdated
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 we should rewrite this comment somehow.
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.
the comment has been invalid since addition of per-kernel split before my changes.
But OK, I'll go ahead and change the comment
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.
Should we group kernels without this attribute into a separate module?
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 don't know, maybe. The answer would be 'yes' if there are practical scenarios where per-module splitting is requested on modules with functions w/o module-id attribute. This would be a topic for a separate PR, anyway.
Here I just protect from the existing problem that I noticed - silent dropping of kernels w/o module-id attribute in -split=source mode. What I can do now is add a TODO.
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.
Sure. I thought about this case while implementing split, but I didn't come up with the viable case when it is possible to get such module containing kernels with and without module-id attribute.
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 suppose tests are failing in pre-commit due conflict of test files.
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
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.
thanks for the hint, BTW )