Commit Graph

2984 Commits

Author SHA1 Message Date
Qianfeng Zhang
db5cd5ed2d flag mask class interface IsTokenPairInsideMask() as const 2026-07-07 11:13:02 +00:00
Qianfeng Zhang
4948520212 Add leeked including 2026-06-30 14:59:52 +00:00
Qianfeng Zhang
53e69c1404 Use run-time checking (almost_invariant_seqlen) to replace pre-compiling setting (HSTU_SCHED_BATCH_AS_FIRST_GRID_DIM) for switching grid-schedule 2026-06-30 14:06:05 +00:00
Qianfeng Zhang
4667be2bb0 Fix the compiling error in HSTU_SCHED_BATCH_AS_FIRST_GRID_DIM=0 path 2026-06-30 09:10:12 +00:00
Qianfeng Zhang
80d7b8dce7 Adjust the threhold value in shall_use_splitkv() 2026-06-30 09:09:04 +00:00
Qianfeng Zhang
26400def37 Add max_seqlen_kv as host API parameter and adjust the rules for using splitkv for cross-attention 2026-06-29 14:39:57 +00:00
Qianfeng Zhang
7c1c61b710 Fix a bug in calculating max_num_target in run_group_hstu_forward() 2026-06-28 15:07:21 +00:00
Qianfeng Zhang
bdc300591b Removing the class derivation to simplify struct HstuAttentionFwdCommonDropoutKargs 2026-06-24 09:06:01 +00:00
Qianfeng Zhang
db5cb5d19d Update to example_hstu_attention_fwd.cpp 2026-06-22 09:23:23 +00:00
Qianfeng Zhang
e349a39f3d Rename generate_instances.py to generate_fwd_instances.py 2026-06-22 08:02:23 +00:00
Qianfeng Zhang
2694adbd55 Remove the using of kSubQKHeaddim 2026-06-19 05:17:35 +00:00
Qianfeng Zhang
a625506698 Add restriction on the relationship between HstuAttention<xxx>Problem and HstuAttention<xxx>TileSettingClass 2026-06-17 15:59:29 +00:00
Qianfeng Zhang
3eb929334b Add static_assert() in HstuAttentionFwdTileSettingClass 2026-06-14 13:39:22 +00:00
Qianfeng Zhang
c0a011a275 Fix the comments in reference_hstu_attention_fwd.hpp 2026-06-12 14:50:22 +00:00
Qianfeng Zhang
73b5f5ee38 Remove un-used element-wise functions passed through pipelines' operator() interfaces 2026-06-12 08:41:40 +00:00
Qianfeng Zhang
bff80fc39e Rename GetKVBlockGemm to GetPVTBlockGemm 2026-06-12 07:37:18 +00:00
Qianfeng Zhang
de4f776531 Remove the kHasBias==true instances to save building time 2026-06-12 07:37:18 +00:00
Qianfeng Zhang
c7cde5807d Renaming BUILD_HSTU_FOR_GFX95_ONLY to BUILD_HSTU_FOR_GFX95 2026-06-10 15:31:46 +00:00
Qianfeng Zhang
042e35ec9c Update the README.md according to the summary by claude code 2026-06-10 14:42:49 +00:00
Qianfeng Zhang
5204dc7580 Fix the using of num_targets[] in run_group_hstu_attention 2026-06-10 09:00:39 +00:00
Qianfeng Zhang
73965593f9 Renaming in the dispatching codes and generate_instances.py scripts 2026-06-08 15:24:48 +00:00
Qianfeng Zhang
cde6f60611 Split hstu_attention_util.hpp into host_util.hpp and kernel_util.hpp 2026-06-06 06:43:35 +00:00
Qianfeng Zhang
20f97ae684 Remove un-needed includings from some hpp and cpp files 2026-06-06 04:52:38 +00:00
Qianfeng Zhang
797ade1b7f Tiny update in generate_instances.py 2026-06-06 04:52:38 +00:00
Qianfeng Zhang
bd8c2d05fa Fix header file mapping bug in generate_instances.py 2026-06-06 04:52:38 +00:00
Qianfeng Zhang
c71cdbcad7 Some renaming in kernel and pipeline 2026-06-05 15:51:39 +00:00
Qianfeng Zhang
1304e807fb Update and fix for leeked changes and make the scripts be able to test/benchmark kStoreLSE cases 2026-06-05 15:51:39 +00:00
Qianfeng Zhang
798fd3cd8b Enable the kernel dispatching path from is_training & use_softmax to kStoreLSE 2026-06-05 15:51:39 +00:00
Qianfeng Zhang
8b62d651a4 Add instances and kStoreLSE template in dispatcher class to support outputting lse for fwd training 2026-06-05 15:51:39 +00:00
Qianfeng Zhang
c1e3b9be6a Set lse tensor dim strides in example 2026-06-05 15:51:39 +00:00
Qianfeng Zhang
0fdca0e940 Replace template kUseSoftmax/kStoreLSE by boolean parameters in reference fwd codes to save compiling time 2026-06-05 15:51:39 +00:00
Qianfeng Zhang
8f091efc4c Add support for outputing lse in the example and reference hstu attention forward implementation 2026-06-05 15:51:39 +00:00
Qianfeng Zhang
cc184fc202 Add support for preparing lse_dram_window in hstu fwd kernel 2026-06-05 15:51:39 +00:00
Qianfeng Zhang
75a3b5aab0 Kernel use types declared in the problem rather than the pipeline 2026-06-05 15:51:39 +00:00
Qianfeng Zhang
696d4534b2 Tiny simplification with defining the Bias related Kargs 2026-06-03 09:55:04 +00:00
Qianfeng Zhang
eba3c2f635 Add parameters used by storing lse in the fwd and fwd_splitkv_combine kernel to prepare for supporting training 2026-06-03 09:55:04 +00:00
Qianfeng Zhang
5ee8a37cd3 Move num_splits/o_acc_ptr/l_acc_ptr out from HstuAttention<xxx>FwdParams struct 2026-06-03 09:55:04 +00:00
Qianfeng Zhang
36dd77fb16 Add kStoreLSE template parameter to the problems 2026-06-03 09:55:04 +00:00
Qianfeng Zhang
333abddbae Rename the reference interfaces and the files 2026-05-28 08:07:54 +00:00
Qianfeng Zhang
e841981ddd Update to MakeLSEaccDramTileDistribution trying to assign more threads to MThreadPerWarp so that block_tile_reduce_sync() work on less KThreadPerWarp 2026-05-23 07:24:00 +00:00
Qianfeng Zhang
1dbd127d1b Use buffer_view to create lse_acc_dram_naive so that out_of_boundary loading value can be specified (be -inf) 2026-05-23 04:37:52 +00:00
Qianfeng Zhang
86d8d72008 Use partition_index parameter for all get_x_indices_from_distributed_indices() calls 2026-05-22 15:08:30 +00:00
Qianfeng Zhang
65992be728 Update to the cross_attention test/bench scripts 2026-05-22 14:44:14 +00:00
Qianfeng Zhang
b1052e87e1 Add implementation of hstu fwd splitkv for softmax path 2026-05-22 09:54:27 +00:00
Qianfeng Zhang
8a7529177d Fix the calling context for type_context in scale_tile_in_scalar()/scale_tile_in_pack 2026-05-11 08:53:07 +00:00
Qianfeng Zhang
0a32eddc0a Re-format the .hpp/.cpp files using clang-format-18 2026-05-10 13:46:02 +00:00
Qianfeng Zhang
6981f148ee Fix potential bug in kernel host interface BlockSize() 2026-05-08 06:27:19 -04:00
Qianfeng Zhang
250f325c3a More consideration in MakeOaccDramTileDistribution() in splitkv_combine pipeline policy 2026-05-07 06:32:01 -04:00
Qianfeng Zhang
888b6cad86 Use inline-assembly based v_pk_mul_f32 to scale tile pcomp_tile in non-softmax pipeline on gfx950 2026-04-30 14:06:06 +00:00
Qianfeng Zhang
4c583f0574 Add -fno-slp-vectorize option for building hstu kernels on gfx950 2026-04-30 13:37:22 +00:00