Skip to content

Commit 948f3c5

Browse files
committed
Remove INTEL_CPU
1 parent 09dfe89 commit 948f3c5

File tree

5 files changed

+9
-14
lines changed

5 files changed

+9
-14
lines changed

docs/backend/SYCL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ use 1 SYCL GPUs: [0] with Max compute units:512
630630
| Name | Value | Function |
631631
|--------------------|---------------------------------------|---------------------------------------------|
632632
| GGML_SYCL | ON (mandatory) | Enable build with SYCL code path.<br>FP32 path - recommended for better perforemance than FP16 on quantized model|
633-
| GGML_SYCL_TARGET | INTEL *(default)* \| INTEL_CPU \| INTEL_GPU \| NVIDIA \| AMD | Set the SYCL target device type. |
633+
| GGML_SYCL_TARGET | INTEL *(default)* \| NVIDIA \| AMD | Set the SYCL target device type. |
634634
| GGML_SYCL_DEVICE_ARCH | Optional (except for AMD) | Set the SYCL device architecture, optional except for AMD. Setting the device architecture can improve the performance. See the table [--offload-arch](https://github.com/intel/llvm/blob/sycl/sycl/doc/design/OffloadDesign.md#--offload-arch) for a list of valid architectures. |
635635
| GGML_SYCL_F16 | OFF *(default)* \|ON *(optional)* | Enable FP16 build with SYCL code path. |
636636
| CMAKE_C_COMPILER | `icx` *(Linux)*, `icx/cl` *(Windows)* | Set `icx` compiler for SYCL code path. |

examples/sycl/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ List all SYCL devices with ID, compute capability, max work group size, ect.
1414

1515
1. Build the llama.cpp for SYCL for the specified target *(using GGML_SYCL_TARGET)*.
1616

17-
2. Enable oneAPI running environment *(if GGML_SYCL_TARGET is set to INTEL -default-, INTEL_CPU or INTEL_GPU)*
17+
2. Enable oneAPI running environment *(if GGML_SYCL_TARGET is set to INTEL -default-)*
1818

1919
```
2020
source /opt/intel/oneapi/setvars.sh

ggml/cmake/ggml-config.cmake.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ if (NOT GGML_SHARED_LIB)
7878

7979
if (GGML_SYCL)
8080
find_package(DNNL)
81-
if (${DNNL_FOUND} AND GGML_SYCL_TARGET MATCHES "INTEL.*")
81+
if (${DNNL_FOUND} AND GGML_SYCL_TARGET STREQUAL "INTEL")
8282
list(APPEND GGML_SYCL_INTERFACE_LINK_LIBRARIES DNNL::dnnl)
8383
endif()
8484
if (WIN32)

ggml/src/ggml-sycl/CMakeLists.txt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
message(STATUS "GGML_SYCL_TARGET=${GGML_SYCL_TARGET}")
22

3-
if (NOT GGML_SYCL_TARGET MATCHES "^(INTEL.*|NVIDIA|AMD)$")
3+
if (NOT GGML_SYCL_TARGET MATCHES "^(INTEL|NVIDIA|AMD)$")
44
message(FATAL_ERROR "Invalid backend chosen, supported options are INTEL, NVIDIA, or AMD")
55
endif()
66

@@ -49,13 +49,13 @@ target_sources(ggml-sycl PRIVATE ${GGML_HEADERS_SYCL} ${GGML_SOURCES_SYCL})
4949
find_package(DNNL)
5050
message("-- DNNL found:" ${DNNL_FOUND})
5151

52-
if (GGML_SYCL_TARGET MATCHES "INTEL.*")
52+
if (GGML_SYCL_TARGET STREQUAL "INTEL")
5353
add_compile_definitions(GGML_SYCL_DNNL=${DNNL_FOUND})
5454
else()
5555
add_compile_definitions(GGML_SYCL_DNNL=0)
5656
endif()
5757

58-
if (${DNNL_FOUND} AND GGML_SYCL_TARGET MATCHES "INTEL.*")
58+
if (${DNNL_FOUND} AND GGML_SYCL_TARGET STREQUAL "INTEL")
5959
target_link_libraries(ggml-sycl PRIVATE DNNL::dnnl)
6060
endif()
6161

@@ -116,12 +116,9 @@ if (NOT oneMath_FOUND)
116116
endif()
117117

118118
# Below oneMath compile-time dispatching is used for better performance
119-
if (GGML_SYCL_TARGET STREQUAL "INTEL_CPU")
120-
target_link_libraries(ggml-sycl PRIVATE ONEMATH::onemath_blas_mklcpu)
121-
target_compile_definitions(ggml-sycl PRIVATE GGML_SYCL_INTEL GGML_SYCL_INTEL_CPU)
122-
elseif (GGML_SYCL_TARGET STREQUAL "INTEL_GPU")
119+
if (GGML_SYCL_TARGET STREQUAL "INTEL")
123120
target_link_libraries(ggml-sycl PRIVATE ONEMATH::onemath_blas_mklgpu)
124-
target_compile_definitions(ggml-sycl PRIVATE GGML_SYCL_INTEL GGML_SYCL_INTEL_GPU)
121+
target_compile_definitions(ggml-sycl PRIVATE GGML_SYCL_INTEL)
125122
elseif (GGML_SYCL_TARGET STREQUAL "NVIDIA")
126123
target_link_libraries(ggml-sycl PRIVATE ONEMATH::onemath_blas_cublas)
127124
target_compile_options(ggml-sycl PRIVATE "-fsycl-targets=nvptx64-nvidia-cuda")

ggml/src/ggml-sycl/dpct/helper.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ inline auto get_onemath_backend(sycl::queue& queue)
9898
// If the backend is known at compile-time, use oneMath backend_selector to use
9999
// compile-time dispatching and avoid the need to dlopen libraries. Otherwise
100100
// fallback to runtime dispatching.
101-
#if defined(GGML_SYCL_INTEL_CPU)
102-
return oneapi::math::backend_selector<oneapi::math::backend::mklcpu>{ queue };
103-
#elif defined(GGML_SYCL_INTEL_GPU)
101+
#if defined(GGML_SYCL_INTEL)
104102
return oneapi::math::backend_selector<oneapi::math::backend::mklgpu>{ queue };
105103
#elif defined(GGML_SYCL_NVIDIA)
106104
return oneapi::math::backend_selector<oneapi::math::backend::cublas>{ queue };

0 commit comments

Comments
 (0)