1 Reply Latest reply on Jul 19, 2016 11:35 AM by dipak

    Compile OpenCL code using command line

    shailu1995

      Hello,

      I am trying to compile an OpenCL code in command prompt(windows).

      Basically, I want to compile a simple C++ code(using cl.exe compiler) which in itself will compile another .cl kernel file (as it happens in OpenCL). So how should I compile this code and how to include the opencl libraries and everything.

      I am a newbie in this field, so please correct me if I am wrong at some point.

      Thanks in advance.

      Regards

      Shailesh

        • Re: Compile OpenCL code using command line
          dipak

          Hi Shailesh,

          Hope, you've already installed the AMD APP SDK and compatible driver on your system. Otherwise, please install the packages using below links:

          AMD APP SDK ->  app-sdk

          Driver -> Download Drivers

           

          To build and run OpenCL project, please refer the section ''Building and Running OpenCL Programs" in  AMD Programming User Guide (/AMD_OpenCL_Programming_User_Guide2.pdf ) which shows how to build an OpenCL program using Visual Studio on Windows. Though I've not used the cl.exe myself to develop an OpenCL project, I hope, you can figure out the cl.exe command-line options to achieve the same if you are already familiar with the cl.exe.

           

          Regards,