Coder Social home page Coder Social logo

neumann-a / llvm_svml_intrinsic_generator Goto Github PK

View Code? Open in Web Editor NEW
4.0 0.0 2.0 125 KB

Generator to map svml intrinsics from visual studio to intel intrinsics for clang-cl

License: MIT License

CMake 0.37% C++ 87.04% Assembly 0.33% C 12.26%

llvm_svml_intrinsic_generator's Introduction

Microsoft SVML intrinsics for clang-cl

The code within this repository generates the mapping from intel svml intrinsics to the corresponding __vdecl_* symbols found in the c libraries of newer visual studio version (>2019)

The required code to use the intrinsics is in generated_code/avx_svml_intrin.h and generated_code/avx512_svml_intrin.h

About the tests
The tests for the functions ending in *inv fail due to floating point precession. (either testvalue is not accurate enough or the intrinsic is not accurate enough/results are still quite good)
The same happens sometimes for the complex functions.

AVX512 is not yet tested. Especially the masked versions might generated a bit worse code than VS2019 due to a possible extra unmasked load/store before/after the masked load/store.
Since the whole code is automatically generated I assume that the unmasked AVX512 code works as expected.
(don't have a AVX512 system to test)

Note: If you try to build the tests with VS2019 you will encounter an internal compile error. Try to compile the tests in smaller chuncks until the ICE vanishes.
In optimized builds some of the divrem test throw an access violation with clang-cl. Commenting them out solves the problem and the tests run fine.
(The error occours because the stack pointer is not aligned to a 16 bit boundary when calling the helper_intrinsic function. I do not know why clang-cl does not align the stack pointer properly).

Requirements to build
CMake
gtest
boost::program_options
c++17
VS2019 (You might want to change the hardcoded arch flag in the CMakeLists.txt)

llvm_svml_intrinsic_generator's People

Contributors

neumann-a avatar

Stargazers

 avatar  avatar  avatar  avatar

Forkers

vamuvetv

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.