@@ -83,11 +83,6 @@ lazy_static! {
83
83
include_str!( "../templates/matrix/transpose.wgsl" ) ,
84
84
)
85
85
. unwrap( ) ;
86
- tera. add_raw_template(
87
- "matrix/lrn.wgsl" ,
88
- include_str!( "../templates/matrix/lrn.wgsl" ) ,
89
- )
90
- . unwrap( ) ;
91
86
tera. add_raw_template(
92
87
"pool/aggregate.wgsl" ,
93
88
include_str!( "../templates/pool/aggregate.wgsl" ) ,
@@ -1326,38 +1321,6 @@ pub fn compile(
1326
1321
threads : ( ceil ( output_lengths[ 0 ] , 256 ) as _ , 1 , 1 ) ,
1327
1322
}
1328
1323
}
1329
- "LRN" => {
1330
- // https://github.com/onnx/onnx/blob/main/docs/Operators.md#lrn
1331
- let alpha = node. get_attribute_value ( "alpha" , Some ( 0.0001 ) ) ?;
1332
- let beta = node. get_attribute_value ( "beta" , Some ( 0.75 ) ) ?;
1333
- let bias = node. get_attribute_value ( "bias" , Some ( 1.0 ) ) ?;
1334
- let size = node. get_attribute_value ( "size" , Some ( 1 ) ) ?;
1335
-
1336
- context. insert ( "alpha" , & alpha) ;
1337
- context. insert ( "beta" , & beta) ;
1338
- context. insert ( "bias" , & bias) ;
1339
- context. insert ( "size" , & size) ;
1340
-
1341
- let left_size = f64:: floor ( ( size - 1 ) as f64 / 2.0 ) as u32 ;
1342
- let right_size = f64:: ceil ( ( size - 1 ) as f64 / 2.0 ) as u32 ;
1343
-
1344
- context. insert ( "left_size" , & left_size) ;
1345
- context. insert ( "right_size" , & right_size) ;
1346
-
1347
- let ( x_threads, workgroup_size_x) = workgroup_size (
1348
- output_lengths[ 0 ] ,
1349
- MAX_COMPUTE_WORKGROUPS_PER_DIMENSION ,
1350
- MAX_WORKGROUP_SIZE_X ,
1351
- ) ?;
1352
- context. insert ( "workgroup_size_x" , & workgroup_size_x) ;
1353
- context. insert ( "i_chunks" , & input_chunks) ;
1354
-
1355
- NodeTemplate {
1356
- scalar_type : agreed_type ( input_shapes, output_shapes) ?,
1357
- template : "matrix/lrn.wgsl" ,
1358
- threads : ( x_threads, 1 , 1 ) ,
1359
- }
1360
- }
1361
1324
op => return Err ( CompileError :: UnimplementedOp ( op. to_string ( ) ) ) ,
1362
1325
} ;
1363
1326
0 commit comments