We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 263de2e commit af449d3Copy full SHA for af449d3
lora.hpp
@@ -33,14 +33,6 @@ struct LoraModel : public GGMLModule {
33
return model_loader.get_params_mem_size(NULL);
34
}
35
36
- static inline int ggml_n_dims_t(const struct TensorStorage tensor) {
37
- for (int i = GGML_MAX_DIMS - 1; i >= 1; --i) {
38
- if (tensor.ne[i] > 1) {
39
- return i + 1;
40
- }
41
42
- return 1;
43
44
45
bool load_from_file() {
46
LOG_INFO("loading LoRA from '%s'", file_path.c_str());
@@ -57,7 +49,7 @@ struct LoraModel : public GGMLModule {
57
49
if (dry_run) {
58
50
struct ggml_tensor* real = ggml_new_tensor(params_ctx,
59
51
tensor_storage.type,
60
- ggml_n_dims_t(tensor_storage),
52
+ tensor_storage.n_dims,
61
53
tensor_storage.ne);
62
54
lora_tensors[name] = real;
63
55
} else {
0 commit comments