Skip to content

Commit

Permalink
remove JIT subsequent RNG tests (#1652)
Browse files Browse the repository at this point in the history
  • Loading branch information
louisfd authored Apr 21, 2024
1 parent 1433284 commit 2140d9b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 51 deletions.
21 changes: 0 additions & 21 deletions crates/burn-jit/src/tests/bernoulli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,6 @@ mod tests {
use burn_jit::kernel::prng::tests_utils::calculate_bin_stats;
use burn_tensor::{backend::Backend, Distribution, Shape, Tensor};

#[test]
#[serial]
fn subsequent_calls_give_different_tensors() {
TestBackend::seed(0);
let shape: Shape<2> = [40, 40].into();
let device = Default::default();

let tensor_1 =
Tensor::<TestBackend, 2>::random(shape.clone(), Distribution::Bernoulli(0.5), &device);
let tensor_2 =
Tensor::<TestBackend, 2>::random(shape.clone(), Distribution::Bernoulli(0.5), &device);
let mut diff_exists = false;
for i in 0..shape.num_elements() {
if tensor_1.to_data().value[i] != tensor_2.to_data().value[i] {
diff_exists = true;
break;
}
}
assert!(diff_exists);
}

#[test]
#[serial]
fn number_of_1_proportional_to_prob() {
Expand Down
16 changes: 0 additions & 16 deletions crates/burn-jit/src/tests/normal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,6 @@ mod tests {
use burn_tensor::{backend::Backend, Data, Distribution, Shape, Tensor};
use serial_test::serial;

#[test]
#[serial]
fn subsequent_calls_give_different_tensors() {
TestBackend::seed(0);
let shape = [4, 5];
let device = Default::default();

let tensor_1 =
Tensor::<TestBackend, 2>::random(shape, Distribution::Normal(0., 1.), &device);
let tensor_2 =
Tensor::<TestBackend, 2>::random(shape, Distribution::Normal(0., 1.), &device);
for i in 0..20 {
assert!(tensor_1.to_data().value[i] != tensor_2.to_data().value[i]);
}
}

#[test]
#[serial]
fn empirical_mean_close_to_expectation() {
Expand Down
14 changes: 0 additions & 14 deletions crates/burn-jit/src/tests/uniform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@ mod tests {
use burn_jit::kernel::prng::tests_utils::calculate_bin_stats;
use serial_test::serial;

#[test]
#[serial]
fn subsequent_calls_give_different_tensors() {
TestBackend::seed(0);
let shape = [4, 5];
let device = Default::default();

let tensor_1 = Tensor::<TestBackend, 2>::random(shape, Distribution::Default, &device);
let tensor_2 = Tensor::<TestBackend, 2>::random(shape, Distribution::Default, &device);
for i in 0..20 {
assert!(tensor_1.to_data().value[i] != tensor_2.to_data().value[i]);
}
}

#[test]
#[serial]
fn values_all_within_interval_default() {
Expand Down

0 comments on commit 2140d9b

Please sign in to comment.