Skip to content

Commit

Permalink
Blocking sync in the default
Browse files Browse the repository at this point in the history
  • Loading branch information
tmrlvi committed Feb 13, 2022
1 parent 31cd661 commit 0492183
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugins/cuda/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ pub struct CudaOpt {
pub cuda_workload_absolute: bool,
#[clap(long = "cuda-disable", help = "Disable cuda workers")]
pub cuda_disable: bool,
#[clap(long = "cuda-blocking-sync", help = "Block threads when waiting for GPU result. Lowers CPU usage, but might cause delays resulting in red blocks. Requires higher workload.")]
pub cuda_blocking_sync: bool,
#[clap(long = "cuda-no-blocking-sync", help = "Actively wait for GPU result. Increases CPU usage, but removes delays that might result in red blocks. Can have lower workload.")]
pub cuda_no_blocking_sync: bool,
}
4 changes: 2 additions & 2 deletions plugins/cuda/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mod worker;
use crate::cli::CudaOpt;
use crate::worker::CudaGPUWorker;

const DEFAULT_WORKLOAD_SCALE: f32 = 64.;
const DEFAULT_WORKLOAD_SCALE: f32 = 256.;

pub struct CudaPlugin {
specs: Vec<CudaWorkerSpec>,
Expand Down Expand Up @@ -66,7 +66,7 @@ impl Plugin for CudaPlugin {
_ => DEFAULT_WORKLOAD_SCALE,
},
is_absolute: opts.cuda_workload_absolute,
blocking_sync: opts.cuda_blocking_sync,
blocking_sync: !opts.cuda_no_blocking_sync,
})
.collect();
Ok(())
Expand Down

0 comments on commit 0492183

Please sign in to comment.