• Docs >
  • Library API >
  • Template Function at::symint::_flash_attention_forward(const at::Tensor&, const at::Tensor&, const at::Tensor&, const ::std::optional<at::Tensor>&, const ::std::optional<at::Tensor>&, int64_t, int64_t, double, bool, bool, ::std::optional<double>, ::std::optional<int64_t>, ::std::optional<int64_t>, const ::std::optional<at::Tensor>&, const ::std::optional<at::Tensor>&)
  • Edit on GitHub
Shortcuts

Template Function at::symint::_flash_attention_forward(const at::Tensor&, const at::Tensor&, const at::Tensor&, const ::std::optional<at::Tensor>&, const ::std::optional<at::Tensor>&, int64_t, int64_t, double, bool, bool, ::std::optional<double>, ::std::optional<int64_t>, ::std::optional<int64_t>, const ::std::optional<at::Tensor>&, const ::std::optional<at::Tensor>&)

Function Documentation

template<typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
::std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor> at::symint::_flash_attention_forward(const at::Tensor &query, const at::Tensor &key, const at::Tensor &value, const ::std::optional<at::Tensor> &cum_seq_q, const ::std::optional<at::Tensor> &cum_seq_k, int64_t max_q, int64_t max_k, double dropout_p, bool is_causal, bool return_debug_mask, ::std::optional<double> scale = ::std::nullopt, ::std::optional<int64_t> window_size_left = ::std::nullopt, ::std::optional<int64_t> window_size_right = ::std::nullopt, const ::std::optional<at::Tensor> &seqused_k = {}, const ::std::optional<at::Tensor> &alibi_slopes = {})

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources