| 106 | typedef std::pair<enum ggml_type, std::array<int64_t, GGML_MAX_DIMS>> tensor_config_t; |
| 107 | |
| 108 | static std::vector<tensor_config_t> get_tensor_configs(std::mt19937 & rng) { |
| 109 | std::vector<tensor_config_t> tensor_configs; |
| 110 | tensor_configs.reserve(100); |
| 111 | |
| 112 | for (int i = 0; i < 100; ++i) { |
| 113 | const enum ggml_type type = ggml_type(rng() % GGML_TYPE_COUNT); |
| 114 | if (ggml_type_size(type) == 0) { |
| 115 | continue; |
| 116 | } |
| 117 | |
| 118 | std::array<int64_t, GGML_MAX_DIMS> shape = {1, 1, 1, 1}; |
| 119 | shape[0] = (1 + rng() % 10) * ggml_blck_size(type); |
| 120 | const int n_dims = 1 + rng() % GGML_MAX_DIMS; |
| 121 | for (int i = 1; i < n_dims; ++i) { |
| 122 | shape[i] = 1 + rng() % 10; |
| 123 | } |
| 124 | |
| 125 | tensor_configs.push_back(std::make_pair(type, shape)); |
| 126 | } |
| 127 | |
| 128 | return tensor_configs; |
| 129 | } |
| 130 | |
| 131 | static std::vector<std::pair<enum gguf_type, enum gguf_type>> get_kv_types(std::mt19937 rng) { |
| 132 | std::vector<std::pair<enum gguf_type, enum gguf_type>> kv_types; |
no test coverage detected