pt-4052, introduction to amd developer tools, by yaki tebeka and gordon selley

35
INTRODUCTION TO AMD DEVELOPER TOOLS YAKI TEBEKA GORDON SELLEY

Upload: amd-developer-central

Post on 07-Nov-2014

760 views

Category:

Technology


0 download

DESCRIPTION

Presentation PT-4052 by Yaki Tebeka from the AMD Developer Summit (APU13) November 11-13, 2013.

TRANSCRIPT

Page 1: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

INTRODUCTION  TO  AMD  DEVELOPER  TOOLS  YAKI  TEBEKA  

GORDON  SELLEY  

Page 2: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

2   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

APU:  ACCELERATED  PROCESSING  UNIT  

!  The  APU  has  arrived  and  it  is  a  great  advance  over  previous  plaKorms  

!  Combines  scalar  processing  on  CPU,  parallel  processing  on  GPU,  co-­‐processors  and  high  bandwidth  access  to  memory  

!  Higher  performance  with  lower  power    

Dual  Core  x86  Module  

Dual  Core  x86  Module  

L2  Cache   L2  Cache  

DDR3  Controller  

PCIe  

UNB   Channel  

GPU  

PCIe  PCIe  

DisplayPort  /HDMI  

UVD/  VCE  

Page 3: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

3   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

HSA:  HETEROGENEOUS  SYSTEM  ARCHITECTURE  

Processor  and  soTware  design  that  makes  it  easy  for  developers  to  harness  the  compuVng  power  of  an  APU,  for  faster  and  more  power-­‐efficient  computaVon  

Page 4: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

4   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

AMD'S  DEVELOPER  TOOLS  STRATEGY  

!  Converge  tools  and  technologies  to  an  “HSA  Developer  Tools  Suite”  !  Maintain  capabiliVes  for  specific  market  needs  

CPU  Tools  

GPU  Tools  

Need  for  System  Level  APU  Tool  Convergence  of  Technologies  and  Tools  

GPU  PerfStudio  

Page 5: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

AMD  CodeXL  

Page 6: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

6   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

CONVERGE  TOOLS  AND  TECHNOLOGIES  

gDEBugger   Code  Analyst   APP  Profiler  

APP  Kernel  Analyzer   AMD  Driver  innovaVons  

Page 7: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

7   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

AMD  CODE  XL  

!  Coherent,  innovaVve  and  unified  developer  tools  suite  ‒ Debug,  Profile,  and  Analyze  applicaVons  ‒  System-­‐wide  “white  box”  view  ‒ AMD  CPUs,  GPUs  and  APUs    ‒ Does  not  require  source  code  modificaVons  

 

Page 8: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

8   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

AMD  CODE  XL  AVAILABILITY  

!  Windows®  Standalone  

!  MicrosoT®  Visual  Studio®  2010,  2012  Extension  

!  Linux®  Standalone  

Page 9: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

CodeXL  Demo  

Page 10: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

10   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

GPU  DEBUGGING  

!  Transforms  GPU  debugging  process  to  a  “white  box”  model  

!  Finds  “hard  to  catch”  heterogeneous  compuVng  related  bugs  

!  IntuiVve  and  familiar  debugging  experience  

!  Feature  highlights:  ‒ OpenCL™  and  OpenGL  API  Level  Debugger  ‒ OpenCL™  Kernel  Source  Code  Debugger  ‒ MulV-­‐Watch  view  ‒ OpenCL  Buffers’  Data  view  

Page 11: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

11   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

CPU  TIME  BASED  PROFILING  

!  Usage  ‒  Is  used  for  finding  program  level/algorithmic/data  structure  related  performance  issues  

!  Profiling  Method  ‒ The  user  defines  a  Vme  interval  (default  is  1  msec)  ‒ On  every  Vme  interval,  for  each  thread,  the  profiler  logs  the  instrucVon  pointer  ‒ Call-­‐stack  logging  is  opVonal  (very  useful)  

Page 12: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

12   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

CPU  EVENT  BASED  PROFILING  

!  Usage  ‒  Is  used  for  locaVng  CPU  micro-­‐architectural  related  performance  issues  

!  Profiling  Method  ‒ The  user  selects  an  event  (example:  cache  misses)  ‒ The  user  defines  event  count  (example:  5000)  ‒ A  counter  counts  the  event  occurrences  (cache  misses)  ‒ When  the  counter  reaches  the  event  count,  the  profiler  logs  the  instrucVon  pointer  ‒ Call-­‐stack  logging  is  opVonal  

Page 13: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

13   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

GPU  COMPUTE  PROFILING  

