mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-07-11 17:51:40 +00:00
fix k origin
This commit is contained in:
@@ -188,10 +188,10 @@ struct page_tile_with_static_distribution
|
||||
array<index_t, NDimY>{0}));
|
||||
#endif
|
||||
|
||||
BottomTensorIndex bottom_tensor_thread_origin_idx_tmp ={0,
|
||||
window_origin[1] + window_adaptor_thread_coord_tmp.get_bottom_index()[1]};
|
||||
// BottomTensorIndex bottom_tensor_thread_origin_idx_tmp =
|
||||
// window_origin + window_adaptor_thread_coord_tmp.get_bottom_index();
|
||||
BottomTensorIndex bottom_tensor_thread_origin_idx_tmp =
|
||||
window_origin + tuple<index_t, index_t>(0, window_adaptor_thread_coord_tmp.get_bottom_index()[1]);
|
||||
// tuple<index_t, index_t>(0, window_adaptor_thread_coord_tmp.get_bottom_index()[1]);
|
||||
const auto bottom_tensor_thread_coord_tmp = make_tensor_coordinate(
|
||||
bottom_tensor_view_.get_tensor_descriptor(), bottom_tensor_thread_origin_idx_tmp);
|
||||
|
||||
|
||||
@@ -988,6 +988,8 @@ struct FmhaFwdKernel
|
||||
{
|
||||
batch_offset_v = key_start;
|
||||
}
|
||||
|
||||
kargs.page_idx += key_start;
|
||||
if constexpr(BiasEnum == BlockAttentionBiasEnum::ELEMENTWISE_BIAS)
|
||||
{
|
||||
batch_offset_bias = query_start * kargs.stride_bias + key_start;
|
||||
|
||||
@@ -243,11 +243,10 @@ struct BlockFmhaPipelineQRKSVS
|
||||
return o_acc;
|
||||
}
|
||||
}
|
||||
|
||||
auto k_dram_block_window =
|
||||
make_tile_window(k_dram_block_window_tmp.get_bottom_tensor_view(),
|
||||
k_dram_block_window_tmp.get_window_lengths(),
|
||||
{seqlen_k_start, 0});
|
||||
{seqlen_k_start, 0}); //todo fixme felix
|
||||
|
||||
const auto bias_origin = bias_dram_block_window_tmp.get_window_origin();
|
||||
auto bias_dram_window =
|
||||
@@ -283,7 +282,7 @@ struct BlockFmhaPipelineQRKSVS
|
||||
statically_indexed_array<index_t, NR> offsets;
|
||||
|
||||
static_for<0, NR, 1>{}([&](auto n0) {
|
||||
offsets[n0] = page_idx[c_coord[0] + 64 * n0.value] * 128; // Problem::kN_;
|
||||
offsets[n0] = page_idx[i_total_loops * kN0 + c_coord[0] + 64 * n0.value] * kQKHeaddim; // Problem::kN_;
|
||||
});
|
||||
auto k_dram_window = make_tile_window_paged(
|
||||
k_dram_block_window.get_bottom_tensor_view(),
|
||||
|
||||
Reference in New Issue
Block a user