From: Raul Torres Date: Fri, 16 Jan 2026 08:34:09 +0000 (+0000) Subject: CANN: Remove unused `ggml_cann_get_device` function (llama/18625) X-Git-Tag: v0.9.6~61 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=51a9964e960155f7c9198e9ef9c010ff0f558dbb;p=pkg%2Fggml%2Fsources%2Fggml CANN: Remove unused `ggml_cann_get_device` function (llama/18625) --- diff --git a/src/ggml-cann/common.h b/src/ggml-cann/common.h index 70d3f2b2..fb3e7572 100644 --- a/src/ggml-cann/common.h +++ b/src/ggml-cann/common.h @@ -101,7 +101,6 @@ struct ggml_cann_device_info { const ggml_cann_device_info & ggml_cann_info(); void ggml_cann_set_device(int32_t device); -int32_t ggml_cann_get_device(); std::optional get_env_as_lowercase(const std::string & name); bool parse_bool(const std::string & value); diff --git a/src/ggml-cann/ggml-cann.cpp b/src/ggml-cann/ggml-cann.cpp index a5ca85c4..eba83327 100644 --- a/src/ggml-cann/ggml-cann.cpp +++ b/src/ggml-cann/ggml-cann.cpp @@ -93,17 +93,6 @@ void ggml_cann_set_device(const int32_t device) { g_current_cann_device = device; } -/** - * @brief Retrieves the current device ID. - * - * @return The current device ID. - */ -int32_t ggml_cann_get_device() { - int32_t id; - ACL_CHECK(aclrtGetDevice(&id)); - return id; -} - /** * @brief Get the value of the specified environment variable (name) as lowercase. * if not empty, return a std::string object