-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL][Driver] Add deprecated warning for backend GRF options on PVC #12029
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
Signed-off-by: Sarnie, Nick <[email protected]>
HIP and CUDA failures are both
and are not related and are under investigation. |
// RUN: %clang -fsycl -Xs "-device pvc -ze-intel-128-GRF-per-thread" -### %s 2>&1 | FileCheck -check-prefix=SMALL %s | ||
// RUN: %clang -fsycl -Xs "-ze-intel-enable-auto-large-GRF-mode -device pvc" -### %s 2>&1 | FileCheck -check-prefix=AUTO %s | ||
|
||
// RUN: %clang -fsycl -fsycl-targets=intel_gpu_pvc -Xs "-ze-opt-large-register-file" -### %s 2>&1 | FileCheck -check-prefix=LARGE %s |
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.
Did I miss any important cases 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.
So do we care about potential usages like -Xs -ze-opt-large-register-file -Xs "-device pvc"
?
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.
im gonna go with no because i've never seen anybody do that and it seems like it would be pretty annoying to deal with
// Make sure to only warn for once for gen targets as the translate | ||
// options tree is called twice but only the second time has the | ||
// device set. | ||
if (Triple.isSPIR() && Triple.getSubArch() == llvm::Triple::SPIRSubArch_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.
This is kinda gross but we end up calling the entire translate backend opt tree super early in selectBfloatLibs
so if we don't do anything the warning is thrown twice for the same backend opt instance.
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.
this would probably need some kind of cleanup so we can do BE arg checking from anywhere and not be impacted by multiple diagnostic outputs, but yeah, it's not pretty.
|
||
int main() { | ||
} |
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.
Actual source code not needed - everything is -###
checked.
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.
nice catch, thanks
// RUN: %clang -fsycl -Xs "-device pvc -ze-intel-128-GRF-per-thread" -### %s 2>&1 | FileCheck -check-prefix=SMALL %s | ||
// RUN: %clang -fsycl -Xs "-ze-intel-enable-auto-large-GRF-mode -device pvc" -### %s 2>&1 | FileCheck -check-prefix=AUTO %s | ||
|
||
// RUN: %clang -fsycl -fsycl-targets=intel_gpu_pvc -Xs "-ze-opt-large-register-file" -### %s 2>&1 | FileCheck -check-prefix=LARGE %s |
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.
So do we care about potential usages like -Xs -ze-opt-large-register-file -Xs "-device pvc"
?
// Make sure to only warn for once for gen targets as the translate | ||
// options tree is called twice but only the second time has the | ||
// device set. | ||
if (Triple.isSPIR() && Triple.getSubArch() == llvm::Triple::SPIRSubArch_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.
this would probably need some kind of cleanup so we can do BE arg checking from anywhere and not be impacted by multiple diagnostic outputs, but yeah, it's not pretty.
Signed-off-by: Sarnie, Nick <[email protected]>
@intel/dpcpp-cfe-reviewers Hey all, mind reviewing this one? Just added a warning in the td file. |
@@ -399,6 +399,9 @@ def err_drv_fsycl_wrong_optimization_options : Error< | |||
def warn_drv_fsycl_add_default_spec_consts_image_flag_in_non_AOT : Warning< | |||
"-fsycl-add-default-spec-consts-image flag has an effect only in Ahead of Time Compilation mode (AOT).">, | |||
InGroup<SyclTarget>; | |||
def warn_drv_ftarget_register_alloc_mode_pvc : Warning< | |||
"using %0 to set GRF mode on PVC hardware is deprecated; use -ftarget-register-alloc-mode=pvc:%1">, |
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.
"using %0 to set GRF mode on PVC hardware is deprecated; use -ftarget-register-alloc-mode=pvc:%1">, | |
"using '%0' to set GRF mode on PVC hardware is deprecated; use '-ftarget-register-alloc-mode=pvc:%1'">, |
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.
fixed in latest commit, thank you!
Signed-off-by: Sarnie, Nick <[email protected]>
Signed-off-by: Sarnie, Nick <[email protected]>
@intel/dpcpp-devops-reviewers Cuda CI not looking too hot:
|
@intel/llvm-gatekeepers Can we merge this one? Cuda CI is failing but it passed in an earlier commit here and all I did since then is reword a warning which is tested in LIT and passes on other platforms. |
With the
-ftarget-register-alloc-mode
option, the user doesn't need to pass IGC flags to the compiler to set the GRF mode. On PVC, emit a warning in the most common case to suggest the user use the new option. This doesn't catch every case because the-device
syntax is complicated, but it can help in the most common use case.