mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-24 00:12:08 +00:00
fix comment
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
This commit is contained in:
parent
7914e980e2
commit
787dbe98a8
@ -28,8 +28,8 @@ impl Env {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_hpu_device(&self) -> bool {
|
pub fn should_start_a_single_hpu_shard(&self) -> bool {
|
||||||
self.hpu_env != "N/A"
|
self.hpu_env != "N/A" && std::env::var("ATTENTION").as_deref() != Ok("paged")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1559,10 +1559,7 @@ fn spawn_shards(
|
|||||||
) -> Result<(), LauncherError> {
|
) -> Result<(), LauncherError> {
|
||||||
// Start shard processes
|
// Start shard processes
|
||||||
for rank in 0..num_shard {
|
for rank in 0..num_shard {
|
||||||
if rank != 0
|
if rank != 0 && env_runtime::Env::new().should_start_a_single_hpu_shard() {
|
||||||
&& env_runtime::Env::new().is_hpu_device()
|
|
||||||
&& std::env::var("ATTENTION").as_deref() != Ok("paged")
|
|
||||||
{
|
|
||||||
tracing::info!("Running on HPU, the launcher will not do any sharding as actual sharding is done in the server");
|
tracing::info!("Running on HPU, the launcher will not do any sharding as actual sharding is done in the server");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1642,7 +1639,7 @@ fn spawn_shards(
|
|||||||
if shard_ready == num_shard {
|
if shard_ready == num_shard {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if env_runtime::Env::new().is_hpu_device() {
|
if env_runtime::Env::new().should_start_a_single_hpu_shard() {
|
||||||
tracing::info!("HPU detected, shard is ready");
|
tracing::info!("HPU detected, shard is ready");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user