- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The VML 64-bit API appears to internally dispatch to the VML 32-bit API. When the vector length parameter exceeds `INT_MAX`, it crashes. Defining `-DMKL_MKL_ILP64` does not help. Below is a minimum reproducible example.
#include <mkl_vml.h>
#include <mkl_service.h>
#include <vector>
int main()
{
mkl_set_interface_layer(MKL_INTERFACE_ILP64); // Does not resolve crash
// auto constexpr N = int64_t{INT_MAX}; // Works
auto constexpr N = int64_t{INT_MAX} + int64_t{1}; // Crashes
auto constexpr k = float{1};
auto xs = std::vector<float>(N);
vsAddI_64(N, xs.data(), 1, &k, 0, xs.data(), 1);
} `__INTEL_MKL_BUILD_DATE` is `20260401`
Linking against `mkl_rt.3.dll`
Stacktrace
2 mkl_vml_serv_threader_s_2iI_1oI mkl_intel_thread_3 0x7ff982641ec6
3 vsAddI_64 mkl_rt_3 0x7ff98610536e
4 main main.cxx 37 0x7ff67466182a
5 invoke_main exe_common.inl 79 0x7ff6746637f9
6 __scrt_common_main_seh exe_common.inl 288 0x7ff6746636a2
7 __scrt_common_main exe_common.inl 331 0x7ff67466355e
8 mainCRTStartup exe_main.cpp 17 0x7ff67466388e
9 BaseThreadInitThunk KERNEL32 0x7ffa5bf8e957
10 RtlUserThreadStart ntdll 0x7ffa5d607c1c
Processor 13th Gen Intel(R) Core(TM) i5-13420H (2.10 GHz)
Installed RAM 16.0 GB (15.7 GB usable)
Graphics card NVIDIA GeForce RTX 3050 6GB Laptop GPU (6 GB)
Intel(R) UHD Graphics (128 MB)
Storage 258 GB of 477 GB used
System type 64-bit operating system, x64-based processor
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reporting this bug.
I can reproduce it. It looks it only happens when incb=0. Let me escalate it internally and I will get back to you soon.
Thanks,
Fengrui
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should report this to Intel. Your reproducer is minimal and clearly shows that vsAddI_64() crashes when N > INT_MAX, even with the ILP64 interface enabled, which shouldn't happen if 64-bit vector lengths are fully supported.
In the meantime, as a workaround, split the operation into chunks no larger than INT_MAX elements until Intel confirms whether this is a bug or provides a fix.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@davidwarner344 "You should report this to Intel." Is that not what the op did by posting here? I love these non-answers/responses from new users who have established no credibility.
Doc (not an Intel employee or contractor)
[Success breeds complacency. Complacency breeds failure. (Andy Grove)]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This looks like an MKL bug. vsAddI_64 should support 64-bit lengths, so crashing at INT_MAX + 1 suggests an internal 32-bit limitation. I'd report it to Intel with your reproducer and stack trace.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For those saying that I should report this to Intel, that is what the original post was for. If I try to use "Development Software Support" or "Contact Support", I get rejected for not being a paying customer. If there is a proper channel to report bugs, Intel has not designed their website in an intuitive manner to do so.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This looks like a bug in MKL. Since vsAddI_64() crashes only when N > INT_MAX even with ILP64 enabled, it suggests an internal 32-bit limitation. I'd report it to Intel with your minimal reproducer and build details. For now, splitting the work into chunks smaller than INT_MAX is the safest workaround.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like a bug in the current MKL release. Since the crash only happens when N > INT_MAX and ILP64 settings don't help, it suggests the call is still using a 32-bit path internally. Your minimal example is excellent—I'd submit it as a bug report so Intel can reproduce and investigate it quickly.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page