File size: 6,590 Bytes
45929a2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
program(1.0)
[buildInfo = dict<tensor<string, []>, tensor<string, []>>({{"coremlc-component-MIL", "3520.4.1"}, {"coremlc-version", "3520.5.1"}, {"coremltools-component-torch", "2.3.1"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "8.3.0"}})]
{
    func main<ios17>(tensor<int32, [1, 2]> y) {
            tensor<int32, []> var_10 = const()[name = tensor<string, []>("op_10"), val = tensor<int32, []>(0)];
            tensor<string, []> cast_0_promoted_to_fp16_dtype_0 = const()[name = tensor<string, []>("cast_0_promoted_to_fp16_dtype_0"), val = tensor<string, []>("fp16")];
            tensor<fp16, []> var_10_promoted_to_fp16 = const()[name = tensor<string, []>("op_10_promoted_to_fp16"), val = tensor<fp16, []>(0x0p+0)];
            tensor<fp16, []> const_0_to_fp16 = const()[name = tensor<string, []>("const_0_to_fp16"), val = tensor<fp16, []>(inf)];
            tensor<fp16, [1, 2]> y_to_fp16 = cast(dtype = cast_0_promoted_to_fp16_dtype_0, x = y)[name = tensor<string, []>("cast_5")];
            tensor<fp16, [1, 2]> clip_0_cast_fp16 = clip(alpha = var_10_promoted_to_fp16, beta = const_0_to_fp16, x = y_to_fp16)[name = tensor<string, []>("clip_0_cast_fp16")];
            tensor<int32, []> var_19_axis_0 = const()[name = tensor<string, []>("op_19_axis_0"), val = tensor<int32, []>(0)];
            tensor<int32, []> var_19_batch_dims_0 = const()[name = tensor<string, []>("op_19_batch_dims_0"), val = tensor<int32, []>(0)];
            tensor<bool, []> var_19_validate_indices_0 = const()[name = tensor<string, []>("op_19_validate_indices_0"), val = tensor<bool, []>(false)];
            tensor<fp16, [500, 320]> decoder_embedding_weight_to_fp16 = const()[name = tensor<string, []>("decoder_embedding_weight_to_fp16"), val = tensor<fp16, [500, 320]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(64)))];
            tensor<string, []> cast_1_to_int16_dtype_0 = const()[name = tensor<string, []>("cast_1_to_int16_dtype_0"), val = tensor<string, []>("int16")];
            tensor<int16, [1, 2]> clip_0_cast_fp16_to_int16 = cast(dtype = cast_1_to_int16_dtype_0, x = clip_0_cast_fp16)[name = tensor<string, []>("cast_4")];
            tensor<fp16, [1, 2, 320]> var_19_cast_fp16_cast_uint16 = gather(axis = var_19_axis_0, batch_dims = var_19_batch_dims_0, indices = clip_0_cast_fp16_to_int16, validate_indices = var_19_validate_indices_0, x = decoder_embedding_weight_to_fp16)[name = tensor<string, []>("op_19_cast_fp16_cast_uint16")];
            tensor<bool, [1, 2]> var_20 = greater_equal(x = y, y = var_10)[name = tensor<string, []>("op_20")];
            tensor<int32, [1]> var_21_axes_0 = const()[name = tensor<string, []>("op_21_axes_0"), val = tensor<int32, [1]>([-1])];
            tensor<bool, [1, 2, 1]> var_21 = expand_dims(axes = var_21_axes_0, x = var_20)[name = tensor<string, []>("op_21")];
            tensor<string, []> var_21_promoted_to_fp16_dtype_0 = const()[name = tensor<string, []>("op_21_promoted_to_fp16_dtype_0"), val = tensor<string, []>("fp16")];
            tensor<fp16, [1, 2, 1]> var_21_to_fp16 = cast(dtype = var_21_promoted_to_fp16_dtype_0, x = var_21)[name = tensor<string, []>("cast_3")];
            tensor<fp16, [1, 2, 320]> embedding_out_1_cast_fp16 = mul(x = var_19_cast_fp16_cast_uint16, y = var_21_to_fp16)[name = tensor<string, []>("embedding_out_1_cast_fp16")];
            tensor<int32, [3]> var_23 = const()[name = tensor<string, []>("op_23"), val = tensor<int32, [3]>([0, 2, 1])];
            tensor<string, []> embedding_out0_1_pad_type_0 = const()[name = tensor<string, []>("embedding_out0_1_pad_type_0"), val = tensor<string, []>("valid")];
            tensor<int32, []> embedding_out0_1_groups_0 = const()[name = tensor<string, []>("embedding_out0_1_groups_0"), val = tensor<int32, []>(80)];
            tensor<int32, [1]> embedding_out0_1_strides_0 = const()[name = tensor<string, []>("embedding_out0_1_strides_0"), val = tensor<int32, [1]>([1])];
            tensor<int32, [2]> embedding_out0_1_pad_0 = const()[name = tensor<string, []>("embedding_out0_1_pad_0"), val = tensor<int32, [2]>([0, 0])];
            tensor<int32, [1]> embedding_out0_1_dilations_0 = const()[name = tensor<string, []>("embedding_out0_1_dilations_0"), val = tensor<int32, [1]>([1])];
            tensor<fp16, [320, 4, 2]> decoder_conv_weight_to_fp16 = const()[name = tensor<string, []>("decoder_conv_weight_to_fp16"), val = tensor<fp16, [320, 4, 2]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(320128)))];
            tensor<fp16, [1, 320, 2]> embedding_out0_2_cast_fp16 = transpose(perm = var_23, x = embedding_out_1_cast_fp16)[name = tensor<string, []>("transpose_1")];
            tensor<fp16, [1, 320, 1]> embedding_out0_1_cast_fp16 = conv(dilations = embedding_out0_1_dilations_0, groups = embedding_out0_1_groups_0, pad = embedding_out0_1_pad_0, pad_type = embedding_out0_1_pad_type_0, strides = embedding_out0_1_strides_0, weight = decoder_conv_weight_to_fp16, x = embedding_out0_2_cast_fp16)[name = tensor<string, []>("embedding_out0_1_cast_fp16")];
            tensor<int32, [3]> var_31 = const()[name = tensor<string, []>("op_31"), val = tensor<int32, [3]>([0, 2, 1])];
            tensor<fp16, [1, 1, 320]> input0_1_cast_fp16 = transpose(perm = var_31, x = embedding_out0_1_cast_fp16)[name = tensor<string, []>("transpose_0")];
            tensor<fp16, [1, 1, 320]> var_33_cast_fp16 = relu(x = input0_1_cast_fp16)[name = tensor<string, []>("op_33_cast_fp16")];
            tensor<int32, [1]> input_3_axes_0 = const()[name = tensor<string, []>("input_3_axes_0"), val = tensor<int32, [1]>([1])];
            tensor<fp16, [1, 320]> input_3_cast_fp16 = squeeze(axes = input_3_axes_0, x = var_33_cast_fp16)[name = tensor<string, []>("input_3_cast_fp16")];
            tensor<fp16, [320, 320]> decoder_proj_weight_to_fp16 = const()[name = tensor<string, []>("decoder_proj_weight_to_fp16"), val = tensor<fp16, [320, 320]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(325312)))];
            tensor<fp16, [320]> decoder_proj_bias_to_fp16 = const()[name = tensor<string, []>("decoder_proj_bias_to_fp16"), val = tensor<fp16, [320]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(530176)))];
            tensor<fp16, [1, 320]> decoder_out = linear(bias = decoder_proj_bias_to_fp16, weight = decoder_proj_weight_to_fp16, x = input_3_cast_fp16)[name = tensor<string, []>("linear_0_cast_fp16")];
        } -> (decoder_out);
}