use crate::buffer::Arena;
pub fn run_lstm(
arena: &Arena,
device: &wgpu::Device,
queue: &wgpu::Queue,
x_byte_off: usize,
w_ih_byte_off: usize,
w_hh_byte_off: usize,
bias_byte_off: usize,
h0_byte_off: usize,
c0_byte_off: usize,
dst_byte_off: usize,
batch: usize,
seq: usize,
input_size: usize,
hidden: usize,
num_layers: usize,
bidirectional: bool,
carry: bool,
) {
let mut host = arena.read_bytes_range(device, queue, 0, arena.size);
unsafe {
rlx_cpu::thunk::execute_lstm_f32(
x_byte_off,
w_ih_byte_off,
w_hh_byte_off,
bias_byte_off,
h0_byte_off,
c0_byte_off,
dst_byte_off,
batch,
seq,
input_size,
hidden,
num_layers,
bidirectional,
carry,
host.as_mut_ptr(),
);
}
arena.write_bytes_range(queue, 0, &host);
}