lists of operations for forward pass for alexnet and googlenet
This file has been truncated, but you can view the full file.
This file contains hidden or 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
op_wisdom_t | |
(str_vals=(type=Convolution),nda_vals=(biases=(dims=(out_chan=16)),filts=(dims=(out_chan=16,in_chan=192,y=1,x=1)),in=(dims=(img=1,chan=192,y=28,x=28)),in_pad=(tn=none,dims=(y=0,x=0)),kern_sz=(tn=none,dims=(y=1,x=1)),out=(dims=(img=1,chan=16,y=28,x=28)),out_chans=(tn=uint32_t,v=16),stride=(tn=none,dims=(y=1,x=1)))) | |
kg | |
out | |
0105000000666C6F61740101DADA000000000000000004000000010000000031000003000000696D671000000010030000040000006368616E1C0000001C00000001000000791C00000001000000010000007805000000666C6F61740031000000000000018D905F1F69F48806000000002DCDD54337000000F0DC11495004914814704048169B4B48FEC3E7473CBFE947C702A247131BAA47FF504F4715C249478EF269475D593147390A404737EC25470B73FD46217C054783DD174766330147E9550147103F0047361F0047F673C046327CAE464E53CC465A5BCB463276A0463131B54691FBA146DD189F46DB549C46F42D95462A6EA546190A9D463C605443BADD6C44EABECC43BA60614491603644EB9D8444B32C1544582E1C44DCBF844400000000E249B241B4A5C74200000000000000009CBC13410000000079BAF442B8372F4288789B4200000000B7DB4443DBC4CC40 | |
op_tun |
This file contains hidden or 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
# command lines run: | |
# boda-native case (generates out-boda-native.py; error check results are in test_compute.txt) | |
boda test_compute --model-name=googlenet_conv --wins-per-image=1 --imgs='(pil_fn=%(boda_test_dir)/pascal/head_1/%%s.txt)' --run-cnet='(in_dims=(img=1,y=1024,x=2048))' --cf2='(mode=rtc,per_call_fn=out-boda-native.py,op_tune=(use_culibs=0,k1conv=1,tconv=1),enable_write_xpose=1)' --max-err=1 | |
# cudnn-v5 (via boda) case (generates out-cudnn-v5.py; only convs are cudnn; error check results are in test_compute.txt) | |
boda test_compute --model-name=googlenet_conv --wins-per-image=1 --imgs='(pil_fn=%(boda_test_dir)/pascal/head_1/%%s.txt)' --run-cnet='(in_dims=(img=1,y=1024,x=2048))' --cf2='(mode=rtc,per_call_fn=out-cudnn-v5.py,op_tune=(use_culibs=1))' --max-err=1 | |
# to generate profiles | |
python ../../pysrc/flops.py --per-layer=1 --ai-mnk=1 --per-layer-in-info=1 --profile=1 --net-fn out-boda-native.py | |
python ../../pysrc/flops.py --per-layer=1 --ai-mnk=1 --per-layer-in-info=1 --profile=1 --net-fn out-cudnn-v5 |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
//typedef unsigned uint32_t; | |
typedef int int32_t; | |
//typedef long long int64_t; | |
#define CUCL_GLOBAL_KERNEL kernel | |
#define GASQ global | |
#define GLOB_ID_1D get_global_id(0) | |
#define LOC_ID_1D get_local_id(0) | |
#define GRP_ID_1D get_group_id(0) | |
#define LOC_SZ_1D get_local_size(0) |
This file contains hidden or 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
import sys | |
import xml.etree.ElementTree as xee | |
def main( args ): | |
assert len(args) | |
if len(args) != 3: raise ValueError( "usage: %s save_in.xml save_out.xml" % (args[0],) ) | |
doc=xee.fromstring(open(args[1]).read()) | |
for node in doc.iter(): | |
#if node.text is None: node.text = " "; continue # work around TT's inability to parse <foo /> style tags |
This file contains hidden or 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
// private | |
struct pyra_t { | |
// impl. note: can be c++ | |
uint32_t get_num_levels( void ) { ... } | |
img_t get_level( uint32_t l ) { return levs[l]; } | |
}; | |
pyra_t * new_pyra_t( uint32_t const max_w, uint32_t const max_h, ... other params ) { return new pyra_t(...); } | |
void del_pyra_t( pyra_t *p ) { delete p; } |
This file contains hidden or 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
python fmtr.py < foo.prototxt.template > foo.prototxt.template.prototxt name=bar; cat foo.prototxt.template.prototxt |