Commit 668ec4ef authored by zhuwenwen's avatar zhuwenwen
Browse files

Update refactoring operation

parent 8a325c18
...@@ -193,28 +193,28 @@ class PagedAttention: ...@@ -193,28 +193,28 @@ class PagedAttention:
if envs.VLLM_USE_OPT_OP: if envs.VLLM_USE_OPT_OP:
ops.paged_attention_v2_opt( ops.paged_attention_v2_opt(
output, output,
exp_sums, exp_sums,
max_logits, max_logits,
tmp_output, tmp_output,
query, query,
key_cache, key_cache,
value_cache, value_cache,
num_kv_heads, num_kv_heads,
scale, scale,
block_tables, block_tables,
seq_lens, seq_lens,
block_size, block_size,
max_seq_len, max_seq_len,
alibi_slopes, alibi_slopes,
kv_cache_dtype, kv_cache_dtype,
kv_scale, kv_scale,
tp_rank, tp_rank,
blocksparse_local_blocks, blocksparse_local_blocks,
blocksparse_vert_stride, blocksparse_vert_stride,
blocksparse_block_size, blocksparse_block_size,
blocksparse_head_sliding_step, blocksparse_head_sliding_step,
) )
else: else:
ops.paged_attention_v2( ops.paged_attention_v2(
output, output,
......
...@@ -36,7 +36,7 @@ class SiluAndMul(CustomOp): ...@@ -36,7 +36,7 @@ class SiluAndMul(CustomOp):
output_shape = (x.shape[:-1] + (d, )) output_shape = (x.shape[:-1] + (d, ))
out = torch.empty(output_shape, dtype=x.dtype, device=x.device) out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
if envs.VLLM_USE_OPT_OP: if envs.VLLM_USE_OPT_OP:
ops.silu_and_mul(out, x) ops.silu_and_mul_opt(out, x)
else: else:
ops.silu_and_mul(out, x) ops.silu_and_mul(out, x)
return out return out
......
...@@ -70,11 +70,11 @@ class RMSNorm(CustomOp): ...@@ -70,11 +70,11 @@ class RMSNorm(CustomOp):
out = torch.empty_like(x) out = torch.empty_like(x)
if envs.VLLM_USE_OPT_OP: if envs.VLLM_USE_OPT_OP:
ops.rms_norm_opt( ops.rms_norm_opt(
out, out,
x, x,
self.weight.data, self.weight.data,
self.variance_epsilon, self.variance_epsilon,
) )
else: else:
ops.rms_norm( ops.rms_norm(
out, out,
......
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