TUD-UCB-Boda / boda

clone/fork of public boda repo
Other
0 stars 0 forks source link

Error for conv_simd #5

Open dinhv opened 7 years ago

dinhv commented 7 years ago

I wrote a simple constraint solver for using conv_simd operation. I'm also getting a search space, but after annotation of the operations, I'm getting an error in gen_ops_rec in rtc_fwd:

error: RTC template function instantiation argument error: xpose_filts: call arg 'filts' incompatible with decl arg (dim count mismatch or dim (non-zero and thus req'd) name/size/stride mismatch; 
ARG[filts_ref]:
  DECL: (__tn__=float,out_chan=0,in_chan=0,y=0,x=0) --- vn=filts_ref tn=float loi=1 io_type=IN 
  CALL: (__tn__=float,out_chan=96,in_chan=96,y=1,x=1)
ARG[filts]:
  DECL: (__tn__=float,out_chan_blk=0,in_chan=0,y=0,x=0,out_chan_reg=0,out_chan_tile=0) --- vn=filts tn=float loi=1 io_type=OUT 
  CALL: (__tn__=float,in_chan=96,y=1,x=1,out_chan=96)
full rfs: (str_vals=(func_name=xpose_filts,type=Convolution),nda_vals=(Kb=(tn=uint32_t,v=1),biases=(dims=(out_chan=96)),conv_has_relu=(tn=uint32_t,v=1),filts=(dims=(in_chan=96,y=1,x=1,out_chan=96)),filts_ref=(dims=(out_chan=96,in_chan=96,y=1,x=1)),in=(dims=(chan=96,pel=2916)),in_pad=(tn=none,dims=(y=0,x=0)),in_pels=(tn=none,dims=(img=1,y=54,x=54)),in_ref=(dims=(img=1,chan=96,y=54,x=54)),kern_sz=(tn=none,dims=(y=1,x=1)),out=(dims=(chan=96,pel=2920)),out_chans=(tn=uint32_t,v=96),out_pels=(tn=none,dims=(img=1,y=54,x=54)),out_ref=(dims=(img=1,chan=96,y=54,x=54)),stride=(tn=none,dims=(y=1,x=1)),vw=(tn=uint32_t,v=4),work=(tn=none,dims=(pels_blk=73,out_chan_blk=1,pels_tile=5,out_chan_tile=12,pels=8,out_chan=8))),tag=cccp1)

Can you explain what this error means? What's the general reason for this error?

moskewcz commented 7 years ago

it's telling you pretty much what it says: an attempt was made to instantiate (i.e. call, more or less) a function with arguments that are incompatible with its declaration (i.e. argument signature). in this case, it tells you the error is on the 'filts' argument, and then it outputs both the declared and called types so you can see the mismatch.in the declaration, a zero size dim means that any size is okay for that dim. however, the number and names of dimension names must match (in order). in this case, the number of dimensions is different (decl: 6 vs call: 4), so it fails before further checking. if the count had been the same, then the names would be checked (in order) next.

dinhv commented 7 years ago

So I'm wondering what the user can do about? This problem occurs if I'm using conv_simd: use_local_mem=2 . So do I have to add some kind of constraint before using conv_simd?

moskewcz commented 7 years ago

as i've mentioned before, in general, the interface of a function can depend on the tuning parameters specified (i.e. the input/output formats can depend on the variant). in the original profiler, correct inputs/outputs are created (from scratch) per operation -- which is fine for profiling isolated operations. in general, though, it's the responsibility of the caller to ensure the arguments are correct depending on how the function was tuned. as per the original project description, one of the difficulties in integrating autotuing with the full-net running flow is to deal with this more generally than the existing flow does -- depending on which operations are joined together, some transform may need to be inserted.

On Thu, Aug 10, 2017 at 11:17 AM, dinhv notifications@github.com wrote:

So I'm wondering what the user can do about? This problem occurs if I'm using conv_simd: use_local_mem=2 . So do I have to add some kind of constraint before using conv_simd?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/TUD-UCB-Boda/boda/issues/5#issuecomment-321632322, or mute the thread https://github.com/notifications/unsubscribe-auth/AGL-s4EzO7O8430goEPMTLoGvUmx61ygks5sW0k-gaJpZM4Ozb-v .