arrayfire icon indicating copy to clipboard operation
arrayfire copied to clipboard

No AF_ERR_NO_MEM error when afopencl array creation fails

Open WilliamTambellini opened this issue 6 years ago • 3 comments

Hello Not a high priority but for some reasons AFOpenCL does not throw a AF_ERR_NO_MEM exception when allocation via OpenCL fails :

backend ArrayFire v3.7.0 (OpenCL, 64-bit Linux, build 929a641) [0] INTEL: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 15925 MB

fatal error: af::exception: ArrayFire Exception (Internal error:998): OpenCL Error (-61): Invalid Buffer Size when calling clCreateBuffer In function void {anonymous}::initEmptyArray(void**, af::dtype, dim_t, dim_t, dim_t, dim_t) In file src/api/cpp/array.cpp:105

Steps to repro: just try to create {1000000000, 1000000000} dense array with afopencl. Expected behavior: AF_ERR_NO_MEM exception

WilliamTambellini avatar Oct 10 '19 19:10 WilliamTambellini

Is the behavior same on non-Intel devices too ?

9prady9 avatar Oct 15 '19 11:10 9prady9

I think I ve seen afopencl via nvidia opencl behaving the same but TBC.

WilliamTambellini avatar Oct 31 '19 22:10 WilliamTambellini