Skip to content

Commit

Permalink
chore: get_attribute was renamed
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelspark committed Mar 25, 2023
1 parent 3282b44 commit ccca5f7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions wonnx/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1328,16 +1328,16 @@ pub fn compile(
}
"LRN" => {
// https://github.com/onnx/onnx/blob/main/docs/Operators.md#lrn
let alpha = get_attribute("alpha", Some(0.0001), node)?;
let beta = get_attribute("beta", Some(0.75), node)?;
let bias = get_attribute("bias", Some(1.0), node)?;
let size = get_attribute("size", Some(1), node)?;
let alpha = node.get_attribute_value("alpha", Some(0.0001))?;
let beta = node.get_attribute_value("beta", Some(0.75))?;
let bias = node.get_attribute_value("bias", Some(1.0))?;
let size = node.get_attribute_value("size", Some(1))?;

context.insert("alpha", &alpha);
context.insert("beta", &beta);
context.insert("bias", &bias);
context.insert("size", &size);

let left_size = f64::floor((size - 1) as f64 / 2.0) as u32;
let right_size = f64::ceil((size - 1) as f64 / 2.0) as u32;

Expand All @@ -1348,7 +1348,7 @@ pub fn compile(
output_lengths[0],
MAX_COMPUTE_WORKGROUPS_PER_DIMENSION,
MAX_WORKGROUP_SIZE_X,
)?;
)?;
context.insert("workgroup_size_x", &workgroup_size_x);
context.insert("i_chunks", &input_chunks);

Expand Down

0 comments on commit ccca5f7

Please sign in to comment.