[Mesa-dev] OpenCL max VRAM setting

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Tue Apr 26 19:56:46 UTC 2016


Hi Bo,

I am not aware of any environment variables that do that. However you
can change the limit in the source code.

You can change the single allocation size limit in
src/gallium/drivers/radeon/r600_pipe_common.c where max_mem_alloc_size
is set to 256MiB. You can change that, and then the total available
memory will be limited to 4 times this value (and available VRAM+GTT
if that is lower).

Yours sincerely,
Bas Nieuwenhuizen

On Tue, Apr 26, 2016 at 9:35 PM, Bo Gao <7zlaser at gmail.com> wrote:
> Hi all,
>
> First time poster here. Is there any way I can change global memory size and
> max allocable memory size for an OpenCL program? My card has 4GB or VRAM,
> but seems like I can only use a quarter of it for OCL, and I can only use a
> quarter of the quarter for a single block of allocation. Is there anyway to
> lift this limitation? I know I can do that by exporting 2 environment
> variables when using fglrx, but how to do this with AMDGPU+Clover?
>
> My GPU is AMD R9 nano, and I have enough host memory (64GB).
>
>
>
> Thanks,
> Bo Gao
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>


More information about the mesa-dev mailing list