You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found on MTL iGPU, if I call FP16 gemm of onemkl (no matter using OneAPI 2024.0 or 2024.2), the program will crash, and if I call it many times, it will cause my machine to freeze directly.
However, on ARC, everything is fine.
Version
oneAPI 2024.0 or oneAPI 2024.2 .
Environment
minimal c++ program
Windows 11
icx 2024.0.2 or 2024.2
Hardware: Intel Core Ultra iGPU
Steps to reproduce
#include<sycl/sycl.hpp>
#include<oneapi/mkl.hpp>
#include<iostream>usingnamespacesycl;intmain() {
queue q{gpu_selector_v};
std::cout << "Device: " << q.get_device().get_info<info::device::name>() << std::endl;
constint M = 1024;
constint N = 11008;
constint K = 4096;
float* A_h = newfloat[M * K];
float* B_h = newfloat[K * N];
float* C_h = newfloat[M * N];
// randomfor (int i = 0; i < M * K; ++i) {
A_h[i] = static_cast<float>(rand()) / static_cast<float>(RAND_MAX);
}
for (int i = 0; i < K * N; ++i) {
B_h[i] = static_cast<float>(rand()) / static_cast<float>(RAND_MAX);
}
// convert input to half
sycl::half* A_h_half = new sycl::half[M * K];
sycl::half* B_h_half = new sycl::half[K * N];
for (int i = 0; i < M * K; ++i) {
A_h_half[i] = sycl::half(A_h[i]);
}
for (int i = 0; i < K * N; ++i) {
B_h_half[i] = sycl::half(B_h[i]);
}
buffer<sycl::half> A(A_h_half, M * K);
buffer<sycl::half> B(B_h_half, K * N);
buffer<float> C(C_h, M * N);
// Use OneMKL to do GEMM
{
q.submit([&](handler &h) {
sycl::accessor A_acc(A, h, sycl::write_only, sycl::no_init);
sycl::accessor B_acc(B, h, sycl::write_only, sycl::no_init);
sycl::accessor C_acc(C, h, sycl::write_only, sycl::no_init);
oneapi::mkl::blas::row_major::gemm(
q,
oneapi::mkl::transpose::nontrans,
oneapi::mkl::transpose::trans,
M, N, K,
1.0f, A_acc.get_pointer(), K,
B_acc.get_pointer(), K,
0.0f, C_acc.get_pointer(), N);
}).wait();
}
delete[] A_h;
delete[] B_h;
delete[] C_h;
delete[] A_h_half;
delete[] B_h_half;
printf("run success!\n");
return0;
}
Hi @andrewtbarker , thanks for quick reply !
I wonder about how long I can obtain such fix ? Next release means OneAPI 2024.3 or smaller product iterations?
Summary
I found on MTL iGPU, if I call FP16 gemm of onemkl (no matter using OneAPI 2024.0 or 2024.2), the program will crash, and if I call it many times, it will cause my machine to freeze directly.
However, on ARC, everything is fine.
Version
oneAPI 2024.0 or oneAPI 2024.2 .
Environment
Steps to reproduce
running above script with below command:
Observed behavior
If I run above command on Linux Arc A770, it works fine:
If I run above command on Windows MTL iGPU, it fails and even cause a black screen:
Expected behavior
I hope above FP16 GEMM can work for MTL iGPU. Thanks!
The text was updated successfully, but these errors were encountered: