Skip to content

Commit 14508d7

Browse files
committed
vulkan: enable cooperative matrix support and improve shader generation
1 parent ed2cdea commit 14508d7

File tree

7 files changed

+632801
-604578
lines changed

7 files changed

+632801
-604578
lines changed

common/sampling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ void common_sampler_reset(struct common_sampler * gsmpl) {
262262
void common_sampler_reinit_grammar(struct common_sampler * gsmpl, const struct llama_model * model, const char * grammar) {
263263
llama_sampler_reset(gsmpl->grmr);
264264

265-
gsmpl->grmr = llama_sampler_init_grammar(model, grammar, "root");
265+
gsmpl->grmr = llama_sampler_init_grammar(llama_model_get_vocab(model), grammar, "root");
266266
}
267267

268268
struct common_sampler * common_sampler_clone(common_sampler * gsmpl) {

examples/llava/clip.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,8 +1111,6 @@ static ggml_cgraph * clip_image_build_graph(clip_ctx * ctx, const clip_image_f32
11111111

11121112
// read and create ggml_context containing the tensors and their data
11131113
struct clip_ctx * clip_model_load(const char * fname, const int verbosity = 1) {
1114-
throw new std::runtime_error("Not implemented");
1115-
11161114
struct ggml_context * meta = NULL;
11171115

11181116
struct gguf_init_params params = {
@@ -2446,8 +2444,6 @@ bool clip_image_encode(struct clip_ctx * ctx, const int n_threads, clip_image_f3
24462444
}
24472445

24482446
bool clip_image_batch_encode(clip_ctx * ctx, const int n_threads, const clip_image_f32_batch * imgs, float * vec) {
2449-
throw new std::runtime_error("Not implemented");
2450-
24512447
if (!ctx->has_vision_encoder) {
24522448
LOG_ERR("This gguf file seems to have no vision encoder\n");
24532449
return false;

examples/llava/llava.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ static struct clip_image_grid_shape get_anyres_image_grid_shape(const std::pair<
101101

102102
// Take the image segments in a grid configuration and return the embeddings and the number of embeddings into preallocated memory (image_embd_out)
103103
static bool clip_llava_handle_patches(clip_ctx * ctx_clip, std::vector<float *> & image_embd_v, struct clip_image_grid_shape grid_shape, float * image_embd_out, int * n_img_pos_out) {
104-
throw new std::runtime_error("Not implemented");
105-
106104
struct {
107105
struct ggml_context * ctx;
108106
} model;

0 commit comments

Comments
 (0)