Skip to content

Commit

Permalink
don't build rope factors from ggerganov#8676 for CLBlast as it segfaults
Browse files Browse the repository at this point in the history
  • Loading branch information
LostRuins committed Jul 28, 2024
1 parent edbdfbc commit e47477f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5921,7 +5921,7 @@ static bool llm_load_tensors(
#if defined(GGML_USE_CLBLAST)
if(clblast_offload_fallback_mode)
{
printf("\nOpenCL GPU Offload Fallback...");
printf("\nOpenCL GPU Offload Fallback...\n");
clblast_offload_fallback_layers = n_gpu_layers;
i_gpu_start = std::max((int64_t) hparams.n_layer, (int64_t) 0);
}
Expand Down Expand Up @@ -8784,7 +8784,11 @@ struct llm_build_context {
// self-attention
{
// rope freq factors for llama3; may return nullptr for llama2 and other models
#if defined(GGML_USE_CLBLAST)
struct ggml_tensor * rope_factors = nullptr; //clblast does not work with rope_factors
#else
struct ggml_tensor * rope_factors = build_rope_factors(il);
#endif

// compute Q and K and RoPE them
struct ggml_tensor * Qcur = llm_build_lora_mm(lctx, ctx0, model.layers[il].wq, cur);
Expand Down

0 comments on commit e47477f

Please sign in to comment.