Skip to content

Commit

Permalink
Remove duplicate jit conv2d test (tracel-ai#2581)
Browse files Browse the repository at this point in the history
* fix typos in crates/burn-jit/src/tests/conv2d.rs

* rename fn name with prefix 2

* delete the duplicated latter test due to a review
  • Loading branch information
tiruka authored Dec 4, 2024
1 parent 3dd5dcd commit dee2e9d
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions crates/burn-jit/src/tests/conv2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,25 +125,4 @@ mod tests {
into_data_sync::<TestRuntime, Float>(output)
.assert_approx_eq(&into_data_sync::<TestRuntime, Float>(output_ref), 4);
}

#[test]
fn nchw_to_nhwc_should_match_into_contiguos() {
let test_device = Default::default();
let input =
Tensor::<TestBackend, 4>::random([4, 72, 53, 56], Distribution::Default, &test_device);

type Float = <TestBackend as Backend>::FloatElem;

let output = nchw_to_nhwc::<TestRuntime, Float>(input.clone().into_primitive().tensor());
let output_ref = into_contiguous(
input
.clone()
.permute([0, 2, 3, 1])
.into_primitive()
.tensor(),
);

into_data_sync::<TestRuntime, Float>(output)
.assert_approx_eq(&into_data_sync::<TestRuntime, Float>(output_ref), 1);
}
}

0 comments on commit dee2e9d

Please sign in to comment.