-
Notifications
You must be signed in to change notification settings - Fork 11
Description
How to compile a neural network using glow, our neural network is in onnx format, so that the operator functions in the neural network such as conv do not call other functions.
The contents of the .axf file I got from compiling are as follows:
000107b0 <libjit_conv2d_f>: 107b0: b5f0 push {r4, r5, r6, r7, lr} 107b2: af03 add r7, sp, https://github.com/pytorch/glow/pull/12 107b4: e92d 0f00 stmdb sp!, {r8, r9, sl, fp} 107b8: b081 sub sp, https://github.com/pytorch/glow/pull/4 107ba: ed2d 8b10 vpush {d8-d15} 107be: b0d0 sub sp, https://github.com/pytorch/glow/pull/320 ; 0x140 107c0: 9037 str r0, [sp, https://github.com/pytorch/glow/pull/220] ; 0xdc 107c2: 68f8 ldr r0, [r7, https://github.com/pytorch/glow/pull/12] 107c4: 9306 str r3, [sp, https://github.com/pytorch/glow/pull/24] 107c6: 9224 str r2, [sp, https://github.com/pytorch/glow/pull/144] ; 0x90 107c8: 914a str r1, [sp, https://github.com/pytorch/glow/pull/296] ; 0x128 107ca: e9d0 0100 ldrd r0, r1, [r0] 107ce: 4308 orrs r0, r1 107d0: f000 8691 beq.w 114f6 <libjit_conv2d_f+0xd46> 107d4: 693a ldr r2, [r7, https://github.com/pytorch/glow/pull/16] 107d6: ed9f 8add vldr s16, [pc, https://github.com/pytorch/glow/pull/884] ; 10b4c <libjit_conv2d_f+0x39c> 107da: f102 0008 add.w r0, r2, https://github.com/pytorch/glow/pull/8 107de: 9019 str r0, [sp, https://github.com/pytorch/glow/pull/100] ; 0x64 107e0: f102 0010 add.w r0, r2, https://github.com/pytorch/glow/pull/16 107e4: 3218 adds r2, https://github.com/pytorch/glow/pull/24 107e6: 9018 str r0, [sp, https://github.com/pytorch/glow/pull/96] ; 0x60 107e8: 68f8 ldr r0, [r7, https://github.com/pytorch/glow/pull/12] 107ea: 4603 mov r3, r0 107ec: e9d0 0106 ldrd r0, r1, [r0, https://github.com/pytorch/glow/pull/24] 107f0: 9217 str r2, [sp, https://github.com/pytorch/glow/pull/92] ; 0x5c 107f2: f103 0208 add.w r2, r3, https://github.com/pytorch/glow/pull/8 107f6: 922f str r2, [sp, https://github.com/pytorch/glow/pull/188] ; 0xbc 107f8: f103 0210 add.w r2, r3, https://github.com/pytorch/glow/pull/16 107fc: 9225 str r2, [sp, https://github.com/pytorch/glow/pull/148] ; 0x94 107fe: 68ba ldr r2, [r7, https://github.com/pytorch/glow/pull/8] 10800: f102 0308 add.w r3, r2, https://github.com/pytorch/glow/pull/8 10804: 9313 str r3, [sp, https://github.com/pytorch/glow/pull/76] ; 0x4c 10806: f102 0310 add.w r3, r2, https://github.com/pytorch/glow/pull/16 1080a: 9336 str r3, [sp, https://github.com/pytorch/glow/pull/216] ; 0xd8 1080c: e9d2 3606 ldrd r3, r6, [r2, https://github.com/pytorch/glow/pull/24] 10810: e9cd 630b strd r6, r3, [sp, https://github.com/pytorch/glow/pull/44] ; 0x2c 10814: 900e str r0, [sp, https://github.com/pytorch/glow/pull/56] ; 0x38 10816: 43c0 mvns r0, r0 10818: 910d str r1, [sp, https://github.com/pytorch/glow/pull/52] ; 0x34 1081a: 2300 movs r3, #0 1081c: 9008 str r0, [sp, https://github.com/pytorch/glow/pull/32] 1081e: 43c8 mvns r0, r1 10820: 2100 movs r1, #0 10822: 9007 str r0, [sp, https://github.com/pytorch/glow/pull/28] 10824: 9200 str r2, [sp, #0] 10826: 9332 str r3, [sp, https://github.com/pytorch/glow/pull/200] ; 0xc8 10828: 4618 mov r0, r3 1082a: 9a37 ldr r2, [sp, https://github.com/pytorch/glow/pull/220] ; 0xdc 1082c: 9b06 ldr r3, [sp, https://github.com/pytorch/glow/pull/24] 1082e: 9134 str r1, [sp, https://github.com/pytorch/glow/pull/208] ; 0xd0 10830: f000 fe68 bl 11504 <ZN12_GLOBAL__N_133libjit_conv_init_output_with_biasEmPfPKfPKmS4> 10834: e9dd 100d ldrd r1, r0, [sp, https://github.com/pytorch/glow/pull/52] ; 0x34 10838: 4308 orrs r0, r1 1083a: f000 864e beq.w 114da <libjit_conv2d_f+0xd2a> 1083e: 2100 movs r1, #0 10840: 2200 movs r2, #0 10842: 2300 movs r3, #0 10844: 2600 movs r6, #0 10846: f8dd c020 ldr.w ip, [sp, https://github.com/pytorch/glow/pull/32]
The libjit_conv2d_f function calls other functions, while the libjit_conv2d_f_0_specialized function does not call any other functions.
libjit_conv2d_f_0_specialized is what other people get by disassembling the .axf obtained by compiling onnx using glow, how should I use what kind of code so that I don't call other functions in my The libjit_conv2d_f function as well, such as <ZN12_GLOBAL_N 133libjit_conv_init_output_with_biasEmPfPKfPKmS4_>