mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-11 17:48:34 +00:00
Fix AMD pipeline test failures (#19250)
### Description <!-- Describe your changes. --> Fix amd test failure ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->
This commit is contained in:
parent
cbb29d80ff
commit
6a424ccf8c
2 changed files with 4 additions and 2 deletions
|
|
@ -68,6 +68,7 @@ MultiHeadAttention<T>::MultiHeadAttention(const OpKernelInfo& info)
|
|||
scale_ = info.GetAttrOrDefault<float>("scale", 0.0f);
|
||||
|
||||
past_present_share_buffer_ = info.GetAttrOrDefault<int64_t>("past_present_share_buffer", 0LL) != 0LL;
|
||||
is_unidirectional_ = info.GetAttrOrDefault<int64_t>("unidirectional", 0) == 1;
|
||||
|
||||
using HipT = typename ToHipType<T>::MappedType;
|
||||
using AttentionTunableOp = GemmSoftmaxGemmPermuteTunableOp<HipT>;
|
||||
|
|
@ -121,8 +122,8 @@ Status MultiHeadAttention<T>::ComputeInternal(OpKernelContext* context) const {
|
|||
query, key, value, bias,
|
||||
key_padding_mask, relative_position_bias,
|
||||
past_key, past_value, past_seq_len,
|
||||
&attn,
|
||||
num_heads_, mask_filter_value_, scale_,
|
||||
&attn, num_heads_,
|
||||
mask_filter_value_, scale_, false, /*is_unidirectional_*/
|
||||
past_present_share_buffer_, false, device_prop.maxThreadsPerBlock));
|
||||
|
||||
if (attn_type_ == kDecoderMaskedMultiHeadAttention && attn.sequence_length != 1) {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ class MultiHeadAttention final : public RocmKernel {
|
|||
float mask_filter_value_;
|
||||
float scale_;
|
||||
bool past_present_share_buffer_{false};
|
||||
bool is_unidirectional_{false};
|
||||
|
||||
// type-erased GemmSoftmaxGemmPermuteTunableOp<HipT>, the reason for this is:
|
||||
// 1. We don't want to include the cuh file where GemmSoftmaxGemmPermuteTunableOp<HipT> is defined.
|
||||
|
|
|
|||
Loading…
Reference in a new issue