Comments (5)
Hi, stepping into ZeCommandQueueExecuteCommandLists will go into ze_loader and L0 driver implementation of that function. This will not step directly into the kernel.
What format is the module input you are using? SPIRV or native? You will need to set a breakpoint inside kernel before execution to debug it
from level-zero.
Hello,
it is possible to debug level zero kernels. For that setup environment has to be setup similarly to what is done for SYCL application debugging (https://www.intel.com/content/www/us/en/develop/documentation/get-started-with-debugging-dpcpp-linux/top.html), especially:
export ZET_ENABLE_PROGRAM_DEBUGGING=1
export IGC_EnableGTLocationDebugging=1
Then, start application under gdb.
Set breakpoint in HOST before zeModuleCreate() call ( gdb-oneapi -ex "b example.cpp:LINE" )
When HOST hits the breakpoint - set stop on loading libraries:
(gdb) set stop-on-solib-event 1
Continue execution on HOST, when module is created - message should be printed:
Stopped due to shared library event:
Inferior loaded in-memory-0x5555569e35c0-0x5555569e7508
Now, dump memory :
(gdb) dump memory module.elf 0x5555569e35c0 0x5555569e7508
Read elf to find out entry point address:
readelf -a module.elf
Elf file should list entries in symbol table, something similar to:
Symbol table '.symtab' contains 12 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 00008000fff40000 3760 FUNC LOCAL DEFAULT 1 mykernel
2: 00008000fff400c0 3568 FUNC LOCAL DEFAULT 1 _entry
The address to set BP from above is 0x8000fff400c0:
(gdb) b *0x8000fff400c0
Breakpoint 6 at 0x8000fff400c0: file main.cl, line 17.
continue
Now debugger should stop in the kernel
Thread 5.1 hit Breakpoint 6, with SIMD lanes [0-15], 0x00008000fff400c0 in mykernel ( ....
When stopped on GPU thread - it is possible to disassemble binary and single step.
Regards,
Mateusz
from level-zero.
I am generating ze_module_handle_t
directly via nGen
from level-zero.
seems our address might be wrong
There are no relocations in this file.
The decoding of unwind sections for machine type Intel Graphics Technology is not currently supported.
Symbol table '.symtab' contains 3 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: ffff8000fffa0000 104 FUNC LOCAL DEFAULT 1 _
2: ffff8000fffa0020 72 FUNC LOCAL DEFAULT 1 _entry
set BP at ffff8000fffa0020
Cannot insert breakpoint 2.
Cannot access memory at address 0xffff8000fffa0020
set BP at 0x8000fffa0020
Cannot insert breakpoint 2.
Cannot access memory at address 0x8000fffa0020
@HoppeMateusz @bmyates any advices?
from level-zero.
@airMeng - do you see gdb event like this one:
Stopped due to shared library event:
Inferior loaded in-memory-0x5555569e35c0-0x5555569e7508
it is only possible to set BP after zeModuleCreate() creates and loads module binary to GPU. Have you tried breaking just before zeCommandQueueExecuteCommandLists() and setting BP in the GPU module at that point ?
from level-zero.
Related Issues (20)
- [Feature Request] Add equivalent of cudaDeviceSynchronize() HOT 3
- Parameter validation layer erroneously checks pCommandQueueGroupProperties HOT 3
- Document says "setting ZE_FLAT_DEVICE_HIERARCHY to 1" - error? HOT 1
- Loader throws access violation at exit during context destroy
- Potential problem with zeKernelSuggestGroupSize HOT 1
- libze_loader.so.1: cannot open shared object file: no such file or directory HOT 6
- Preferred abbreviation: ZE or L0? HOT 1
- [Error] Don't get kernel HOT 1
- v1.15.1: Debs Prefix/Install Paths Appear to Be Wrong in Release Artifacts HOT 7
- Incorrect libdir in pkg-config files
- `zesMemoryGetState` only works under root user HOT 4
- Convenience method for error processing
- Can't find binaries for windows
- TEST 'IMEX :: Integration/Dialect/XeGPU/gemm_4kx4kx4k_f16_f16_f16_w_8x32xf16_stores.mlir' FAILED HOT 1
- Error when loading level_zero lib for `zesInit()` on windows client HOT 2
- Conflict with DLLs already in system32
- `zesDeviceEnumFabricPorts` and `subdevice`
- Finding the cause for ZE_RESULT_ERROR_UNINITIALIZED HOT 2
- Support static version of ZE loader library
- Missing ze_loader.dll HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from level-zero.