Open
Conversation
fix bug for flash-attn v2.6.2
Member
Contributor
|
pls check latest commit(9173531) whether still reproduce this issue. thx |
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.
Fix the issues that occur when running cmake -DSM=86 -DWITH_TESTING=ON .. && make -j32 for Ksana_llm error information:
/home/ubuntu/KsanaLLM/src/ksana_llm/kernels/nvidia/kernel_wrapper.cpp: In function ‘void ksana_llm::InvokePagedAttention(void*, void*, void**, void**, void*, int, cudaStream_t, void*, int, int, int, int, int, int, float, float, int, void*, void*, int, std::optional<llm_kernels::nvidia::RotaryEmbeddingCuda<SCALAR_T> >&, void*, float, bool, void*, void*, size_t, int, const std::optional<void*>&, void*, void*, void*, int32_t*, int64_t, int, bool, bool, bool, float, size_t)’:
/home/ubuntu/KsanaLLM/src/ksana_llm/kernels/nvidia/kernel_wrapper.cpp:1248:21: error: cannot bind non-const lvalue reference of type ‘std::optional&’ to an rvalue of type ‘std::optional’
1248 | block_table_tensor, // batch_size x max_num_blocks_per_seq
| ^~~~~~~~~~~~~~~~~~
In file included from /usr/local/lib/python3.12/dist-packages/torch/include/c10/util/StringUtil.h:9:
/usr/include/c++/13/optional:768:9: note: after user-defined conversion: ‘constexpr std::optional<_Tp>::optional(const std::optional<_Up>&) [with _Up = at::Tensor; typename std::enable_if<__and_v<std::_not<std::is_same<_T1, _U1> >, std::is_constructible<_T1, const _U1&>, std::is_convertible<const _Up&, _Tp>, std::_not<std::_or<std::is_constructible<_Tp, const std::optional<_Up>&>, std::is_constructible<_Tp, std::optional<_Up>&>, std::is_constructible<_Tp, const std::optional<_Up>&&>, std::is_constructible<_Tp, std::optional<_Up>&&>, std::is_convertible<const std::optional<_Up>&, _Tp>, std::is_convertible<std::optional<_Up>&, _Tp>, std::is_convertible<const std::optional<_Up>&&, _Tp>, std::is_convertible<std::optional<_Up>&&, _Tp> > > >, bool>::type = true; _Tp = const at::Tensor]’
When the flash-attn version is 2.6.2, the function interfaces in src\ksana_llm\kernels\nvidia\kernel_wrapper.cpp do not correspond to those in ksana_llm/kernels/nvidia/flash_attn_cpp_wrapper.h.