[Bug] Fix returned_lse not Defined issue (#25106)
Signed-off-by: yewentao256 <zhyanwentao@126.com> Co-authored-by: Tyler Michael Smith <tyler@neuralmagic.com>
This commit is contained in:
co-authored by
Tyler Michael Smith
parent
38db529f66
commit
75fb112d80
@@ -206,12 +206,11 @@ class CutlassMLAImpl(MLACommonImpl[MLACommonMetadata]):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if H < MAX_HEADS:
|
if H < MAX_HEADS:
|
||||||
# Extract the subsets of the outputs
|
|
||||||
returned_lse = lse[:, :H].contiguous(
|
|
||||||
) if self.need_to_return_lse_for_decode else lse
|
|
||||||
out = out[:, :H]
|
out = out[:, :H]
|
||||||
|
if self.need_to_return_lse_for_decode:
|
||||||
|
lse = lse[:, :H].contiguous()
|
||||||
|
|
||||||
return out, returned_lse
|
return out, lse
|
||||||
|
|
||||||
def _forward_decode(
|
def _forward_decode(
|
||||||
self,
|
self,
|
||||||
|
|||||||
Reference in New Issue
Block a user