Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Commit 5e87c7d

Browse files
committed
Revert "Merge pull request #139 from CameronTofer/LRN"
This reverts commit 9fc367f, reversing changes made to eaf889e. # Conflicts: # wonnx/src/compiler.rs # wonnx/templates/matrix/lrn.wgsl # wonnx/tests/localresponsenormalization.rs
1 parent b4b4dca commit 5e87c7d

File tree

3 files changed

+0
-121
lines changed

3 files changed

+0
-121
lines changed

wonnx/src/compiler.rs

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,6 @@ lazy_static! {
8383
include_str!("../templates/matrix/transpose.wgsl"),
8484
)
8585
.unwrap();
86-
tera.add_raw_template(
87-
"matrix/lrn.wgsl",
88-
include_str!("../templates/matrix/lrn.wgsl"),
89-
)
90-
.unwrap();
9186
tera.add_raw_template(
9287
"pool/aggregate.wgsl",
9388
include_str!("../templates/pool/aggregate.wgsl"),
@@ -1326,38 +1321,6 @@ pub fn compile(
13261321
threads: (ceil(output_lengths[0], 256) as _, 1, 1),
13271322
}
13281323
}
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-
}
13611324
op => return Err(CompileError::UnimplementedOp(op.to_string())),
13621325
};
13631326

wonnx/templates/matrix/lrn.wgsl

Lines changed: 0 additions & 23 deletions
This file was deleted.

wonnx/tests/localresponsenormalization.rs

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)