Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielsimard committed Jun 13, 2024
1 parent 46d614f commit 121a164
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions crates/burn-compute/tests/dummy/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pub type DummyClient = ComputeClient<DummyServer, DummyChannel>;

static RUNTIME: ComputeRuntime<DummyDevice, DummyServer, DummyChannel> = ComputeRuntime::new();
pub static TUNER_DEVICE_ID: &str = "tests/dummy-device";
pub static TUNER_PREFIX: &str = "dymmy-tests/dummy-device";

pub fn init_client() -> ComputeClient<DummyServer, MutexComputeChannel<DummyServer>> {
let storage = BytesStorage::default();
Expand Down
6 changes: 2 additions & 4 deletions crates/burn-compute/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ fn autotune_cache_same_key_return_a_cache_hit() {
#[cfg(feature = "std")]
fn autotune_cache_no_cache_on_disk_return_a_cache_miss() {
// delete the cache file
let file_path =
burn_compute::tune::get_persistent_cache_file_path(crate::dummy::TUNER_DEVICE_ID);
let file_path = burn_compute::tune::get_persistent_cache_file_path(crate::dummy::TUNER_PREFIX);
let _ = std::fs::remove_file(file_path);

type Runtime = ComputeRuntime<DummyDevice, dummy::DummyServer, dummy::DummyChannel>;
Expand Down Expand Up @@ -176,8 +175,7 @@ fn autotune_cache_no_cache_on_disk_return_a_cache_miss() {
#[cfg(feature = "std")]
fn autotune_cache_file_path_creation_works_when_path_does_not_exist_yet() {
// delete the cache file
let file_path =
burn_compute::tune::get_persistent_cache_file_path(crate::dummy::TUNER_DEVICE_ID);
let file_path = burn_compute::tune::get_persistent_cache_file_path(crate::dummy::TUNER_PREFIX);
let parent_dir = file_path
.parent()
.expect("Cache file should have a parent directory");
Expand Down

0 comments on commit 121a164

Please sign in to comment.