5 Replies Latest reply on Feb 3, 2010 8:16 PM by Raistmer

    CPU Context using ATI Stream/OpenCL

    toddwbrownjr

      Hello all,

           I have been developing CUDA programs up until now on my ASUS 1201N, Atom-based processor with NVIDIA ION graphics chip.  I am starting to use ATI's Stream technology to develop OpenCL programs.  I successfully installed the ATI SDK and I replaced NVIDIA's OpenCL.dll file with ATI's OpenCL.dll in Windows\system32.  With the SDK installed and no ATI GPU driver (as I don't have a device that supports it), I am having an issue with the following.  I cannot create a CPU Context.  When I query with a clGetPlatformIDs, I only have one device that is returned, which when I do a clGetPlatformInfo with a CL_PLATFORM_VENDOR argument, returns "Advanced Micro Devices, Inc.".  I assume this context would not work, since I do not have an AMD GPU, but why can't I specify a CPU Context?  Is it the AMD/ATI driver that emulates the CPU OpenCL context (which I don't have)?

        • CPU Context using ATI Stream/OpenCL
          deepthi

          You do need the ATI driver to access the CPU as an OpenCL compute device. Install the ATI Catalyst driver, and you may also need to uninstall the NVidia driver, and then it should work.

            • CPU Context using ATI Stream/OpenCL
              Raistmer
              Originally posted by: deepthi

              You do need the ATI driver to access the CPU as an OpenCL compute device. Install the ATI Catalyst driver, and you may also need to uninstall the NVidia driver, and then it should work.



              Seems not correct to me. I use CPU in OpenCL on Atom-based netbook w/o Catalyst driver installation. Only Stream SDK should be installed for this.
            • CPU Context using ATI Stream/OpenCL
              genaganna

               

              Originally posted by: toddwbrownjr Hello all,

               

                   I have been developing CUDA programs up until now on my ASUS 1201N, Atom-based processor with NVIDIA ION graphics chip.  I am starting to use ATI's Stream technology to develop OpenCL programs.  I successfully installed the ATI SDK and I replaced NVIDIA's OpenCL.dll file with ATI's OpenCL.dll in Windows\system32.  With the SDK installed and no ATI GPU driver (as I don't have a device that supports it), I am having an issue with the following.  I cannot create a CPU Context.  When I query with a clGetPlatformIDs, I only have one device that is returned, which when I do a clGetPlatformInfo with a CL_PLATFORM_VENDOR argument, returns "Advanced Micro Devices, Inc.".  I assume this context would not work, since I do not have an AMD GPU, but why can't I specify a CPU Context?  Is it the AMD/ATI driver that emulates the CPU OpenCL context (which I don't have)?

               

              Toddwbrownjr,

                                    ATI driver is not required if you want to use only CPU as OpenCL device. CPU should support SSE3.x or later. Please run CLInfo.exe sample to know how many OpenCL devices are there on your system.

              Please run existing sample with --device cpu and -q -e -t options and see it say passed or not.

                         Ex :  Reduction.exe --device cpu -q -e -t

               

                • CPU Context using ATI Stream/OpenCL
                  toddwbrownjr

                  genaganna,

                       Thanks very much for the reply.  I made two mistakes--first, I confused a 'platform' with a 'device'.  Second, I used several NULLs in the clGetDeviceID call and, as a result, I did not get a return with CL_SUCCESS.

                       In addition, I saw you post another reply (in a different thread) about Image support on the CPU.  I hope a release is done relatively soon with this support.  Ideally, to debug the OpenCL code, I would think one would just want to change device from GPU to CPU.  With this limitation, the actual GPU code would need to change (if Image was used).  For cards that support texture memory (and the developer wants to use it), I would think an Image memory type would be one of the key ways the driver would infer that texture memory was requested.  maybe I'm wrong.

                    • CPU Context using ATI Stream/OpenCL
                      genaganna

                       

                      Originally posted by: toddwbrownjr genaganna,

                       

                           Thanks very much for the reply.  I made two mistakes--first, I confused a 'platform' with a 'device'.  Second, I used several NULLs in the clGetDeviceID call and, as a result, I did not get a return with CL_SUCCESS.

                       

                           In addition, I saw you post another reply (in a different thread) about Image support on the CPU.  I hope a release is done relatively soon with this support.  Ideally, to debug the OpenCL code, I would think one would just want to change device from GPU to CPU.  With this limitation, the actual GPU code would need to change (if Image was used).  For cards that support texture memory (and the developer wants to use it), I would think an Image memory type would be one of the key ways the driver would infer that texture memory was requested.  maybe I'm wrong.

                       

                      Toddwbrownjr,

                                     OpenCL CPU implemenation is not a emulation of OpenCL GPU implementation. OpenCL treats CPU as device.  Image is not supported for both CPU and GPU presently. You can expect in upcoming releases