7 Replies Latest reply on May 26, 2011 6:32 PM by jeff_golds

    Buffer Size Recommendations from AMD for AMD GPUs [CLOSED]

    dragonxi4amd
      clCreateBuffer & clCreateSubBuffer

      Hi,

      Referring to OpenCL specs for clCreateBuffer

       

      "OpenCL implementations are allowed to cache the buffer

       

      contents pointed to by

       

       

      host_ptr in device memory. This

      cached copy can be used when kernels are executed on a

      device."

       

      Q1. What is the cache size used by AMD GPU

      A) ATI RV770 ?

      B) new 6990 ?

       

      Q2. What is the minimum and maximum for region of clCreateSubBuffer function ?

      Q3. Are there any limits / recommendations to number of regions in a buffer - due to cache feature for example ?

      Q4. Can one release a created sub-buffer ?

       

       

       

       

       

       

       

       

       

       

       

       

       

        • Buffer Size Recommendations from AMD for AMD GPUs [OPEN] ?
          himanshu.gautam

          "OpenCL implementations are allowed to cache the buffer

          >>You need to use the flag -fno-alias for caching.

           

          contents pointed to by

           

          host_ptr in device memory. This

          cached copy can be used when kernels are executed on a

          device."

          Q1. What is the cache size used by AMD GPU

          A) ATI RV770 ?

          B) new 6990 ?

          >> L1 and L2 caches are used. Sizes are given in Appendix D of Programming guide( gen L1 - 8K and L2-128K)

          Q2. What is the minimum and maximum for region of clCreateSubBuffer function ?

          >> I don't think there should be any limit. you should be able to have a region value from 0 to bufferSize.

          Q3. Are there any limits / recommendations to number of regions in a buffer - due to cache feature for example ?

          Q4. Can one release a created sub-buffer ?

          >> I think a subBuffer is just another cl_mem object.Refer to sec 5.4 of opencl spec. From Spec: "After the memobj reference count becomes zero and commands queued for execution on a command-queue(s) that use memobj have finished, the memory object is deleted. If memobj is a
          buffer object, memobj cannot be deleted until all sub-buffer objects associated with memobj are deleted."