ops.h 676 B

1234567891011121314
  1. #pragma once
  2. #include <torch/all.h>
  3. void paged_attention(torch::Tensor& out, torch::Tensor& exp_sums,
  4. torch::Tensor& max_logits, torch::Tensor& tmp_out,
  5. torch::Tensor& query, torch::Tensor& key_cache,
  6. torch::Tensor& value_cache, int64_t num_kv_heads,
  7. double scale, torch::Tensor& block_tables,
  8. torch::Tensor& context_lens, int64_t block_size,
  9. int64_t max_context_len,
  10. const c10::optional<torch::Tensor>& alibi_slopes,
  11. const std::string& kv_cache_dtype, double k_scale,
  12. double v_scale);