]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
CANN: Remove unused `ggml_cann_get_device` function (llama/18625)
authorRaul Torres <redacted>
Fri, 16 Jan 2026 08:34:09 +0000 (08:34 +0000)
committerGeorgi Gerganov <redacted>
Fri, 30 Jan 2026 11:49:29 +0000 (13:49 +0200)
src/ggml-cann/common.h
src/ggml-cann/ggml-cann.cpp

index 70d3f2b225df1e04d17c908e5c5c870b1eec3a29..fb3e7572e2c32ae112ca492c01fab44f4d4c47c8 100644 (file)
@@ -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<std::string> get_env_as_lowercase(const std::string & name);
 bool                       parse_bool(const std::string & value);
index a5ca85c4470ab3266a306354fa9b30fc5da1b301..eba83327f13fe001ab8889035be67ed3593f4750 100644 (file)
@@ -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