arrayfire / arrayfire-rust

Rust wrapper for ArrayFire
BSD 3-Clause "New" or "Revised" License
815 stars 58 forks source link

[BUG] arrayfire::locate fails for large arrays #373

Closed BA8F0D39 closed 1 year ago

BA8F0D39 commented 1 year ago

Description

arrayfire::locate fails for input large arrays

Reproducible Code and/or Steps

For a large array of A, arrayfire locate fails


arrayfire::set_seed(100);
let A_dims = arrayfire::Dim4::new(&[107500,1,32000,1]);
let mut A = arrayfire::randu::<bool>(A_dims);

let result = arrayfire::locate(&A);

println!("  result.dims()[0] {}",result.dims()[0]);
println!("  result.dims()[1] {}",result.dims()[1]);
println!("  result.dims()[2] {}",result.dims()[2]); 
[1]    84261 segmentation fault (core dumped) 

System Information

ArrayFire v3.9.0 (CUDA, 64-bit Linux, build 715e21fcd) Platform: CUDA Runtime 12.0, Driver: 525.89.02 [0] NVIDIA GeForce RTX 3090, 24260 MB, CUDA Compute 8.6 Info String: ArrayFire v3.9.0 (CUDA, 64-bit Linux, build 715e21fcd) Platform: CUDA Runtime 12.0, Driver: 525.89.02 [0] NVIDIA GeForce RTX 3090, 24260 MB, CUDA Compute 8.6 Arrayfire version: (3, 9, 0) Name: NVIDIA_GeForce_RTX_3090 Platform: CUDA Toolkit: v12.0 Compute: 8.6 Revision: 715e21fcd

Checklist

BA8F0D39 commented 1 year ago

@9prady9 Will there be a fix?

9prady9 commented 1 year ago

@BA8F0D39 This has to be reported upstream unless you think there is an issue in the wrapper which is rather unlikely given it is more or less just call delegation to ArrayFire. I have reopened the issue on upstream