Skip to content
Open
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
36 changes: 33 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,35 @@ if(VLLM_GPU_LANG STREQUAL "SYCL")
set(CMAKE_${VLLM_GPU_LANG}_FLAGS "${CMAKE_${VLLM_GPU_LANG}_FLAGS}")
set(SYCL_FIRST_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/csrc/sycl_first.h")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include ${SYCL_FIRST_HEADER}")

# define link options for SYCL, including AOT targets and optimizations
set(PERF_LINK_OPTS "-doubleGRF")
set(PERF_LINK_OPTS "${PERF_LINK_OPTS} -vc-disable-indvars-opt")
set(PERF_LINK_OPTS "${PERF_LINK_OPTS} -vc-codegen")
set(PERF_LINK_OPTS "${PERF_LINK_OPTS} -Xfinalizer -printregusage")
set(PERF_LINK_OPTS "${PERF_LINK_OPTS} -Xfinalizer -enableBCR")
set(PERF_LINK_OPTS "${PERF_LINK_OPTS} -Xfinalizer -DPASTokenReduction")

set(LINKE_OPTS ${LINKE_OPTS}
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable name 'LINKE_OPTS' contains a typo. It should be 'LINK_OPTS' for consistency and clarity.

Copilot uses AI. Check for mistakes.
-fsycl
-fsycl-device-code-split=per_kernel
)
# TODO: make AOT device list configurable
set(USE_AOT_DEVLIST "pvc,bmg")

if (USE_AOT_DEVLIST)
set(LINKE_OPTS ${LINKE_OPTS} -fsycl-targets=spir64_gen)
endif()

set(LINKE_OPTS ${LINKE_OPTS} -Xs )
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a trailing space after '-Xs' which could cause issues. Remove the trailing space or add a comment explaining why it's needed.

Suggested change
set(LINKE_OPTS ${LINKE_OPTS} -Xs )
set(LINKE_OPTS ${LINKE_OPTS} -Xs)

Copilot uses AI. Check for mistakes.

if (USE_AOT_DEVLIST)
set(LINKE_OPTS ${LINKE_OPTS} "-device ${USE_AOT_DEVLIST} -options '${PERF_LINK_OPTS}'")
else()
set(LINKE_OPTS ${LINKE_OPTS} "${PERF_LINK_OPTS}")
endif()
set(SYCL_LINK_OPTION ${LINKE_OPTS})

endif()

#
Expand All @@ -154,12 +183,13 @@ if(VLLM_GPU_LANG STREQUAL "SYCL")
"csrc/torch_bindings.cpp"
"csrc/quantization/fp8/fp8_quant.cpp"
)

include_directories("/usr/include")
set(CMPLR_ROOT $ENV{CMPLR_ROOT})
set(CMAKE_CXX_COMPILER icpx)
set(VLLM_EXTRA_INCLUDE_DIRECTORIES ${CMPLR_ROOT}/include/sycl)
list(APPEND VLLM_GPU_FLAGS "-DVLLM_BUILD_XPU_OPS" )
list(APPEND VLLM_GPU_LINK_FLAGS "-fsycl" "-fsycl-targets=spir64")
list(APPEND VLLM_GPU_FLAGS "-DVLLM_BUILD_XPU_OPS")
list(APPEND VLLM_GPU_LINK_FLAGS ${SYCL_LINK_OPTION})
list(APPEND VLLM_LINK_LIBRARIES "sycl" "OpenCL" "pthread" "m" "dl" "torch" )
endif()

Expand Down Expand Up @@ -189,7 +219,7 @@ if(VLLM_GPU_LANG STREQUAL "SYCL")
set(CMAKE_CXX_COMPILER icpx)
set(VLLM_EXTRA_INCLUDE_DIRECTORIES ${CMPLR_ROOT}/include/sycl)
list(APPEND VLLM_GPU_FLAGS "-DVLLM_BUILD_XPU_OPS" )
list(APPEND VLLM_GPU_LINK_FLAGS "-fsycl" "-fsycl-targets=spir64")
list(APPEND VLLM_GPU_LINK_FLAGS ${SYCL_LINK_OPTION})
list(APPEND VLLM_LINK_LIBRARIES "sycl" "OpenCL" "pthread" "m" "dl" "torch" )
endif()

Expand Down