- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As shown in the following image, trying to debug line by line of my source code.
Is it possible to see variable in kernal code? I can set breakpoint, but can't reach to that line in running the code.
Followed all instructions here for Windows using Visual Studio.
https://software.intel.com/en-us/get-started-with-debugging-dpcpp-windows
How can I debug variables in kernel code?
- Tags:
- General Support
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Nyan,
Please confirm that you have edited the Registry Editor properly with proper type and value.
I just wanted to share some limitation with you, regarding windows debugger you can find them at this link.
It is possible to see the variables present in Kernel.
For Linux, you can directly use gdb-oneapi to debug ger to debug your code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Nyan,
Could you please let us know if your issue got resolved or not.
Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As you can see below, I have set at Registry Editor.
Then I made sure I have the followings.
Start Microsoft Visual Studio* Project
Run the x64 Native Tools Command Prompt for Microsoft Visual Studio* 2017 or Microsoft Visual Studio* 2019.
In the Microsoft Visual Studio terminal, set environment variables by running the following code:
set CL_CONFIG_USE_NATIVE_DEBUGGER=1
set SYCL_PROGRAM_BUILD_OPTIONS=-g -cl-opt-disable
Run the following command to start Microsoft Visual Studio:
devenv.exe
Build the Application
With Microsoft Visual Studio*, open a DPC++ project and add the sample application array-transform.cpp shipped with this release.
Go to Project > Properties > General and set Platform Toolset to Intel® oneAPI DPC++ Compiler.
Build the solution. In the Output window, verify that the build is successfull.
Setup Project Debugging Properties
Go to Project > Properties > Debugging and add the following value to the Environment field:
SYCL_DEVICE_TYPE=CPU
But I can't stop at line in kernel at A[index] = index[0] * 2 + index[1]; in the following code.
myQueue.submit([&](handler& cgh) { // The kernel write a, so get a write accessor on it auto A = a.get_access<access::mode::write>(cgh); // Enqueue a parallel kernel iterating on a N*M 2D iteration space cgh.parallel_for<class init_a>(range<2> {N, M}, [=](id<2> index) { A[index] = index[0] * 2 + index[1]; }); });
What could be issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you tell us the version of beta-toolkit you are using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using 2021.1-beta03 this version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have forwarded your issue to our concerned team, you will get a response soon.
Thank you
-Abhishek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Nyan,
Thank you for your question. Unfortunately, I confirm this issue for beta5, too. I have reported this case to our Developers.
Kind regards,
Alina
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you try COMPILE instead of BUILD
set CL_CONFIG_USE_NATIVE_DEBUGGER=1
set SYCL_PROGRAM_COMPILE_OPTIONS=-g -cl-opt-disable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In addition to all the settings discussed earlier, please, navigate Tools -> Options -> Debugging and unset Require Source Files.
Jens, thanks again for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As this issue is already resolved, we will no longer monitor this issue. You may post a new thread if you have any other issues.
Please go through the Getting Started Guide for more details:
Warm Regards,
Abhishek
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page