program(1.3) [buildInfo = dict({{"coremlc-component-MIL", "3600.16.1"}, {"coremlc-version", "3600.25.1"}})] { func main(tensor c_in, tensor h_in, tensor target_length, tensor targets) { int32 input_batch_dims_0 = const()[name = string("input_batch_dims_0"), val = int32(0)]; bool input_validate_indices_0 = const()[name = string("input_validate_indices_0"), val = bool(false)]; tensor embedding_weight_to_fp16_quantized = constexpr_blockwise_shift_scale(data = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(64))), scale = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(5243648))))[name = string("embedding_weight_to_fp16_quantized")]; string targets_to_int16_dtype_0 = const()[name = string("targets_to_int16_dtype_0"), val = string("int16")]; string cast_1_dtype_0 = const()[name = string("cast_1_dtype_0"), val = string("int32")]; int32 greater_equal_0_y_0 = const()[name = string("greater_equal_0_y_0"), val = int32(0)]; tensor targets_to_int16 = cast(dtype = targets_to_int16_dtype_0, x = targets)[name = string("cast_9")]; tensor cast_1 = cast(dtype = cast_1_dtype_0, x = targets_to_int16)[name = string("cast_8")]; tensor greater_equal_0 = greater_equal(x = cast_1, y = greater_equal_0_y_0)[name = string("greater_equal_0")]; int32 slice_by_index_0 = const()[name = string("slice_by_index_0"), val = int32(8193)]; tensor add_2 = add(x = cast_1, y = slice_by_index_0)[name = string("add_2")]; tensor select_0 = select(a = cast_1, b = add_2, cond = greater_equal_0)[name = string("select_0")]; string select_0_to_int16_dtype_0 = const()[name = string("select_0_to_int16_dtype_0"), val = string("int16")]; string cast_0_dtype_0 = const()[name = string("cast_0_dtype_0"), val = string("int32")]; int32 greater_equal_0_y_0_1 = const()[name = string("greater_equal_0_y_0_1"), val = int32(0)]; tensor select_0_to_int16 = cast(dtype = select_0_to_int16_dtype_0, x = select_0)[name = string("cast_7")]; tensor cast_0 = cast(dtype = cast_0_dtype_0, x = select_0_to_int16)[name = string("cast_6")]; tensor greater_equal_0_1 = greater_equal(x = cast_0, y = greater_equal_0_y_0_1)[name = string("greater_equal_0_1")]; int32 slice_by_index_0_1 = const()[name = string("slice_by_index_0_1"), val = int32(8193)]; tensor add_0 = add(x = cast_0, y = slice_by_index_0_1)[name = string("add_0")]; tensor select_0_1 = select(a = cast_0, b = add_0, cond = greater_equal_0_1)[name = string("select_0_1")]; int32 input_cast_fp16_cast_uint16_cast_uint16_axis_0 = const()[name = string("input_cast_fp16_cast_uint16_cast_uint16_axis_0"), val = int32(0)]; tensor input_cast_fp16_cast_uint16_cast_uint16 = gather(axis = input_cast_fp16_cast_uint16_cast_uint16_axis_0, batch_dims = input_batch_dims_0, indices = select_0_1, validate_indices = input_validate_indices_0, x = embedding_weight_to_fp16_quantized)[name = string("input_cast_fp16_cast_uint16_cast_uint16")]; tensor input_batch_first_transpose_perm_0 = const()[name = string("input_batch_first_transpose_perm_0"), val = tensor([1, 0, 2])]; int32 split_0_num_splits_0 = const()[name = string("split_0_num_splits_0"), val = int32(2)]; int32 split_0_axis_0 = const()[name = string("split_0_axis_0"), val = int32(0)]; string h_in_to_fp16_dtype_0 = const()[name = string("h_in_to_fp16_dtype_0"), val = string("fp16")]; tensor h_in_to_fp16 = cast(dtype = h_in_to_fp16_dtype_0, x = h_in)[name = string("cast_5")]; tensor split_0_cast_fp16_0, tensor split_0_cast_fp16_1 = split(axis = split_0_axis_0, num_splits = split_0_num_splits_0, x = h_in_to_fp16)[name = string("split_0_cast_fp16")]; int32 split_1_num_splits_0 = const()[name = string("split_1_num_splits_0"), val = int32(2)]; int32 split_1_axis_0 = const()[name = string("split_1_axis_0"), val = int32(0)]; string c_in_to_fp16_dtype_0 = const()[name = string("c_in_to_fp16_dtype_0"), val = string("fp16")]; tensor c_in_to_fp16 = cast(dtype = c_in_to_fp16_dtype_0, x = c_in)[name = string("cast_4")]; tensor split_1_cast_fp16_0, tensor split_1_cast_fp16_1 = split(axis = split_1_axis_0, num_splits = split_1_num_splits_0, x = c_in_to_fp16)[name = string("split_1_cast_fp16")]; tensor out_lstm_layer_0_lstm_h0_squeeze_axes_0 = const()[name = string("out_lstm_layer_0_lstm_h0_squeeze_axes_0"), val = tensor([0])]; tensor out_lstm_layer_0_lstm_h0_squeeze_cast_fp16 = squeeze(axes = out_lstm_layer_0_lstm_h0_squeeze_axes_0, x = split_0_cast_fp16_0)[name = string("out_lstm_layer_0_lstm_h0_squeeze_cast_fp16")]; tensor out_lstm_layer_0_lstm_c0_squeeze_axes_0 = const()[name = string("out_lstm_layer_0_lstm_c0_squeeze_axes_0"), val = tensor([0])]; tensor out_lstm_layer_0_lstm_c0_squeeze_cast_fp16 = squeeze(axes = out_lstm_layer_0_lstm_c0_squeeze_axes_0, x = split_1_cast_fp16_0)[name = string("out_lstm_layer_0_lstm_c0_squeeze_cast_fp16")]; string out_lstm_layer_0_direction_0 = const()[name = string("out_lstm_layer_0_direction_0"), val = string("forward")]; bool out_lstm_layer_0_output_sequence_0 = const()[name = string("out_lstm_layer_0_output_sequence_0"), val = bool(true)]; string out_lstm_layer_0_recurrent_activation_0 = const()[name = string("out_lstm_layer_0_recurrent_activation_0"), val = string("sigmoid")]; string out_lstm_layer_0_cell_activation_0 = const()[name = string("out_lstm_layer_0_cell_activation_0"), val = string("tanh")]; string out_lstm_layer_0_activation_0 = const()[name = string("out_lstm_layer_0_activation_0"), val = string("tanh")]; tensor concat_1_to_fp16_quantized = constexpr_blockwise_shift_scale(data = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(5260160))), scale = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(6898624))))[name = string("concat_1_to_fp16_quantized")]; tensor concat_2_to_fp16_quantized = constexpr_blockwise_shift_scale(data = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(6903808))), scale = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(8542272))))[name = string("concat_2_to_fp16_quantized")]; tensor concat_0_to_fp16 = const()[name = string("concat_0_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(8547456)))]; tensor input_batch_first_transpose_cast_fp16 = transpose(perm = input_batch_first_transpose_perm_0, x = input_cast_fp16_cast_uint16_cast_uint16)[name = string("transpose_1")]; tensor out_lstm_layer_0_cast_fp16_0, tensor out_lstm_layer_0_cast_fp16_1, tensor out_lstm_layer_0_cast_fp16_2 = lstm(activation = out_lstm_layer_0_activation_0, bias = concat_0_to_fp16, cell_activation = out_lstm_layer_0_cell_activation_0, direction = out_lstm_layer_0_direction_0, initial_c = out_lstm_layer_0_lstm_c0_squeeze_cast_fp16, initial_h = out_lstm_layer_0_lstm_h0_squeeze_cast_fp16, output_sequence = out_lstm_layer_0_output_sequence_0, recurrent_activation = out_lstm_layer_0_recurrent_activation_0, weight_hh = concat_2_to_fp16_quantized, weight_ih = concat_1_to_fp16_quantized, x = input_batch_first_transpose_cast_fp16)[name = string("out_lstm_layer_0_cast_fp16")]; tensor out_batch_first_lstm_h0_squeeze_axes_0 = const()[name = string("out_batch_first_lstm_h0_squeeze_axes_0"), val = tensor([0])]; tensor out_batch_first_lstm_h0_squeeze_cast_fp16 = squeeze(axes = out_batch_first_lstm_h0_squeeze_axes_0, x = split_0_cast_fp16_1)[name = string("out_batch_first_lstm_h0_squeeze_cast_fp16")]; tensor out_batch_first_lstm_c0_squeeze_axes_0 = const()[name = string("out_batch_first_lstm_c0_squeeze_axes_0"), val = tensor([0])]; tensor out_batch_first_lstm_c0_squeeze_cast_fp16 = squeeze(axes = out_batch_first_lstm_c0_squeeze_axes_0, x = split_1_cast_fp16_1)[name = string("out_batch_first_lstm_c0_squeeze_cast_fp16")]; string out_batch_first_direction_0 = const()[name = string("out_batch_first_direction_0"), val = string("forward")]; bool out_batch_first_output_sequence_0 = const()[name = string("out_batch_first_output_sequence_0"), val = bool(true)]; string out_batch_first_recurrent_activation_0 = const()[name = string("out_batch_first_recurrent_activation_0"), val = string("sigmoid")]; string out_batch_first_cell_activation_0 = const()[name = string("out_batch_first_cell_activation_0"), val = string("tanh")]; string out_batch_first_activation_0 = const()[name = string("out_batch_first_activation_0"), val = string("tanh")]; tensor concat_4_to_fp16_quantized = constexpr_blockwise_shift_scale(data = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(8552640))), scale = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(10191104))))[name = string("concat_4_to_fp16_quantized")]; tensor concat_5_to_fp16_quantized = constexpr_blockwise_shift_scale(data = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(10196288))), scale = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(11834752))))[name = string("concat_5_to_fp16_quantized")]; tensor concat_3_to_fp16 = const()[name = string("concat_3_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(11839936)))]; tensor out_batch_first_cast_fp16_0, tensor out_batch_first_cast_fp16_1, tensor out_batch_first_cast_fp16_2 = lstm(activation = out_batch_first_activation_0, bias = concat_3_to_fp16, cell_activation = out_batch_first_cell_activation_0, direction = out_batch_first_direction_0, initial_c = out_batch_first_lstm_c0_squeeze_cast_fp16, initial_h = out_batch_first_lstm_h0_squeeze_cast_fp16, output_sequence = out_batch_first_output_sequence_0, recurrent_activation = out_batch_first_recurrent_activation_0, weight_hh = concat_5_to_fp16_quantized, weight_ih = concat_4_to_fp16_quantized, x = out_lstm_layer_0_cast_fp16_0)[name = string("out_batch_first_cast_fp16")]; tensor transpose_0_perm_0 = const()[name = string("transpose_0_perm_0"), val = tensor([1, 2, 0])]; string transpose_0_cast_fp16_to_fp32_dtype_0 = const()[name = string("transpose_0_cast_fp16_to_fp32_dtype_0"), val = string("fp32")]; int32 var_31_axis_0 = const()[name = string("op_31_axis_0"), val = int32(0)]; tensor var_31_cast_fp16 = stack(axis = var_31_axis_0, values = (out_lstm_layer_0_cast_fp16_1, out_batch_first_cast_fp16_1))[name = string("op_31_cast_fp16")]; string var_31_cast_fp16_to_fp32_dtype_0 = const()[name = string("op_31_cast_fp16_to_fp32_dtype_0"), val = string("fp32")]; int32 var_32_axis_0 = const()[name = string("op_32_axis_0"), val = int32(0)]; tensor var_32_cast_fp16 = stack(axis = var_32_axis_0, values = (out_lstm_layer_0_cast_fp16_2, out_batch_first_cast_fp16_2))[name = string("op_32_cast_fp16")]; string var_32_cast_fp16_to_fp32_dtype_0 = const()[name = string("op_32_cast_fp16_to_fp32_dtype_0"), val = string("fp32")]; tensor transpose_0_cast_fp16 = transpose(perm = transpose_0_perm_0, x = out_batch_first_cast_fp16_0)[name = string("transpose_0")]; tensor decoder = cast(dtype = transpose_0_cast_fp16_to_fp32_dtype_0, x = transpose_0_cast_fp16)[name = string("cast_1")]; tensor h_out = cast(dtype = var_31_cast_fp16_to_fp32_dtype_0, x = var_31_cast_fp16)[name = string("cast_2")]; tensor c_out = cast(dtype = var_32_cast_fp16_to_fp32_dtype_0, x = var_32_cast_fp16)[name = string("cast_3")]; tensor target_length_tmp = identity(x = target_length)[name = string("target_length_tmp")]; } -> (decoder, h_out, c_out); }