Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/charisee_dev/src/compiler/high-to-mid/ProbeEin.sml
ViewVC logotype

Diff of /branches/charisee_dev/src/compiler/high-to-mid/ProbeEin.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3685, Wed Feb 24 22:17:45 2016 UTC revision 3686, Fri Feb 26 16:01:37 2016 UTC
# Line 57  Line 57 
57      fun transformToImgSpace  e=T.transformToImgSpace  e      fun transformToImgSpace  e=T.transformToImgSpace  e
58      fun transformToImgSpaceF  e=T.transformToImgSpaceF  e      fun transformToImgSpaceF  e=T.transformToImgSpaceF  e
59      fun toStringBind e=(MidToString.toStringBind e)      fun toStringBind e=(MidToString.toStringBind e)
60      fun toStringBindp e=(MidToString.toStringBind e)      fun toStringBindp e=print(MidToString.toStringBind e)
61      fun mkEin e=Ein.mkEin e      fun mkEin e=Ein.mkEin e
62      fun mkEinApp(rator,args)=DstIL.EINAPP(rator,args)      fun mkEinApp(rator,args)=DstIL.EINAPP(rator,args)
63      fun setConst e = E.setConst e      fun setConst e = E.setConst e
# Line 360  Line 360 
360          val originalb=Ein.body e          val originalb=Ein.body e
361          val params=Ein.params e          val params=Ein.params e
362          val index=Ein.index e          val index=Ein.index e
363          val _ = (String.concat["\n***************** \n Replace ************ \n"])          val _ =print (String.concat["\n***************** \n Replace ************ \n"])
364          val _=  toStringBindp (y, DstIL.EINAPP(e,args))          val _=  toStringBindp (y, DstIL.EINAPP(e,args))
365    
366          val E.Probe(E.Conv(Vid,alpha,hid,dx),E.Tensor(tid,_))=p          val E.Probe(E.Conv(Vid,alpha,hid,dx),E.Tensor(tid,_))=p
# Line 382  Line 382 
382              (*end case*))              (*end case*))
383    
384          val args'=argsA@[PArg]          val args'=argsA@[PArg]
385    
386          val einapp=(y,mkEinApp(mkEin(params',index,body'),args'))          val einapp=(y,mkEinApp(mkEin(params',index,body'),args'))
387    
388              (*
389    
390            val e2=SummationEin.main (mkEin(params',index,body'))
391            val einapp=(y,mkEinApp(e2,args'))
392            val _ = print("\n shifted:=>"^P.printerE(e2))
393            *)
394          val _= List.map toStringBindp(code@[einapp])          val _= List.map toStringBindp(code@[einapp])
395          in          in
396              (fieldset,code@[einapp])              (fieldset,code@[einapp])
# Line 494  Line 502 
502          end          end
503    
504      fun liftProbe0(fieldset,(y, DstIL.EINAPP(e,args)),p ,sx)=let      fun liftProbe0(fieldset,(y, DstIL.EINAPP(e,args)),p ,sx)=let
505          val _=(String.concat["\n******* Lift Geneirc Probe ***\n"])          val _= print(String.concat["\n******* Lift Geneirc Probe ***\n"])
506          val originalb=Ein.body e          val originalb=Ein.body e
507          val params=Ein.params e          val params=Ein.params e
508          val index=Ein.index e          val index=Ein.index e
# Line 537  Line 545 
545          val rtn0=(case splitvar          val rtn0=(case splitvar
546              of false => [(y,mkEinApp(ein0,[PArg,FArg]))]              of false => [(y,mkEinApp(ein0,[PArg,FArg]))]
547              | _      => let              | _      => let
548              val bind3 = (y,DstIL.EINAPP(SummationEin.main ein0,[PArg,FArg]))              val e2=SummationEin.main ein0
549                val _ = print("\n shifted:"^P.printerE(ein0)^"=>"^P.printerE(e2))
550                val bind3 = (y,DstIL.EINAPP(e2,[PArg,FArg]))
551                  in Split.splitEinApp bind3                  in Split.splitEinApp bind3
552          end          end
553          (*end case*))          (*end case*))

Legend:
Removed from v.3685  
changed lines
  Added in v.3686

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0