Documentation
¶
Overview ¶
Package gpubuilder provides default builders for commonly used GPUs.
Index ¶
- type EmuGPUBuilder
- func (b EmuGPUBuilder) Build(name string) *mgpusim.GPU
- func (b EmuGPUBuilder) WithDriver(d *driver.Driver) EmuGPUBuilder
- func (b EmuGPUBuilder) WithEngine(e akita.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
- func (b EmuGPUBuilder) WithoutProgressBar() EmuGPUBuilder
- type R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) Build(name string, id uint64) *mgpusim.GPU
- func (b R9NanoGPUBuilder) WithEngine(engine akita.Engine) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithFreq(freq akita.Freq) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithISADebugging() 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.MMUImpl) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithMemAddrOffset(offset uint64) R9NanoGPUBuilder
- func (b R9NanoGPUBuilder) WithMemTracer(t tracing.Tracer) 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
- func (b R9NanoGPUBuilder) WithoutProgressBar() R9NanoGPUBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) *mgpusim.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 akita.Engine) EmuGPUBuilder
WithEngine sets the engine that the emulator GPUs to use
func (EmuGPUBuilder) WithISADebugging ¶ added in v1.7.1
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 ¶ added in v1.7.1
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
func (EmuGPUBuilder) WithoutProgressBar ¶ added in v1.7.1
func (b EmuGPUBuilder) WithoutProgressBar() EmuGPUBuilder
WithoutProgressBar will disable the progress bar for kernel execution.
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) *mgpusim.GPU
Build creates a pre-configure GPU similar to the AMD R9 Nano GPU.
func (R9NanoGPUBuilder) WithEngine ¶
func (b R9NanoGPUBuilder) WithEngine(engine akita.Engine) R9NanoGPUBuilder
WithEngine sets the engine that the GPU use.
func (R9NanoGPUBuilder) WithFreq ¶
func (b R9NanoGPUBuilder) WithFreq(freq akita.Freq) R9NanoGPUBuilder
WithFreq sets the frequency that the GPU works at.
func (R9NanoGPUBuilder) WithISADebugging ¶ added in v1.7.1
func (b R9NanoGPUBuilder) WithISADebugging() R9NanoGPUBuilder
WithISADebugging enables the GPU to dump instruction execution information.
func (R9NanoGPUBuilder) WithLog2CacheLineSize ¶ added in v1.8.1
func (b R9NanoGPUBuilder) WithLog2CacheLineSize( log2CacheLine uint64, ) R9NanoGPUBuilder
WithLog2CacheLineSize sets the cache line size with the power of 2.
func (R9NanoGPUBuilder) WithLog2MemoryBankInterleavingSize ¶ added in v1.8.1
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.MMUImpl) 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 ¶ added in v1.7.1
func (b R9NanoGPUBuilder) WithMemTracer(t tracing.Tracer) R9NanoGPUBuilder
WithMemTracer applies a tracer to trace the memory transactions.
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
func (R9NanoGPUBuilder) WithoutProgressBar ¶ added in v1.7.1
func (b R9NanoGPUBuilder) WithoutProgressBar() R9NanoGPUBuilder
WithoutProgressBar disables the progress bar for kernel execution