mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-09 22:57:59 -05:00
fix(gpu): fix degree after shift/rotate
This commit is contained in:
@@ -799,7 +799,9 @@ template <typename Torus> struct int_shift_and_rotate_buffer {
|
|||||||
params.carry_modulus, mux_lut_f);
|
params.carry_modulus, mux_lut_f);
|
||||||
mux_lut->broadcast_lut(streams, gpu_indexes, 0);
|
mux_lut->broadcast_lut(streams, gpu_indexes, 0);
|
||||||
|
|
||||||
auto cleaning_lut_f = [](Torus x) -> Torus { return x; };
|
auto cleaning_lut_f = [params](Torus x) -> Torus {
|
||||||
|
return x % params.message_modulus;
|
||||||
|
};
|
||||||
generate_device_accumulator<Torus>(
|
generate_device_accumulator<Torus>(
|
||||||
streams[0], gpu_indexes[0], cleaning_lut->get_lut(0, 0),
|
streams[0], gpu_indexes[0], cleaning_lut->get_lut(0, 0),
|
||||||
cleaning_lut->get_degree(0), cleaning_lut->get_max_degree(0),
|
cleaning_lut->get_degree(0), cleaning_lut->get_max_degree(0),
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ __host__ void host_integer_radix_shift_and_rotate_kb_inplace(
|
|||||||
// control_bit|b|a
|
// control_bit|b|a
|
||||||
integer_radix_apply_univariate_lookup_table_kb<Torus>(
|
integer_radix_apply_univariate_lookup_table_kb<Torus>(
|
||||||
streams, gpu_indexes, gpu_count, input_bits_a, mux_inputs, bsks, ksks,
|
streams, gpu_indexes, gpu_count, input_bits_a, mux_inputs, bsks, ksks,
|
||||||
mux_lut, mux_inputs->num_radix_blocks);
|
mux_lut, total_nb_bits);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initializes the output
|
// Initializes the output
|
||||||
|
|||||||
Reference in New Issue
Block a user