configuration
play

Configuration 2 What system configuration does zsim simulate? Type - PowerPoint PPT Presentation

MICRO 2015 Waikiki, Hawaii 5 Dec 2015 ZS IM T UTORIAL Configuration and Stats Configuration 2 What system configuration does zsim simulate? Type and number of cores, caches, how different components are connected to each other.


  1. MICRO 2015 – Waikiki, Hawaii 5 Dec 2015 ZS IM T UTORIAL Configuration and Stats

  2. Configuration 2  What system configuration does zsim simulate?  Type and number of cores, caches, how different components are connected to each other. Beefy Cores Beefy Core Wimpy Core L1i L1d L1i L1d Shared LLC L2 L2 L3 Wimpy Cores

  3. Configuration files 3 Configuration files use XML like syntax, but much simpler 3 Main components  System - Cores, caches and main memory  Processes - Applications to simulate  Simulation - Miscellaneous simulator knobs Ex. Stats, logging

  4. System Config: Cores 4 cores = { simpleCore = { cores = 1; Core type = “Simple”; icache = “l1i”; dcache = “l1d”; L1i L1d }; };

  5. Caches And Memory 5 caches = { l1i = { Core size = 32768; }; L1i L1d l1d = { 32KB 64KB size = 65536; }; L2 l2 = { 2MB size = 2097152; children = “l1i | l1d”; # Connect l2 to l1i and lid }; DDR Memory }; mem = { type= “DDR”; };

  6. Process Config 6 process0 = { command = “./ helloworld ”; env = “PATH=/home/ usr /bin/”; startFastForwarded = True; ffiPoints = “10000000 20000000”; }; process1{ …............. }; process2{ …............. };

  7. Simulation Config 7 sim = { phaseLength = 10000; # Cycles maxTotalInstrs = 10000000000; logToFile = True; }

  8. 16 Core Tiled Processor 8 Core L1i L1d Private L2 LLC Bank

  9. Changes To Single Core Config 9  Change no. of instances of core and private caches.  Other parameters remain the same. simpleCore = { cores = 16; type = “Simple”; icache = “ icache ”; dcache = “ dcache ”; } l1i = { caches = 16; size = 32768; } Similarly for l1d and l2

  10. Add Banked L3 10 l3 = { caches = 1; banks = 16; children = “l2”; size = 8386608; # 8MB total across all banks nuca = { type = “Static”; }; }; networkFile = “net -16-4x4- tiles.txt”  Network file lists on-chip latency between tiles tile0 tile7 10 tile0 tile10 13

  11. Debugging 11  All configuration variables needed by ZSim have default values.  The values for all variables used by ZSim in a given simulation(including default values) are dumped to out.cfg DEFAULT VALUES zsim.cfg ZSim out.cfg

  12. Stats 12  Stats organization  Analyzing stats  Adding new stats

  13. Stats organization 13  Decouple stats collection and stats output.  Create all stats objects during initialization.  Use different backends to output these stats in desired formats.  Fixed sized stats output  All the supported stats types are fixed size.  New stats cannot be added after initialization.

  14. Stats organization 14 Root Cores L1I L1D Core0 Core1 Hits Misses Cycles Instrs stats.abcd stats.txt stats.h5

  15. Stats backends 15  We support multiple backends that traverse the stats tree and dump the output.  ZSim has two kinds of backends.  Text backend: Prints out a hierarchical listing of all simulator stats.  zsim.out  Hdf5 backend: Dumps stats in hdf5 file format.  zsim-ev.h5: Eventual stats  zsim.h5: Periodic stats

  16. Stats and Plots 16

  17. Analyzing Stats 17 HDF5 ZSim stats Python h5py library Analysis Numpy & arrays Plotting numpy matplotlib.pyplot

  18. Basic Stats 18 import h5py import numpy as np f = h5py.File( ‘zsim - ev.h5’ , ‘r’ ) dset = f[ “ stats ” ][ “ root ” ] stats = dset[-1] phases = stats[ ‘phase’ ] coreStats = stats[ ‘core’ ] totalInstrs = coreStats[ ‘ instrs ’ ] totalCycles = coreStats[ ‘cycles’ ] ipc= (1. * totalInstrs)/totalCycles

  19. Periodic Stats 19 ZSim dumps stats periodically in zsim.h5. Example 1: l2 hits at the end of 200 th stats dump sample = dset[200] L2Hits = sample[ ‘l2’ ][ ‘ hGETS ’ ] + sample[ ‘l2’ ][ ‘ hGETX ’ ] Example 2: Average IPC between 100 th and 200 th stats dump instrs = dset[200][ ‘ c ore’ ][ ‘ instrs ’ ] - dset[100][ ‘core’ ][ ‘ instrs ’ ] cycles = dset[100][ ‘ c ore’ ][ ‘cycles’ ] - dset[100][ ‘core’ ][ ‘cycles’ ] ipc = (1. * instrs)/cycles

  20. Adding new stats 20 Create root AggregateStat* rootStat = new AggregateStat(); rootStat->init( “root” , ”my stats” ); of stats tree ProxyStat* phaseStat = new ProxyStat(); phaseStat->init( "phase", "Phase", &zinfo->numPhases); Build tree rootStat->append(phaseStat); Choose std::string statsFile = zinfo->outputDir; stats file statsFile += "/mystats.h5"; Create stats = new HDF5Backend(gm_strdup(statsFile.c_str()), backend to rootStat, 1<<17, false, false); zinfo->statsBackends->push_back(stats); dump stats

  21. 21 DEMO

  22. 22 THANK YOU Q UESTIONS ?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend