Skip to content

Commit e25ac05

Browse files
committed
CANN: Fix rename for get_env
In ggml-org#18624, get_env in ggml-cann was renamed to get_env_as_lowercase to accurately reflect the function’s behavior and reduce the chance of misuse. However, the update missed renaming call sites in other files. This commit fixes that oversight.
1 parent 193ee38 commit e25ac05

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ggml/src/ggml-cann/aclnn_ops.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1963,7 +1963,7 @@ static void ggml_cann_mat_mul_fp(ggml_backend_cann_context & ctx, ggml_tensor *
19631963
acl_tensor_ptr acl_weight_tensor;
19641964

19651965
// Only check env once.
1966-
static bool weight_to_nz = parse_bool(get_env("GGML_CANN_WEIGHT_NZ").value_or("on"));
1966+
static bool weight_to_nz = parse_bool(get_env_as_lowercase("GGML_CANN_WEIGHT_NZ").value_or("on"));
19671967
if (weight_to_nz && is_matmul_weight(weight)) {
19681968
acl_weight_tensor = ggml_cann_create_tensor(weight, transpose_ne, transpose_nb, n_dims, ACL_FORMAT_FRACTAL_NZ);
19691969
} else {

ggml/src/ggml-cann/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const ggml_cann_device_info & ggml_cann_info();
103103
void ggml_cann_set_device(int32_t device);
104104
int32_t ggml_cann_get_device();
105105

106-
std::optional<std::string> get_env(const std::string & name);
106+
std::optional<std::string> get_env_as_lowercase(const std::string & name);
107107
bool parse_bool(const std::string & value);
108108
int parse_integer(const std::string & value);
109109

0 commit comments

Comments
 (0)