"...com/git@developer.sourcefind.cn:danggl/opencfd-scu.git" did not exist on "bcdfbfd57c8f3cd6cd65998464bb71a562d49948"
Commit cba9a28c authored by Casper Hansen's avatar Casper Hansen
Browse files

Clean code

parent 707315a6
...@@ -190,15 +190,8 @@ class QuantAttentionFused(nn.Module): ...@@ -190,15 +190,8 @@ class QuantAttentionFused(nn.Module):
.contiguous() .contiguous()
) )
try: self.cache_v[:bsz, :, self.start_pos : self.start_pos + seqlen, :] = values_store
self.cache_v[:bsz, :, self.start_pos : self.start_pos + seqlen, :] = values_store self.cache_k[:bsz, :, :, self.start_pos : self.start_pos + seqlen, :] = keys_store
self.cache_k[:bsz, :, :, self.start_pos : self.start_pos + seqlen, :] = keys_store
except Exception as ex:
print(seqlen, self.max_seq_len)
print(self.cache_v.shape, self.cache_v[:bsz, :, self.start_pos : self.start_pos + seqlen, :].shape, values_store.shape)
print(self.cache_k.shape, self.cache_k[:bsz, :, :, self.start_pos : self.start_pos + seqlen, :].shape, keys_store.shape)
print(ex)
exit(0)
if seqlen == 1: if seqlen == 1:
xv = self.cache_v[:bsz, :, : self.start_pos + seqlen, :].transpose(1, 2).contiguous() xv = self.cache_v[:bsz, :, : self.start_pos + seqlen, :].transpose(1, 2).contiguous()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment