Created
September 11, 2020 15:52
-
-
Save michel-steuwer/8816c7ff13e2d7f0f903f062e9085c94 to your computer and use it in GitHub Desktop.
TVM Matrix Multiplication Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Naive algorithm | |
k = tvm.reduce_axis((0, K), 'k') | |
A = tvm.placeholder((M, K), name='A') | |
B = tvm.placeholder((K, N), name='B') | |
C = tvm.compute((M, N),lambda x, y: tvm.sum(A[x, k] * B[k, y], axis=k),name='C') | |
# Default schedule | |
s = tvm.create_schedule(C.op) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment