Skip to content

Commit f29155e

Browse files
committed
Disable cuda allocator max_split_size for now
1 parent 6783a96 commit f29155e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

launcher/src/main.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ use std::ffi::OsString;
1616
use subprocess::{Popen, PopenConfig, PopenError, Redirection};
1717
use tracing::info;
1818

19+
// For now this will be disabled by default, more testing is needed
20+
const DEFAULT_MAX_SPLIT_SIZE_MB: &'static str = "none";
21+
1922
/// App Configuration
2023
#[derive(Parser, Debug, Clone)]
2124
#[clap(author, version, about, long_about = None)]
@@ -106,9 +109,9 @@ fn main() -> ExitCode {
106109
// Set max_split_size to default value if PYTORCH_CUDA_ALLOC_CONF is not set,
107110
// or unset it if PYTORCH_CUDA_ALLOC_CONF is set but empty
108111
let cuda_alloc_conf = match env::var("PYTORCH_CUDA_ALLOC_CONF") {
109-
Err(VarError::NotPresent) if DEFAULT_SPLIT_SIZE == "none" => None,
112+
Err(VarError::NotPresent) if DEFAULT_MAX_SPLIT_SIZE_MB == "none" => None,
110113
Err(VarError::NotPresent) => {
111-
let alloc_conf = format!("max_split_size_mb:{}", DEFAULT_SPLIT_SIZE);
114+
let alloc_conf = format!("max_split_size_mb:{}", DEFAULT_MAX_SPLIT_SIZE_MB);
112115
info!("Setting PYTORCH_CUDA_ALLOC_CONF to default value: {alloc_conf}");
113116
Some(alloc_conf)
114117
},
@@ -387,9 +390,6 @@ enum ShardStatus {
387390
Failed((usize, String)),
388391
}
389392

390-
const DEFAULT_SPLIT_SIZE: &'static str = "512";
391-
392-
393393
#[allow(clippy::too_many_arguments)]
394394
fn shard_manager(
395395
model_name: String,

0 commit comments

Comments
 (0)