!  Analyzes  and  profiles  OpenCL™  and  MicrosoT®  DirectCompute  applicaVons  

!  API  Trace  View:  Traces  OpenCL™  API  calls,  IdenVfy  failed  API  calls,  resource  leaks  and  best  pracVces  !  Timeline  VisualizaNon:  Visualize  host,  kernel  and  data  transfer  execuVon  in  a  Vmeline  chart  

!  Summary  Pages:  Finds  the  top  booleneck,  top  ten  kernel  execuVon  and  data  transfer  operaVons  

!  Performance  Counter  View:  Collects  GPU  performance  counters  for  OpenCL™  kernels  

Page 14: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

14   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

STATIC  KERNEL  ANALYSIS  

!  StaVc  analysis  tool  to  compile,  analyze  and  disassemble  an  OpenCL™  kernel  for  AMD  CPUs,  APUs  and  GPUs  

!  View  AMD  Intermediate  Language  (AMD  IL)  and    hardware  disassembly  (ISA)  

!  Generate  offline  compilaVon  of  OpenCL™  kernel  binary  

!  View  kernel  compilaVon  warning  and  error  messages  

!  View  compiler  staVsVcs  and  esVmate  performance  

!  Only  require  the  OpenCL™  kernel  source  code  as  an  input  !  Does  not  require  a  GPU  in  the  system  

Page 15: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

15   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

WHAT’S  NEW  IN  CODEXL?  

!  Version  1.1  ‒ Windows®  8  support  ‒ MicrosoT®  Visual  Studio®  2012  integraVon  ‒  Linux®  KDE  support  ‒  Support  AMD’s  Sea  Island  family  of  GPUs  ‒  Single  CodeXL  Explorer  tree  

!  Version  1.2  ‒ Windows®  8.1  support  ‒ Enhanced  CPU  Profiling  user  interface  ‒ CPU  profiling  of  Java  /.NET  applicaVons  ‒  Support  Kabini  APUs        

Page 16: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

16   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

WHAT’S  NEW  IN  CODEXL  /2  

!  Version  1.3  ‒ Remote  GPU  Profiling  and  Remote  GPU  debugging  ‒  IntegraVng  Kernel  Analyzer  ‒ CPU  Profiling  of  Cache  Line  UVlizaVon  ‒ CPU  Profiling  support  for  Java  inline  funcVons  ‒ GPU  API  Level  Debugging  support  for  OpenGL  4.3  ‒  Support  Kaveri  APUs  

   

Page 17: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

APP  SDK  

Page 18: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

18   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

ACCELERATED  PARALLEL  PROCESSING  (APP)  SDK  

!  What  is  AMD  APP  SDK?  ‒ Development  plaKorm  for  heterogeneous  compuVng  ‒ Helps  developers  to  exploit  the  highly  parallel  compute  acceleraVon  of    GPUs  ‒ Designed  to  allow  a  GPU  to  work  harmoniously  with  a  mulVcore  CPU  to  execute  demanding  compuVng  tasks  ‒ Helps  enable  a  beoer  balanced  plaKorm  opVmizaVon  for  APUs  ‒  Supports  open  industry  standards  and  embraces  open  source  soTware  

‒ OpenCL™  ‒  C++  AMP  ‒  Aparapi  (Java)  ‒  Bolt  C++  template  library  ‒ OpenCV  ‒ OpenNI  

‒ Helps  enable  development  for  cross-­‐OS  and  cross-­‐plaKorm  heterogeneous  soluVons  ‒ Contains  numerous  programming  samples  

Page 19: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

19   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

WHAT’S  NEW  IN  APP  SDK  2.9  

!  Unified  SDK  installer  

!  Sample  browser  

!  New  SDK  samples  ‒ OpenCV  and  OpenNI  ‒ Bolt  samples  ‒ Concurrent  kernels  ‒ GCN  samples  

!  Bolt  C++  template  library  support  on  Linux®  

!  Support  for  latest  AMD  hardware  (“Kabini”  APUs,  R9  &  R7  series  GPUs)  

!  Download  the  latest  APP  SDK  from  AMD  today  from  AMD  Developer  Central  (developer.amd.com)  

Page 20: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

GPU  PerfStudio2  

Page 21: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

21   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

!  GPU  PerfStudio2  is  AMD's  performance  and  debugging  tool  for  graphics  applicaVons.    

