This extension configures the system environment and settings for Intel oneAPI toolkits and their products.
Before you start, make sure that you have oneAPI BaseKit or other installed. Note: To use the environment features in Windows, you need to have PowerShell 7 or higher. For more information, see sections Intel oneAPI toolkits and components and Other extensions for oneAPI.
-
Launch the command palette to access the options:
- Press
Ctrl+Shift+P
( orView -> Command Palette…
) and type Intel oneAPI.
- Press
-
Adding and removing oneAPI environments for local and remote cases:
- Choose the option
Intel oneAPI: Set oneAPI environment
. - All tasks, launches, and terminals created after that will contain the oneAPI environment.
- To delete the oneAPI environment choose the option
Intel oneAPI: Unset oneAPI environment
- Choose the option
-
Preparing tasks from make / cmake files:
- Choose the option
Intel oneAPI: Generate tasks
and follow the prompts to add targets from your make/cmake oneAPI project. If the oneAPI environment is not present it will be automatically added to the current VSCode instance. - Now you can run targets from make/cmake in the oneAPI environment via
Terminal -> Run task...
- Choose the option
-
Preparing launch configuration for running/debugging oneAPI projects:
- Choose the option
Intel oneAPI: Generate launch configurations
and follow the prompts. If the oneAPI environment is not present it will be automatically added to the current VSCode instance. - The result is a configuration for debugging and running that uses the gdb-oneapi debugger and is available in the Run tab ( or
Ctrl+Shift+D
).
- Choose the option
- General links:
- To get started with oneAPI development may be useful:
- Make sure that the C/C++ extension is already installed.
- Press
Ctrl+Shift+P
and choose the optionC/C++ Edit Configurations (JSON)
. As a result, a c_cpp_properties.json file will be created in .vscode folder. - Edit the file so that it looks like in the example:
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"/opt/intel/oneapi/**"
],
"defines": [],
"compilerPath": /opt/intel/oneapi/compiler/latest/linux/bin/dpcpp",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "linux-clang-x64"
}
],
"version": 4
}
- If necessary, replace the path to the oneAPI components with the one that is relevant for your installation folder.
- IntelliSense for oneAPI is ready.
Install Visual Studio Code (at least version 1.46) and open this project within it.
You may also need yarn
installed, and of course node+npm
npm install -g yarn
yarn install
code .
At this point you should be able to run the extension in the "Extension Development Host"
This extension is released under MIT.