Skip to content

Conversation

@draftbk
Copy link
Contributor

@draftbk draftbk commented Aug 28, 2025

Purpose

I am encountering an issue that is very likely caused by this PR (#23791) when building on AMD MI300X.

# Run
python setup.py clean && python setup.py build
# Error
FAILED: [code=1] CMakeFiles/_C.dir/csrc/cache_kernels.hip.o

/data/users/lifans/gitrepos/vllm/build/temp.linux-x86_64-cpython-312/csrc/cache_kernels.hip:918:14: error: unused variable 'is_last_split' [-Werror,-Wunused-variable]
  918 |   const bool is_last_split = (split_end == tot_slots);
      |              ^~~~~~~~~~~~~
2 warnings and 1 error generated when compiling for gfx942.

Test Plan & Test Result

# python setup.py clean && python setup.py build
The error is gone. 
# Run 
from vllm import LLM
if __name__ == "__main__":
    llm = LLM("/home/lifans/hf_models/meta-llama/Llama-3.1-8B-Instruct")
    result = llm.generate("Hello my name is")
    print(result[0].outputs[0].text)

# Output
Adding requests: 100%|█████████████████| 1/1 [00:00<00:00, 55.36it/s]
Processed prompts: 100%|█| 1/1 [00:01<00:00,  1.19s/it, est. speed in
 Helen and I am a 35 year old mother of three. I am a

Signed-off-by: Lifan Shen <lifans@meta.com>
@mergify mergify bot added the rocm Related to AMD ROCm label Aug 28, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly resolves a build failure on ROCm platforms by removing the unused variable is_last_split from the cp_gather_cache kernel. The change is minimal and directly addresses the -Werror,-Wunused-variable compilation error. The logic of the kernel is unaffected as the variable was not used. The fix is approved.

@draftbk
Copy link
Contributor Author

draftbk commented Aug 29, 2025

cc: @youkaichao @gshtras

@yuguo68
Copy link
Contributor

yuguo68 commented Aug 29, 2025

already fixed in #23847

@draftbk
Copy link
Contributor Author

draftbk commented Aug 29, 2025

already fixed in #23847

oh coool, thanks, close this PR

@draftbk draftbk closed this Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rocm Related to AMD ROCm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants