Skip to content

100% Single Thread Usage on Ryzen AI MAX 395 (gfx1151, Strix Halo) #750

Description

@RandomLemon

When the engine start to prefill/decode, one or two CPU core's usage increase to 100%.

top:

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                              
    327 root      20   0  107.2g  94.3g 296092 S 200.0  75.5  34:25.52 luce_server

Here is what I caught with perf record -g -p <PID>:

  Children      Self  Command      Shared Object                      Symbol                                                                                
+   62.49%    62.35%  luce_server  libhsa-runtime64.so.1.21.0         [.] rocr::core::Runtime::AsyncEventsLoop(void*)
+   33.36%    33.27%  luce_server  libhsa-runtime64.so.1.21.0         [.] rocr::core::InterruptSignal::WaitRelaxed(hsa_signal_condition_t, long, unsigned long, hsa_wait_state_t)

Here is what I caught with gdb -p <PID> and bt:

#0  0x00007c1079ef2525 in rocr::core::InterruptSignal::WaitRelaxed(hsa_signal_condition_t, long, unsigned long, hsa_wait_state_t) ()
   from /opt/rocm/core-7.14//lib/libhsa-runtime64.so.1
#1  0x00007c1079ef25c7 in rocr::core::InterruptSignal::WaitAcquire(hsa_signal_condition_t, long, unsigned long, hsa_wait_state_t) ()
   from /opt/rocm/core-7.14//lib/libhsa-runtime64.so.1
#2  0x00007c1079ee2d44 in rocr::HSA::hsa_signal_wait_scacquire(hsa_signal_s, hsa_signal_condition_t, long, unsigned long, hsa_wait_state_t) ()
   from /opt/rocm/core-7.14//lib/libhsa-runtime64.so.1

Here is my environment:

Debian 13.7
Ryzen AI MAX+ 395, with 128G RAM
ROCm 7.14.1

Here is my parameters:

export MODEL_DIR=/mnt/data/ai/llm/deepseek-v4-flash
export ROCM_PATH=/opt/rocm/core-7.14/
export HIP_PATH=$ROCM_PATH
export LD_LIBRARY_PATH=$ROCM_PATH/lib:$LD_LIBRARY_PATH
DFLASH_DS4_SPEC=1 \
DFLASH_DS4_DRAFT=$MODEL_DIR/DeepSeek-V4-Flash-0731-DSpark-draft-Q4RMFP4-denseF16.gguf \
DFLASH_DS4_SPARSE_DECODE_FLASH=1 \
./server/build-hip/luce_server $MODEL_DIR/DeepSeek-V4-Flash-0731-ROCMFPX-MIX-STRIX.gguf \
  --port 8002 \
  --target-device hip:0 \
  --max-ctx 500000 \
  --chunk 8192 \
  --cache-type-k q4_0 --cache-type-v q4_0 \
  --ds4-fused-decode --ds4-fused-verify-f16-kv \
  --ds4-expert-top-k 6 \
  --ds4-prefill sparse

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions