2023-05-02 20:23:54 +02:00
|
|
|
#pragma once
|
|
|
|
|
2023-06-25 13:22:21 +02:00
|
|
|
#include "ggml.h"
|
2024-01-12 20:07:38 +01:00
|
|
|
#include "ggml-backend.h"
|
2023-06-25 13:22:21 +02:00
|
|
|
|
2023-05-02 20:23:54 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2023-12-29 11:23:27 +01:00
|
|
|
GGML_API void ggml_cl_init(void);
|
2023-05-02 20:23:54 +02:00
|
|
|
|
2023-12-29 11:23:27 +01:00
|
|
|
GGML_API void ggml_cl_mul(const struct ggml_tensor * src0, const struct ggml_tensor * src1, struct ggml_tensor * dst);
|
2024-01-26 23:07:32 +01:00
|
|
|
GGML_API void ggml_cl_add(const struct ggml_tensor * src0, const struct ggml_tensor * src1, struct ggml_tensor * dst);
|
2024-01-12 20:07:38 +01:00
|
|
|
GGML_API bool ggml_cl_can_mul_mat(const struct ggml_tensor * src0, const struct ggml_tensor * src1, const struct ggml_tensor * dst);
|
2023-12-29 11:23:27 +01:00
|
|
|
GGML_API size_t ggml_cl_mul_mat_get_wsize(const struct ggml_tensor * src0, const struct ggml_tensor * src1, struct ggml_tensor * dst);
|
|
|
|
GGML_API void ggml_cl_mul_mat(const struct ggml_tensor * src0, const struct ggml_tensor * src1, struct ggml_tensor * dst, void * wdata, size_t wsize);
|
2023-06-25 13:22:21 +02:00
|
|
|
|
2024-01-12 20:07:38 +01:00
|
|
|
// GGML_API void * ggml_cl_host_malloc(size_t size);
|
|
|
|
// GGML_API void ggml_cl_host_free(void * ptr);
|
2023-05-02 20:23:54 +02:00
|
|
|
|
2023-12-29 11:23:27 +01:00
|
|
|
GGML_API void ggml_cl_free_data(const struct ggml_tensor* tensor);
|
2023-05-02 20:23:54 +02:00
|
|
|
|
2023-12-29 11:23:27 +01:00
|
|
|
GGML_API void ggml_cl_transform_tensor(void * data, struct ggml_tensor * tensor);
|
2023-05-02 20:23:54 +02:00
|
|
|
|
2024-01-12 20:07:38 +01:00
|
|
|
// backend API
|
|
|
|
|
|
|
|
// GGML_API ggml_backend_t ggml_backend_opencl_init(void);
|
|
|
|
|
|
|
|
// GGML_API bool ggml_backend_is_opencl(ggml_backend_t backend);
|
|
|
|
|
|
|
|
GGML_API ggml_backend_buffer_type_t ggml_backend_opencl_buffer_type(void);
|
|
|
|
// GGML_API ggml_backend_buffer_type_t ggml_backend_opencl_host_buffer_type(void);
|
|
|
|
|
2023-05-02 20:23:54 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|