arrayfire / arrayfire

ArrayFire: a general purpose GPU library.
https://arrayfire.com
BSD 3-Clause "New" or "Revised" License
4.56k stars 535 forks source link

[Question] How to query the size of device RAM? #3263

Open wbrickner opened 2 years ago

wbrickner commented 2 years ago

Hello,

I'd like to dynamically use different sizes of a 3D tensor based on how much device memory (video ram, regular ram, fpga memory, etc) is available at one time.

There seems to be a few functions adjacent to this, device_mem_info, etc. Nothing seems to provide device memory size, which is what I need to know.

Thank you

wbrickner commented 2 years ago

I see af_memory_manager_get_max_memory_size, is this supported in the arrayfire-rust crate?

That is the way in which I am interacting with arrayfire.