Skip to content

Commit

Permalink
#8865: Optimize softmax dispatch time - remove unnececery arg setting
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanjagrujic committed Aug 27, 2024
1 parent b05f91e commit 55caf49
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,6 @@ operation::ProgramWithCallbacks scale_mask_softmax_multi_core(
reader_kernel_args[3] = 0;
softmax_kernel_args[0] = 0;
writer_kernel_args[1] = 0;
// SetRuntimeArgs(program, reader_kernels_id, core, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); // [8]=1.0f is scaler
// SetRuntimeArgs(program, softmax_kernels_id, core, { 0, 0, 0, 0, 0, 0 });
// SetRuntimeArgs(program, writer_kernels_id, core, { 0, 0, 0, 0, 0, 0, 0});
continue;
}

Expand Down Expand Up @@ -410,7 +407,7 @@ operation::ProgramWithCallbacks scale_mask_softmax_multi_core(
reader_kernel_args[7] = mask_buffer_address;
reader_kernel_args[8] = curr_ht;
reader_kernel_args[9] = mask_id;
reader_kernel_args[10] = 0x3f803f80;
// reader_kernel_args[10] = 0x3f803f80; // Hardcoded value doesn't need to be updated

if (causal_mask) {
reader_kernel_args[11] = mask_curr_ht;
Expand All @@ -430,7 +427,7 @@ operation::ProgramWithCallbacks scale_mask_softmax_multi_core(
writer_kernel_args[3] = block_size;
writer_kernel_args[4] = mask_padded_data;
writer_kernel_args[5] = num_datum_padded;
writer_kernel_args[6] = 0xFF00FF00;
// writer_kernel_args[6] = 0xFF00FF00; // Hardcoded value doesn't need to be updated

curr_row += num_tile_rows_per_core;
}
Expand Down

0 comments on commit 55caf49

Please sign in to comment.