Documentation ¶
Overview ¶
Package matrixmultiplication implements the matrix multiplication benchmark from AMDAPPSDK.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Benchmark ¶
type Benchmark struct {
X, Y, Z uint32
MatrixA, MatrixB, MatrixC *Matrix
// contains filtered or unexported fields
}
Benchmark defines a benchmark
func NewBenchmark ¶
NewBenchmark makes a new benchmark
func (*Benchmark) SetUnifiedMemory ¶
func (b *Benchmark) SetUnifiedMemory()
SetUnifiedMemory uses Unified Memory
type CPUMatrixMultiplier ¶
type CPUMatrixMultiplier struct{}
CPUMatrixMultiplier is a matrix multiplier
func (*CPUMatrixMultiplier) Multiply ¶
func (m *CPUMatrixMultiplier) Multiply(mA, mB *Matrix) *Matrix
Multiply multiplies two matrice
type GPUMatrixMultiplier ¶
type GPUMatrixMultiplier struct {
// contains filtered or unexported fields
}
A GPUMatrixMultiplier is a MatrixMultiplier that runs the MatrixMultiplication on GCN3 simulator.
func NewGPUMatrixMultiplier ¶
func NewGPUMatrixMultiplier( gpuDriver *driver.Driver, context *driver.Context, ) *GPUMatrixMultiplier
NewGPUMatrixMultiplier creates a new GPUMatrixMultiplier, injecting the dependency of driver and the GPU context.
func (*GPUMatrixMultiplier) Multiply ¶
func (m *GPUMatrixMultiplier) Multiply(mA, mB *Matrix) *Matrix
Multiply multiplies two matrice
func (*GPUMatrixMultiplier) SelectGPU ¶
func (m *GPUMatrixMultiplier) SelectGPU(gpus []int)
SelectGPU selects GPU
type KernelArgs ¶
type KernelArgs struct { MatrixA driver.Ptr MatrixB driver.Ptr MatrixC driver.Ptr WidthA uint32 BlockA driver.LocalPtr HiddenGlobalOffsetX int64 HiddenGlobalOffsetY int64 HiddenGlobalOffsetZ int64 }
KernelArgs defines kernel arguments
type MatrixMultiplier ¶
A MatrixMultiplier is a service type that can calculate the result of matrix -matrix multiplication.