Skip to content

Commit 4ed1911

Browse files
authored
ApplicationDebugger: simplify AoT compile command and supply "-g" flag. (oneapi-src#2003)
Some users have reported that "-g" flag is not always present in their debug builds by default. The AoT command does not require anymore to pass the internal options to the device compiler. sycl-ls stopped showing the device-id, so I removed that from the Readme. Signed-off-by: Natalia Saiapova <[email protected]>
1 parent 12fbaca commit 4ed1911

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

Tools/ApplicationDebugger/array-transform/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ endif ()
1414

1515
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsycl")
1616

17-
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
17+
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g")
1818
message (STATUS "Optimization level is set to -O0.")
1919

2020
# Check that debugger executables exist in PATH
@@ -37,7 +37,7 @@ elseif (SYCL_COMPILE_TARGET MATCHES fpga-emu)
3737
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsycl-targets=spir64_fpga")
3838
else ()
3939
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsycl-targets=spir64_gen")
40-
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Xs \"-device ${SYCL_COMPILE_TARGET} -internal_options -cl-kernel-debug-enable -options -cl-opt-disable\"")
40+
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Xs \"-device ${SYCL_COMPILE_TARGET}\"")
4141
endif ()
4242
message (STATUS "SYCL_COMPILE_TARGET is '${SYCL_COMPILE_TARGET}'")
4343

Tools/ApplicationDebugger/array-transform/README.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -184,18 +184,7 @@ For example, to do AoT compilation for a specific GPU device ID:
184184
```
185185
$ cmake .. -DSYCL_COMPILE_TARGET=<device id>
186186
```
187-
where the `<device id>` must be replaced with the actual device ID in the hex format.
188-
Use `sycl-ls` command to list available devices on your target machine:
189-
190-
```
191-
$ sycl-ls
192-
[ext_oneapi_level_zero:gpu:0] Intel(R) Level-Zero, Intel(R) Graphics [0x56c1] 1.3 [1.3.0]
193-
[ext_oneapi_level_zero:gpu:1] Intel(R) Level-Zero, Intel(R) Graphics [0x56c1] 1.3 [1.3.0]
194-
[ext_oneapi_level_zero:gpu:2] Intel(R) Level-Zero, Intel(R) Graphics [0x56c1] 1.3 [1.3.0]
195-
[ext_oneapi_level_zero:gpu:3] Intel(R) Level-Zero, Intel(R) Graphics [0x56c1] 1.3 [1.3.0]
196-
```
197-
198-
In the above example, the device ID is `0x56c1`.
187+
where the `<device id>` specifies the target device, e.g., "xe".
199188
200189
> *Hint:* Run `ocloc compile --help` to see all available GPU device options.
201190

Tools/ApplicationDebugger/jacobi/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ endif ()
1414

1515
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsycl")
1616

17-
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
17+
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g")
1818
message (STATUS "Optimization level is set to -O0.")
1919

2020
# Check that debugger executables exist in PATH

0 commit comments

Comments
 (0)