Welcome back to the oneAPI channel.​
Productivity is so important,​
And we all hate to deal with setting up new environment, linking to the right libraries.​
Well, I hate it.​
One option is to run code on the Intel dev-cloud. Everything is already set-up there​
But it has its limitations,​
If you are using VS-code, here is your way to direct code SYCL with the DPC++ compiler
and much more.
If you navigate to the VS-code marketplace​
And look for oneAPI extensions​
You can find here 7 of them​
Each has a full documentation, short videos, and explanations to get you started..​
And with the spirit of oneAPI, it is all open,​
You can take a look at the code, and even contribute to the project
Just a quick look at what we have here​
The environment configurator is an easy way to get the environment set up in a click
​Then you can use the code sample browser to
find a code sample, build and run it on your local machine
If you prefer running it on the Intel dev-cloud, the dev-cloud connector will assist you ​
To configure and Remote-SSH connect to the Intel® DevCloud development environment.
With the GDB with GPU Debug Support extension, you can debug CPU and GPU applications,
directly from VS-Code.
The analysis configurator is your way to​
seamless integration with the VTune™ Profiler, and the Intel Advisor​
Pretty powerful tools, look for the relevant videos on them.
The extension pack is the easy way to install all at once
And the Intel SW development tools is a fast way to get a catalog of ready to use ​
Docker* images for from Intel like OpenVINO, Open Visual Cloud and more​
Let’s see the extensions in action
​ I open the VS-Code,​
I already have the base toolkit installed.​
Look for extensions,​
oneAPI..​
I can install each of the extensions separately, or I can just get the pack..​
And that’s all, I’m all set.​
If you open the command pallet and look for oneAPI​
The first thing you can do is to clear the oneAPI environment variables, ​
Or Initialize custom variables, or like me initialize the default ones, ​
And I’m all set​
And I’ve got here a simple SYCL code,​
You might need to point to the right path of the sycl library or the DPC++ libraries,​
This is the location of the library for windows, I’m sure you’ll find the linux one​
And let’s open a terminal, ​
We have the code here,​
Let’s Compile it​
DPCPP hello-sycl​
And run it from the terminal, ​
Pretty cool and easy to get started with SYCL programming and DPC++ compiler..
And here is a great way to get sample code​
We have here the oneAPI logo,​
And we can browse for oneAPI sample code​
Or you can search for it​
I’ll look for the array-transform sample, specify a folder for it​
And it is opened in a new window​
Yes, setup the default oneAPI environment​
I got here everything I need,​
And all the instructions will be under the readme file​
Setting up​
Running in the dev cloud​
Running in VS-code and so on.​
Every sample requires a slightly different handling.​
This one need to build the solution in Visual Studio​
So let me do it real quick, re-build​
And let’s open a terminal​
And from the Pallete , “generate a task” ​
And let’s build all.​
Generated, ​
And from Terminal, let’s run task.. All​
And it’s running​
​
And we are all done..​
And I can run the sample code​
Here using the GPU..​
Results are correct​
And on the CPU..​
All good
Pretty cool, setting up the environment variables, getting the sample code and running it all
from VS-code, ​
But you can do more ​
Debugging with GDB for example, this is not enabled on Windows yet, so try it in Linux
only​
And the analysis configurator can help you set up Intel vTune or the intel advisor
Let me show you how​
From the Pallet choose to Launch the Vtune profiler​
I’ll direct it to the executable,​
vTune is open.​
Let’s run it​
And I can choose all types of analysis,​
Detect Hot spots, and many others​
Lets try the GPU offload,​
Run it​
And we get the full report​
And the graphical view..​
You are in vTune.. Start debugging,​
With all the capabilities directly from VS-code.
If you’d like to run on a new powerful HW from Intel​
Use the dev-cloud extension to work remotely from VS-code on the devcoud​
​
And that’s all​
oneAPI extensions to VS-code.​
Enjoy, subscribe​
Thank you