vllm-project / vllm

A high-throughput and memory-efficient inference and serving engine for LLMs
https://docs.vllm.ai
Apache License 2.0
26.09k stars 3.82k forks source link

Does vllm support pytorch/xla ? #3424

Open dinghaodhd opened 5 months ago

dinghaodhd commented 5 months ago

Anything you want to discuss about vllm.

Hi, We have adapt our harware to pytorch/xla, what should we do to run vllm via pytorch/xla?

rkooo567 commented 5 months ago

I don't think it is working with pytorch/XLA now.

  1. The core attention algorithm that supports paged-attention is written in Cuda (and there are some other custom cuda kernels).
  2. https://github.com/vllm-project/vllm/blob/429284dc374bab79d4dfbb25053583901e6e5051/vllm/config.py#L520 there are only neuron and cuda device options.

I think to make this work;

richardliaw commented 5 months ago

There will be some exploration done from Google side I believe (cc @allenwang28)

allenwang28 commented 5 months ago

We are exploring TPU compatibility and support in https://github.com/vllm-project/vllm/issues/3620 through PyTorch/XLA.

but after this work, it should be clearer how to adapt PyTorch/XLA in vLLM for different hardware backends CC @WoosukKwon @miladm @shauheen

yiakwy-xpu-ml-framework-team commented 1 month ago

Google has made its efforts in supportin TPU. We will make efforts to utilize the canonical IR optimizattion ,auto tuning, auto fusion, layout optimization form xla and stableHLO in GPU devices.