GPU matrix multiplication in Unity.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Assets
ProjectSettings
UnityPackageManager
.gitignore
README.md

README.md

GPUMatrixMultiplicationTest

GPU matrix multiplication in Unity.

Usage

float[,] A = new float[1024, 512];
float[,] B = new float[512, 256];

// matmul : ComputeShader (MatMul.compute)
float[,] C = GPUMatrixMultiplication.Multiply(matmul, A, B);

// float[,] C = GPUMatrixMultiplication.Multiply(matmul, A, B, GPUMatrixMultiplicationMethod.SharedMemory); // default
// float[,] C = GPUMatrixMultiplication.Multiply(matmul, A, B, GPUMatrixMultiplicationMethod.Naive); // naive impl

Resourses

Compatibility

tested on Unity 2017.0.3, Windows 10 (GTX 1060).