| program(1.0) |
| [buildInfo = dict<tensor<string, []>, tensor<string, []>>({{"coremlc-component-MIL", "3510.2.1"}, {"coremlc-version", "3500.32.1"}, {"coremltools-component-torch", "2.7.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "9.0b1"}})] |
| { |
| func main<ios17>(tensor<fp32, [1, 640, 1]> decoder_step, tensor<fp32, [1, 1024, 1]> encoder_step) { |
| tensor<int32, [3]> input_1_perm_0 = const()[name = tensor<string, []>("input_1_perm_0"), val = tensor<int32, [3]>([0, 2, 1])]; |
| tensor<string, []> encoder_step_to_fp16_dtype_0 = const()[name = tensor<string, []>("encoder_step_to_fp16_dtype_0"), val = tensor<string, []>("fp16")]; |
| tensor<int32, [3]> input_3_perm_0 = const()[name = tensor<string, []>("input_3_perm_0"), val = tensor<int32, [3]>([0, 2, 1])]; |
| tensor<string, []> decoder_step_to_fp16_dtype_0 = const()[name = tensor<string, []>("decoder_step_to_fp16_dtype_0"), val = tensor<string, []>("fp16")]; |
| tensor<fp16, [640, 1024]> joint_module_enc_weight_to_fp16 = const()[name = tensor<string, []>("joint_module_enc_weight_to_fp16"), val = tensor<fp16, [640, 1024]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(64)))]; |
| tensor<fp16, [640]> joint_module_enc_bias_to_fp16 = const()[name = tensor<string, []>("joint_module_enc_bias_to_fp16"), val = tensor<fp16, [640]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(1310848)))]; |
| tensor<fp16, [1, 1024, 1]> encoder_step_to_fp16 = cast(dtype = encoder_step_to_fp16_dtype_0, x = encoder_step)[name = tensor<string, []>("cast_3")]; |
| tensor<fp16, [1, 1, 1024]> input_1_cast_fp16 = transpose(perm = input_1_perm_0, x = encoder_step_to_fp16)[name = tensor<string, []>("transpose_1")]; |
| tensor<fp16, [1, 1, 640]> linear_0_cast_fp16 = linear(bias = joint_module_enc_bias_to_fp16, weight = joint_module_enc_weight_to_fp16, x = input_1_cast_fp16)[name = tensor<string, []>("linear_0_cast_fp16")]; |
| tensor<fp16, [640, 640]> joint_module_pred_weight_to_fp16 = const()[name = tensor<string, []>("joint_module_pred_weight_to_fp16"), val = tensor<fp16, [640, 640]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(1312192)))]; |
| tensor<fp16, [640]> joint_module_pred_bias_to_fp16 = const()[name = tensor<string, []>("joint_module_pred_bias_to_fp16"), val = tensor<fp16, [640]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(2131456)))]; |
| tensor<fp16, [1, 640, 1]> decoder_step_to_fp16 = cast(dtype = decoder_step_to_fp16_dtype_0, x = decoder_step)[name = tensor<string, []>("cast_2")]; |
| tensor<fp16, [1, 1, 640]> input_3_cast_fp16 = transpose(perm = input_3_perm_0, x = decoder_step_to_fp16)[name = tensor<string, []>("transpose_0")]; |
| tensor<fp16, [1, 1, 640]> linear_1_cast_fp16 = linear(bias = joint_module_pred_bias_to_fp16, weight = joint_module_pred_weight_to_fp16, x = input_3_cast_fp16)[name = tensor<string, []>("linear_1_cast_fp16")]; |
| tensor<int32, [1]> var_23_axes_0 = const()[name = tensor<string, []>("op_23_axes_0"), val = tensor<int32, [1]>([2])]; |
| tensor<fp16, [1, 1, 1, 640]> var_23_cast_fp16 = expand_dims(axes = var_23_axes_0, x = linear_0_cast_fp16)[name = tensor<string, []>("op_23_cast_fp16")]; |
| tensor<int32, [1]> var_24_axes_0 = const()[name = tensor<string, []>("op_24_axes_0"), val = tensor<int32, [1]>([1])]; |
| tensor<fp16, [1, 1, 1, 640]> var_24_cast_fp16 = expand_dims(axes = var_24_axes_0, x = linear_1_cast_fp16)[name = tensor<string, []>("op_24_cast_fp16")]; |
| tensor<fp16, [1, 1, 1, 640]> input_5_cast_fp16 = add(x = var_23_cast_fp16, y = var_24_cast_fp16)[name = tensor<string, []>("input_5_cast_fp16")]; |
| tensor<fp16, [1, 1, 1, 640]> input_7_cast_fp16 = relu(x = input_5_cast_fp16)[name = tensor<string, []>("input_7_cast_fp16")]; |
| tensor<fp16, [8198, 640]> joint_module_joint_net_2_weight_to_fp16 = const()[name = tensor<string, []>("joint_module_joint_net_2_weight_to_fp16"), val = tensor<fp16, [8198, 640]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(2132800)))]; |
| tensor<fp16, [8198]> joint_module_joint_net_2_bias_to_fp16 = const()[name = tensor<string, []>("joint_module_joint_net_2_bias_to_fp16"), val = tensor<fp16, [8198]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(12626304)))]; |
| tensor<fp16, [1, 1, 1, 8198]> linear_2_cast_fp16 = linear(bias = joint_module_joint_net_2_bias_to_fp16, weight = joint_module_joint_net_2_weight_to_fp16, x = input_7_cast_fp16)[name = tensor<string, []>("linear_2_cast_fp16")]; |
| tensor<int32, [4]> var_35_begin_0 = const()[name = tensor<string, []>("op_35_begin_0"), val = tensor<int32, [4]>([0, 0, 0, 0])]; |
| tensor<int32, [4]> var_35_end_0 = const()[name = tensor<string, []>("op_35_end_0"), val = tensor<int32, [4]>([1, 1, 1, 8193])]; |
| tensor<bool, [4]> var_35_end_mask_0 = const()[name = tensor<string, []>("op_35_end_mask_0"), val = tensor<bool, [4]>([true, true, true, false])]; |
| tensor<fp16, [1, 1, 1, 8193]> var_35_cast_fp16 = slice_by_index(begin = var_35_begin_0, end = var_35_end_0, end_mask = var_35_end_mask_0, x = linear_2_cast_fp16)[name = tensor<string, []>("op_35_cast_fp16")]; |
| tensor<string, []> var_35_cast_fp16_to_fp32_dtype_0 = const()[name = tensor<string, []>("op_35_cast_fp16_to_fp32_dtype_0"), val = tensor<string, []>("fp32")]; |
| tensor<int32, [4]> var_40_begin_0 = const()[name = tensor<string, []>("op_40_begin_0"), val = tensor<int32, [4]>([0, 0, 0, 8193])]; |
| tensor<int32, [4]> var_40_end_0 = const()[name = tensor<string, []>("op_40_end_0"), val = tensor<int32, [4]>([1, 1, 1, 8198])]; |
| tensor<bool, [4]> var_40_end_mask_0 = const()[name = tensor<string, []>("op_40_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])]; |
| tensor<fp16, [1, 1, 1, 5]> var_40_cast_fp16 = slice_by_index(begin = var_40_begin_0, end = var_40_end_0, end_mask = var_40_end_mask_0, x = linear_2_cast_fp16)[name = tensor<string, []>("op_40_cast_fp16")]; |
| tensor<string, []> var_40_cast_fp16_to_fp32_dtype_0 = const()[name = tensor<string, []>("op_40_cast_fp16_to_fp32_dtype_0"), val = tensor<string, []>("fp32")]; |
| tensor<fp32, [1, 1, 1, 5]> duration_logits = cast(dtype = var_40_cast_fp16_to_fp32_dtype_0, x = var_40_cast_fp16)[name = tensor<string, []>("cast_0")]; |
| tensor<fp32, [1, 1, 1, 8193]> token_logits = cast(dtype = var_35_cast_fp16_to_fp32_dtype_0, x = var_35_cast_fp16)[name = tensor<string, []>("cast_1")]; |
| } -> (token_logits, duration_logits); |
| } |