Skip to content

Question of O_accum and LSE_accum shape #70

Open
@mingyangHao

Description

@mingyangHao

at::Tensor softmax_lse_accum = torch::empty({batch_size + params.num_sm_parts, num_heads, seqlen_q}, opts.dtype(at::kFloat));

Hi all,

Just wondering why the shape of O_accum and LSE_accum change from [numsplit, batch, head, seqlen_q, (dim)] to [batch + sm_part, ... ] I can get the idea that sm_parts should be the first dimension of output cz it replaced the batchsize, and I also get that sm_parts is not the exact number of loops cz some batch are merge into one sm_parts, but why is the addition work here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions