oneapi-src / oneDAL

oneAPI Data Analytics Library (oneDAL)
https://software.intel.com/en-us/oneapi/onedal
Apache License 2.0
611 stars 214 forks source link

Feature request: Add support for ClangCl on MSVC #2115

Open emmenlau opened 2 years ago

emmenlau commented 2 years ago

Describe the bug It would be great if oneDAL could be compiled with the clang-cl compiler frontend for Visual Studio. I have tried to use ClangCl but there seem to be some warnings or errors that make the build fail. Since ClangCl is very similar to clang but also to Visual Studio, it seems it is well aligned with the already supported compilers. And on Windows it generates often much faster code than Visual Studio alone.

napetrov commented 1 year ago

@emmenlau - is this request for library build with clang-cl?

emmenlau commented 1 year ago

@napetrov yes correct, I'd like to build the library with clang-cl from LLVM, as a frontend to Visual Studio.

napetrov commented 1 year ago

@emmenlau - the way how some optimizations are enabled is based on use of compiler intrinsics and some portions of code would be accusable only in case compiler by Intel compilers. So non intel compilers likely would get lower perf comparing to version build with Intel compiler.

But overall would see if ClangCL can be added

emmenlau commented 1 year ago

@napetrov what you say sounds very reasonable! Would love to have ClangCl added (even with these limitations).