Commit 5ded4ac1 authored by turneram's avatar turneram
Browse files

Formatting

parent 988bf26b
...@@ -155,12 +155,7 @@ struct parse_attention : op_parser<parse_attention> ...@@ -155,12 +155,7 @@ struct parse_attention : op_parser<parse_attention>
info.add_instruction(migraphx::make_op("mul"), gemm3, info.make_contiguous(alpha_lit)); info.add_instruction(migraphx::make_op("mul"), gemm3, info.make_contiguous(alpha_lit));
// apply softmax and store result P to scratch2: BxNxSxS* // apply softmax and store result P to scratch2: BxNxSxS*
std::vector<float> mask(batch_size * num_heads * sequence_length * all_sequence_length, 0); // Inference mask is all 1s => masking can be skipped
if(false and mask_index_lens.size() >= 2) {}
else if(false and mask_index_lens.size() == 1)
{
}
// else => no mask
auto softmax = info.add_instruction(migraphx::make_op("softmax", {{"axis", 3}}), gemm3); auto softmax = info.add_instruction(migraphx::make_op("softmax", {{"axis", 3}}), gemm3);
// compute P*V (as V*P), and store in scratch3: BxNxSxH // compute P*V (as V*P), and store in scratch3: BxNxSxH
......
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