Fixes the incorrect argument in the prefix-prefill test cases#3246
Merged
simon-mo merged 1 commit intovllm-project:mainfrom Mar 16, 2024
Merged
Conversation
Signed-off-by: Tao He <sighingnow@gmail.com>
zhuohan123
approved these changes
Mar 7, 2024
Comment on lines
+39
to
+43
| # Need this, otherwise when we capture the graph the process for GPU 1 would run on both | ||
| # GPU0 and GPU1 and things would hang | ||
| # | ||
| # see also similar issue: https://github.com/Dao-AILab/flash-attention/issues/523 | ||
| torch.cuda.set_device(device) |
Member
There was a problem hiding this comment.
I am confused why do we need this? Can you give a more detailed example?
Collaborator
Author
There was a problem hiding this comment.
There would be an error if we run the test case in environments with 2 GPU card, the test case test_contexted_kv_attention[cuda:0-dtype0-128-64-64] passed, but when run
test_contexted_kv_attention[cuda:1-dtype0-128-64-64] (note now it uses cuda:1), it failed and complains:
bin = self.cache[device][key]
if not warmup:
> bin.c_wrapper(
grid_0,
grid_1,
grid_2,
bin.num_warps,
bin.num_ctas,
bin.clusterDims[0],
bin.clusterDims[1],
bin.clusterDims[2],
bin.shared,
stream,
bin.cu_function,
CompiledKernel.launch_enter_hook,
CompiledKernel.launch_exit_hook,
bin,
*bin.assemble_tensormap_to_arg(non_constexpr_arg_values),
)
E ValueError: Pointer argument (at 0) cannot be accessed from Triton (cpu tensor?)
/usr/local/lib/python3.10/dist-packages/triton/runtime/jit.py:550: ValueErrorI'm not very clear about the root causes, but I found the same issue report in flash-attention and the fix from here: Dao-AILab/flash-attention#523 (comment), and confirmed it works.
Collaborator
Author
|
Hi @zhuohan123 any further comments on this patch? Thanks! |
Collaborator
Author
|
Hi @zhuohan123 @simon-mo, could you please take another look at this PR? Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See also comment in #3007