GDB with GPU Debug Support for Intel® oneAPI ToolkitsThis extension for Visual Studio Code (VS Code) enables additional features of GPU debugging with GDB for Intel® oneAPI toolkits. To learn more about using extensions with oneAPI, see Using Visual Studio Code with Intel® oneAPI Toolkits. Get startedStart using this VS Code extension with guide Get Started with Intel® Distribution for GDB* on Linux* OS Host. Prepare Launch ConfigurationNote that this feature is only available for the Linux* target platform. This extension enables the ability to prepare launch configurations for running and debugging projects created using Intel oneAPI toolkits:
Note that you can modify the configuration manually. For example, you may need to change:
More information about all the Debugger Health Checks for oneAPIThe Debugger Health Checks provide a tool for verifying the setup and functionality of the oneAPI environment and debugger. It allows you to run a series of tests to ensure that key components, such as GPU drivers, environment variables, and debugging tools, are correctly configured. How to Use:
SettingsSymbolic indication of SIMD lanesIn the settings, you can specify an additional designation for active and inactive lanes using any text character. This may be useful for clearer recognition of lane status. Display Threads SettingsIn the settings, there's an option to enable or disable the display of inactive threads. This can help users focus on active threads or get a comprehensive view of all threads. SIMD ViewIn the debug view, this extension provides SIMD View, which displays the SIMD lane state of an Intel GPU thread. The view will automatically populate when hitting a GPU thread breakpoint. oneAPI GPU ThreadsThe specific values corresponding to the status of the SIMD lanes in your current color scheme can be found in the SIMD Lanes tooltip. Dark blue represents active lanes that are stopped at a breakpoint, light blue indicates active lanes that do not meet breakpoint conditions, and grey indicates inactive lanes. SIMD lane specific breakpointsNote that SIMD lane specific breakpoints are saved between sessions, but will be applied only after hitting a regular breakpoint inside the kernel. There are several ways to set a SIMD lane specific breakpoint:
Choose SIMD LaneYou can choose a new SIMD lane by clicking on it. Choosing a new SIMD lane will show updated information in the SELECTED LANE tab, and extended thread information can be found using the debug console (command Selected lane and Thread infoYou can see additional properties in separate tabs while debugging:
Hardware infoYou can see your device's info in a separate tab while debugging. SIMD Variable WatchThe SIMD Variable Watch functions like the classic Watch panel but displays values for all lanes, making it convenient to compare values without the need for switching between lanes. Most expressions can be evaluated only for active lanes, however GDB convenience variables are usually available for inactive lanes, too, e.g. $_workitem_global_id or $_workitem_local_id. GPU Memory ViewingVS Code's generic debugger now includes a feature for viewing binary data. When a variable supports memory viewing and editing, an inline binary icon appears in the Variables view. Clicking on the icon opens the Hex Editor, allowing to perform operations on the binary data. This functionality appears in the Variables and Watch panels. Clicking on the icon opens the Hex Editor, in which is possible to inspect conveniently large pieces of data. This functionality enables users to examine the memory space of Intel® GPU kernels. Differences Between GDB and GDB-oneapiTo display the differences between these two distributions of GDB:
Note that the debug session is started by running a command from this terminal. If characters remain in the terminal, this will make the command incorrect and cause the debugging session to hang. ContributingInstall Visual Studio Code (version 1.86, or newer) and open this project within it. You also need
At this point you should be able to run the extension in the "Extension Development Host". License
Other names and brands may be claimed as the property of others. Legal NoticeYour use of this software and any required dependent software (
|