- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'd like to set the MKL_DIRECT_CALL flag for the custom MKL dll that we are using from a C application and hopefully speed up the matrix operations. Will it be enough to set the flag for the C application alone? What about the makefile for the custom MKL dll?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Berk,
We did the investigation. you can
1) include dgemm_direct and dgemm_direct_ in user_example_list. (user_def_file.def) to create custom.dll
2) then you can just call dgemm() and add –DMKL_DIRECT_CALL with include "mkl.h".
Best Regards,
Ying
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Are you reading the article,
Right?
MKL_DIRECT_CALL flag is pre-processor macros to be defined to instruct Intel MKL to pick the fast path for small matrices. It was using during compile phase, so it should be ok for you to add such option
on Linux system, simply add -DMKL_DIRECT_CALL or -DMKL_DIRECT_CALL_SEQ. On Windows, the syntax is /DMKL_DIRECT_CALL or /DMKL_DIRECT_CALL_SEQ.
in your makefile (same as /Qstd=c99 ) both for c application and custom MKL Dll.
Best Regards,
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ying,
Thanks for your reply. Yes I've read the article before posting, and my question was if using MKL by not directly linking with it but via a custom made MKL dll changed anything or not. I especially wanted to know if I needed to declare the flag when building the custom MKL dll, and if so, where & how. It looks trivial to define & use the flag in our main C project that calls the custom MKL dll for matrix operations. I am not sure how to do the same for the custom MKL dll itself, though...
Berk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Berk,
We did the investigation. you can
1) include dgemm_direct and dgemm_direct_ in user_example_list. (user_def_file.def) to create custom.dll
2) then you can just call dgemm() and add –DMKL_DIRECT_CALL with include "mkl.h".
Best Regards,
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ying,
Thanks for your reply. One final question: Does this flag affect PARDISO at all? If so, how can I set it on my custom dll exposing PARDISO calls to my application?
Thanks again for you help.
Berk
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page