← 返回首页
Static MKL build fixes by umar456 · Pull Request #3244 · arrayfire/arrayfire · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension .cpp  (1) .txt  (2) All 2 file types selected Viewed files
Conversations
Failed to load comments. Retry
Loading
Jump to
Jump to file
Failed to load files. Retry
Loading
Diff view
Unified
Split
Hide whitespace
Apply and reload
Show whitespace
Diff view
Unified
Split
Hide whitespace
Apply and reload
Prev
Next Next commit
Fix static MKL. Avoid calling interface/threading layer functions
We only need to call the mkl_set_threading_layer and mkl_set_interface_layer functions for shared library builds of MKL. Static builds do not need those functions.
  • Loading branch information
umar456 committed Apr 19, 2022
commit 040960ddd0f40aff01a7255bd00c654379cf2845
2 changes: 1 addition & 1 deletion src/api/c/device.cpp
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ af_err af_init() {
thread_local std::once_flag flag;
std::call_once(flag, []() {
getDeviceInfo();
#if defined(USE_MKL)
#if defined(USE_MKL) && !defined(USE_STATIC_MKL)
int errCode = -1;
// Have used the AF_MKL_INTERFACE_SIZE as regular if's so that
// we will know if these are not defined when using MKL when a
Expand Down
1 change: 1 addition & 0 deletions src/backend/cpu/CMakeLists.txt
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ if(BUILD_WITH_MKL)

if(AF_WITH_STATIC_MKL)
target_link_libraries(afcpu PRIVATE MKL::Static)
target_compile_definitions(afcpu PRIVATE USE_STATIC_MKL)
else()
target_link_libraries(afcpu PRIVATE MKL::RT)
endif()
Expand Down
1 change: 1 addition & 0 deletions src/backend/opencl/CMakeLists.txt
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ if(LAPACK_FOUND OR BUILD_WITH_MKL)

if(AF_WITH_STATIC_MKL)
target_link_libraries(afopencl PRIVATE MKL::Static)
target_compile_definitions(afopencl PRIVATE USE_STATIC_MKL)
else()
target_link_libraries(afopencl PRIVATE MKL::RT)
endif()
Expand Down
Toggle all file notes Toggle all file annotations

Footer

© 2026 GitHub, Inc.