!  Key  Features  ‒  Integrated  Frame  Profiler,  Frame  Debugger,  and  API  Trace  with  CPU  Vming  informaVon  ‒  Shader  Debugger  with  support  for  DirectX®10  &  11  HLSL  and  Assembly  code  ‒ Client  /  Server  model  -­‐  GPU  PerfStudio  2  Client  runs  locally  or  remotely  over  the  network  ‒ GPU  PerfStudio  2  Server  supports  32-­‐bit  and  64-­‐bit  applicaVons  ‒  Supports  DirectX®11,  DirectX®10.1  ,  DirectX®10    and  OpenGL  4.2  applicaVons  ‒ No  special  build  required  for  your  applicaVon    ‒  Small  footprint  –  no  installaVon  ‒  Free  download  hop://developer.amd.com    

GPU  PERFSTUDIO  2  INTRODUCTION  

Page 22: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

22   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

INTRODUCTION  TO  GPU  PERFSTUDIO  2  

!  Capture,  play  back  and  view  the  contents  of  a  frame  

!  Scrub  through  draw  calls  !  Visualize  the  GPU  Vme  for  each  draw  call  !  View  all  game  resources  and  state  bound  

at  each  draw  call  !  Inspect  the  resources  at  each  stage  of  the  

pipeline  !  View,  edit  and  debug  shader  code  

FRAME  DEBUGGER  

Page 23: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

23   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

INTRODUCTION  TO  GPU  PERFSTUDIO  2  

!  IdenVfy  costly  draw  calls  !  Detect  GPU  pipeline  stage  

boolenecks  !  InvesVgate  performance  issues  at  

the  counter  level  

FRAME  PROFILER  

Page 24: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

24   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

INTRODUCTION  TO  GPU  PERFSTUDIO  2  

!  Edit  the  live  HLSL  and  GLSL  code  inside  your  app  while  running  in  the  tool  

!  Debug  the  live  HLSL  and  Assembly  code  inside  your  app  while  running  in  the  tool  ‒  Step  through  shader  code  ‒  Inspect  all  register  values  ‒  Insert  and  run-­‐to  break  points  

!  Compare  before  and  aTer  edit  performance  using  the  Profiler  

SHADER  DEBUGGER  &  EDITOR  

Page 25: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

25   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

INTRODUCTION  TO  GPU  PERFSTUDIO  2  

!  Inspect  all  API  calls  (with  arguments)  

!  CPU  Vmeline  informaVon  for  each  API  call  

!  Visualize  mulV-­‐threaded  API  usage  

!  Supports  DirectX®  11  Command  Lists  and  deferred  contexts  

API  TRACE  

Page 26: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

26   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

INTRODUCTION  TO  GPU  PERFSTUDIO  2  

!  Widely  used  by  internal  groups  in  AMD  ‒ AMD  Developer  Technology  Engineers:  OpVmize  &  debug  game  Vtles  in  conjuncVon  with  developers  ‒ AMD  Driver  Performance  Team:  Improve  GPU  benchmarks  and  Vtles  at  the  driver  level  ‒ AMD  Driver  Team:  Inspect  apps  that  cause  driver  problems  ‒ AMD  Game  Compute  Team:  Debug  and  opVmize  game  technologies  for  new  GPU  hardware  -­‐  AMD  Mecha  Demo,  Ladybug,  Leo  demo  

!  External  users  ‒ Graphics  developers:  Used  in  the  development  of  DirectX®11  and  OpenGL  graphics  applicaVons  

WHO  USES  IT?  

Page 27: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

27   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

GPU  PERFSTUDIO  2  

!  Remote  usage  allows  the  game  to  be  run  full  screen.  Higher  profiling  accuracy,  useful  during  final  opVmizaVon.  

 

 

 

!  Local  usage  on  a  single  machine  (preferred  by  developers).  More  suited  for  use  during  development.  

REMOTE  AND  LOCAL  DEBUG  SESSIONS  

Server   Client  

Remote  debugging  

Server   Client  

Local  debugging  server  &  client  on  same  computer

Server  &  Client  

Page 28: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

28   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

OPTIMIZING  GAME  DEVELOPMENT  USING  AMD'S  GPU  PERFSTUDIO  2  

!  What’s  new  in  GPS2.14?  ‒ Hardware  counter  support  for  AMD  “Hawaii”  (R9  290  series)    GPU’s  ‒  Improved  support  for  mulVthreaded  applicaVons  ‒ Pipeline  specific  counters  for  OpenGL  ‒  Support  for  OpenGL  Compute  

LATEST  VERSION  

!  Currently  in  development  ‒  Support  for  Linux®/OpenGL  applicaVons    ‒  Support  for  Mantle  applicaVons  

‒ There’s  opVmizaVon,  and  then  there’s  Mantle.  Games  enabled  with  Mantle  speak  the  language  of  GCN  architecture  to  unlock  revoluVonary  performance  and  image  quality.  

Page 29: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

GPU  PerfStudio2  Demo  

Page 30: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

