Skip to content

[SYCL][Driver] Fix -save-temps for SYCL compilations #1114

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 2 commits into from
Feb 13, 2020

Conversation

AGindinson
Copy link
Contributor

@AGindinson AGindinson commented Feb 11, 2020

The following issues have been blocking the correct functioning
of -save-temps in the presence of -fsycl:

  1. LLVM BC -> host assembly transformation naturally crashes upon
    encountering a SYCL device triple. Without -save-temps, this was
    hidden due to compile/backend/assemble actions collapsing, however
    the need to save all intermediate results uncovers the issue.
    Solution: remove backend/assemble actions from the SYCL device flow
    altogether, as these do not carry practical value anyway.

  2. The integration header name being emptied by -save-temps enabling.
    This is due to a bug in the llvm::sys::fs::real_path() function -
    the Unix implementation doesn't guarantee a valid path for non-existent
    files.
    Solution: work around the issue by placing the Windows-specific caller
    code under an OS preprocessor check.

Signed-off-by: Artem Gindinson [email protected]

@AGindinson AGindinson requested a review from asavonic February 11, 2020 10:21
The following issues have been blocking the correct functioning
of -save-temps in the presence of -fsycl:

1. LLVM BC -> host assembly transformation naturally crashes upon
encountering a SYCL device triple. Without -save-temps, this was
hidden due to compile/backend/assemble actions collapsing, however
the need to save all intermediate results uncovers the issue.
Solution: remove backend/assemble actions from the SYCL device flow
altogether, as these do not carry practical value anyway.

2. The integration header name being emptied by -save-temps enabling.
This is due to a bug in the llvm::sys::fs::real_path() function -
the Unix implementation doesn't guarantee a valid path for non-existent
files.
Solution: work around the issue by placing the Windows-specific caller
code under an OS preprocessor check.

Signed-off-by: Artem Gindinson <[email protected]>
@AGindinson AGindinson force-pushed the private/agindins/fsycl-save-temps branch from 2e018e5 to daa083b Compare February 12, 2020 12:36
@AGindinson
Copy link
Contributor Author

Resolved conflicts, squashed the commits, updated the main commit message/description to reflect @asavonic's review.

@AGindinson AGindinson requested a review from mdtoguchi February 12, 2020 12:38
mdtoguchi
mdtoguchi previously approved these changes Feb 12, 2020
Copy link
Contributor

@mdtoguchi mdtoguchi left a comment

Choose a reason for hiding this comment

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

LGTM

@bader bader merged commit f7f4699 into intel:sycl Feb 13, 2020
@AGindinson AGindinson deleted the private/agindins/fsycl-save-temps branch February 13, 2020 18:35
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.

4 participants