-
Notifications
You must be signed in to change notification settings - Fork 769
[Driver][SYCL] Do not emit mismatch warning with -fsycl-force-target #17013
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
Conversation
The use of -fsycl-force-target=arg allows for a user to override the default target triple that is used to unbundle device objects from the fat objects. The diagnostic warning a user that the expected target values within the given objects is not found is not valid when -fsycl-force-target is used with the matching target value. Avoid emitting this warning when the -fsycl-force-target=arg matches what is found in the incoming objects.
This sentence is hard to understand with the current wording. |
Wow - the original description was quite the word jumble. I have updated for clarity. |
@@ -22,4 +22,7 @@ | |||
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen %S/Inputs/SYCL/liblin64.a \ | |||
// RUN: -Wno-sycl-target -### %s 2>&1 \ | |||
// RUN: | FileCheck %s -check-prefix=SPIR64_DIAG | |||
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen %S/Inputs/SYCL/liblin64.a \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think passing %S/Inputs/SYCL/liblin64.a
and ###
is not necessary here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The passing of liblin64.a
is necessary, it represents the binary that contains the spir64-unknown-unknown
bundled fat object that should trigger the diagnostic due to -fsycl-targets=spir64_gen
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the documentation , my understanding is, when we invoke,
icx -fsycl -fsycl-targets=spir64_gen -fsycl-force-target=spir64
spir64 objects/archives will be extracted but spir64_gen targets will still compile.
I dont see the spir64 archive explicitly passed to the compiler.
Also, since we are checking if a diagnostic is being thrown or not, do we need to pass -### ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation doesn't show a full command line, it just demonstrates how the options work together - it probably should be updated to be a little clearer.
The use of -### ensures that only the driver is invoked here. Without it, we would run additional tools that aren't necessary since we are only checking a diagnostic from the driver.
@intel/llvm-gatekeepers, this is ready for merge, thanks! |
The use of -fsycl-force-target=arg allows for a user to override the default target triple that is used to unbundle device objects from the fat objects. A diagnostic warning is emitted to inform the user that the expected target values within the given objects is not found. This diagnostic is not valid when -fsycl-force-target is used with the matching target value.
Avoid emitting this warning when the -fsycl-force-target=arg matches what is found in the incoming objects.