Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions sendnn_inference/envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

_cache: dict[str, Any] = {}

_CPU_MM_DTYPE_PLATFORM_DEFAULTS = {"s390x": "float32", "ppc64le": "bfloat16"}
_CPU_MM_DTYPE_PLATFORM_DEFAULTS = {"s390x": "float32", "ppc64le": "float32"}


def override(name: str, value: str) -> None:
Expand Down Expand Up @@ -184,12 +184,7 @@ def clear_env_cache():
# its embedding is available. Only effective for decoder models with TP > 1.
# Defaults to 0 (disabled) — uses the Phase 1 blocking encode path.
"SENDNN_INFERENCE_ASYNC_MM_ENCODER": lambda: bool(
int(
os.getenv(
"SENDNN_INFERENCE_ASYNC_MM_ENCODER",
"0" if platform.machine() == "ppc64le" else "1",
)
)
int(os.getenv("SENDNN_INFERENCE_ASYNC_MM_ENCODER", "1"))
),
# When "1" (default), rank 0 runs the vision encoder and shares the result
# with other TP ranks via POSIX shared memory (one encoder call instead of
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_env_vars_override_for_invalid_config():
"machine,expected",
[
("s390x", torch.float32),
("ppc64le", torch.bfloat16),
("ppc64le", torch.float32),
("x86_64", torch.float16),
("aarch64", torch.float16),
],
Expand Down
Loading