Intel® oneAPI DL Framework Developer Toolkit
Gain insights from peers and Intel experts to develop new deep learning frameworks or to customize an framework utilizing common APIs.

OneDNN Visual Studio integration?

dr_m7
Beginner
2,479 Views

As a preexisting user of MKL and TBB, I had no problem installing oneAPI, loading up my existing VS2019 projects, and activating oneTBB and oneMKL from the "Intel Libraries for oneAPI" project settings - everything there is working fine. However, I also installed oneDNN as part of the oneAPI install package, yet it does not show up as an option here. What is the correct way to integrate oneDNN into a preexisting VS2019 project?

0 Kudos
1 Solution
Gopika_Intel
Moderator
2,411 Views

Hi,

Sorry for the delay in response. On checking from our side, the option to integrate OneDNN to Visual studio is not available. Other libraries such as oneDAL and oneMKL can be integrated with Visual studio. For more information please refer: https://software.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compiler-setup/using-microsoft-visual-studio/using-intel-libraries-with-microsoft-visual-studio.html .

Regards

Gopika


View solution in original post

0 Kudos
6 Replies
AthiraM_Intel
Moderator
2,449 Views

Hi,


Thanks for reaching out to us.

We are investigating your issue at our end. We will get back to you soon with an update.


Thanks.


0 Kudos
Gopika_Intel
Moderator
2,412 Views

Hi,

Sorry for the delay in response. On checking from our side, the option to integrate OneDNN to Visual studio is not available. Other libraries such as oneDAL and oneMKL can be integrated with Visual studio. For more information please refer: https://software.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compiler-setup/using-microsoft-visual-studio/using-intel-libraries-with-microsoft-visual-studio.html .

Regards

Gopika


0 Kudos
dr_m7
Beginner
2,401 Views

Thanks, but this raises an important follow-up question about the usage of oneAPI. It's pretty clear that the reason oneDNN cannot be used in isolation like MKL etc. can is because it requires DPC++ (please correct me if I'm wrong here). Will my use case of using MKL and TBB (and optionally oneDAL and IPP although I have yet to use those two personally) without any DPC++ whatsoever remain fully supported by Intel for the foreseeable future? I am getting a little concerned because all of the oneAPI messaging from Intel seems extremely DPC++ focused, yet oneAPI is also now the only way to install the latest versions of TBB and MKL (which I use heavily but am not in a position where we can migrate to DPC++). Are these standalone non-DPC++ use cases still viewed by Intel as a configuration worthy of supporting, or is Intel's goal to try to push all users of any oneAPI libraries to convert their code to DPC++? Would really appreciate any clarity you can provide around this concern.

0 Kudos
Gopika_Intel
Moderator
2,353 Views

Hi,

  • MKL and TBB can be used in a standalone fashion. MKL can be used with different compilers like icc, icx etc where you don’t need dpcpp.
  • And OneDNN does support Windows OS. It just doesn’t have the library plugin in MS visual studio. Below are the command-line steps to build the getting started sample that comes with OneDNN in Windows.
  1. Open a OneAPI command prompt(setvars.bat would be already executed).
  2. Execute the below command in the desired folder where your project needs to be built.

 

oneapi-cli

 

  1. Select Create a project-> cpp-> Toolkit-> oneAPI Libraries-> oneDNN-> Getting Started
  2. Go to the getting started folder

 

cd getting_started
mkdir build
cd build
cmake -G Ninja ..

 

The Clang compiler tool

"C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/bin/clang++.exe"

targets the MSVC ABI but has a GNU-like command-line interface. This is

not supported. Use 'clang-cl' instead, e.g. by setting 'CXX=clang-cl' in

the environment.

If you get this error after executing cmake statement. Please edit the file CMakeLists.txt in getting started folder. Change to be made: instead of set(CMAKE_CXX_COMPILER "clang++") change it to set(CMAKE_CXX_COMPILER "clang-cl")

 

cmake --build .

 

For more information on OneDNN, please refer:

https://github.com/oneapi-src/oneAPI-samples/tree/master/Libraries/oneDNN/getting_started#on-a-windows-system

For more information regarding oneMKL and oneTBB, feel free to raise your queries in their corresponding forums:-

MKL: https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bd-p/oneapi-math-kernel-library

TBB: https://community.intel.com/t5/Intel-oneAPI-Threading-Building/bd-p/oneapi-threading-building-blocks

Hope this helps.

Regards

Gopika

 

0 Kudos
Gopika_Intel
Moderator
2,320 Views

Hi,

Thank you for accepting it as a solution. If you need any additional information, please submit a new question as this thread will no longer be monitored.

Regards

Gopika


0 Kudos
Ymenjour
Beginner
1,513 Views

Hi ,

 

I recently installed intel c/c++ compiler extension on Visual studio 2022 on my windows 10 and it work well !

Ymenjour_0-1653665703589.png

 

I also installed OneApi Toolkit to use MKL library with DPC++ (also working well after activated it on project properties).

Ymenjour_1-1653665703595.png

 

Now i would like to use oneDNN, as you can see below it already installed on my computer.

 

Ymenjour_2-1653665703882.png

 

 

But when i want to use it and try exemples it's not working and visual studio failed to find these two file

#include "example_utils.hpp"
#include "oneapi/dnnl/dnnl.hpp"

I know i need to set environment var but i don't know how and unfortunatelly i didn't found any explanation how.

I read this topic and the solution does not answer my question.

Is someone can help me to finish to set up my environment ?

 

Thanks,

0 Kudos
Reply