Developer Central
China  |  India
  • Home
  • Tools & SDKs
  • Resources
  • Community
  • Partners
  • Support
  • Home
  • Tools & SDKs
  • Resources
  • Community
  • Partners
  • Support
  • Home
  • Tools & SDKs
  • Resources
  • Community
  • Partners
  • Support
  • Home
  • Tools & SDKs
  • Resources
  • Community
  • Partners
  • Support

Tools & SDKs

  • Heterogeneous Computing
    • Aparapi
    • APP Kernel Analyzer
    • APP Profiler
      • Getting Started
        • System Requirements
        • Installation
        • Successful Installation
        • Using The Visual Studio Plugin
        • Using the Command Line Interface
        • Known Issues
        • Support
      • User Guide
        • APP Profiler Session Explorer
        • APP Profiler Session
        • APP Profiler Timeline
        • APP Profiler Summary Pages
        • APP Profiler Code Viewer
        • APP Profiler Kernel Occupancy Viewer
        • APP Profiler Settings
        • APP Profiler Session Parameters
        • Description of Configuration Files
        • APP Profiler Kernel Occupancy
        • CLPerfMarkerAMD Library
    • Accelerated Parallel Processing (APP) SDK
      • Downloads
        • Download Archive
      • System Requirements & Driver Compatibility
      • Documentation
      • Bolt C++ Template Library
        • AMD Bolt Sample Code Contest Official Rules
      • Samples & Demos
      • Compute System Recommendations
      • Intro OpenCL Tutorial
      • Open Source Libraries
      • Support
    • Accelerated Parallel Processing Math Libraries (APPML)
    • CodeAnalyst Performance Analyzer
      • CodeAnalyst for Linux®
      • CodeAnalyst for Windows®
      • PMU Extension Driver
      • CodeAnalyst Archive
    • CodeXL
    • gDEBugger
      • gDEBugger User Guide
        • Getting started with gDEBugger
        • Toolbars
        • Views
        • Dialogs
        • How Do I…
        • FAQ
        • Supported Extensions
        • System Requirements & Installation
        • Legal Information
        • Contact Information
  • CPU Development
    • Advanced Platform Management Link (APML)
    • Core Math Library (ACML)
      • Downloads & Resources
        • Building with ACML
        • How to use ACML with different versions of GCC/GFORTRAN
      • Archive Downloads
      • Product Features
      • Redistribution Agreements
    • LibM
      • ACML_MV
      • LibM Functions
    • Open64 SDK
      • Building with ACML
    • SimNow™ Simulator
    • Tools for DMTF DASH
    • x86 Open64 Compiler Suite
      • Developer Guide
      • Apps & Libraries Built by x86 Open64
      • Inactive Files
  • Graphics Development
    • Display Library (ADL) SDK
    • ATI GPU Services (AGS) Library
    • GPU PerfStudio 2
      • API Trace
      • Frame Debugger
      • Frame Profiler
      • Shader Debugger
      • Shader Editor
      • Previous versions
    • GPU ShaderAnalyzer
    • GPUPerfAPI
    • OpenGL ES SDK
    • Quad-Buffer SDK
    • FirePro SDK
      • FirePro News & Events
    • Radeon™ SDK
  • Open Source
    • GCC & GNU Toolchains
    • OpenCL™ Emulator-Debugger
    • Tapper

Home > Tools & SDKs > Open Source > OpenCL™ Emulator-Debugger

OpenCL™ Emulator-Debugger

The OpenCL Emulator-Debugger (ocl-emu) is an open source project originating at AMD that allows you to compile and debug OpenCL kernels as C++ procedures. The goal of the project is to provide OpenCL developers with the full support of Microsoft® Visual Studio® C++ development and debugging environments.

Benefits

  • Compile and debug code within Visual Studio
  • Concentrate on your code rather than the intricacies of the OpenCL runtime, for example:
    • For beginners – get a one-line call “Hello World” kernel
    • For algorithm developers – you can focus on the massive parallel algorithm(s) rather than the OpenCL runtime
  • Enable an easy switch from emulator, CPU or GPU devices for a correctness verification and performance tuning
  • Avoid most OpenCL language compilation errors using the Visual Studio compiler as a syntactical checker

Getting Started

To get ocl-emu on your local machine and attach it to your application you must do the following:

  • Download and install the latest AMD APP SDK
  • Download the files below by browsing the source tree and place them in the same hierarchical level and under the same parent directory:
    • …\opencl_emu
    • …\opencl_emu_app
  • Manually set the environment variable CLEMU_ROOT to point to the installation directory …\opencl_emu directory, for example:
    • SET CLEMU_ROOT=C:\…\deopt\main\sw\advtech\tools\opencl_emu
  • Find and compile the ocl-emu test solution located:
    • …\opencl-emu_app\src
    • The sample application with the debugger’s static libraries should compile out-of-the-box

Setting up a Solution

YOUR Application’s VS9 solution setup

The Microsoft Visual Studio is the recommended developing environment for this tool and requires these quick changes to configure the OpenCL Emulator.

Additional Include Directories:

From the Visual Studio window, go to: Project Properties -> C/C++ -> General and include the following new paths in the additional include directories:

$(AMDAPPSDKROOT)\include
$(CLEMU_ROOT)\clemu
$(CLEMU_ROOT)\runCL
$(CLEMU_ROOT)\SDKUtil
$(CLEMU_ROOT)\include

Note: Users who had downloaded the ocl-emu before APP SDK 2.4 have to add environment variable: AMDAPPSDKROOT = %ATISTREAMSDKROOT%

Preprocessor:

Now go to “Preprocessor” tab in the same Project Properties window and add the following preprocessor

GPU_EMU_IMPL

Code Generation:

The code generation option would be selected depending upon the target application. For example if you’re building a Multi-threaded Debug application (not DLL) then you may select:

Multi-Threaded Debug (/MTd).

Linker:

Now proceed to Configuration Properties -> Linker -> General and add the following as additional library directories:

$(AMDAPPSDKROOT)\lib\x86
$(CLEMU_ROOT)\lib\debug\x86
$(CLEMU_ROOT)\lib\x86

Proceed to Linker -> Input and add the following as Additional Dependencies:

OpenCL.lib

runCl.lib

Your Visual Studio is now all set to run OpenCL Emu.

To build libraries and sample applications, use a solution file located under:

…\opencl-emu_app\src

It does not require any changes and should correctly compile out of the box.

Support

This is an open source project. All support will be provided through the “issues” tab on the ocl-emu project page.

Documentation

  • OpenCL-EMU Documentation
  • Ocl-emu Project Home Page

Downloads

See the ocl-emu source and browse the source tree

Get the hcNewsFlash.

Your email address:

No SPAM.
Easy unsubscribe.

HSA is going to rock your world.

Learn more about Heterogeneous System Architecture.

Got Questions?

Ask the Developer Forums Community. They’ve got answers.

Tools & SDKs

  • Heterogeneous Computing
    • Aparapi
    • APP Kernel Analyzer
    • APP Profiler
      • Getting Started
        • System Requirements
        • Installation
        • Successful Installation
        • Using The Visual Studio Plugin
        • Using the Command Line Interface
        • Known Issues
        • Support
      • User Guide
        • APP Profiler Session Explorer
        • APP Profiler Session
        • APP Profiler Timeline
        • APP Profiler Summary Pages
        • APP Profiler Code Viewer
        • APP Profiler Kernel Occupancy Viewer
        • APP Profiler Settings
        • APP Profiler Session Parameters
        • Description of Configuration Files
        • APP Profiler Kernel Occupancy
        • CLPerfMarkerAMD Library
    • Accelerated Parallel Processing (APP) SDK
      • Downloads
        • Download Archive
      • System Requirements & Driver Compatibility
      • Documentation
      • Bolt C++ Template Library
        • AMD Bolt Sample Code Contest Official Rules
      • Samples & Demos
      • Compute System Recommendations
      • Intro OpenCL Tutorial
      • Open Source Libraries
      • Support
    • Accelerated Parallel Processing Math Libraries (APPML)
    • CodeAnalyst Performance Analyzer
      • CodeAnalyst for Linux®
      • CodeAnalyst for Windows®
      • PMU Extension Driver
      • CodeAnalyst Archive
    • CodeXL
    • gDEBugger
      • gDEBugger User Guide
        • Getting started with gDEBugger
        • Toolbars
        • Views
        • Dialogs
        • How Do I…
        • FAQ
        • Supported Extensions
        • System Requirements & Installation
        • Legal Information
        • Contact Information
  • CPU Development
    • Advanced Platform Management Link (APML)
    • Core Math Library (ACML)
      • Downloads & Resources
        • Building with ACML
        • How to use ACML with different versions of GCC/GFORTRAN
      • Archive Downloads
      • Product Features
      • Redistribution Agreements
    • LibM
      • ACML_MV
      • LibM Functions
    • Open64 SDK
      • Building with ACML
    • SimNow™ Simulator
    • Tools for DMTF DASH
    • x86 Open64 Compiler Suite
      • Developer Guide
      • Apps & Libraries Built by x86 Open64
      • Inactive Files
  • Graphics Development
    • Display Library (ADL) SDK
    • ATI GPU Services (AGS) Library
    • GPU PerfStudio 2
      • API Trace
      • Frame Debugger
      • Frame Profiler
      • Shader Debugger
      • Shader Editor
      • Previous versions
    • GPU ShaderAnalyzer
    • GPUPerfAPI
    • OpenGL ES SDK
    • Quad-Buffer SDK
    • FirePro SDK
      • FirePro News & Events
    • Radeon™ SDK
  • Open Source
    • GCC & GNU Toolchains
    • OpenCL™ Emulator-Debugger
    • Tapper

©2013 Advanced Micro Devices, Inc. OpenCL and the OpenCL logo are trademarks of Apple, Inc., used with permission by Khronos.

  • Contact Us
  • |
  • Careers
  • |
  • Site Map
  • |
  • Terms and Conditions
  • |
  • Privacy
  • |
  • Trademarks