-
Notifications
You must be signed in to change notification settings - Fork 24k
/
Copy pathqembeddingbag.h
32 lines (28 loc) · 1015 Bytes
/
qembeddingbag.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include <ATen/core/Tensor.h>
#include <cstdint>
namespace at::native {
Tensor& embedding_bag_byte_rowwise_offsets_out(
Tensor& output,
const Tensor& weight,
const Tensor& indices,
const std::optional<Tensor>& offsets_in,
const bool /* scale_grad_by_freq */,
const int64_t /* mode */,
bool pruned_weights,
const std::optional<Tensor>& per_sample_weights_,
const std::optional<Tensor>& compressed_indices_mapping,
bool include_last_offset);
Tensor& embedding_bag_4bit_rowwise_offsets_out(
Tensor& output,
const Tensor& weight,
const Tensor& indices,
const std::optional<Tensor>& offsets_in,
const bool /* scale_grad_by_freq */,
const int64_t /* mode */,
bool pruned_weights,
const std::optional<Tensor>& per_sample_weights_,
const std::optional<Tensor>& compressed_indices_mapping,
bool include_last_offset);
Tensor& qembeddingbag_byte_unpack_out(Tensor& output, const Tensor& packed_weight);
} // namespace at::native