- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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?
- Marcas:
- General Support
Link copiado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Hi Nyan,
Could you please let us know if your issue got resolved or not.
Regards
Goutham
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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?
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Can you tell us the version of beta-toolkit you are using?
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
I'm using 2021.1-beta03 this version.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Hi,
We have forwarded your issue to our concerned team, you will get a response soon.
Thank you
-Abhishek
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Can you try COMPILE instead of BUILD
set CL_CONFIG_USE_NATIVE_DEBUGGER=1
set SYCL_PROGRAM_COMPILE_OPTIONS=-g -cl-opt-disable
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
In addition to all the settings discussed earlier, please, navigate Tools -> Options -> Debugging and unset Require Source Files.
Jens, thanks again for your help!
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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

- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora