Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debugging examples in Docker container within vscode on ubuntu #13

Open
jnorwood opened this issue Jun 1, 2021 · 1 comment
Open

debugging examples in Docker container within vscode on ubuntu #13

jnorwood opened this issue Jun 1, 2021 · 1 comment

Comments

@jnorwood
Copy link

jnorwood commented Jun 1, 2021

In addition to Intel's info on debugging in vscode, there were a couple of mods I did in devcontainer.json.

"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined", "--device=/dev/dri" ],

added the --device=/dev/dri was required to get access to the GPU devices

uncommented the mounts line

// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.

"mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],

changed my cmake build to remove optimization and add DEBUG mode. Also just using make instead of Ninja

CXX=dpcpp cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_CXX_FLAGS="-O0" -D NODPL=1 ../

I had to change the FPGA devices to FPGA emulator in some projects.

I also had to change from default_device to cpu_device in some projects. The default_device is a GPU, which doesn't work in all the programs.

I'm attaching a launch.json file and my modified devcontainer.json for the examples

vscodefiles.zip

Screenshot from 2021-06-01 15-14-58
Screenshot from 2021-06-01 15-13-51
Screenshot from 2021-06-01 15-08-13

@jnorwood
Copy link
Author

jnorwood commented Jun 2, 2021

one other change that wasn't mentioned in Intel's vscode support was the need to update the debugger search path for c and c++ includes for the sycl code. Without it, the debugger can't browse through source related to these type of includes.

#include <CL/sycl.hpp>

so, the change in my vscode c_cpp_properties.json file was to add an additional configurations includePath string:

            "/opt/intel/oneapi/compiler/2021.2.0/linux/include/sycl/**"

This made it possible to, for example, browse to the parallel_for definition
Screenshot from 2021-06-02 09-22-31
Screenshot from 2021-06-02 09-25-14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant