Testing oneAPI Toolkits with VSCode on Windows Subsystem for Linux

Antimo Musone

Antimo Musone

Rome, Lazio

0 0
  • 0 Collaborators

This a tutorial will enable you to set and test oneAPI Environment with Visual Studio Code on Windows to edit your code and debug using the Windows Subsystem for Linux* (WSL). ...learn more

Project status: Concept

oneAPI, Artificial Intelligence

Intel Technologies
oneAPI

Overview / Usage

Before start, we have two prerequisites for your Windows System:

Installation of Intel® oneAPI Toolkits on a WSL requires the following steps:

  1. Get the Intel Repository public key and install it:

cd /tmp wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB

Add to your apt sources keyring so that archives signed with this key will be trusted.

sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB

Remove the public key

rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB

2) Configure the APT client to use Intel's repository:

3) Download package info for oneAPI Toolkit and components.

4) Install the Toolkit, the Intel® oneAPI Base Toolkit:

5) Set user environment for CPU with:

Install CMake*, pkg-config, and GNU* Dev Tools to Build Samples:

sudo apt -y install cmake pkg-config build-essential

Set Environment Variables:

  1. Configure Visual Studio Code :

Install the Remote - WSL extension . Click the Extensions icon and search for "remote wsl" in the search bar then click on the first result and install

  1. Connect Visual Code to Your WSL Linux System. Open a WSL terminal and invoke VSCode from the command line to start a local instance connected to WSL.

  2. After previous step on your windows system a new Visual Studio Code window opens and is connected to the WSL system.

  3. Add the **C/C++ extension **to the Visual Studio Code, this extension is required to debug a remote session using the VSCode debug interface.

  4. Installing the Visual Studio Code Extension for Browsing Samples and Build:

From Visual Studio Code, install the oneAPI CLI Samples Browser by clicking on the Extensions logo in the left navigation. Locate the extension titled Sample Browser for Intel oneAPI Toolkits then click install.

Comments (0)