Results 1 to 7 of 7

Thread: OpenCL - local memory over multiple kernels

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    4

    OpenCL - local memory over multiple kernels

    Hi Guys!

    Is it possible, to generate some kind of data on GPU, store it in the local memory and use this data in more than one kernel?

    It would be nice to see a simple example, if it's possible.

    Thank you!

  2. #2
    Member
    Join Date
    Jul 2011
    Location
    Moscow, Russia
    Posts
    41

    Re: OpenCL - local memory over multiple kernels

    Is there anything preventing you from using global buffers? They keep their data between kernel runs.
    Blog (in russian)

  3. #3
    Junior Member
    Join Date
    Jul 2011
    Posts
    4

    Re: OpenCL - local memory over multiple kernels

    I've read that using local memory is much faster than using global memory. At the moment i use global memory. But the point is, that the GPU-side generated data is never used by the host - so why i should write the data in the global memory?

  4. #4
    Member
    Join Date
    Jul 2011
    Location
    Moscow, Russia
    Posts
    41

    Re: OpenCL - local memory over multiple kernels

    Quote Originally Posted by Soxda2
    I've read that using local memory is much faster than using global memory. At the moment i use global memory. But the point is, that the GPU-side generated data is never used by the host - so why i should write the data in the global memory?
    Global memory - is the main memory of GPU. If it is not needed by host then you just don't copy it to the host.

    Local memory is invalidated after all work-items in work-group finish execution. There is no way to use it for passing data between kernel runs. Besides, it is small in size.
    Blog (in russian)

  5. #5
    Junior Member
    Join Date
    Jul 2011
    Posts
    4

    Re: OpenCL - local memory over multiple kernels

    ah..ok, that sounds good. Is it still necessary to set the Kernel-Argument for the Kernels which use that buffer?

  6. #6
    Member
    Join Date
    Jul 2011
    Location
    Moscow, Russia
    Posts
    41

    Re: OpenCL - local memory over multiple kernels

    Quote Originally Posted by Soxda2
    ah..ok, that sounds good. Is it still necessary to set the Kernel-Argument for the Kernels which use that buffer?
    Yes.
    Blog (in russian)

  7. #7
    Junior Member
    Join Date
    Jul 2011
    Posts
    4

    Re: OpenCL - local memory over multiple kernels

    Ok, thank you very much.

Similar Threads

  1. Multiple kernels and constant memory
    By eugine in forum OpenCL
    Replies: 1
    Last Post: 09-03-2010, 12:59 PM
  2. Replies: 5
    Last Post: 04-23-2010, 08:50 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
  •