arrayfire / arrayfire/arrayfire

[Question] Have an array allocation failing w/ errno 103

Đang mở
#3,619 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C++
Star
4.9k
Fork
555
Merge trung bình
1 giờ 24 phút
Pull request đã merge (30 ngày)
1

Mô tả

Hey all,

I have some code that is erroring and i have **no** idea why.

```int main(int argc, char** argv)
{
// Show available backends
auto backends = af::getAvailableBackends();
cout << "Available backends: ";
if(backends & AF_BACKEND_CPU) cout << "CPU ";
if(backends & AF_BACKEND_CUDA) cout << "CUDA ";
if(backends & AF_BACKEND_ONEAPI) cout << "OneAPI ";
if(backends & AF_BACKEND_OPENCL) cout << "OpenCL ";
cout << endl;

my_namespace::methods::af_benchmark_solve_linear_system();
}
void af_benchmark_solve_linear_system()
{
// Define the coefficient matrix A (10x10)
float A_vals[] =
{
2, 3, -4, 1, -5, 7, 2, -6, 8, -1,
5, -6, 3, 7, -1, 9, 4, 8, 2, -3,
-3, 5, -7, 9, -4, 6, 1, -2, 3, 5,
6, 1, -5, 3, -8, 4, 9, 2, -7, -1,
4, -7, 8, 2, -1, 3, 5, -6, 9, 1,
-1, 3, 6, -4, 7, -5, 8, 2, -3, 4,
7, -4, 3, -5, 6, 9, -2, 1, 4, -8,
8, 6, -9, 1, 3, -7, 5, -2, 1, 6,
5, -3, 7, -8, 4, 6, -1, 9, 2, -5,
3, 1, -6, 5, -7, 8, 2, 4, -9, 3
};

// Define the right-hand side vector b (10x1)
float b_vals[] = {15, -12, 10, 20, -5, 18, 25, -7, 14, 8};

// Create ArrayFire arrays for A and b
try
{
af::array A = af::randu(10, 10, f32);
af::array b(10, b_vals);

// Solve the linear system
af::array x = af::solve(A, b);
}
catch (af::exception &ex)
{
cout << stderr << " ArrayFire error: " << ex.what() << endl;
}

}
```

When it reaches the ```af:array A = af::randu(...)``` line, it throws this error:
```00007FFCA4679CE0 ArrayFire error: ArrayFire Exception (Runtime error :103):
In function af_err __cdecl af_randu(af_array *, const unsigned int, const dim_t *const, const af_dtype)
In file C:/Users/stef/coding/arrayfire/src/api/c/random.cpp:346

0# 0x00007FFC025A6E87 in C:\Program Files\ArrayFire\v3\lib\afoneapi.dll
1# 0x00007FFC0528FDB7 in C:\Program Files\ArrayFire\v3\lib\afoneapi.dll
2# 0x00007FFC054C8953 in C:\Program Files\ArrayFire\v3\lib\afoneapi.dll
3# 0x00007FFC054C8BB7 in C:\Program Files\ArrayFire\v3\lib\afoneapi.dll
4# 0x00007FF7A903A50A in C:\bin\arrayfire_bench.exe
5# 0x00007FF7A9033A8B in C:\bin\arrayfire_bench.exe
6# 0x00007FF7A9042F59 in C:\bin\arrayfire_bench.exe
7# 0x00007FF7A9042E42 in C:\bin\arrayfire_bench.exe
8# 0x00007FF7A9042CFE in C:\bin\arrayfire_bench.exe
9# 0x00007FF7A9042FEE in C:\bin\arrayfire_bench.exe
10# 0x00007FFD2598DBE7 in C:\WINDOWS\System32\KERNEL32.DLL
11# 0x00007FFD2647FBEC in C:\WINDOWS\SYSTEM32\ntdll.dll

In function array __cdecl af::randu(const dim4 &, const af::dtype)```

If anyone could help me understand what's going on that would be great. I was testing this library earlier and it was working just fine. Without the pdb files though I don't think I'll be able to get close enough to the exception source to figure this one out.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Reproduce the failure at af::randu(10, 10, f32), then inspect src/api/c/random.cpp:346 and the selected backend or device initialization. Verify the available-backends output and runtime configuration; done means identifying the cause of errno 103 and recording a reproducible resolution or required environment.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
cpp
Lĩnh vực
backend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
20/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.