GPU memory usage for Hadamard product
I have a GPU with 48 Gb of RAM.
I have a large matrix A (complex single 45927×45927, gpuArray) taking 16 Gb of my GPU.
I get to the following Hadamard product with a vector B (complex single 45927×1, gpuArray) with approximately 28 Gb of free RAM on the GPU:
C = A .* (B.’)
But this throws an "out of memory on the device" error, despite there being enough memory for C (also 16 Gb). Why is this happening? Does MATLAB implicitly convert B to a full matrix? Is there a way to get this multiplication to work on the GPU within the available memory? (maybe this has been fixed in later releases of MATLAB?)I have a GPU with 48 Gb of RAM.
I have a large matrix A (complex single 45927×45927, gpuArray) taking 16 Gb of my GPU.
I get to the following Hadamard product with a vector B (complex single 45927×1, gpuArray) with approximately 28 Gb of free RAM on the GPU:
C = A .* (B.’)
But this throws an "out of memory on the device" error, despite there being enough memory for C (also 16 Gb). Why is this happening? Does MATLAB implicitly convert B to a full matrix? Is there a way to get this multiplication to work on the GPU within the available memory? (maybe this has been fixed in later releases of MATLAB?) I have a GPU with 48 Gb of RAM.
I have a large matrix A (complex single 45927×45927, gpuArray) taking 16 Gb of my GPU.
I get to the following Hadamard product with a vector B (complex single 45927×1, gpuArray) with approximately 28 Gb of free RAM on the GPU:
C = A .* (B.’)
But this throws an "out of memory on the device" error, despite there being enough memory for C (also 16 Gb). Why is this happening? Does MATLAB implicitly convert B to a full matrix? Is there a way to get this multiplication to work on the GPU within the available memory? (maybe this has been fixed in later releases of MATLAB?) hadamard, gpu, memory, product MATLAB Answers — New Questions