Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/infinicore/ops/per_tensor_quant_i8.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ namespace infinicore::op {
INFINICORE_GRAPH_OP_CLASS(PerTensorQuantI8, const Tensor &, Tensor, Tensor, Tensor, bool);

void per_tensor_quant_i8_(const Tensor &x, Tensor x_packed, Tensor x_scale, Tensor x_zero, bool is_static);

Tensor per_tensor_quant_i8(const Tensor &x, Tensor x_scale, Tensor x_zero, bool is_static);
} // namespace infinicore::op
2 changes: 1 addition & 1 deletion include/infinicore/quantization/quantization_scheme.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ enum class QuantScheme {
AWQ_W4A16,
};

enum class KVQuantScheme {
enum class KVQuantAlgo {
NONE,
INT8,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ void PerTensorQuantI8::execute(const Tensor &x, Tensor x_packed, Tensor x_scale,
void per_tensor_quant_i8_(const Tensor &x, Tensor x_packed, Tensor x_scale, Tensor x_zero, bool is_static) {
PerTensorQuantI8::execute(x, x_packed, x_scale, x_zero, is_static);
}

Tensor per_tensor_quant_i8(const Tensor &x, Tensor x_scale, Tensor x_zero, bool is_static) {
auto x_packed = Tensor::strided_empty(x->shape(), x->strides(), infinicore::DataType::I8, x->device());
PerTensorQuantI8::execute(x, x_packed, x_scale, x_zero, is_static);
return x_packed;
}
} // namespace infinicore::op
Loading