cann: Add host buffer type for Ascend NPU (#9406)
* feat: Add host buffer type for Ascend NPU(CANN backend) * fix some checking errors * Add a few comments
This commit is contained in:
parent
e665744317
commit
e6b7801bd1
3 changed files with 121 additions and 0 deletions
|
@ -80,6 +80,13 @@ ggml_backend_cann_buffer_type(int32_t device);
|
|||
*/
|
||||
GGML_API GGML_CALL int32_t ggml_backend_cann_get_device_count(void);
|
||||
|
||||
/**
|
||||
* @brief pinned host buffer for use with the CPU backend for faster copies between CPU and NPU.
|
||||
*
|
||||
* @return A pointer to the host buffer type interface.
|
||||
*/
|
||||
GGML_API GGML_CALL ggml_backend_buffer_type_t ggml_backend_cann_host_buffer_type(void);
|
||||
|
||||
/**
|
||||
* @brief Retrieves the description of a specific CANN device.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue