gpuArray size limit is much less than the GPU maximum memory

조회 수: 72 (최근 30일)
z223641s
z223641s 2024년 10월 29일 0:30
댓글: z223641s 2024년 10월 30일 15:51
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
Walter Roberson
Walter Roberson 2024년 10월 29일 1:15
As far as I know, indexing on NVIDIA is restricted to int32.

댓글을 달려면 로그인하십시오.

답변 (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