Skip to content

Commit 632dc53

Browse files
authored
[CI] add bmg g31 and update docker file (vllm-project#144)
* add safe dir Signed-off-by: Kunshang Ji <kunshang.ji@intel.com> * limit thread Signed-off-by: Kunshang Ji <kunshang.ji@intel.com> * limit thread to 128 Signed-off-by: Kunshang Ji <kunshang.ji@intel.com> * upgrade umd Signed-off-by: Kunshang Ji <kunshang.ji@intel.com> * install ocloc Signed-off-by: Kunshang Ji <kunshang.ji@intel.com> * test Signed-off-by: Kunshang Ji <kunshang.ji@intel.com> * fix Signed-off-by: Kunshang Ji <kunshang.ji@intel.com> * fix Signed-off-by: Kunshang Ji <kunshang.ji@intel.com> * fix Signed-off-by: Kunshang Ji <kunshang.ji@intel.com> * add g31 Signed-off-by: Kunshang Ji <kunshang.ji@intel.com> --------- Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
1 parent 8051496 commit 632dc53

4 files changed

Lines changed: 21 additions & 7 deletions

File tree

.github/workflows/ut.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ jobs:
7373

7474
- name: build & install wheel
7575
run: |
76+
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
7677
python3 -m pip config set global.break-system-packages true
7778
pip install -r requirements.txt
78-
pip install --extra-index-url=https://download.pytorch.org/whl/xpu -e . -v
79+
MAX_JOB=128 pip install --extra-index-url=https://download.pytorch.org/whl/xpu -e . -v
7980
8081
- name: test
8182
run: |
@@ -107,9 +108,10 @@ jobs:
107108

108109
- name: build & install wheel
109110
run: |
111+
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
110112
python3 -m pip config set global.break-system-packages true
111113
pip install -r requirements.txt
112-
pip install --extra-index-url=https://download.pytorch.org/whl/xpu -e . -v
114+
MAX_JOBS=128 pip install --extra-index-url=https://download.pytorch.org/whl/xpu -e . -v
113115
114116
- name: test
115117
run: |

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ install(CODE "set(CMAKE_INSTALL_LOCAL_ONLY TRUE)" ALL_COMPONENTS)
3535
set(PYTHON_SUPPORTED_VERSIONS "3.9" "3.10" "3.11" "3.12")
3636

3737
# Supported Intel GPU architectures.
38-
set(SYCL_SUPPORTED_ARCHS "intel_gpu_pvc;intel_gpu_bmg_g21")
38+
set(SYCL_SUPPORTED_ARCHS "intel_gpu_pvc;intel_gpu_bmg_g21;intel_gpu_bmg_g31")
3939

4040
#
4141
# Supported/expected torch versions for XPU.
@@ -180,8 +180,8 @@ if(VLLM_GPU_LANG STREQUAL "SYCL")
180180
)
181181

182182
# TODO: make AOT configurable
183-
set(AOT_DEVICES "pvc,bmg-g21-a0")
184-
set(XE2_AOT_DEVICES "pvc,bmg-g21-a0")
183+
set(AOT_DEVICES "pvc,bmg-g21-a0,bmg-g31-a0")
184+
set(XE2_AOT_DEVICES "pvc,bmg-g21-a0,bmg-g31-a0")
185185

186186
# Final link option be like: icpx -fsycl -fsycl-target=spir64_gen
187187
# ${SYCL_DEVICE_LINK_FLAGS} -Xsycl-target-backend=spir64_gen

Dockerfile.xpu

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,16 @@ RUN apt clean && apt-get update -y && \
2424
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
2525
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1
2626

27-
RUN apt install -y libze1 libze-dev libze-intel-gpu1 intel-opencl-icd libze-intel-gpu-raytracing intel-ocloc
27+
RUN apt install -y libze1 libze-dev
28+
29+
RUN mkdir neo && cd neo && \
30+
wget https://github.com/intel/intel-graphics-compiler/releases/download/v2.22.2/intel-igc-core-2_2.22.2+20121_amd64.deb && \
31+
wget https://github.com/intel/intel-graphics-compiler/releases/download/v2.22.2/intel-igc-opencl-2_2.22.2+20121_amd64.deb && \
32+
wget https://github.com/intel/compute-runtime/releases/download/25.44.36015.8/intel-ocloc_25.44.36015.8-0_amd64.deb && \
33+
wget https://github.com/intel/compute-runtime/releases/download/25.44.36015.8/intel-opencl-icd_25.44.36015.8-0_amd64.deb && \
34+
wget https://github.com/intel/compute-runtime/releases/download/25.44.36015.8/libigdgmm12_22.8.2_amd64.deb && \
35+
wget https://github.com/intel/compute-runtime/releases/download/25.44.36015.8/libze-intel-gpu1_25.44.36015.8-0_amd64.deb && \
36+
dpkg -i *.deb && cd .. && rm -rf neo
2837

2938
RUN python3 -m pip config set global.break-system-packages true
3039

csrc/utils.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ get_device_architecture(at::DeviceIndex device_index = -1) {
3030

3131
static inline bool is_bmg(at::DeviceIndex device_index = -1) {
3232
return get_device_architecture(device_index) ==
33-
syclex::architecture::intel_gpu_bmg_g21;
33+
syclex::architecture::intel_gpu_bmg_g21 ||
34+
get_device_architecture(device_index) ==
35+
syclex::architecture::intel_gpu_bmg_g31;
3436
}
3537

3638
static inline bool is_pvc(at::DeviceIndex device_index = -1) {
@@ -41,6 +43,7 @@ static inline bool is_pvc(at::DeviceIndex device_index = -1) {
4143
static inline bool is_xe2_arch(at::DeviceIndex device_index = -1) {
4244
auto arch = get_device_architecture(device_index);
4345
return arch == syclex::architecture::intel_gpu_bmg_g21 ||
46+
arch == syclex::architecture::intel_gpu_bmg_g31 ||
4447
arch == syclex::architecture::intel_gpu_pvc;
4548
}
4649

0 commit comments

Comments
 (0)