Skip to content

Commit

Permalink
updated docs and added TODO
Browse files Browse the repository at this point in the history
Signed-off-by: Wallas Santos <[email protected]>
  • Loading branch information
wallashss committed Jan 7, 2025
1 parent a81634b commit 79a52dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/source/getting_started/installation/cpu-arm.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Installation for ARM CPUs

vLLM has been adapted to work on ARM64 CPUs with NEON support, leveraging the CPU backend initially developed for the x86 platform. This guide provides installation instructions specific to ARM (including Apple Silicon). For additional details on supported features, refer to the [x86 CPU documentation](#installation-x86) covering:
vLLM has been adapted to work on ARM64 CPUs with NEON support, leveraging the CPU backend initially developed for the x86 platform. This guide provides installation instructions specific to ARM (which also apply to Apple Silicon, see [Installation for macOS](#installation-apple) for more). For additional details on supported features, refer to the [x86 CPU documentation](#installation-x86) covering:

- CPU backend inference capabilities
- Relevant runtime environment variables
Expand Down
10 changes: 7 additions & 3 deletions vllm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2254,12 +2254,16 @@ def _get_and_verify_dtype(
"using float16 by default. Float16 is not currently "
"supported for POWERPC.")
torch_dtype = torch.bfloat16

# TODO: change this condition to check if the platform support bf16
# instead of checking the OS. For instance M2 shall supports bf16
# already. But we need to modify `cpu_extension.cmake` to activate
# the feature in the build.
if (current_platform.is_cpu() and sys.platform.startswith("darwin")
and current_platform.get_cpu_architecture()
== CpuArchEnum.ARM and config_dtype == torch.bfloat16):
logger.info(
"For macOS with Apple Silicon, bfloat16 is not supported. "
"Setting dtype to float16.")
logger.info("For macOS with Apple Silicon, currently bfloat16 "
"is not supported. Setting dtype to float16.")
torch_dtype = torch.float16

if current_platform.is_hpu() and config_dtype == torch.float16:
Expand Down

0 comments on commit 79a52dc

Please sign in to comment.