@@ -4,7 +4,8 @@ function demo() {
4
4
expression : "" ,
5
5
tensorOrders : { } ,
6
6
error : "" ,
7
- indices : [ ]
7
+ indices : [ ] ,
8
+ prefix : ""
8
9
} ,
9
10
schedule : [ ] ,
10
11
output : {
@@ -30,7 +31,6 @@ function demo() {
30
31
}
31
32
} ,
32
33
updateScheduleView : function ( ) {
33
- console . log ( model . schedule ) ;
34
34
model . removeInvalidIndices ( ) ;
35
35
model . removeInvalidAccesses ( ) ;
36
36
model . scheduleView ( 0 ) ;
@@ -81,6 +81,11 @@ function demo() {
81
81
}
82
82
model . updateInputViews ( ) ;
83
83
} ,
84
+ setPrefix : function ( prefix ) {
85
+ model . cancelReq ( ) ;
86
+ model . setOutput ( "" , "" , "" , "" ) ;
87
+ model . input . prefix = prefix ;
88
+ } ,
84
89
setOutput : function ( computeLoops , assemblyLoops , fullCode , error ) {
85
90
model . output = { computeLoops : computeLoops ,
86
91
assemblyLoops : assemblyLoops ,
@@ -1008,6 +1013,11 @@ function demo() {
1008
1013
command += ")" ;
1009
1014
}
1010
1015
1016
+ var prefix = model . input . prefix . replaceAll ( " " , "" ) ;
1017
+ if ( prefix ) {
1018
+ command += " -prefix=" + prefix ;
1019
+ }
1020
+
1011
1021
var req = $ . ajax ( {
1012
1022
type : "POST" ,
1013
1023
url : "http://tensor-compiler-online.csail.mit.edu" ,
@@ -1138,4 +1148,8 @@ function demo() {
1138
1148
$ ( "#btnGPU" ) . click ( function ( ) {
1139
1149
model . setSchedule ( default_GPU_schedules [ $ ( this ) . attr ( 'data-val' ) ] ) ;
1140
1150
} ) ;
1151
+
1152
+ $ ( "#prefix" ) . keyup ( function ( ) {
1153
+ model . setPrefix ( $ ( "#prefix" ) . val ( ) ) ;
1154
+ } ) ;
1141
1155
}
0 commit comments