30   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

GPU  PERFSTUDIO  2  

!  GS-­‐4136  -­‐  OpVmizing  Game  Development  using  AMD’s  GPU  PerfStudio  2  Tue  4:00  -­‐  4:45  LL21E  

!  Take  a  look  at  three  usage  scenarios  from  developers  ‒ Assassins  Creed  3  –  Understanding  the  frame  ‒  Far  Cry  3  –  Automated  data  mining  of  game  content  ‒  Steam  Linux®  –  PorVng  Source2  to  OpenGL  

!  Currently  in  development  ‒  Support  for  Linux®  (OpenGL)  applicaVons    ‒  Support  for  Mantle  applicaVons  

FIND  OUT  MORE  

Page 31: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

APU  2013    

Page 32: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

32   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

APU  2013  DEVELOPER  TOOLS  SESSIONS  

!  PT-­‐4052  IntroducVon  to  AMD  Developer  Tools  Tue  10:00  -­‐  10:45  

!  PT-­‐4055  -­‐  OpVmizing  Raytracing  on  GCN  with  AMD  Development  Tools  Tue  5:00  -­‐  5:45  

!  PT-­‐4053  -­‐  Advanced  OpenCL  Debugging  and  Profiling  using  CodeXL  Wed  11:00  -­‐  11:45  

!  GS-­‐4136  -­‐  OpVmizing  Game  Development  using  AMD’s  GPU  PerfStudio  2  Tue  4:00  -­‐  4:45  

!  Come  and  chat  with  us  at  the  AMD  Developer  Tools  Demo  Booth  

Page 33: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

QuesVons  

Page 34: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

 CONTACT  US:    [email protected]                                                                                                  [email protected]  DEVELOPER.AMD.COM        

Page 35: PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley

35   |      INTRODUCTION  TO  AMD  DEVELOPER  TOOLS      |      NOVEMBER  2013      

DISCLAIMER  &  ATTRIBUTION  

The  informaVon  presented  in  this  document  is  for  informaVonal  purposes  only  and  may  contain  technical  inaccuracies,  omissions  and  typographical  errors.    

The  informaVon  contained  herein  is  subject  to  change  and  may  be  rendered  inaccurate  for  many  reasons,  including  but  not  limited  to  product  and  roadmap  changes,  component  and  motherboard  version  changes,  new  model  and/or  product  releases,  product  differences  between  differing  manufacturers,  soTware  changes,  BIOS  flashes,  firmware  upgrades,  or  the  like.  AMD  assumes  no  obligaVon  to  update  or  otherwise  correct  or  revise  this  informaVon.  However,  AMD  reserves  the  right  to  revise  this  informaVon  and  to  make  changes  from  Vme  to  Vme  to  the  content  hereof  without  obligaVon  of  AMD  to  noVfy  any  person  of  such  revisions  or  changes.    

AMD  MAKES  NO  REPRESENTATIONS  OR  WARRANTIES  WITH  RESPECT  TO  THE  CONTENTS  HEREOF  AND  ASSUMES  NO  RESPONSIBILITY  FOR  ANY  INACCURACIES,  ERRORS  OR  OMISSIONS  THAT  MAY  APPEAR  IN  THIS  INFORMATION.    

AMD  SPECIFICALLY  DISCLAIMS  ANY  IMPLIED  WARRANTIES  OF  MERCHANTABILITY  OR  FITNESS  FOR  ANY  PARTICULAR  PURPOSE.  IN  NO  EVENT  WILL  AMD  BE  LIABLE  TO  ANY  PERSON  FOR  ANY  DIRECT,  INDIRECT,  SPECIAL  OR  OTHER  CONSEQUENTIAL  DAMAGES  ARISING  FROM  THE  USE  OF  ANY  INFORMATION  CONTAINED  HEREIN,  EVEN  IF  AMD  IS  EXPRESSLY  ADVISED  OF  THE  POSSIBILITY  OF  SUCH  DAMAGES.  

 

ATTRIBUTION  

©  2013  Advanced  Micro  Devices,  Inc.  All  rights  reserved.  AMD,  the  AMD  Arrow  logo  and  combinaVons  thereof  are  trademarks  of  Advanced  Micro  Devices,  Inc.  in  the  United  States  and/or  other  jurisdicVons.    OpenCL  is  a  trademark  of  Apple  Inc.  and  Linux  is  a  trademark  of  Linus  Torvalds.  Windows,  MicrosoT  ,  Visual  Studio  and  DirectX  are  trademarks  of  MicrosoT  Corp.  Other  names  are  for  informaVonal  purposes  only  and  may  be  trademarks  of  their  respecVve  owners.