-
Notifications
You must be signed in to change notification settings - Fork 39
Enhance build flags for Debug and RelWithDebInfo configurations #1671
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
base: main
Are you sure you want to change the base?
Conversation
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.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (1)
- cmake/BuildFlags.cmake: Language not supported
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.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (1)
- cmake/BuildFlags.cmake: Language not supported
cmake/BuildFlags.cmake
Outdated
|
||
if(CMAKE_BUILD_TYPE MATCHES Debug) | ||
set(SYCL_KERNEL_OPTIONS ${SYCL_KERNEL_OPTIONS} -g) | ||
set(SYCL_KERNEL_OPTIONS ${SYCL_KERNEL_OPTIONS} -Rno-debug-disables-optimization) |
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.
why we use -Rno-debug-disables-optimization
on kernel option but -O0
in host option? we should keep them the same. https://github.com/intel/torch-xpu-ops/blob/main/cmake/BuildFlags.cmake#L47
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.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (1)
- cmake/BuildFlags.cmake: Language not supported
Updates the build configuration in
cmake/BuildFlags.cmake
for different build types. The changes focus on improving debugging capabilities and adding specific flags forDebug
andRelWithDebInfo
build types.Debugging and Optimization Flags:
CMakeLists.txt
to automatically enableBUILD_SEPARATE_OPS
when the build type isDebug
orRelWithDebInfo
.SYCL_HOST_FLAGS
for theDebug
build type to include-g
,-fno-omit-frame-pointer
, and-O0
, and added a new configuration for theRelWithDebInfo
build type with-g
and-O2
.SYCL_KERNEL_OPTIONS
to add-g -O0 -Rno-debug-disables-optimization
forDebug
builds and-gline-tables-only -O2
forRelWithDebInfo
builds.