-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] Implement host pipe unique name generation and mapping calls #8009
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
Conversation
Could you please add FE tests? |
Yep, I'll do that |
|
||
__pipeType __pipe; | ||
}]; | ||
} |
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.
@elizabethandrews - Now that we have [[__sycl_detail__::sycl_type(...)]]
, could this be accomplished using it? If so, we may consider doing the same for [[__sycl_detail__::device_global]]
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 can use sycl_type
here. I have a JIRA to replace device_global
to use sycl_type
as well. Just haven't gotten around to it.
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.
@elizabethandrews @steffenlarsen Are there examples or documentation for sycl_type
? I took a quick look in the repo and it's not clear to me how I should use it here.
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.
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.
@elizabethandrews @steffenlarsen Updated. Though I know it's not best practice, I copied the static function isSyclType() from SemaSYCL.cpp to do the type check in CodeGenModule. Let me know if there's a common place where this can be put and I can make that change as well.
@@ -9644,6 +9644,9 @@ void SYCLPostLink::ConstructJob(Compilation &C, const JobAction &JA, | |||
// Process device-globals. | |||
addArgs(CmdArgs, TCArgs, {"-device-globals"}); | |||
|
|||
// Process host pipes. | |||
addArgs(CmdArgs, TCArgs, {"-host-pipes"}); |
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.
We are planning on moving the CompileTimePropertiesPass to be an LLVM pass rather than a sub-feature of sycl-post-link, in which case we won't need this. See #7527. Note also this may affect the sycl-post-link related changes in this PR, but it should be resolvable.
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.
@steffenlarsen Now that the CompileTimePropertiesPass change was merged, I rebased, moved my host pipe change out of sycl-post-link, and removed the host-pipe arg from the driver.
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'm wondering, what is the difference between a host pipe and a device global? Can we just use a device global of a particular type to define a host pipe instead?
Device globals involve creating storage on the device that is accessible by all kernels. Host pipes can be connected to only one kernel, and do not involve creating storage but are linked to specialized hardware. The commonality is simply that they both require a mechanism to translate addresses in host space to some logical name that the backend compiler knows about. |
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.
Sorry for the delay in review. This PR fell off my radar. FE changes look ok to me. Just a minor comment about test
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.
(sorry for the late review. My notifications weren't quite working.)
FE changes look okay to me.
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.
FE part 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.
FE changes look OK to me
@KseniyaTikhomirova I didn't mean to remove you from the review list, I'd only hit the "re-request" button for @steffenlarsen. I'm not sure who else needs to review this to enable merging. |
Missing reviews from @intel/dpcpp-clang-driver-reviewers & @intel/dpcpp-tools-reviewers . |
Hello, do not worry. Steffen approval is enough on behalf of SYCL RT reviewers side😊 |
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.
sycl-post-link
part LGTM
Co-authored-by: Alexey Sachkov <[email protected]>
Implementation of host pipes outlined in the design document in this PR:
#5850
PR for accompanying runtime changes: #7468