Documentation ¶
Overview ¶
Package runner defines how default benchmark samples are executed.
Index ¶
- type EmuBuilder
- func (b EmuBuilder) Build() *Platform
- func (b EmuBuilder) WithISADebugging() EmuBuilder
- func (b EmuBuilder) WithLog2PageSize(n uint64) EmuBuilder
- func (b EmuBuilder) WithMagicMemoryCopy() EmuBuilder
- func (b EmuBuilder) WithMemTracing() EmuBuilder
- func (b EmuBuilder) WithNumGPU(n int) EmuBuilder
- func (b EmuBuilder) WithParallelEngine() EmuBuilder
- func (b EmuBuilder) WithVisTracing() EmuBuilder
- type EmuGPUBuilder
- func (b EmuGPUBuilder) Build(name string) *GPU
- func (b EmuGPUBuilder) WithDriver(d *driver.Driver) EmuGPUBuilder
- func (b EmuGPUBuilder) WithEngine(e sim.Engine) EmuGPUBuilder
- func (b EmuGPUBuilder) WithISADebugging() EmuGPUBuilder
- func (b EmuGPUBuilder) WithLog2PageSize(n uint64) EmuGPUBuilder
- func (b EmuGPUBuilder) WithMemCapacity(c uint64) EmuGPUBuilder
- func (b EmuGPUBuilder) WithMemOffset(offset uint64) EmuGPUBuilder
- func (b EmuGPUBuilder) WithMemTracing() EmuGPUBuilder
- func (b EmuGPUBuilder) WithPageTable(pageTable vm.PageTable) EmuGPUBuilder
- func (b EmuGPUBuilder) WithStorage(s *mem.Storage) EmuGPUBuilder
- type GPU
- type Platform
- type R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) Build(name string, id uint64) *GPU
- func (b R9NanoGPUBuilder) WithDRAMSize(size uint64) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithEngine(engine sim.Engine) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithFreq(freq sim.Freq) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithGlobalStorage(storage *mem.Storage) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithISADebugging() R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithL2CacheSize(size uint64) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithLog2CacheLineSize(log2CacheLine uint64) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithLog2MemoryBankInterleavingSize(n uint64) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithLog2PageSize(log2PageSize uint64) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithMMU(mmu *mmu.MMU) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithMemAddrOffset(offset uint64) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithMemTracer(t tracing.Tracer) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithMonitor(m *monitoring.Monitor) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithNumCUPerShaderArray(n int) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithNumMemoryBank(n int) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithNumShaderArray(n int) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithVisTracer(t tracing.Tracer) R9NanoGPUBuilder
- type R9NanoPlatformBuilder
- func (b R9NanoPlatformBuilder) Build() *Platform
- func (b R9NanoPlatformBuilder) WithISADebugging() R9NanoPlatformBuilder
- func (b R9NanoPlatformBuilder) WithLog2PageSize(n uint64) R9NanoPlatformBuilder
- func (b R9NanoPlatformBuilder) WithMagicMemoryCopy() R9NanoPlatformBuilder
- func (b R9NanoPlatformBuilder) WithMemTracing() R9NanoPlatformBuilder
- func (b R9NanoPlatformBuilder) WithMonitor(m *monitoring.Monitor) R9NanoPlatformBuilder
- func (b R9NanoPlatformBuilder) WithNumGPU(n int) R9NanoPlatformBuilder
- func (b R9NanoPlatformBuilder) WithParallelEngine() R9NanoPlatformBuilder
- func (b R9NanoPlatformBuilder) WithPartialVisTracing(start, end sim.VTimeInSec) R9NanoPlatformBuilder
- func (b R9NanoPlatformBuilder) WithVisTracing() R9NanoPlatformBuilder
- type Runner
- func (r *Runner) AddBenchmark(b benchmarks.Benchmark)
- func (r *Runner) AddBenchmarkWithoutSettingGPUsToUse(b benchmarks.Benchmark)
- func (r *Runner) Driver() *driver.Driver
- func (r *Runner) Engine() sim.Engine
- func (r *Runner) Init() *Runner
- func (r *Runner) ParseFlag() *Runner
- func (r *Runner) Run()
- type TraceableComponent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmuBuilder ¶
type EmuBuilder struct {
// contains filtered or unexported fields
}
EmuBuilder can build a platform for emulation purposes.
func MakeEmuBuilder ¶
func MakeEmuBuilder() EmuBuilder
MakeEmuBuilder creates a EmuBuilder with default parameters.
func (EmuBuilder) WithISADebugging ¶
func (b EmuBuilder) WithISADebugging() EmuBuilder
WithISADebugging enables ISA debugging in the simulation.
func (EmuBuilder) WithLog2PageSize ¶
func (b EmuBuilder) WithLog2PageSize(n uint64) EmuBuilder
WithLog2PageSize sets the page size as a power of 2.
func (EmuBuilder) WithMagicMemoryCopy ¶ added in v2.0.1
func (b EmuBuilder) WithMagicMemoryCopy() EmuBuilder
WithMagicMemoryCopy uses global storage as memory components
func (EmuBuilder) WithMemTracing ¶
func (b EmuBuilder) WithMemTracing() EmuBuilder
WithMemTracing lets the platform to trace memory operations.
func (EmuBuilder) WithNumGPU ¶
func (b EmuBuilder) WithNumGPU(n int) EmuBuilder
WithNumGPU sets the number of GPUs to build.
func (EmuBuilder) WithParallelEngine ¶
func (b EmuBuilder) WithParallelEngine() EmuBuilder
WithParallelEngine lets the EmuBuilder to use parallel engine.
func (EmuBuilder) WithVisTracing ¶
func (b EmuBuilder) WithVisTracing() EmuBuilder
WithVisTracing lets the platform to record traces for visualization purposes.
type EmuGPUBuilder ¶
type EmuGPUBuilder struct {
// contains filtered or unexported fields
}
EmuGPUBuilder provide services to assemble usable GPUs
func MakeEmuGPUBuilder ¶
func MakeEmuGPUBuilder() EmuGPUBuilder
MakeEmuGPUBuilder creates a new EmuGPUBuilder
func (EmuGPUBuilder) Build ¶
func (b EmuGPUBuilder) Build(name string) *GPU
Build creates a very simple GPU for emulation purposes
func (EmuGPUBuilder) WithDriver ¶
func (b EmuGPUBuilder) WithDriver(d *driver.Driver) EmuGPUBuilder
WithDriver sets the GPU driver that the GPUs connect to.
func (EmuGPUBuilder) WithEngine ¶
func (b EmuGPUBuilder) WithEngine(e sim.Engine) EmuGPUBuilder
WithEngine sets the engine that the emulator GPUs to use
func (EmuGPUBuilder) WithISADebugging ¶
func (b EmuGPUBuilder) WithISADebugging() EmuGPUBuilder
WithISADebugging enables the simulation to dump instruction execution information.
func (EmuGPUBuilder) WithLog2PageSize ¶
func (b EmuGPUBuilder) WithLog2PageSize(n uint64) EmuGPUBuilder
WithLog2PageSize sets the page size of the GPU, as a power of 2.
func (EmuGPUBuilder) WithMemCapacity ¶
func (b EmuGPUBuilder) WithMemCapacity(c uint64) EmuGPUBuilder
WithMemCapacity sets the capacity of the GPU memory
func (EmuGPUBuilder) WithMemOffset ¶
func (b EmuGPUBuilder) WithMemOffset(offset uint64) EmuGPUBuilder
WithMemOffset sets the first byte address of the GPU memory
func (EmuGPUBuilder) WithMemTracing ¶
func (b EmuGPUBuilder) WithMemTracing() EmuGPUBuilder
WithMemTracing enables the simulation to dump memory transaction information.
func (EmuGPUBuilder) WithPageTable ¶
func (b EmuGPUBuilder) WithPageTable(pageTable vm.PageTable) EmuGPUBuilder
WithPageTable sets the page table that provides the address translation
func (EmuGPUBuilder) WithStorage ¶
func (b EmuGPUBuilder) WithStorage(s *mem.Storage) EmuGPUBuilder
WithStorage sets the global memory storage that is shared by multiple GPUs
type GPU ¶
type GPU struct { Domain *sim.Domain CommandProcessor *cp.CommandProcessor RDMAEngine *rdma.Engine PMC *pagemigrationcontroller.PageMigrationController CUs []TraceableComponent L1VCaches []TraceableComponent L1SCaches []TraceableComponent L1ICaches []TraceableComponent L2Caches []TraceableComponent L1VTLBs []TraceableComponent L1STLBs []TraceableComponent L1ITLBs []TraceableComponent L2TLBs []TraceableComponent MemControllers []TraceableComponent }
A GPU is a collection of GPU internal Components
type R9NanoGPUBuilder ¶
type R9NanoGPUBuilder struct {
// contains filtered or unexported fields
}
R9NanoGPUBuilder can build R9 Nano GPUs.
func MakeR9NanoGPUBuilder ¶
func MakeR9NanoGPUBuilder() R9NanoGPUBuilder
MakeR9NanoGPUBuilder provides a GPU builder that can builds the R9Nano GPU.
func (R9NanoGPUBuilder) Build ¶
func (b R9NanoGPUBuilder) Build(name string, id uint64) *GPU
Build creates a pre-configure GPU similar to the AMD R9 Nano GPU.
func (R9NanoGPUBuilder) WithDRAMSize ¶ added in v2.0.1
func (b R9NanoGPUBuilder) WithDRAMSize(size uint64) R9NanoGPUBuilder
WithDRAMSize sets the size of DRAMs in the GPU.
func (R9NanoGPUBuilder) WithEngine ¶
func (b R9NanoGPUBuilder) WithEngine(engine sim.Engine) R9NanoGPUBuilder
WithEngine sets the engine that the GPU use.
func (R9NanoGPUBuilder) WithFreq ¶
func (b R9NanoGPUBuilder) WithFreq(freq sim.Freq) R9NanoGPUBuilder
WithFreq sets the frequency that the GPU works at.
func (R9NanoGPUBuilder) WithGlobalStorage ¶ added in v2.0.1
func (b R9NanoGPUBuilder) WithGlobalStorage( storage *mem.Storage, ) R9NanoGPUBuilder
WithGlobalStorage lets the GPU to build to use the externally provided storage.
func (R9NanoGPUBuilder) WithISADebugging ¶
func (b R9NanoGPUBuilder) WithISADebugging() R9NanoGPUBuilder
WithISADebugging enables the GPU to dump instruction execution information.
func (R9NanoGPUBuilder) WithL2CacheSize ¶
func (b R9NanoGPUBuilder) WithL2CacheSize(size uint64) R9NanoGPUBuilder
WithL2CacheSize set the total L2 cache size. The size of the L2 cache is split between memory banks.
func (R9NanoGPUBuilder) WithLog2CacheLineSize ¶
func (b R9NanoGPUBuilder) WithLog2CacheLineSize( log2CacheLine uint64, ) R9NanoGPUBuilder
WithLog2CacheLineSize sets the cache line size with the power of 2.
func (R9NanoGPUBuilder) WithLog2MemoryBankInterleavingSize ¶
func (b R9NanoGPUBuilder) WithLog2MemoryBankInterleavingSize( n uint64, ) R9NanoGPUBuilder
WithLog2MemoryBankInterleavingSize sets the number of consecutive bytes that are guaranteed to be on a memory bank.
func (R9NanoGPUBuilder) WithLog2PageSize ¶
func (b R9NanoGPUBuilder) WithLog2PageSize(log2PageSize uint64) R9NanoGPUBuilder
WithLog2PageSize sets the page size with the power of 2.
func (R9NanoGPUBuilder) WithMMU ¶
func (b R9NanoGPUBuilder) WithMMU(mmu *mmu.MMU) R9NanoGPUBuilder
WithMMU sets the MMU component that provides the address translation service for the GPU.
func (R9NanoGPUBuilder) WithMemAddrOffset ¶
func (b R9NanoGPUBuilder) WithMemAddrOffset( offset uint64, ) R9NanoGPUBuilder
WithMemAddrOffset sets the address of the first byte of the GPU to build.
func (R9NanoGPUBuilder) WithMemTracer ¶
func (b R9NanoGPUBuilder) WithMemTracer(t tracing.Tracer) R9NanoGPUBuilder
WithMemTracer applies a tracer to trace the memory transactions.
func (R9NanoGPUBuilder) WithMonitor ¶
func (b R9NanoGPUBuilder) WithMonitor(m *monitoring.Monitor) R9NanoGPUBuilder
WithMonitor sets the monitor to use.
func (R9NanoGPUBuilder) WithNumCUPerShaderArray ¶
func (b R9NanoGPUBuilder) WithNumCUPerShaderArray(n int) R9NanoGPUBuilder
WithNumCUPerShaderArray sets the number of CU and number of L1V caches in each Shader Array.
func (R9NanoGPUBuilder) WithNumMemoryBank ¶
func (b R9NanoGPUBuilder) WithNumMemoryBank(n int) R9NanoGPUBuilder
WithNumMemoryBank sets the number of L2 cache modules and number of memory controllers in each GPU.
func (R9NanoGPUBuilder) WithNumShaderArray ¶
func (b R9NanoGPUBuilder) WithNumShaderArray(n int) R9NanoGPUBuilder
WithNumShaderArray sets the number of shader arrays in each GPU. Each shader array contains a certain number of CUs, a certain number of L1V caches, 1 L1S cache, and 1 L1V cache.
func (R9NanoGPUBuilder) WithVisTracer ¶
func (b R9NanoGPUBuilder) WithVisTracer(t tracing.Tracer) R9NanoGPUBuilder
WithVisTracer applies a tracer to trace all the tasks of all the GPU components
type R9NanoPlatformBuilder ¶
type R9NanoPlatformBuilder struct {
// contains filtered or unexported fields
}
R9NanoPlatformBuilder can build a platform that equips R9Nano GPU.
func MakeR9NanoBuilder ¶
func MakeR9NanoBuilder() R9NanoPlatformBuilder
MakeR9NanoBuilder creates a EmuBuilder with default parameters.
func (R9NanoPlatformBuilder) Build ¶
func (b R9NanoPlatformBuilder) Build() *Platform
Build builds a platform with R9Nano GPUs.
func (R9NanoPlatformBuilder) WithISADebugging ¶
func (b R9NanoPlatformBuilder) WithISADebugging() R9NanoPlatformBuilder
WithISADebugging enables ISA debugging in the simulation.
func (R9NanoPlatformBuilder) WithLog2PageSize ¶
func (b R9NanoPlatformBuilder) WithLog2PageSize( n uint64, ) R9NanoPlatformBuilder
WithLog2PageSize sets the page size as a power of 2.
func (R9NanoPlatformBuilder) WithMagicMemoryCopy ¶ added in v2.0.1
func (b R9NanoPlatformBuilder) WithMagicMemoryCopy() R9NanoPlatformBuilder
WithMagicMemoryCopy uses global storage as memory components
func (R9NanoPlatformBuilder) WithMemTracing ¶
func (b R9NanoPlatformBuilder) WithMemTracing() R9NanoPlatformBuilder
WithMemTracing lets the platform to trace memory operations.
func (R9NanoPlatformBuilder) WithMonitor ¶
func (b R9NanoPlatformBuilder) WithMonitor( m *monitoring.Monitor, ) R9NanoPlatformBuilder
WithMonitor sets the monitor that is used to monitor the simulation
func (R9NanoPlatformBuilder) WithNumGPU ¶
func (b R9NanoPlatformBuilder) WithNumGPU(n int) R9NanoPlatformBuilder
WithNumGPU sets the number of GPUs to build.
func (R9NanoPlatformBuilder) WithParallelEngine ¶
func (b R9NanoPlatformBuilder) WithParallelEngine() R9NanoPlatformBuilder
WithParallelEngine lets the EmuBuilder to use parallel engine.
func (R9NanoPlatformBuilder) WithPartialVisTracing ¶
func (b R9NanoPlatformBuilder) WithPartialVisTracing( start, end sim.VTimeInSec, ) R9NanoPlatformBuilder
WithPartialVisTracing lets the platform to record traces for visualization purposes. The trace will only be collected from the start time to the end time.
func (R9NanoPlatformBuilder) WithVisTracing ¶
func (b R9NanoPlatformBuilder) WithVisTracing() R9NanoPlatformBuilder
WithVisTracing lets the platform to record traces for visualization purposes.
type Runner ¶
type Runner struct { Timing bool Verify bool Parallel bool ReportInstCount bool ReportCacheLatency bool ReportCacheHitRate bool ReportTLBHitRate bool ReportRDMATransactionCount bool ReportDRAMTransactionCount bool UseUnifiedMemory bool GPUIDs []int // contains filtered or unexported fields }
Runner is a class that helps running the benchmarks in the official samples.
func (*Runner) AddBenchmark ¶
func (r *Runner) AddBenchmark(b benchmarks.Benchmark)
AddBenchmark adds an benchmark that the driver runs
func (*Runner) AddBenchmarkWithoutSettingGPUsToUse ¶
func (r *Runner) AddBenchmarkWithoutSettingGPUsToUse(b benchmarks.Benchmark)
AddBenchmarkWithoutSettingGPUsToUse allows for user specified GPUs for the benchmark to run.
func (*Runner) Engine ¶
Engine returns the event-driven simulation engine used by the current runner.
type TraceableComponent ¶
type TraceableComponent interface { sim.Component tracing.NamedHookable }
TraceableComponent is a component that can accept traces