This extension configures the system environment and settings for Intel® oneAPI toolkits and their products. To learn about more extensions for oneAPI Toolkits, see Using Visual Studio Code with Intel® oneAPI toolkits.
You can initialize your environment with following steps.
- Install one of Intel® oneAPI Toolkits. Use Intel® oneAPI Base Toolkit as a default.
- Open your project in VSCode and press
Ctrl+Shift+P (or View -> Command Palette...)
to open the Command Palette. - Type Intel oneAPI to view options of the installed extensions.
- Click on
Intel oneAPI: Initialize default environment variables
. - If Visual Studio Code* asks for a location, locate your setvars script. Linux: the script is located in
<install dir>/intel/oneapi
. The default installation location is/opt/intel/oneapi
. Windows: the script is located in<install dir>\Intel\oneAPI\
. The default installation location isC:\Program Files (x86)\Intel\oneAPI
.
The current environment applies to all tasks, launch and new terminals, regardless of which folder it was originally associated with.
Previously created terminals contain only the environment in which they were created, regardless of the environment applied to a new terminal.
You can specify the direct path to the oneAPI install directory in order to avoid searching for the environment every time the environment is initialized.
- Press
Ctrl+, (or File -> Preferences -> Settings)
to open the Settings. - On the left side of the Settings window, select
Extensions>Environment Configurator for Intel Software Developer Tools
. - In the "ONEAPI_ROOT" field, specify the path to the installation directory of the oneAPI toolkit.
You can limit the initialization of the environment to a specific set of oneAPI components, and also initialize the environment for a specific version of the component.
Due to changes in directory layout, 2024.0 version of Intel® oneAPI Toolkits include 2 environment setup scripts - setvars and oneapi-vars. Note that oneapi-vars script doesn't work with config files, so you can only use setvars script for this case.
For this you need:
- Press
Ctrl+, ( or File -> Preferences -> Settings )
to open the Settings. - On the left side of the Settings window, select
Extensions>Environment Configurator for Intel Software Developer Tools
. - In the
SETVARS_CONFIG
area, clickAdd Item
and provide the path to your setvars configuration file. - Press
Ctrl+Shift+P
to open the Command Palette.Type oneAPI
and selectIntel oneAPI: Initialize custom environment variables using SETVARS_CONFIG
. - To switch the environment, click
Intel oneAPI: Switch environment
and select the configuration file that the environment is associated with. - To delete the oneAPI environment, open the Command Palette and select
Intel oneAPI: Clear environment variables
.
Also the name of the configuration file can be arbitrary, but it will be used as an environment identifier. Using different files with the same name will result in the reinitialization of the current environment and not the creation of a new one.
Install Visual Studio Code (at least version 1.83.1) and open this project within it.
You may also need node+npm
installed:
npm i
code .
At this point you should be able to run the extension in the "Extension Development Host".
This extension is released under MIT.