-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[libclc] Fix commands in compile_to_bc are executed sequentially #130755
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
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1f8b5bf
[libclc] Fix commands in compile_to_bc are executed sequentially
wenju-he 3181480
revert ARG_DEPENDENCIES change
wenju-he ea2f503
add FIXME about DEPENDS_EXPLICIT_ONLY
wenju-he 603255c
update comment
wenju-he aed94cf
Merge branch 'main' into libclc-compile-target
wenju-he 952e8c1
remove -as target, add back to DEPENDS of builtins_comp_lib_tgt
wenju-he 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 hidden or 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
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.
I don't think the (possibly) "temp" output (in the case of
.llfiles) should be given the honour of theARG_TARGETtarget. The final output of this function should unconditionally haveARG_TARGET. That saves doing-asworkarounds in other parts of the code. TheTARGETname the user passes should be definitive, in other words.Do we strictly need a target for the intermediate step too? If we do, we could have
${ARG_TARGET}${TMP_SUFFIX}here. Then non-IR files getARG_TARGETtarget, and then in the IR block below we createARG_TARGETfor that case.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 have simplified the code by removing ${ARG_TARGET}-as
The issue we observing is that .cl files are compiled sequentially. We don't see problem with .ll file, so we can leave it as-is.
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.
Ah yes that's much simpler.
I'm half wondering if this isn't only for enabling parallel execution but is technically required for correct behaviour. I know CMake can behave strangely when only depending upon files and not targets, which is that we're doing before this PR. Though even with this PR, we're still implicitly depending on files coming out of the
llvm-asstep. That's what makes me a bit nervous. This is still better than what we've got so maybe we can keep an eye on it and see if we have any parallel build issues stemming from.llfiles, and we can adjust as needed.I think I'll also post a follow-up which handles empty arguments. I was going to ask about handling an empty
TARGETbut noticed there's nothing for emptyINPUTorOUTPUTso maybe that's best left handled later in one go.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.
yeah, I agree