From 74e3185cfd51d39a4738b631db5ced23eea7f1c6 Mon Sep 17 00:00:00 2001 From: arthw <14088817+arthw@users.noreply.github.com> Date: Sat, 13 Jul 2024 16:02:15 +0800 Subject: [PATCH] fix editorconfig check format issue --- ggml/src/ggml-sycl/sycl_hw.cpp | 34 ++++++++++++------------ ggml/src/ggml-sycl/sycl_hw.hpp | 48 +++++++++++++++++----------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/ggml/src/ggml-sycl/sycl_hw.cpp b/ggml/src/ggml-sycl/sycl_hw.cpp index a9a216a4e90d2..21e0c2af90191 100644 --- a/ggml/src/ggml-sycl/sycl_hw.cpp +++ b/ggml/src/ggml-sycl/sycl_hw.cpp @@ -1,17 +1,17 @@ -#include "sycl_hw.hpp" - -bool is_in_vector(const std::vector &vec, int item) { - return std::find(vec.begin(), vec.end(), item) != vec.end(); -} - -SYCL_HW_FAMILY get_device_family(sycl::device *device_ptr) { - auto id = device_ptr->get_info(); - auto id_prefix = id & 0xff00; - - if (is_in_vector(Xe_Iris_IDs, id_prefix) or is_in_vector(UHD_IDs, id_prefix)) { - return SYCL_HW_FAMILY_INTEL_IGPU; - } else { - std::cerr << "No support PCI_ID: " << std::hex << id << std::endl; - return SYCL_HW_FAMILY_UNKNOWN; - } -} \ No newline at end of file +#include "sycl_hw.hpp" + +bool is_in_vector(const std::vector &vec, int item) { + return std::find(vec.begin(), vec.end(), item) != vec.end(); +} + +SYCL_HW_FAMILY get_device_family(sycl::device *device_ptr) { + auto id = device_ptr->get_info(); + auto id_prefix = id & 0xff00; + + if (is_in_vector(Xe_Iris_IDs, id_prefix) or is_in_vector(UHD_IDs, id_prefix)) { + return SYCL_HW_FAMILY_INTEL_IGPU; + } else { + std::cerr << "No support PCI_ID: " << std::hex << id << std::endl; + return SYCL_HW_FAMILY_UNKNOWN; + } +} diff --git a/ggml/src/ggml-sycl/sycl_hw.hpp b/ggml/src/ggml-sycl/sycl_hw.hpp index 475bb194f678e..81944475663a4 100644 --- a/ggml/src/ggml-sycl/sycl_hw.hpp +++ b/ggml/src/ggml-sycl/sycl_hw.hpp @@ -1,24 +1,24 @@ -#ifndef SYCL_HW_HPP -#define SYCL_HW_HPP - -#include -#include -#include - - -#include - -// const int Xe_ARC[] = {0x5600, 0x4f}; -const std::vector Xe_Iris_IDs = {0x4900, 0xa700}; -const std::vector UHD_IDs = {0x4600}; - -enum SYCL_HW_FAMILY { - SYCL_HW_FAMILY_UNKNOWN = -1, - SYCL_HW_FAMILY_INTEL_IGPU = 0 -}; - -bool is_in_vector(std::vector &vec, int item); - -SYCL_HW_FAMILY get_device_family(sycl::device *device_ptr); - -#endif // SYCL_HW_HPP \ No newline at end of file +#ifndef SYCL_HW_HPP +#define SYCL_HW_HPP + +#include +#include +#include + + +#include + +// const int Xe_ARC[] = {0x5600, 0x4f}; +const std::vector Xe_Iris_IDs = {0x4900, 0xa700}; +const std::vector UHD_IDs = {0x4600}; + +enum SYCL_HW_FAMILY { + SYCL_HW_FAMILY_UNKNOWN = -1, + SYCL_HW_FAMILY_INTEL_IGPU = 0 +}; + +bool is_in_vector(std::vector &vec, int item); + +SYCL_HW_FAMILY get_device_family(sycl::device *device_ptr); + +#endif // SYCL_HW_HPP