mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-29 03:00:14 -04:00
3x3 gemm in conv
This commit is contained in:
@@ -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
BIN
ane/2_compile/twos.weights
Normal file
Binary file not shown.
26
ane/lib/testconv.py
Executable file
26
ane/lib/testconv.py
Executable 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)
|
||||
BIN
ane/ops/conv.hwx
BIN
ane/ops/conv.hwx
Binary file not shown.
Reference in New Issue
Block a user