gpuArray size limit is much less than the GPU maximum memory

72 次查看(过去 30 天)
When I work on using gpuArray to speed up my computation, I vectorized all my parallel element-wise operations and then obtained 2 big matrices as gpuArrays, to perform some basic multiplications/summations, etc. I thought this might be the better way to go compared to use the arrayFun. It did work well, and, to further speed up, I want to maximize the memory usage of the GPU. This means, instead of performing matrices operations several times, it will be better to perform bigger matrix operations only one time. Then I found matlab has some limit on the array size as intmax('int32'). However, this number is much less than the maximum GPU memory of my device. So I wonder if there is a way to overcome this.

回答(1 个)

Joss Knight
Joss Knight 2024-10-29,9:51
  1 个评论
z223641s
z223641s 2024-10-30,15:51
Thank you for the guideline. So I think at present I will just split the arrays within the int32 index limit. However, this then requires a repeated process for loading the splitted data one by one and then compute, although by theory I think it is feasible to do these repeated processes in parallel since the memory is enough. For the computation part I tried using the splitted data with arrayfun feature and did achieve to compute all the splitted data on GPU at the same time. However, I have trouble in loading the splitted data to GPU in parallel. I strated by using a for-loop to load the splitted parts one by one to GPU, and later I changed the for to par-for loop, but this seems not working.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 GPU Computing 的更多信息

产品


版本

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by