Skip to content

oneMath links Intel oneMKL statically on Windows #654

Open
@Rbiessy

Description

@Rbiessy

Summary

The CMake logics set MKL_LINK to static when building for Windows:

oneMath/CMakeLists.txt

Lines 231 to 235 in c3c85db

if(BUILD_SHARED_LIBS AND NOT WIN32)
set(MKL_LINK dynamic)
else()
set(MKL_LINK static)
endif()

This creates a large library on Windows of around 100MB, whereas on Linux with dynamic linking it is around 3MB for the blas domain for instance. This is not practical to integrate in other applications.
I am wondering if someone from @uxlfoundation/onemath-arch-write know why this is the case? Would there be any risk to switch to linking Intel oneMKL dynamically today?

Version

It looks like this was introduced in c3c85db9
Pinging @mkrainiuk in case you have more context.

Environment

The issue happens on Windows with the Intel oneMKL backends.

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildA request to change/fix/improve the build system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions