Skip to content

[Driver][SYCL][FPGA] Do not generate host dependency files by default #1918

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
Jun 22, 2020

Conversation

mdtoguchi
Copy link
Contributor

When compiling for -fsycl -fintelfpga, dependency file information needs
to be generated and added to the AOT compilation step. The dep file is
only needed from the device compilation.

Remove the generation of the dependency files for the host compilation
unless the user explicitly calls for it (with a generation option)

Signed-off-by: Michael D Toguchi [email protected]

@mdtoguchi mdtoguchi requested a review from AGindinson as a code owner June 18, 2020 00:37
@mdtoguchi mdtoguchi force-pushed the private/mdtoguchi/fpga-host-dep-changes branch from c666117 to f2a40d1 Compare June 18, 2020 00:39
@mdtoguchi mdtoguchi requested a review from meiyacha June 18, 2020 00:39
meiyacha
meiyacha previously approved these changes Jun 18, 2020
Copy link

@meiyacha meiyacha left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

When compiling for -fsycl -fintelfpga, dependency file information needs
to be generated and added to the AOT compilation step.  The dep file is
only needed from the device compilation.

Remove the generation of the dependency files for the host compilation
unless the user explicitly calls for it (with a generation option)

Signed-off-by: Michael D Toguchi <[email protected]>
AGindinson
AGindinson previously approved these changes Jun 22, 2020
Copy link
Contributor

@AGindinson AGindinson left a 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, LGTM but for a minor comment.

One more thing, does the patch resolve the -foffload-static-lib issue with .d file extraction? If so, is this due to host dependency absence in a default fat object that no issues arise during the object's unbundling?

Comment on lines +1227 to +1231
SmallString<128> P(Inputs[0].getBaseInput());
llvm::sys::path::replace_extension(P, "o");
SmallString<128> Quoted;
QuoteTarget(llvm::sys::path::filename(P), Quoted);
CmdArgs.push_back(Args.MakeArgString(Quoted));
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we double-check these in the test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll adjust the test accordingly. As for your -foffload-static-lib issue with .d question, this patch does not address that problem. For that problem, we need to extract the .d files from the archive and add them to the aoc call. Current device extraction only takes into account the device objects and passes them along to the partial link step. The .d files are left alone.

Copy link

@meiyacha meiyacha Jun 22, 2020

Choose a reason for hiding this comment

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

I suppose this also affects offload static library that are passed without this flag?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@meiyacha, that is correct. Offload static lib w/ and w/out -foffload-static-lib behaves the same.

@bader bader merged commit 24726df into intel:sycl Jun 22, 2020
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