-
Notifications
You must be signed in to change notification settings - Fork 745
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][Experimental] Reduce the set of optimizations for SYCL device #1550
Conversation
This is patch limits the set of optimizations aiming to reduce the size of generated device module. Optimizations are currently disabled by default as they cause multiple sorts of issues. Some of the issues are addressed within this patch, but not all of them. Optimizations can be enabled with `-fsycl-enable-optimizaions` front-end option (or `-Xclang -fsycl-enable-optimizaions` driver option). Signed-off-by: Alexey Bader <alexey.bader@intel.com>
Signed-off-by: Alexey Bader <alexey.bader@intel.com>
Signed-off-by: Alexey Bader <alexey.bader@intel.com>
Signed-off-by: Alexey Bader <alexey.bader@intel.com>
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 this needs driver work to make sure it rejects the opt settings for SYCL? Or what do we expect -O3 to do here?
At this moment it's not clear to me whether we should have a single optimization pipeline for SYCL device compiler or allow users to configure it with -O* options. As of now, this is not exposed to the users, so I can configure the pipeline with O1//2/3 with |
Signed-off-by: Alexey Bader <alexey.bader@intel.com>
Signed-off-by: Alexey Bader <alexey.bader@intel.com>
@@ -865,14 +897,15 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action, | |||
|
|||
std::unique_ptr<llvm::ToolOutputFile> ThinLinkOS, DwoOS; | |||
|
|||
// Clean-up SYCL device code if LLVM passes are disabled | |||
if (LangOpts.SYCLIsDevice && CodeGenOpts.DisableLLVMPasses) |
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.
More a suggestion for upstreaming purposes: DisableLLVMPasses
is supposed to be a mode to retrieve LLVM IR as generated by clang before any LLVM optimizations (helpful for debugging). Perhaps it would be better to have a specific mode which would not run optimizations yet would run some clean-up passes.
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 change is just a refactoring of existing functionality.
@Naghasan, are you okay with addressing it in a separate PR?
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.
yes, it was more informative. As you refactored it, this was highlighted, but that's clearly out of scope.
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.
CFE stuff looks fine.
@AlexeySotkin, @AlexeySachkov, ping. |
I guess that for FPGA when you know you have only 1 work-item you can have |
Unfortunately, it's not related to # of work-items, but rather issues are caused by the kernel code. I see problems with vectors & loops, where O3 passes use constructs unsupported either by SPIR-V translator or (I suspect) exposes bugs in OpenCL implementations consuming optimized SPIR-V. |
FP power operation is legalized using the identity ``pow(x,y) = pow(2, y * log2(x))``. This fixes the latest WL compilation failure for ll->XeISA path.
This is patch limits the set of optimizations aiming to reduce the size of
generated device module.
Optimizations are currently disabled by default as they cause multiple
sorts of issues. Some of the issues are addressed within this patch, but
not all of them.
Optimizations can be enabled with
-fsycl-enable-optimizaions
front-endoption (or
-Xclang -fsycl-enable-optimizaions
driver option).Signed-off-by: Alexey Bader alexey.bader@intel.com