Skip to content

Eval bug: Unable to run with Qwen3 model on rocm with gfx1100, but works on cpu #14696

@chowdri

Description

@chowdri

Name and Version

$ llama-cli --version

ggml_cuda_init: GGML_CUDA_FORCE_MMQ:    no
ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no
ggml_cuda_init: found 2 ROCm devices:
  Device 0: Radeon RX 7900 GRE, gfx1100 (0x1100), VMM: no, Wave Size: 32
  Device 1: Radeon RX Vega, gfx900:xnack- (0x900), VMM: no, Wave Size: 64
version: 5898 (cbc68be5)
built with cc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 for x86_64-linux-gnu

Operating systems

Linux

GGML backends

HIP

Hardware

7950X3D + 7900 GRE (gfx1100) + Vega 64 (gfx 900)

Models

Qwen3-14B-Q8_0.gguf

Problem description & steps to reproduce

$ llama-cli -m Qwen3-14B-Q8_0.gguf 
ggml_cuda_init: GGML_CUDA_FORCE_MMQ:    no
ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no
ggml_cuda_init: found 2 ROCm devices:
  Device 0: Radeon RX 7900 GRE, gfx1100 (0x1100), VMM: no, Wave Size: 32
  Device 1: Radeon RX Vega, gfx900:xnack- (0x900), VMM: no, Wave Size: 64
build: 5898 (cbc68be5) with cc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 for x86_64-linux-gnu
main: llama backend init
main: load the model and apply lora adapter, if any
llama_model_load_from_file_impl: using device ROCm0 (Radeon RX 7900 GRE) - 16312 MiB free
llama_model_load_from_file_impl: using device ROCm1 (Radeon RX Vega) - 8160 MiB free
llama_model_loader: loaded meta data with 27 key-value pairs and 443 tensors from Qwen3-14B-Q8_0.gguf (version GGUF V3 (latest))
llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
llama_model_loader: - kv   0:                       general.architecture str              = qwen3
llama_model_loader: - kv   1:                               general.type str              = model
llama_model_loader: - kv   2:                               general.name str              = Qwen3 14B
llama_model_loader: - kv   3:                           general.basename str              = Qwen3
llama_model_loader: - kv   4:                         general.size_label str              = 14B
llama_model_loader: - kv   5:                          qwen3.block_count u32              = 40
llama_model_loader: - kv   6:                       qwen3.context_length u32              = 32768
llama_model_loader: - kv   7:                     qwen3.embedding_length u32              = 5120
llama_model_loader: - kv   8:                  qwen3.feed_forward_length u32              = 17408
llama_model_loader: - kv   9:                 qwen3.attention.head_count u32              = 40
llama_model_loader: - kv  10:              qwen3.attention.head_count_kv u32              = 8
llama_model_loader: - kv  11:                       qwen3.rope.freq_base f32              = 1000000.000000
llama_model_loader: - kv  12:     qwen3.attention.layer_norm_rms_epsilon f32              = 0.000001
llama_model_loader: - kv  13:                 qwen3.attention.key_length u32              = 128
llama_model_loader: - kv  14:               qwen3.attention.value_length u32              = 128
llama_model_loader: - kv  15:                       tokenizer.ggml.model str              = gpt2
llama_model_loader: - kv  16:                         tokenizer.ggml.pre str              = qwen2
llama_model_loader: - kv  17:                      tokenizer.ggml.tokens arr[str,151936]  = ["!", "\"", "#", "$", "%", "&", "'", ...
llama_model_loader: - kv  18:                  tokenizer.ggml.token_type arr[i32,151936]  = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
llama_model_loader: - kv  19:                      tokenizer.ggml.merges arr[str,151387]  = ["Ġ Ġ", "ĠĠ ĠĠ", "i n", "Ġ t",...
llama_model_loader: - kv  20:                tokenizer.ggml.eos_token_id u32              = 151645
llama_model_loader: - kv  21:            tokenizer.ggml.padding_token_id u32              = 151643
llama_model_loader: - kv  22:                tokenizer.ggml.bos_token_id u32              = 151643
llama_model_loader: - kv  23:               tokenizer.ggml.add_bos_token bool             = false
llama_model_loader: - kv  24:                    tokenizer.chat_template str              = {%- if tools %}\n    {{- '<|im_start|>...
llama_model_loader: - kv  25:               general.quantization_version u32              = 2
llama_model_loader: - kv  26:                          general.file_type u32              = 7
llama_model_loader: - type  f32:  161 tensors
llama_model_loader: - type q8_0:  282 tensors
print_info: file format = GGUF V3 (latest)
print_info: file type   = Q8_0
print_info: file size   = 14.61 GiB (8.50 BPW) 
load: special tokens cache size = 26
load: token to piece cache size = 0.9311 MB
print_info: arch             = qwen3
print_info: vocab_only       = 0
print_info: n_ctx_train      = 32768
print_info: n_embd           = 5120
print_info: n_layer          = 40
print_info: n_head           = 40
print_info: n_head_kv        = 8
print_info: n_rot            = 128
print_info: n_swa            = 0
print_info: is_swa_any       = 0
print_info: n_embd_head_k    = 128
print_info: n_embd_head_v    = 128
print_info: n_gqa            = 5
print_info: n_embd_k_gqa     = 1024
print_info: n_embd_v_gqa     = 1024
print_info: f_norm_eps       = 0.0e+00
print_info: f_norm_rms_eps   = 1.0e-06
print_info: f_clamp_kqv      = 0.0e+00
print_info: f_max_alibi_bias = 0.0e+00
print_info: f_logit_scale    = 0.0e+00
print_info: f_attn_scale     = 0.0e+00
print_info: n_ff             = 17408
print_info: n_expert         = 0
print_info: n_expert_used    = 0
print_info: causal attn      = 1
print_info: pooling type     = 0
print_info: rope type        = 2
print_info: rope scaling     = linear
print_info: freq_base_train  = 1000000.0
print_info: freq_scale_train = 1
print_info: n_ctx_orig_yarn  = 32768
print_info: rope_finetuned   = unknown
print_info: model type       = 14B
print_info: model params     = 14.77 B
print_info: general.name     = Qwen3 14B
print_info: vocab type       = BPE
print_info: n_vocab          = 151936
print_info: n_merges         = 151387
print_info: BOS token        = 151643 '<|endoftext|>'
print_info: EOS token        = 151645 '<|im_end|>'
print_info: EOT token        = 151645 '<|im_end|>'
print_info: PAD token        = 151643 '<|endoftext|>'
print_info: LF token         = 198 'Ċ'
print_info: FIM PRE token    = 151659 '<|fim_prefix|>'
print_info: FIM SUF token    = 151661 '<|fim_suffix|>'
print_info: FIM MID token    = 151660 '<|fim_middle|>'
print_info: FIM PAD token    = 151662 '<|fim_pad|>'
print_info: FIM REP token    = 151663 '<|repo_name|>'
print_info: FIM SEP token    = 151664 '<|file_sep|>'
print_info: EOG token        = 151643 '<|endoftext|>'
print_info: EOG token        = 151645 '<|im_end|>'
print_info: EOG token        = 151662 '<|fim_pad|>'
print_info: EOG token        = 151663 '<|repo_name|>'
print_info: EOG token        = 151664 '<|file_sep|>'
print_info: max token length = 256
load_tensors: loading model tensors, this can take a while... (mmap = true)
load_tensors: offloading 0 repeating layers to GPU
load_tensors: offloaded 0/41 layers to GPU
load_tensors:   CPU_Mapped model buffer size = 14965.61 MiB
............................................................................................
llama_context: constructing llama_context
llama_context: n_seq_max     = 1
llama_context: n_ctx         = 4096
llama_context: n_ctx_per_seq = 4096
llama_context: n_batch       = 2048
llama_context: n_ubatch      = 512
llama_context: causal_attn   = 1
llama_context: flash_attn    = 0
llama_context: freq_base     = 1000000.0
llama_context: freq_scale    = 1
llama_context: n_ctx_per_seq (4096) < n_ctx_train (32768) -- the full capacity of the model will not be utilized
llama_context:        CPU  output buffer size =     0.58 MiB
llama_kv_cache_unified:        CPU KV buffer size =   640.00 MiB
llama_kv_cache_unified: size =  640.00 MiB (  4096 cells,  40 layers,  1 seqs), K (f16):  320.00 MiB, V (f16):  320.00 MiB
llama_kv_cache_unified: LLAMA_SET_ROWS=0, using old ggml_cpy() method for backwards compatibility
llama_context:      ROCm0 compute buffer size =  1094.99 MiB
llama_context:  ROCm_Host compute buffer size =    18.01 MiB
llama_context: graph nodes  = 1606
llama_context: graph splits = 524 (with bs=512), 121 (with bs=1)
common_init_from_params: setting dry_penalty_last_n to ctx_size = 4096
common_init_from_params: warming up the model with an empty run - please wait ... (--no-warmup to disable)
ggml_cuda_compute_forward: MUL failed
ROCm error: invalid device function
  current device: 0, in function ggml_cuda_compute_forward at /home/praful/llama.cpp/ggml/src/ggml-cuda/ggml-cuda.cu:2482
  err
/home/praful/llama.cpp/ggml/src/ggml-cuda/ggml-cuda.cu:79: ROCm error
[New LWP 626504]
[New LWP 626503]
[New LWP 626502]
[New LWP 626501]
[New LWP 626500]
[New LWP 626499]
[New LWP 626498]
[New LWP 626497]
[New LWP 626496]
[New LWP 626495]
[New LWP 626494]
[New LWP 626493]
[New LWP 626492]
[New LWP 626491]
[New LWP 626490]
[New LWP 626424]
[New LWP 626293]
[New LWP 626031]
warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/liblber.so.2
warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libbrotlidec.so.1
warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libbrotlicommon.so.1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007009c1b107e3 in __GI___wait4 (pid=626505, stat_loc=0x0, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:30
warning: 30	../sysdeps/unix/sysv/linux/wait4.c: No such file or directory
#0  0x00007009c1b107e3 in __GI___wait4 (pid=626505, stat_loc=0x0, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:30
30	in ../sysdeps/unix/sysv/linux/wait4.c
#1  0x00007009c218fde3 in ggml_print_backtrace () from /home/praful/llama.cpp/build/bin/libggml-base.so
#2  0x00007009c218ff8b in ggml_abort () from /home/praful/llama.cpp/build/bin/libggml-base.so
#3  0x00007009be2e7f22 in ggml_cuda_error(char const*, char const*, char const*, int, char const*) () from /home/praful/llama.cpp/build/bin/libggml-hip.so
#4  0x00007009be2eed2a in ggml_backend_cuda_graph_compute(ggml_backend*, ggml_cgraph*) () from /home/praful/llama.cpp/build/bin/libggml-hip.so
#5  0x00007009c21a7b33 in ggml_backend_sched_graph_compute_async () from /home/praful/llama.cpp/build/bin/libggml-base.so
#6  0x00007009c22b75d1 in llama_context::graph_compute(ggml_cgraph*, bool) () from /home/praful/llama.cpp/build/bin/libllama.so
#7  0x00007009c22b7c03 in llama_context::process_ubatch(llama_ubatch const&, llm_graph_type, llama_memory_context_i*, ggml_status&) () from /home/praful/llama.cpp/build/bin/libllama.so
#8  0x00007009c22bb584 in llama_context::decode(llama_batch const&) () from /home/praful/llama.cpp/build/bin/libllama.so
#9  0x00007009c22bc7df in llama_decode () from /home/praful/llama.cpp/build/bin/libllama.so
#10 0x00005ee35b50d42a in common_init_from_params(common_params&) ()
#11 0x00005ee35b4183da in main ()
[Inferior 1 (process 626028) detached]
Aborted (core dumped)

First Bad Commit

Dont know.

Relevant log output

$ echo $ROCM_PATH

/opt/rocm-6.4.1/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions