channels concat
MODIFY
ane/2_compile/hwx_parse.py
ane/2_compile/hwx_parse.py
@@ -17,15 +17,16 @@ a = get_macho("model.hwx")
# load commands
for c in a.headers[0].commands:
- print(c[0])
+ print("command", c[0], c[1])
if c[0].cmd == 25:
- print(c[1])
for section in c[2]:
print(section.segname.strip(b'\0'), section.sectname.strip(b'\0'), hex(section.addr), hex(section.size), "@", hex(c[1].fileoff))
#print(dir(section))
if c[1].filesize > 0:
hexdump(section.section_data)
+
+
# this parser is wrong (fixed with 64-bit one)
from macholib import SymbolTable
sym = SymbolTable.SymbolTable(a)

MODIFY
ane/2_compile/simple/concat.plist
ane/2_compile/simple/concat.plist
<key>input_0</key>
<dict>
<key>InputChannels</key>
- <integer>1</integer>
+ <integer>16</integer>
<key>InputHeight</key>
<integer>1</integer>
<key>InputWidth</key>
- <integer>77</integer>
+ <integer>1</integer>
<key>InputType</key>
<string>Float16</string>
<key>input_1</key>
<dict>
<key>InputChannels</key>
- <integer>1</integer>
+ <integer>16</integer>
<key>InputHeight</key>
<integer>1</integer>
<key>InputWidth</key>
- <integer>77</integer>
+ <integer>1</integer>
<key>InputType</key>
<string>Float16</string>

MODIFY
ane/2_compile/simple/gemm.plist
ane/2_compile/simple/gemm.plist
<key>image</key>
<dict>
<key>InputChannels</key>
- <integer>128</integer>
+ <integer>8</integer>
<key>InputHeight</key>
<integer>1</integer>
<key>InputWidth</key>
<key>Name</key>
<string>probs</string>
<key>OutputChannels</key>
- <integer>128</integer>
+ <integer>8</integer>
<key>OutputType</key>
<string>Float16</string>
<key>Params</key>

MODIFY
ane/lib/ane.py
ane/lib/ane.py
@@ -62,6 +62,8 @@ ANE_Struct = [
# section @ 0x1E0 len 0x44
# [0x1ec, 0x1f0, 0x1f4, 0x1f8, 0x214] = number of engines
+ # [0x1f0, 0x1f4, 0x1f8, 0x214] = engines for inconv?
+ # [0x21c, 0x220, 0x224] = engines for outconv?
# section @ 0x22c len 0xC (scaling)
("u16", 0x230, "BiasScalar"),

ADD
ane/ops/concat.hwx
ane/ops/concat.hwx
Binary files /dev/null and b/ane/ops/concat.hwx differ

channels concat