Skip to content

Commit

Permalink
Set DEFAULT_MAX_TASKS to 1 when running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
syl20bnr committed Jul 5, 2024
1 parent 882a27c commit d6efb3c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/burn-wgpu/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ pub struct RuntimeOptions {

impl Default for RuntimeOptions {
fn default() -> Self {
#[cfg(test)]
const DEFAULT_MAX_TASKS: usize = 1;
#[cfg(not(test))]
const DEFAULT_MAX_TASKS: usize = 16;

let tasks_max = match std::env::var("BURN_WGPU_MAX_TASKS") {
Expand Down

0 comments on commit d6efb3c

Please sign in to comment.