Skip to content

Conversation

@maarquitos14
Copy link
Contributor

Dynamic linking was already supported in the old offloading model, so bring the support to the new offloading model.

def sycl_allow_device_image_dependencies : Flag<["--", "-"], "sycl-allow-device-image-dependencies">,
Flags<[WrapperOnlyOption, HelpHidden]>,
HelpText<"Allow dependencies between device code images">;
def no_sycl_allow_device_image_dependencies : Flag<["--", "-"], "no-sycl-allow-device-image-dependencies">,
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure if we need the negative version when we are dealing with sub-tools

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's see what other reviewers think. I don't have a strong opinion either, just added both to be consistent with the driver.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just the enabling option for the tools should be enough, the option complexities of what a user can do via the command line warrants both the positive and negative variants there.

Copy link
Contributor

@asudarsa asudarsa 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.

Thanks

@maarquitos14 maarquitos14 marked this pull request as ready for review November 12, 2024 21:17
@maarquitos14 maarquitos14 requested review from a team as code owners November 12, 2024 21:17
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.

OK for driver

@maarquitos14
Copy link
Contributor Author

@sergey-semenov the review for runtime it's just a few e2e tests copied to use new offload driver, so it should be a quick review :)

@asudarsa ping :)

Copy link
Contributor

@sarnex sarnex left a comment

Choose a reason for hiding this comment

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

minor comment on the test

// RUN: | FileCheck -check-prefix CHECK_DYNAMIC_LINKING %s
// CHECK_DYNAMIC_LINKING: clang-linker-wrapper{{.*}} "-sycl-allow-device-image-dependencies"

/// Check for -sycl-allow-device-image-dependencies transmission to clang-linker-wrapper tool
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like the bottom two cases are ones we should not pass the flag, so maybe we should update the comment?

/// Check for -sycl-allow-device-image-dependencies transmission to clang-linker-wrapper tool
// RUN: %clangxx -fsycl -### --offload-new-driver \
// RUN: -fno-sycl-allow-device-image-dependencies %s 2>&1 \
// RUN: | FileCheck -check-prefix CHECK_NO_DYNAMIC_LINKING %s
Copy link
Contributor

Choose a reason for hiding this comment

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

can you double check and make sure this will actual fail if the arg appears for this case and the below one? if not we might want to use implicit-check-not instead of a check-prefix

Copy link
Contributor

@sarnex sarnex left a comment

Choose a reason for hiding this comment

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

lgtm assuming all the tests are exact copy pastes from the existing tests but with -offload-new-driver added to some commands

note to anyone else: these tests are not intended to be permanent, once we enable the new offload driver by default we can delete all of them

Copy link
Contributor

@sergey-semenov sergey-semenov left a comment

Choose a reason for hiding this comment

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

I would prefer if these tests reused the existing source files instead of copying them, but I'm okay with it if the switch to the new model by default is planned to happen soon.

@maarquitos14
Copy link
Contributor Author

@intel/llvm-gatekeepers I think this is ready to merge.

@martygrant martygrant merged commit c2dab05 into intel:sycl Nov 15, 2024
13 checks passed
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