1、CodeXL17QuickStartGuideAMD CodeXL Quick Start GuideAMD Developer Tools Team Advanced Micro Devices, Inc.Version 1.7Revision 1Table of ContentsINTRODUCTION 3LATEST VERSION OF THIS DOCUMENT 3PREREQUISITES 3DOWNLOAD AND INSTALL CODEXL 4Validate Installation 5Installing the VC+ Redistributable Package 6
2、CODEXL HELP 7SYSTEM INFORMATION 8TEAPOT SAMPLE PROJECT 9Debug the Teapot Sample Application 11Basic Debugging 11Source Code View 12Breakpoint View 13Watch and Locals Views 14Explorer View 16Call Stack View 18Function Calls History View 18Debugged Process Events View 18Memory View 19Statistics View 1
3、9MATRIX MULTIPLICATION PROJECT 20Perform CPU Profile for the Matrix Multiply Sample Application 21CPU Time Based Profile Navigation 21Source Code View 22Run the classic textbook sample 23Analyzing the classic implementation 24Analyzing the improved implementation 26PROFILE MODE 27CPU Profiling 28Ove
4、rview Tab 29Modules Tab 29Call Graph Tab 30Functions Tab 31GPU Profiling 32Summary Tab 33Performance Counters View 34CodeXL Explorer Tree 35Power Profiling 36Switching to Power Profiling mode 36Starting a new Power Profiling session 36Setting the Sampling Interval 37Stopping a Power Profiling sessio
5、n 37Power Profiling Real-Time Values 37Power Profiling Timeline View 38Power Profiling Summary View 39Configuring Power Profiler Sessions 40Static Kernel and Shader Analysis 40Switching to Analysis mode 40Creating a new project for Kernel Analysis 41Adding OpenCL files to an existing project 42Analy
6、ze Mode Options 43Build Options- Defining kernel compilation options 45Building and Analyzing an OpenCL File 48Output Tab 48Overview Tab 50Statistics Tab 50The Analysis Tab 51Viewing compilation output: IL and ISA 51KNOWN ISSUES 52SUPPORT 52IntroductionAMD CodeXL is a tool suite with a unified user
7、interface that lets you harness the benefits of AMD CPUs, GPUs, and APUs. It has powerful capabilities for APU/GPU debugging, CPU and GPU profiling, and static OpenCL kernel analysis. These features let you find bugs, optimize application performance, and easily access heterogeneous computing. AMD C
8、odeXL is available as a stand-alone application for Windows and Linux, as well as a Microsoft Visual Studio extension for Windows.Getting the most out of the AMD CodeXL tool suite requires a relatively recent AMD APU, a recent version of Catalyst, and the OpenCL APP SDK.This document describes how t
9、o get started using CodeXL find information about known CodeXL issues contact AMD for supportLatest Version of This Document For the latest and greatest version of the documentation, go to the CodeXL Website.PrerequisitesOperating Systems Microsoft Windows 7 64-bit Microsoft Windows 8.1 64-bit Linux
10、 64-bit (Red Hat, Ubuntu)For detailed system requirements see the CodeXL Release Notes in the CodeXL installation folder or on the Documentation section of the CodeXL web page.CodeXL Visual Studio Extension Optional Microsoft Visual Studio 2010 (Standard/Professional/Team System Edition) Optional Mi
11、crosoft Visual Studio 2012 (Professional/Premium/Ultimate Edition) Optional Microsoft Visual Studio 2013 (Professional/Premium/Ultimate Edition)Profiling OpenCL Applications GPU device AMD Catalyst driver with OpenCL GPU support GPU device AMD Radeon HD 5000 series or newer AMD APP SDK (requirements
12、)For detailed system requirements see the CodeXL Release Notes in the CodeXL installation folder or on the Documentation section of the CodeXL web page.Download and Install CodeXLInstallation is system-specific (Windows or Linux); but once installed and started, the CodeXL operation is system-indepe
13、ndent.Download the AMD CodeXL installation package from For Windows1. Download the .exe file AMD_CodeXL_Win*.exe.2. When the download completes, double-click the .exe file to install CodeXL.The installer guides you through the installation process.The CodeXL Visual Studio 2010 and 2012 extensions ar
14、e part of the installer package and are installed by default.3. Choose “Custom” installation, and de-select the Visual Studio extensions if you do not want to install them.For Red Hat/CentOS/Fedora Linux1. Download the 64-bit Linux RPM package AMD_CodeXL_Linux*.rpm.2. Install the RPM package directl
15、y:$ sudo rpm -Uvh AMD_CodeXL_Linux*.rpmFor Ubuntu and other Debian based Linux distributionsEither install the tar archive (1.), or install the .deb package (2).1. Download the 64-bit Linux tar package AMD_CodeXL_Linux*.tar.gz.$ tar xvzf AMD_CodeXL_Linux*.tar.gzor2. Download the 64-bit Linux Debian
16、package amdcodexl-*.deb.$ sudo dpkg -i amdcodexl_x.x.x-1_amd64.deb$ sudo apt-get -f installValidate InstallationAfter CodeXL installation, launch the CodeXL standalone application (or Visual Studio, if you are using the VS CodeXL extension).For Windows1. Ensure that: The C:Program Files (C:Program F
17、iles (x86) on 64-bit machines) folder should have a new sub-folder named “AMD”, which should have a sub- folder named “CodeXL” (the full path of the CodeXL folder should be: C:Program FilesAMDCodeXL, or C:Program Files (x86)AMDCodeXL on 64-bit machines) An AMD CodeXL shortcut appears on the desktop.
18、 The Control Panel shows AMD CodeXL in its list of installed programs.2. Double-click on the CodeXL desktop shortcut or select CodeXL from the program menu.The CodeXL stand-alone application starts.For Windows using the Visual Studio plugin1. Launch Microsoft Visual Studio. The VS GUI should appear.
19、2. Verify that AMD CodeXL is installed:Select Help About Microsoft Visual Studio from the menu bar.Check that CodeXL is listed under Installed products. The VS menu bar includes a CodeXL pull-down menu.For LinuxDo one of the following:1. Add one of the following to your PATH:/opt/AMD/CodeXL_X.X-XXXX
20、/ (or wherever you extracted the tar package) or,$ PATH=/opt/AMD/CodeXL_X.X-XXXX:$PATH$ CodeXLOR2. Add one of the following to your PATH:/opt/AMD/CodeXL_X.X-XXXX/or$ cd /opt/AMD/CodeXL_X.X-XXXX/$ ./CodeXLThe CodeXL standalone application starts, and the CodeXL GUI window appears.The CodeXL Explorer
21、view displays: No project loaded, as shown in the following screenshot. Note that screenshots may vary slightly with different versions of CodeXL.Installing the VC+ Redistributable PackageIf Visual Studio is not installed under C:Program Files (or C:Program Files (x86) on 64-bit machines), follow th
22、ese steps to enable CodeXL source view while CPU profiling .NET applications: Download and install Microsoft Visual C+ 2013 Redistributable x86 package from: Register msdia100.dll as a COM component. Open a command shell window.Getting Started with CodeXL On 64-bit Windows systems, enter the followi
23、ng command: regsvr32.exe “c:Program Files (x86)Common Filesmicrosoft sharedVCmsdia100.dll”On 32-bit Windows systems, enter the following command: regsvr32.exe “c:Program FilesCommon Filesmicrosoft sharedVCmsdia100.dll”.Note that 32-bit Windows is no longer formally supported.CodeXL HelpTo bring up a
24、 CodeXL Help window:1. Click on the AMD CodeXL User Guide link on the CodeXL startup Home Page.OR2. Select Help View Help from the CodeXL toolbar.CodeXL Help provides some of the same information provided in this document, but also includes additional details about CodeXL views and modules.To bring
25、up the CodeXL Help window for the Visual Studio extension:1. Select CodeXL Help View Help from the VS menu.System informationTo display system information:1. Select Tools System Information from the CodeXL toolbar.The tabs let you select a category of information. The following screenshot shows Open
26、CL device information for a GPU device and a CPU device on the runtimes available locally - a 32-bit and 64-bit runtime.To display project settings, the project must be stopped. To edit the settings of a project:1. Select File Project Settings from the drop-down File menu.See the CodeXL Help for mor
27、e details about project settings.Teapot Sample ProjectThe CodeXL distribution includes a sample project that displays a smoking teapot. The project uses OpenCL kernels to solve Navier-Stokes equations. It shares a 3D texture between OpenCL and OpenGL, copies a density field grid into the 3D texture,
28、 and renders the smoke using OpenGL.For the Visual Studio extension:1. Select CodeXL Open Teapot Sample Project from the VS menu. Visual Studio displays the teapot sample project.Screenshots in the remainder of this document show the standalone version of CodeXL. The Visual Studio version is similar
29、, but contains a VS window rather than a CodeXL window.For Windows or Linux:1. In the CodeXL welcome page (in the CodeXL menu bar, click on File-Welcome Page), Under the Samples header, click the AMD Teapot link.The CodeXL Explorer view now shows:AMDTTeaPot | Debug Mode - Not runningThe CodeXL windo
30、w also displays several other views, but since the program is not running, those views do not display any information.Debug the Teapot Sample ApplicationNote: Before debugging the Teapot sample application, you must load it (see the previous section).After the teapot sample is loaded, run the debug
31、program:1. Select Debug Start Debugging from the taskbar,or2. Click on the green right arrow taskbar.The program begins execution, and soon displays a rotating smoking teapot in a separate window.To stop the program:1. Select Debug Stop Debugging from the taskbar, or2. Click the black square taskbar Stop button , or3. Click the close button in the upper-right cor
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1