Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

VML 64-bit API Bug Report

meding
Beginner
47 Views

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

1 vmldLinearFracI_26                           mkl_vml_avx2_3       0x7ff97a9eee14
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

0 Kudos
0 Replies
Reply