convert.hpp 778 B

123456789101112131415161718192021222324252627
  1. //
  2. // MIT license
  3. // Copyright (C) 2024 Intel Corporation
  4. // SPDX-License-Identifier: MIT
  5. //
  6. //
  7. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  8. // See https://llvm.org/LICENSE.txt for license information.
  9. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  10. //
  11. #ifndef GGML_SYCL_CONVERT_HPP
  12. #define GGML_SYCL_CONVERT_HPP
  13. #include "common.hpp"
  14. template <typename T>
  15. using to_t_sycl_t = void (*)(const void *__restrict__ x, T *__restrict__ y,
  16. int k, dpct::queue_ptr stream);
  17. typedef to_t_sycl_t<float> to_fp32_sycl_t;
  18. typedef to_t_sycl_t<sycl::half> to_fp16_sycl_t;
  19. to_fp16_sycl_t ggml_get_to_fp16_sycl(ggml_type type);
  20. to_fp32_sycl_t ggml_get_to_fp32_sycl(ggml_type type);
  21. #endif // GGML_SYCL_CONVERT_HPP