CANN: Remove unused `ggml_cann_get_device` function (#18625)
This commit is contained in:
parent
e20fa27a02
commit
4ea2eaac01
|
|
@ -101,7 +101,6 @@ struct ggml_cann_device_info {
|
||||||
const ggml_cann_device_info & ggml_cann_info();
|
const ggml_cann_device_info & ggml_cann_info();
|
||||||
|
|
||||||
void ggml_cann_set_device(int32_t device);
|
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);
|
std::optional<std::string> get_env_as_lowercase(const std::string & name);
|
||||||
bool parse_bool(const std::string & value);
|
bool parse_bool(const std::string & value);
|
||||||
|
|
|
||||||
|
|
@ -93,17 +93,6 @@ void ggml_cann_set_device(const int32_t device) {
|
||||||
g_current_cann_device = 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.
|
* @brief Get the value of the specified environment variable (name) as lowercase.
|
||||||
* if not empty, return a std::string object
|
* if not empty, return a std::string object
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue