@@ -838,9 +838,9 @@ def score_mod_scaled_squared(
838838 kv_idx_global = kv_idx + offset_k
839839 scale = aux_tensors [0 ]
840840 dtype = scale .element_type
841- kv_frag = cute .make_fragment (1 , cutlass .Int32 )
841+ kv_frag = cute .make_rmem_tensor (1 , cutlass .Int32 )
842842 kv_frag .store (kv_idx_global )
843- scale_frag = cute .make_fragment (1 , dtype )
843+ scale_frag = cute .make_rmem_tensor (1 , dtype )
844844 scale_frag [0 ] = scale [kv_frag [0 ]]
845845 scale_val = (scale_frag .load ()).to (cutlass .Float32 )
846846 return scale_val * tSrS_ssa * tSrS_ssa
@@ -855,9 +855,9 @@ def score_mod_bwd_scaled_squared(
855855 kv_idx_global = kv_idx + offset_k
856856 scale = aux_tensors [0 ]
857857 dtype = scale .element_type
858- kv_frag = cute .make_fragment (1 , cutlass .Int32 )
858+ kv_frag = cute .make_rmem_tensor (1 , cutlass .Int32 )
859859 kv_frag .store (kv_idx_global )
860- scale_frag = cute .make_fragment (1 , dtype )
860+ scale_frag = cute .make_rmem_tensor (1 , dtype )
861861 scale_frag [0 ] = scale [kv_frag [0 ]]
862862 scale_val = (scale_frag .load ()).to (cutlass .Float32 )
863863 return grad * cute .full_like (grad , 2.0 ) * scale_val * score
0 commit comments