From 5f26a728766dce07a15eedd5979f342509df5cb4 Mon Sep 17 00:00:00 2001 From: yuanwu Date: Wed, 11 Jun 2025 06:15:11 +0000 Subject: [PATCH] Remove the workaround for HPU distributed. Signed-off-by: yuanwu --- launcher/src/env_runtime.rs | 4 ---- launcher/src/main.rs | 9 --------- 2 files changed, 13 deletions(-) diff --git a/launcher/src/env_runtime.rs b/launcher/src/env_runtime.rs index d9056e41..cd4ee290 100644 --- a/launcher/src/env_runtime.rs +++ b/launcher/src/env_runtime.rs @@ -27,10 +27,6 @@ impl Env { docker_label: option_env!("DOCKER_LABEL").unwrap_or("N/A"), } } - - pub fn should_start_a_single_hpu_shard(&self) -> bool { - self.hpu_env != "N/A" && std::env::var("ATTENTION").as_deref() != Ok("paged") - } } impl fmt::Display for Env { diff --git a/launcher/src/main.rs b/launcher/src/main.rs index ee80eb00..c727623c 100644 --- a/launcher/src/main.rs +++ b/launcher/src/main.rs @@ -1590,11 +1590,6 @@ fn spawn_shards( ) -> Result<(), LauncherError> { // Start shard processes for rank in 0..num_shard { - if rank != 0 && env_runtime::Env::new().should_start_a_single_hpu_shard() { - tracing::info!("Running on HPU, the launcher will not do any sharding as actual sharding is done in the server"); - break; - } - let model_id = args.model_id.clone(); let revision = args.revision.clone(); let uds_path = args.shard_uds_path.clone(); @@ -1670,10 +1665,6 @@ fn spawn_shards( if shard_ready == num_shard { break; } - if env_runtime::Env::new().should_start_a_single_hpu_shard() { - tracing::info!("HPU detected, shard is ready"); - break; - } } Err(TryRecvError::Empty) => { sleep(Duration::from_millis(100));