Results 1 to 4 of 4

Thread: Local memory access question in the specification

  1. #1
    Junior Member
    Join Date
    Oct 2009
    Posts
    7

    Local memory access question in the specification

    I have read the specification 1.0.48.

    According to '3.3 Memory Model',
    Local Memory is local to a work-group and allocated on the device.
    And Table 3.1 refer to behavior of a host and kernels.
    A host allocates 'local memory' dynamically but has 'No access'.

    On the other hand, I have read ..
    Alternatively, the local memory region may be mapped onto sections of the global memory.
    .

    I can't understand. I think it's not able to use clEnqueurMapBuffer.
    Is a local memory allocated on a host memory dynamically?
    Can I map a local memory to global memory region using something API explicitly?
    Or is it the deal within OpenCL implementation?

    Could you point out my misunderstanding?

  2. #2
    Member
    Join Date
    Sep 2009
    Posts
    35

    Re: Local memory access question in the specification

    Host cannot read nor write local memory. From host you can only allocate amount of local memory you need in work-groups.
    Of course if you try to allocate some local memory and device runs out of free local memory, it will use global *internally*.

  3. #3
    Junior Member
    Join Date
    Oct 2009
    Posts
    7

    Re: Local memory access question in the specification

    Thanks,

    Of course if you try to allocate some local memory and device runs out of free local memory, it will use global *internally*.
    is It inside the OpenCL implementation?

  4. #4
    Senior Member
    Join Date
    Jul 2009
    Location
    Northern Europe
    Posts
    311

    Re: Local memory access question in the specification

    That depends. There's no such thing as "local" memory on a CPU so the implementation will probably just allocate regular memory for CPU devices. On GPUs there is physical local memory so if you try to use too much you should get an error.

Similar Threads

  1. 2 times sin() vs one local memory access
    By clint3112 in forum OpenCL
    Replies: 2
    Last Post: 11-02-2012, 01:20 AM
  2. Replies: 4
    Last Post: 08-12-2012, 07:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •