Skip to content

[SYCL][Driver] Improve the diagnostic for FPGA device link errors #1077

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 6, 2020

Conversation

AGindinson
Copy link
Contributor

FPGA compilations have a common use case of linking an object file against
an arhive that contains a pre-compiled device image. If the archive was
comprised without pulling in the object file in question, the presence
of any device kernel in the object file would signal incomplete device code
compilation/linkage.

Within the SYCL flow, a check for this case is performed by the
llvm-no-spir-kernel tool, so as to achieve a compile-time failure instead
of an obscure runtime failure due to a missing kernel.

This patch extends the Clang driver with the infrastructure to enhance
error messages upon receiving specific error codes from external tools.
The functionality is then used to enhance the diagnostic yielded by
llvm-no-spir-kernel in the aforementioned case.

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

FPGA compilations have a common use case of linking an object file against
an arhive that contains a pre-compiled device image. If the archive was
comprised without pulling in the object file in question, the presence
of any device kernel in the object file would signal incomplete device code
compilation/linkage.

Within the SYCL flow, a check for this case is performed by the
llvm-no-spir-kernel tool, so as to achieve a compile-time failure instead
of an obscure runtime failure due to a missing kernel.

This patch extends the Clang driver with the infrastructure to enhance
error messages upon receiving specific error codes from external tools.
The functionality is then used to enhance the diagnostic yielded by
llvm-no-spir-kernel in the aforementioned case.

Signed-off-by: Artem Gindinson <[email protected]>
@AGindinson AGindinson force-pushed the private/agindins/fpga-link-err branch 2 times, most recently from 77c96a7 to d476f8a Compare February 3, 2020 10:12
@bader bader merged commit 6431be6 into intel:sycl Feb 6, 2020
@AGindinson AGindinson deleted the private/agindins/fpga-link-err branch February 21, 2020 10:14
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.

5 participants