@@ -4,7 +4,8 @@ function demo() {
44 expression : "" ,
55 tensorOrders : { } ,
66 error : "" ,
7- indices : [ ]
7+ indices : [ ] ,
8+ prefix : ""
89 } ,
910 schedule : [ ] ,
1011 output : {
@@ -30,7 +31,6 @@ function demo() {
3031 }
3132 } ,
3233 updateScheduleView : function ( ) {
33- console . log ( model . schedule ) ;
3434 model . removeInvalidIndices ( ) ;
3535 model . removeInvalidAccesses ( ) ;
3636 model . scheduleView ( 0 ) ;
@@ -81,6 +81,11 @@ function demo() {
8181 }
8282 model . updateInputViews ( ) ;
8383 } ,
84+ setPrefix : function ( prefix ) {
85+ model . cancelReq ( ) ;
86+ model . setOutput ( "" , "" , "" , "" ) ;
87+ model . input . prefix = prefix ;
88+ } ,
8489 setOutput : function ( computeLoops , assemblyLoops , fullCode , error ) {
8590 model . output = { computeLoops : computeLoops ,
8691 assemblyLoops : assemblyLoops ,
@@ -1008,6 +1013,11 @@ function demo() {
10081013 command += ")" ;
10091014 }
10101015
1016+ var prefix = model . input . prefix . replaceAll ( " " , "" ) ;
1017+ if ( prefix ) {
1018+ command += " -prefix=" + prefix ;
1019+ }
1020+
10111021 var req = $ . ajax ( {
10121022 type : "POST" ,
10131023 url : "http://tensor-compiler-online.csail.mit.edu" ,
@@ -1138,4 +1148,8 @@ function demo() {
11381148 $ ( "#btnGPU" ) . click ( function ( ) {
11391149 model . setSchedule ( default_GPU_schedules [ $ ( this ) . attr ( 'data-val' ) ] ) ;
11401150 } ) ;
1151+
1152+ $ ( "#prefix" ) . keyup ( function ( ) {
1153+ model . setPrefix ( $ ( "#prefix" ) . val ( ) ) ;
1154+ } ) ;
11411155}
0 commit comments