3x3 gemm in conv

This commit is contained in:
George Hotz
2020-12-22 12:00:44 -05:00
parent ff52f832dc
commit ebc7f8305c
4 changed files with 27 additions and 1 deletions

View File

@@ -27,7 +27,7 @@
<!-- Global array of weights -->
<key>Weights</key>
<array>
<string>../min.weights</string>
<string>../twos.weights</string>
</array>
<key>image</key>

BIN
ane/2_compile/twos.weights Normal file

Binary file not shown.

26
ane/lib/testconv.py Executable file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env python3
from ane import ANE, ANETensor
if __name__ == "__main__":
ane = ANE()
# 0x20 per row
tin = ANETensor(0x60)
tout = ANETensor(0x60)
tind = tin.data()
toutd = tout.data()
#tind[0:4] = [-1,1,-2,2]
tind[0] = 1
tind[0x20] = 2
tind[0x40] = 3
print("** before **")
print(tind)
print(toutd)
comp = ane.compile(open("../ops/conv.hwx", "rb").read())
ret = ane.run(comp, tin, tout)
print("** after **")
print(tind)
print(toutd)

Binary file not shown.