Getting Started with Codexl Introduction AMD Codexl™ Is a Coherent and Innovative Tool Suite with a Unified User Interface
Total Page:16
File Type:pdf, Size:1020Kb
AMD CodeXL Quick Start Guide AMD Developer Tools Team Advanced Micro Devices, Inc. Version 1.2 Revision 1 Table of Contents Introduction ................................................................................................................................................ 2 Install CodeXL ............................................................................................................................................ 2 Validate CodeXL installation ............................................................................................................... 4 Installing the VC++ Redistributable package .............................................................................. 5 CodeXL help ................................................................................................................................................ 6 Run the Teapot Sample project ......................................................................................................... 6 Basic debugging ........................................................................................................................................ 9 Source Code view .................................................................................................................................. 10 Breakpoint view ..................................................................................................................................... 11 Watch and Locals views ..................................................................................................................... 12 Explorer view .......................................................................................................................................... 14 Call Stack view ........................................................................................................................................ 16 Function Calls History view.............................................................................................................. 17 Debugged Process Events view ...................................................................................................... 17 Memory view ........................................................................................................................................... 18 Statistics view ......................................................................................................................................... 18 System information .............................................................................................................................. 18 Project settings ....................................................................................................................................... 20 Profile mode ............................................................................................................................................. 20 CPU profiling ............................................................................................................................................ 21 GPU profiling ........................................................................................................................................... 26 CodeXL Explorer view ......................................................................................................................... 28 Kernel Analyzer ...................................................................................................................................... 30 Start KernelAnalyzer2......................................................................................................................... 30 Open kernel source............................................................................................................................... 31 Build Options- Choosing target Asics .......................................................................................... 32 Build Options- Defining kernel compilation options ........................................................... 32 Analysis Input Tab ................................................................................................................................ 33 Build the kernel ...................................................................................................................................... 33 Build Statistics Tab ............................................................................................................................... 34 The Analysis Tab .................................................................................................................................... 34 Known issues ........................................................................................................................................... 35 Support ....................................................................................................................................................... 35 Getting Started with CodeXL Introduction AMD CodeXL™ is a coherent and innovative tool suite with a unified user interface. It lets you harness the benefits of AMD CPUs, GPUs, and APUs with a single program. You can use its powerful APU/GPU debugging, CPU and GPU profiling, and static OpenCL™ kernel analysis capabilities to find bugs and to optimize application performance, giving you easy access to the new era of heterogeneous computing. AMD CodeXL is available as a standalone application for Windows® and Linux® and as a Microsoft® Visual Studio® extension for Windows. This document describes CodeXL system requirements, how to install CodeXL, and how to get started using CodeXL. It then describes how to get started using the kernel analysis tool KernelAnalyzer2. Finally, it explains how to find information about known CodeXL issues and how to contact AMD for support. Install CodeXL This section describes how to install CodeXL. The installation details are system- specific (Windows or Linux), but once you have installed and started CodeXL its operation is system-independent. OpenCL profiling and OpenCL kernel debugging requirements: • An AMD GPU (Radeon HD5000 or newer) or APU • AMD Catalyst Driver, release 12.8 or later o Recommended version: Catalyst 13.6 Beta o See: support.amd.com/US/GPUDOWNLOAD/Pages/index.aspx and click the “Latest Windows Beta Driver”/“Latest Linux Beta Driver” links. OpenCL API-level debugging requirement: • A working OpenCL/OpenGL configuration (AMD or other) CPU profiling requirements: • Time-based profiling: any x64 or AMD X64 (x86-64) CPU or APU • Event-based profiling (EBP) and instruction-based sampling (IBS): an AMD CPU or APU Windows system requirements: • Microsoft Windows 7, 8 or 8.1 (32 bit or 64 bit) • [Optional] Microsoft Visual Studio 2010 • [Optional] Microsoft Visual Studio 2012 Linux system requirements: • Red Hat Enterprise Linux 6.0 U2 64-bit or later 2 © 2013 Advanced Micro Devices, Inc. Getting Started with CodeXL or • Ubuntu 12.04 64-bit or later Download the AMD CodeXL installation package from developer.amd.com/tools/heterogeneous- computing/codexl/#download Then install it as described below for your system. For Windows: Download the .exe file AMD_CodeXL_Win*.exe for Windows (32-bit or 64-bit). When the download completes, click on the .exe file to install CodeXL. The installer will walk you through the installation process. The CodeXL Visual Studio 2010 and 2012 extensions are part of the Windows .exe installer package and are installed by default. Choose “Custom” installation and deselect the Visual Studio extensions if you do not want to install them. For Red Hat/CentOS/Fedora Linux, install the RPM package directly: Download the 64-bit Linux RPM package AMD_CodeXL_Linux*.rpm. $ sudo rpm -Uvh AMD_CodeXL_Linux*.rpm For Ubuntu, either install the tar archive, or alternatively convert the .rpm to a .deb package: Either: Download the 64-bit Linux tar package AMD_CodeXL_Linux*.tar.gz $ tar –xvzf AMD_CodeXL_Linux*.tar.gz or: Download the 64-bit Linux RPM package AMD_CodeXL_Linux*.rpm. $ sudo apt-get install alien $ sudo alien -k AMD_CodeXL_Linux*.rpm $ sudo dpkg -i AMD_CodeXL_Linux*.deb 3 © 2013 Advanced Micro Devices, Inc. Getting Started with CodeXL Validate CodeXL installation Launch the CodeXL standalone application (or Visual Studio, if you are using the VS CodeXL extension) after you finish CodeXL installation. For Windows: • Windows >> All Programs should have a new folder entry: AMD Developer Tools >> AMD CodeXL. • An AMD CodeXL shortcut should appear on the desktop. • Control Panel should show AMD CodeXL in its list of installed programs. Double-click on the CodeXL desktop shortcut or select CodeXL from the program menu. The CodeXL standalone application should start. For Windows using the Visual Studio plugin: Launch Microsoft Visual Studio. The VS GUI should appear. Verify that AMD CodeXL is installed: Select Help >> About Microsoft Visual Studio from the menu bar. CodeXL should be listed under Installed products. The VS menu bar should include a CodeXL pull-down menu. For Linux: Either: • Add /opt/AMD/CodeXL/Output_x86_64/release/bin/ or wherever you extracted the tar package to your PATH and launch: $ PATH=/opt/AMD/CodeXL/Output_x86_64/release/bin:$PATH $ CodeXL or: • Navigate to /opt/AMD/CodeXL/Output_x86_64/release/bin/ or wherever you extracted the tar package and launch: $ cd /opt/AMD/CodeXL/Output_x86_64/bin/ $ ./CodeXL The CodeXL standalone application should start. When you finish the installation