Skip to content
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

[SYCL][Driver][FPGA] Remove support for FPGA related options #16864

Open
wants to merge 11 commits into
base: sycl
Choose a base branch
from

Conversation

mdtoguchi
Copy link
Contributor

@mdtoguchi mdtoguchi commented Jan 31, 2025

Removes support for any FPGA related options and any options that use FPGA specific arguments. Upon usage of any of these options, a specific error will be emitted:

clang++ -fintelfpga file.cpp
clang++: error: option '-fintelfpga' is not supported and has been removed from the compiler. Please see the compiler documentation for more details

The following options are being handled:

  • -fintelfpga
  • -fsycl-targets=spir64_fpga[-unknown-unknown]
  • -fsycl-link=early/image
  • -Xsycl-target-backend=spir64_fpga "opt"
  • -reuse-exe=arg
  • -fsycl-help=fpga

This mainly removes support of the options as specified, subsequent cleanup of driver behaviors will be done in a later change.

Due to the broad impact of these changes, all associated LIT tests have been updated/removed.

…ions

Removes support for any FPGA related options and any options that use
FPGA specific arguments.

First round to double check any fallout in testing
Remove FPGA references from the user manual and update or remove tests
that are using FPGA specific behaviors.
@mdtoguchi mdtoguchi changed the title In Progress- [SYCL][Driver][FPGA] Remove support for FPGA related opt… [SYCL][Driver][FPGA] Remove support for FPGA related options Feb 5, 2025
@mdtoguchi mdtoguchi marked this pull request as ready for review February 5, 2025 22:07
@mdtoguchi mdtoguchi requested review from a team as code owners February 5, 2025 22:07
@mdtoguchi mdtoguchi requested a review from againull February 5, 2025 22:07
Copy link
Contributor

@againull againull left a comment

Choose a reason for hiding this comment

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

llvm-reviewers-runtime owned files LGTM

@keryell
Copy link
Contributor

keryell commented Feb 6, 2025

Why are you removing these options???

Copy link
Contributor

@premanandrao premanandrao left a comment

Choose a reason for hiding this comment

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

FE changes LGTM

@@ -617,7 +617,8 @@ class Driver {

/// getSYCLDeviceTriple - Returns the SYCL device triple for the
/// specified subarch
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment could be updated to mention the additional argument llvm::opt::Arg *Arg = nullptr added.

def reuse_exe_EQ : Joined<["-"], "reuse-exe=">, Visibility<[ClangOption, CLOption, DXCOption]>,
HelpText<"Speed up FPGA aoc compile if the device code in <exe> is unchanged.">,
def reuse_exe_EQ : Joined<["-"], "reuse-exe=">,
Visibility<[ClangOption, CLOption, DXCOption]>, Flags<[UnsupportedRemoved]>,
Copy link
Contributor

Choose a reason for hiding this comment

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

If this option is visible in DXC mode, are those tests removed as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFAIK, there are no DXC specific tests for -reuse-exe.

Arg *SYCLLink = getArgRequiringSYCLRuntime(options::OPT_fsycl_link_EQ);
checkSingleArgValidity(SYCLLink, {"early", "image"});
checkSingleArgValidity(SYCLLink, {"early", "image", "default"});
Copy link
Contributor

Choose a reason for hiding this comment

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

If use of -fsycl-link=early and -fsycl-link=image are not supported, do we still need to pass "early" and "image" as AllowedValues to checkSingleArgValidity ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No - this isn't necessary. The purpose of this change was to introduce the functionality to reject the options. Cleanup will occur later.

@@ -7845,7 +7881,7 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
if (!UseNewOffloadingDriver)
OffloadBuilder->makeHostLinkAction(LinkerInputs);
types::ID LinkType(types::TY_Image);
if (Args.hasArg(options::OPT_fsycl_link_EQ))
if (Args.hasArgNoClaim(options::OPT_fsycl_link_EQ))
Copy link
Contributor

Choose a reason for hiding this comment

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

Why has these been updated to hasArgNoClaim?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change was for a different solution I was working for the -fsycl-link cleanup. This isn't necessary anymore - I will update.

@@ -22,6 +22,9 @@ def err_drv_unsupported_option_argument : Error<
"unsupported argument '%1' to option '%0'">;
def err_drv_unsupported_option_argument_for_target : Error<
"unsupported argument '%1' to option '%0' for target '%2'">;
def err_drv_unsupported_opt_removed : Error<
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a test case added for this diagnostic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes - here:

// FPGA support has been removed, usage of any FPGA specific options and any

- revert usage of hasArgNoClaim
- add comment for new parameter usage
@gmlueck
Copy link
Contributor

gmlueck commented Feb 7, 2025

Why are you removing these options???

Hi @keryell, see #16929 for an explanation.

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.

6 participants