@@ -16,6 +16,9 @@ use std::ffi::OsString;
16
16
use subprocess:: { Popen , PopenConfig , PopenError , Redirection } ;
17
17
use tracing:: info;
18
18
19
+ // For now this will be disabled by default, more testing is needed
20
+ const DEFAULT_MAX_SPLIT_SIZE_MB : & ' static str = "none" ;
21
+
19
22
/// App Configuration
20
23
#[ derive( Parser , Debug , Clone ) ]
21
24
#[ clap( author, version, about, long_about = None ) ]
@@ -106,9 +109,9 @@ fn main() -> ExitCode {
106
109
// Set max_split_size to default value if PYTORCH_CUDA_ALLOC_CONF is not set,
107
110
// or unset it if PYTORCH_CUDA_ALLOC_CONF is set but empty
108
111
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 ,
110
113
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 ) ;
112
115
info ! ( "Setting PYTORCH_CUDA_ALLOC_CONF to default value: {alloc_conf}" ) ;
113
116
Some ( alloc_conf)
114
117
} ,
@@ -387,9 +390,6 @@ enum ShardStatus {
387
390
Failed ( ( usize , String ) ) ,
388
391
}
389
392
390
- const DEFAULT_SPLIT_SIZE : & ' static str = "512" ;
391
-
392
-
393
393
#[ allow( clippy:: too_many_arguments) ]
394
394
fn shard_manager (
395
395
model_name : String ,
0 commit comments