Skip to content

Commit

Permalink
fix: binding types
Browse files Browse the repository at this point in the history
  • Loading branch information
abetlen committed Feb 9, 2024
1 parent cb98ede commit 4fed8db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ggml/ggml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ def ggml_tensor_overhead() -> int:
# GGML_API struct ggml_context * ggml_init(struct ggml_init_params params);
def ggml_init(
params: ggml_init_params,
) -> ggml_context_p:
) -> Optional[ggml_context_p]:
"""Instantiate a new ggml context with params.
You must call `ggml_free()` to free the context.
Expand All @@ -1329,7 +1329,7 @@ def ggml_init(
params: ggml init params
Returns:
Pointer to ggml_context"""
Pointer to ggml_context or None if failed to initialize context."""
return lib.ggml_init(params)


Expand Down Expand Up @@ -9766,8 +9766,8 @@ def ggml_backend_reg_alloc_buffer(
# // Initialize a backend scheduler
# GGML_API ggml_backend_sched_t ggml_backend_sched_new(ggml_backend_t * backends, ggml_backend_buffer_type_t * bufts, int n_backends, size_t graph_size);
def ggml_backend_sched_new(
backends: "ctypes._Pointer(ggml_backend_t)", # type: ignore
bufts: "ctypes._Pointer(ggml_backend_buffer_type_t)", # type: ignore
backends: "ctypes._Pointer[ggml_backend_t]", # type: ignore
bufts: "ctypes._Pointer[ggml_backend_buffer_type_t]", # type: ignore
n_backends: Union[ctypes.c_int, int],
graph_size: Union[ctypes.c_size_t, int],
) -> ggml_backend_sched_t:
Expand Down

0 comments on commit 4fed8db

Please sign in to comment.