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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
// This file is generated by rust-protobuf 2.27.1. Do not edit
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]

#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]

#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `tensorflow/core/protobuf/rewriter_config.proto`

/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1;

#[derive(PartialEq,Clone,Default)]
pub struct AutoParallelOptions {
    // message fields
    pub enable: bool,
    pub num_replicas: i32,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a AutoParallelOptions {
    fn default() -> &'a AutoParallelOptions {
        <AutoParallelOptions as ::protobuf::Message>::default_instance()
    }
}

impl AutoParallelOptions {
    pub fn new() -> AutoParallelOptions {
        ::std::default::Default::default()
    }

    // bool enable = 1;


    pub fn get_enable(&self) -> bool {
        self.enable
    }
    pub fn clear_enable(&mut self) {
        self.enable = false;
    }

    // Param is passed by value, moved
    pub fn set_enable(&mut self, v: bool) {
        self.enable = v;
    }

    // int32 num_replicas = 2;


    pub fn get_num_replicas(&self) -> i32 {
        self.num_replicas
    }
    pub fn clear_num_replicas(&mut self) {
        self.num_replicas = 0;
    }

    // Param is passed by value, moved
    pub fn set_num_replicas(&mut self, v: i32) {
        self.num_replicas = v;
    }
}

impl ::protobuf::Message for AutoParallelOptions {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.enable = tmp;
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int32()?;
                    self.num_replicas = tmp;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if self.enable != false {
            my_size += 2;
        }
        if self.num_replicas != 0 {
            my_size += ::protobuf::rt::value_size(2, self.num_replicas, ::protobuf::wire_format::WireTypeVarint);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if self.enable != false {
            os.write_bool(1, self.enable)?;
        }
        if self.num_replicas != 0 {
            os.write_int32(2, self.num_replicas)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> AutoParallelOptions {
        AutoParallelOptions::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "enable",
                |m: &AutoParallelOptions| { &m.enable },
                |m: &mut AutoParallelOptions| { &mut m.enable },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
                "num_replicas",
                |m: &AutoParallelOptions| { &m.num_replicas },
                |m: &mut AutoParallelOptions| { &mut m.num_replicas },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<AutoParallelOptions>(
                "AutoParallelOptions",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static AutoParallelOptions {
        static instance: ::protobuf::rt::LazyV2<AutoParallelOptions> = ::protobuf::rt::LazyV2::INIT;
        instance.get(AutoParallelOptions::new)
    }
}

impl ::protobuf::Clear for AutoParallelOptions {
    fn clear(&mut self) {
        self.enable = false;
        self.num_replicas = 0;
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for AutoParallelOptions {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for AutoParallelOptions {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct ScopedAllocatorOptions {
    // message fields
    pub enable_op: ::protobuf::RepeatedField<::std::string::String>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a ScopedAllocatorOptions {
    fn default() -> &'a ScopedAllocatorOptions {
        <ScopedAllocatorOptions as ::protobuf::Message>::default_instance()
    }
}

impl ScopedAllocatorOptions {
    pub fn new() -> ScopedAllocatorOptions {
        ::std::default::Default::default()
    }

    // repeated string enable_op = 1;


    pub fn get_enable_op(&self) -> &[::std::string::String] {
        &self.enable_op
    }
    pub fn clear_enable_op(&mut self) {
        self.enable_op.clear();
    }

    // Param is passed by value, moved
    pub fn set_enable_op(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
        self.enable_op = v;
    }

    // Mutable pointer to the field.
    pub fn mut_enable_op(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
        &mut self.enable_op
    }

    // Take field
    pub fn take_enable_op(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
        ::std::mem::replace(&mut self.enable_op, ::protobuf::RepeatedField::new())
    }
}

impl ::protobuf::Message for ScopedAllocatorOptions {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.enable_op)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        for value in &self.enable_op {
            my_size += ::protobuf::rt::string_size(1, &value);
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        for v in &self.enable_op {
            os.write_string(1, &v)?;
        };
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> ScopedAllocatorOptions {
        ScopedAllocatorOptions::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "enable_op",
                |m: &ScopedAllocatorOptions| { &m.enable_op },
                |m: &mut ScopedAllocatorOptions| { &mut m.enable_op },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<ScopedAllocatorOptions>(
                "ScopedAllocatorOptions",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static ScopedAllocatorOptions {
        static instance: ::protobuf::rt::LazyV2<ScopedAllocatorOptions> = ::protobuf::rt::LazyV2::INIT;
        instance.get(ScopedAllocatorOptions::new)
    }
}

impl ::protobuf::Clear for ScopedAllocatorOptions {
    fn clear(&mut self) {
        self.enable_op.clear();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for ScopedAllocatorOptions {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for ScopedAllocatorOptions {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct RewriterConfig {
    // message fields
    pub cpu_layout_conversion: RewriterConfig_CpuLayout,
    pub layout_optimizer: RewriterConfig_Toggle,
    pub constant_folding: RewriterConfig_Toggle,
    pub shape_optimization: RewriterConfig_Toggle,
    pub remapping: RewriterConfig_Toggle,
    pub common_subgraph_elimination: RewriterConfig_Toggle,
    pub arithmetic_optimization: RewriterConfig_Toggle,
    pub dependency_optimization: RewriterConfig_Toggle,
    pub loop_optimization: RewriterConfig_Toggle,
    pub function_optimization: RewriterConfig_Toggle,
    pub debug_stripper: RewriterConfig_Toggle,
    pub disable_model_pruning: bool,
    pub scoped_allocator_optimization: RewriterConfig_Toggle,
    pub pin_to_host_optimization: RewriterConfig_Toggle,
    pub implementation_selector: RewriterConfig_Toggle,
    pub auto_mixed_precision: RewriterConfig_Toggle,
    pub auto_mixed_precision_mkl: RewriterConfig_Toggle,
    pub auto_mixed_precision_onednn_bfloat16: RewriterConfig_Toggle,
    pub auto_mixed_precision_cpu: RewriterConfig_Toggle,
    pub disable_meta_optimizer: bool,
    pub use_plugin_optimizers: RewriterConfig_Toggle,
    pub experimental_conditional_code_motion: RewriterConfig_Toggle,
    pub meta_optimizer_iterations: RewriterConfig_NumIterationsType,
    pub min_graph_nodes: i32,
    pub experimental_disable_compressed_tensor_optimization: bool,
    pub experimental_disable_folding_quantization_emulation: bool,
    pub memory_optimization: RewriterConfig_MemOptType,
    pub memory_optimizer_target_node_name_scope: ::std::string::String,
    pub meta_optimizer_timeout_ms: i64,
    pub auto_parallel: ::protobuf::SingularPtrField<AutoParallelOptions>,
    pub fail_on_optimizer_errors: bool,
    pub scoped_allocator_opts: ::protobuf::SingularPtrField<ScopedAllocatorOptions>,
    pub optimizers: ::protobuf::RepeatedField<::std::string::String>,
    pub custom_optimizers: ::protobuf::RepeatedField<RewriterConfig_CustomGraphOptimizer>,
    pub inter_optimizer_verifier_config: ::protobuf::SingularPtrField<super::verifier_config::VerifierConfig>,
    pub post_optimization_verifier_config: ::protobuf::SingularPtrField<super::verifier_config::VerifierConfig>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a RewriterConfig {
    fn default() -> &'a RewriterConfig {
        <RewriterConfig as ::protobuf::Message>::default_instance()
    }
}

impl RewriterConfig {
    pub fn new() -> RewriterConfig {
        ::std::default::Default::default()
    }

    // .tensorflow.RewriterConfig.CpuLayout cpu_layout_conversion = 50;


    pub fn get_cpu_layout_conversion(&self) -> RewriterConfig_CpuLayout {
        self.cpu_layout_conversion
    }
    pub fn clear_cpu_layout_conversion(&mut self) {
        self.cpu_layout_conversion = RewriterConfig_CpuLayout::NO_CONVERSION_ON_CPU;
    }

    // Param is passed by value, moved
    pub fn set_cpu_layout_conversion(&mut self, v: RewriterConfig_CpuLayout) {
        self.cpu_layout_conversion = v;
    }

    // .tensorflow.RewriterConfig.Toggle layout_optimizer = 1;


    pub fn get_layout_optimizer(&self) -> RewriterConfig_Toggle {
        self.layout_optimizer
    }
    pub fn clear_layout_optimizer(&mut self) {
        self.layout_optimizer = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_layout_optimizer(&mut self, v: RewriterConfig_Toggle) {
        self.layout_optimizer = v;
    }

    // .tensorflow.RewriterConfig.Toggle constant_folding = 3;


    pub fn get_constant_folding(&self) -> RewriterConfig_Toggle {
        self.constant_folding
    }
    pub fn clear_constant_folding(&mut self) {
        self.constant_folding = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_constant_folding(&mut self, v: RewriterConfig_Toggle) {
        self.constant_folding = v;
    }

    // .tensorflow.RewriterConfig.Toggle shape_optimization = 13;


    pub fn get_shape_optimization(&self) -> RewriterConfig_Toggle {
        self.shape_optimization
    }
    pub fn clear_shape_optimization(&mut self) {
        self.shape_optimization = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_shape_optimization(&mut self, v: RewriterConfig_Toggle) {
        self.shape_optimization = v;
    }

    // .tensorflow.RewriterConfig.Toggle remapping = 14;


    pub fn get_remapping(&self) -> RewriterConfig_Toggle {
        self.remapping
    }
    pub fn clear_remapping(&mut self) {
        self.remapping = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_remapping(&mut self, v: RewriterConfig_Toggle) {
        self.remapping = v;
    }

    // .tensorflow.RewriterConfig.Toggle common_subgraph_elimination = 24;


    pub fn get_common_subgraph_elimination(&self) -> RewriterConfig_Toggle {
        self.common_subgraph_elimination
    }
    pub fn clear_common_subgraph_elimination(&mut self) {
        self.common_subgraph_elimination = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_common_subgraph_elimination(&mut self, v: RewriterConfig_Toggle) {
        self.common_subgraph_elimination = v;
    }

    // .tensorflow.RewriterConfig.Toggle arithmetic_optimization = 7;


    pub fn get_arithmetic_optimization(&self) -> RewriterConfig_Toggle {
        self.arithmetic_optimization
    }
    pub fn clear_arithmetic_optimization(&mut self) {
        self.arithmetic_optimization = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_arithmetic_optimization(&mut self, v: RewriterConfig_Toggle) {
        self.arithmetic_optimization = v;
    }

    // .tensorflow.RewriterConfig.Toggle dependency_optimization = 8;


    pub fn get_dependency_optimization(&self) -> RewriterConfig_Toggle {
        self.dependency_optimization
    }
    pub fn clear_dependency_optimization(&mut self) {
        self.dependency_optimization = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_dependency_optimization(&mut self, v: RewriterConfig_Toggle) {
        self.dependency_optimization = v;
    }

    // .tensorflow.RewriterConfig.Toggle loop_optimization = 9;


    pub fn get_loop_optimization(&self) -> RewriterConfig_Toggle {
        self.loop_optimization
    }
    pub fn clear_loop_optimization(&mut self) {
        self.loop_optimization = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_loop_optimization(&mut self, v: RewriterConfig_Toggle) {
        self.loop_optimization = v;
    }

    // .tensorflow.RewriterConfig.Toggle function_optimization = 10;


    pub fn get_function_optimization(&self) -> RewriterConfig_Toggle {
        self.function_optimization
    }
    pub fn clear_function_optimization(&mut self) {
        self.function_optimization = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_function_optimization(&mut self, v: RewriterConfig_Toggle) {
        self.function_optimization = v;
    }

    // .tensorflow.RewriterConfig.Toggle debug_stripper = 11;


    pub fn get_debug_stripper(&self) -> RewriterConfig_Toggle {
        self.debug_stripper
    }
    pub fn clear_debug_stripper(&mut self) {
        self.debug_stripper = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_debug_stripper(&mut self, v: RewriterConfig_Toggle) {
        self.debug_stripper = v;
    }

    // bool disable_model_pruning = 2;


    pub fn get_disable_model_pruning(&self) -> bool {
        self.disable_model_pruning
    }
    pub fn clear_disable_model_pruning(&mut self) {
        self.disable_model_pruning = false;
    }

    // Param is passed by value, moved
    pub fn set_disable_model_pruning(&mut self, v: bool) {
        self.disable_model_pruning = v;
    }

    // .tensorflow.RewriterConfig.Toggle scoped_allocator_optimization = 15;


    pub fn get_scoped_allocator_optimization(&self) -> RewriterConfig_Toggle {
        self.scoped_allocator_optimization
    }
    pub fn clear_scoped_allocator_optimization(&mut self) {
        self.scoped_allocator_optimization = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_scoped_allocator_optimization(&mut self, v: RewriterConfig_Toggle) {
        self.scoped_allocator_optimization = v;
    }

    // .tensorflow.RewriterConfig.Toggle pin_to_host_optimization = 18;


    pub fn get_pin_to_host_optimization(&self) -> RewriterConfig_Toggle {
        self.pin_to_host_optimization
    }
    pub fn clear_pin_to_host_optimization(&mut self) {
        self.pin_to_host_optimization = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_pin_to_host_optimization(&mut self, v: RewriterConfig_Toggle) {
        self.pin_to_host_optimization = v;
    }

    // .tensorflow.RewriterConfig.Toggle implementation_selector = 22;


    pub fn get_implementation_selector(&self) -> RewriterConfig_Toggle {
        self.implementation_selector
    }
    pub fn clear_implementation_selector(&mut self) {
        self.implementation_selector = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_implementation_selector(&mut self, v: RewriterConfig_Toggle) {
        self.implementation_selector = v;
    }

    // .tensorflow.RewriterConfig.Toggle auto_mixed_precision = 23;


    pub fn get_auto_mixed_precision(&self) -> RewriterConfig_Toggle {
        self.auto_mixed_precision
    }
    pub fn clear_auto_mixed_precision(&mut self) {
        self.auto_mixed_precision = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_auto_mixed_precision(&mut self, v: RewriterConfig_Toggle) {
        self.auto_mixed_precision = v;
    }

    // .tensorflow.RewriterConfig.Toggle auto_mixed_precision_mkl = 25;


    pub fn get_auto_mixed_precision_mkl(&self) -> RewriterConfig_Toggle {
        self.auto_mixed_precision_mkl
    }
    pub fn clear_auto_mixed_precision_mkl(&mut self) {
        self.auto_mixed_precision_mkl = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_auto_mixed_precision_mkl(&mut self, v: RewriterConfig_Toggle) {
        self.auto_mixed_precision_mkl = v;
    }

    // .tensorflow.RewriterConfig.Toggle auto_mixed_precision_onednn_bfloat16 = 31;


    pub fn get_auto_mixed_precision_onednn_bfloat16(&self) -> RewriterConfig_Toggle {
        self.auto_mixed_precision_onednn_bfloat16
    }
    pub fn clear_auto_mixed_precision_onednn_bfloat16(&mut self) {
        self.auto_mixed_precision_onednn_bfloat16 = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_auto_mixed_precision_onednn_bfloat16(&mut self, v: RewriterConfig_Toggle) {
        self.auto_mixed_precision_onednn_bfloat16 = v;
    }

    // .tensorflow.RewriterConfig.Toggle auto_mixed_precision_cpu = 29;


    pub fn get_auto_mixed_precision_cpu(&self) -> RewriterConfig_Toggle {
        self.auto_mixed_precision_cpu
    }
    pub fn clear_auto_mixed_precision_cpu(&mut self) {
        self.auto_mixed_precision_cpu = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_auto_mixed_precision_cpu(&mut self, v: RewriterConfig_Toggle) {
        self.auto_mixed_precision_cpu = v;
    }

    // bool disable_meta_optimizer = 19;


    pub fn get_disable_meta_optimizer(&self) -> bool {
        self.disable_meta_optimizer
    }
    pub fn clear_disable_meta_optimizer(&mut self) {
        self.disable_meta_optimizer = false;
    }

    // Param is passed by value, moved
    pub fn set_disable_meta_optimizer(&mut self, v: bool) {
        self.disable_meta_optimizer = v;
    }

    // .tensorflow.RewriterConfig.Toggle use_plugin_optimizers = 28;


    pub fn get_use_plugin_optimizers(&self) -> RewriterConfig_Toggle {
        self.use_plugin_optimizers
    }
    pub fn clear_use_plugin_optimizers(&mut self) {
        self.use_plugin_optimizers = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_use_plugin_optimizers(&mut self, v: RewriterConfig_Toggle) {
        self.use_plugin_optimizers = v;
    }

    // .tensorflow.RewriterConfig.Toggle experimental_conditional_code_motion = 30;


    pub fn get_experimental_conditional_code_motion(&self) -> RewriterConfig_Toggle {
        self.experimental_conditional_code_motion
    }
    pub fn clear_experimental_conditional_code_motion(&mut self) {
        self.experimental_conditional_code_motion = RewriterConfig_Toggle::DEFAULT;
    }

    // Param is passed by value, moved
    pub fn set_experimental_conditional_code_motion(&mut self, v: RewriterConfig_Toggle) {
        self.experimental_conditional_code_motion = v;
    }

    // .tensorflow.RewriterConfig.NumIterationsType meta_optimizer_iterations = 12;


    pub fn get_meta_optimizer_iterations(&self) -> RewriterConfig_NumIterationsType {
        self.meta_optimizer_iterations
    }
    pub fn clear_meta_optimizer_iterations(&mut self) {
        self.meta_optimizer_iterations = RewriterConfig_NumIterationsType::DEFAULT_NUM_ITERS;
    }

    // Param is passed by value, moved
    pub fn set_meta_optimizer_iterations(&mut self, v: RewriterConfig_NumIterationsType) {
        self.meta_optimizer_iterations = v;
    }

    // int32 min_graph_nodes = 17;


    pub fn get_min_graph_nodes(&self) -> i32 {
        self.min_graph_nodes
    }
    pub fn clear_min_graph_nodes(&mut self) {
        self.min_graph_nodes = 0;
    }

    // Param is passed by value, moved
    pub fn set_min_graph_nodes(&mut self, v: i32) {
        self.min_graph_nodes = v;
    }

    // bool experimental_disable_compressed_tensor_optimization = 26;


    pub fn get_experimental_disable_compressed_tensor_optimization(&self) -> bool {
        self.experimental_disable_compressed_tensor_optimization
    }
    pub fn clear_experimental_disable_compressed_tensor_optimization(&mut self) {
        self.experimental_disable_compressed_tensor_optimization = false;
    }

    // Param is passed by value, moved
    pub fn set_experimental_disable_compressed_tensor_optimization(&mut self, v: bool) {
        self.experimental_disable_compressed_tensor_optimization = v;
    }

    // bool experimental_disable_folding_quantization_emulation = 27;


    pub fn get_experimental_disable_folding_quantization_emulation(&self) -> bool {
        self.experimental_disable_folding_quantization_emulation
    }
    pub fn clear_experimental_disable_folding_quantization_emulation(&mut self) {
        self.experimental_disable_folding_quantization_emulation = false;
    }

    // Param is passed by value, moved
    pub fn set_experimental_disable_folding_quantization_emulation(&mut self, v: bool) {
        self.experimental_disable_folding_quantization_emulation = v;
    }

    // .tensorflow.RewriterConfig.MemOptType memory_optimization = 4;


    pub fn get_memory_optimization(&self) -> RewriterConfig_MemOptType {
        self.memory_optimization
    }
    pub fn clear_memory_optimization(&mut self) {
        self.memory_optimization = RewriterConfig_MemOptType::DEFAULT_MEM_OPT;
    }

    // Param is passed by value, moved
    pub fn set_memory_optimization(&mut self, v: RewriterConfig_MemOptType) {
        self.memory_optimization = v;
    }

    // string memory_optimizer_target_node_name_scope = 6;


    pub fn get_memory_optimizer_target_node_name_scope(&self) -> &str {
        &self.memory_optimizer_target_node_name_scope
    }
    pub fn clear_memory_optimizer_target_node_name_scope(&mut self) {
        self.memory_optimizer_target_node_name_scope.clear();
    }

    // Param is passed by value, moved
    pub fn set_memory_optimizer_target_node_name_scope(&mut self, v: ::std::string::String) {
        self.memory_optimizer_target_node_name_scope = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_memory_optimizer_target_node_name_scope(&mut self) -> &mut ::std::string::String {
        &mut self.memory_optimizer_target_node_name_scope
    }

    // Take field
    pub fn take_memory_optimizer_target_node_name_scope(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.memory_optimizer_target_node_name_scope, ::std::string::String::new())
    }

    // int64 meta_optimizer_timeout_ms = 20;


    pub fn get_meta_optimizer_timeout_ms(&self) -> i64 {
        self.meta_optimizer_timeout_ms
    }
    pub fn clear_meta_optimizer_timeout_ms(&mut self) {
        self.meta_optimizer_timeout_ms = 0;
    }

    // Param is passed by value, moved
    pub fn set_meta_optimizer_timeout_ms(&mut self, v: i64) {
        self.meta_optimizer_timeout_ms = v;
    }

    // .tensorflow.AutoParallelOptions auto_parallel = 5;


    pub fn get_auto_parallel(&self) -> &AutoParallelOptions {
        self.auto_parallel.as_ref().unwrap_or_else(|| <AutoParallelOptions as ::protobuf::Message>::default_instance())
    }
    pub fn clear_auto_parallel(&mut self) {
        self.auto_parallel.clear();
    }

    pub fn has_auto_parallel(&self) -> bool {
        self.auto_parallel.is_some()
    }

    // Param is passed by value, moved
    pub fn set_auto_parallel(&mut self, v: AutoParallelOptions) {
        self.auto_parallel = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_auto_parallel(&mut self) -> &mut AutoParallelOptions {
        if self.auto_parallel.is_none() {
            self.auto_parallel.set_default();
        }
        self.auto_parallel.as_mut().unwrap()
    }

    // Take field
    pub fn take_auto_parallel(&mut self) -> AutoParallelOptions {
        self.auto_parallel.take().unwrap_or_else(|| AutoParallelOptions::new())
    }

    // bool fail_on_optimizer_errors = 21;


    pub fn get_fail_on_optimizer_errors(&self) -> bool {
        self.fail_on_optimizer_errors
    }
    pub fn clear_fail_on_optimizer_errors(&mut self) {
        self.fail_on_optimizer_errors = false;
    }

    // Param is passed by value, moved
    pub fn set_fail_on_optimizer_errors(&mut self, v: bool) {
        self.fail_on_optimizer_errors = v;
    }

    // .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16;


    pub fn get_scoped_allocator_opts(&self) -> &ScopedAllocatorOptions {
        self.scoped_allocator_opts.as_ref().unwrap_or_else(|| <ScopedAllocatorOptions as ::protobuf::Message>::default_instance())
    }
    pub fn clear_scoped_allocator_opts(&mut self) {
        self.scoped_allocator_opts.clear();
    }

    pub fn has_scoped_allocator_opts(&self) -> bool {
        self.scoped_allocator_opts.is_some()
    }

    // Param is passed by value, moved
    pub fn set_scoped_allocator_opts(&mut self, v: ScopedAllocatorOptions) {
        self.scoped_allocator_opts = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_scoped_allocator_opts(&mut self) -> &mut ScopedAllocatorOptions {
        if self.scoped_allocator_opts.is_none() {
            self.scoped_allocator_opts.set_default();
        }
        self.scoped_allocator_opts.as_mut().unwrap()
    }

    // Take field
    pub fn take_scoped_allocator_opts(&mut self) -> ScopedAllocatorOptions {
        self.scoped_allocator_opts.take().unwrap_or_else(|| ScopedAllocatorOptions::new())
    }

    // repeated string optimizers = 100;


    pub fn get_optimizers(&self) -> &[::std::string::String] {
        &self.optimizers
    }
    pub fn clear_optimizers(&mut self) {
        self.optimizers.clear();
    }

    // Param is passed by value, moved
    pub fn set_optimizers(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
        self.optimizers = v;
    }

    // Mutable pointer to the field.
    pub fn mut_optimizers(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
        &mut self.optimizers
    }

    // Take field
    pub fn take_optimizers(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
        ::std::mem::replace(&mut self.optimizers, ::protobuf::RepeatedField::new())
    }

    // repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200;


    pub fn get_custom_optimizers(&self) -> &[RewriterConfig_CustomGraphOptimizer] {
        &self.custom_optimizers
    }
    pub fn clear_custom_optimizers(&mut self) {
        self.custom_optimizers.clear();
    }

    // Param is passed by value, moved
    pub fn set_custom_optimizers(&mut self, v: ::protobuf::RepeatedField<RewriterConfig_CustomGraphOptimizer>) {
        self.custom_optimizers = v;
    }

    // Mutable pointer to the field.
    pub fn mut_custom_optimizers(&mut self) -> &mut ::protobuf::RepeatedField<RewriterConfig_CustomGraphOptimizer> {
        &mut self.custom_optimizers
    }

    // Take field
    pub fn take_custom_optimizers(&mut self) -> ::protobuf::RepeatedField<RewriterConfig_CustomGraphOptimizer> {
        ::std::mem::replace(&mut self.custom_optimizers, ::protobuf::RepeatedField::new())
    }

    // .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300;


    pub fn get_inter_optimizer_verifier_config(&self) -> &super::verifier_config::VerifierConfig {
        self.inter_optimizer_verifier_config.as_ref().unwrap_or_else(|| <super::verifier_config::VerifierConfig as ::protobuf::Message>::default_instance())
    }
    pub fn clear_inter_optimizer_verifier_config(&mut self) {
        self.inter_optimizer_verifier_config.clear();
    }

    pub fn has_inter_optimizer_verifier_config(&self) -> bool {
        self.inter_optimizer_verifier_config.is_some()
    }

    // Param is passed by value, moved
    pub fn set_inter_optimizer_verifier_config(&mut self, v: super::verifier_config::VerifierConfig) {
        self.inter_optimizer_verifier_config = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_inter_optimizer_verifier_config(&mut self) -> &mut super::verifier_config::VerifierConfig {
        if self.inter_optimizer_verifier_config.is_none() {
            self.inter_optimizer_verifier_config.set_default();
        }
        self.inter_optimizer_verifier_config.as_mut().unwrap()
    }

    // Take field
    pub fn take_inter_optimizer_verifier_config(&mut self) -> super::verifier_config::VerifierConfig {
        self.inter_optimizer_verifier_config.take().unwrap_or_else(|| super::verifier_config::VerifierConfig::new())
    }

    // .tensorflow.VerifierConfig post_optimization_verifier_config = 301;


    pub fn get_post_optimization_verifier_config(&self) -> &super::verifier_config::VerifierConfig {
        self.post_optimization_verifier_config.as_ref().unwrap_or_else(|| <super::verifier_config::VerifierConfig as ::protobuf::Message>::default_instance())
    }
    pub fn clear_post_optimization_verifier_config(&mut self) {
        self.post_optimization_verifier_config.clear();
    }

    pub fn has_post_optimization_verifier_config(&self) -> bool {
        self.post_optimization_verifier_config.is_some()
    }

    // Param is passed by value, moved
    pub fn set_post_optimization_verifier_config(&mut self, v: super::verifier_config::VerifierConfig) {
        self.post_optimization_verifier_config = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_post_optimization_verifier_config(&mut self) -> &mut super::verifier_config::VerifierConfig {
        if self.post_optimization_verifier_config.is_none() {
            self.post_optimization_verifier_config.set_default();
        }
        self.post_optimization_verifier_config.as_mut().unwrap()
    }

    // Take field
    pub fn take_post_optimization_verifier_config(&mut self) -> super::verifier_config::VerifierConfig {
        self.post_optimization_verifier_config.take().unwrap_or_else(|| super::verifier_config::VerifierConfig::new())
    }
}

impl ::protobuf::Message for RewriterConfig {
    fn is_initialized(&self) -> bool {
        for v in &self.auto_parallel {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.scoped_allocator_opts {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.custom_optimizers {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.inter_optimizer_verifier_config {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.post_optimization_verifier_config {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                50 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.cpu_layout_conversion, 50, &mut self.unknown_fields)?
                },
                1 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.layout_optimizer, 1, &mut self.unknown_fields)?
                },
                3 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.constant_folding, 3, &mut self.unknown_fields)?
                },
                13 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.shape_optimization, 13, &mut self.unknown_fields)?
                },
                14 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.remapping, 14, &mut self.unknown_fields)?
                },
                24 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.common_subgraph_elimination, 24, &mut self.unknown_fields)?
                },
                7 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.arithmetic_optimization, 7, &mut self.unknown_fields)?
                },
                8 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.dependency_optimization, 8, &mut self.unknown_fields)?
                },
                9 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.loop_optimization, 9, &mut self.unknown_fields)?
                },
                10 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.function_optimization, 10, &mut self.unknown_fields)?
                },
                11 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.debug_stripper, 11, &mut self.unknown_fields)?
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.disable_model_pruning = tmp;
                },
                15 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.scoped_allocator_optimization, 15, &mut self.unknown_fields)?
                },
                18 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.pin_to_host_optimization, 18, &mut self.unknown_fields)?
                },
                22 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.implementation_selector, 22, &mut self.unknown_fields)?
                },
                23 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.auto_mixed_precision, 23, &mut self.unknown_fields)?
                },
                25 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.auto_mixed_precision_mkl, 25, &mut self.unknown_fields)?
                },
                31 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.auto_mixed_precision_onednn_bfloat16, 31, &mut self.unknown_fields)?
                },
                29 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.auto_mixed_precision_cpu, 29, &mut self.unknown_fields)?
                },
                19 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.disable_meta_optimizer = tmp;
                },
                28 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.use_plugin_optimizers, 28, &mut self.unknown_fields)?
                },
                30 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.experimental_conditional_code_motion, 30, &mut self.unknown_fields)?
                },
                12 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.meta_optimizer_iterations, 12, &mut self.unknown_fields)?
                },
                17 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int32()?;
                    self.min_graph_nodes = tmp;
                },
                26 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.experimental_disable_compressed_tensor_optimization = tmp;
                },
                27 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.experimental_disable_folding_quantization_emulation = tmp;
                },
                4 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.memory_optimization, 4, &mut self.unknown_fields)?
                },
                6 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.memory_optimizer_target_node_name_scope)?;
                },
                20 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int64()?;
                    self.meta_optimizer_timeout_ms = tmp;
                },
                5 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.auto_parallel)?;
                },
                21 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.fail_on_optimizer_errors = tmp;
                },
                16 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.scoped_allocator_opts)?;
                },
                100 => {
                    ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.optimizers)?;
                },
                200 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.custom_optimizers)?;
                },
                300 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.inter_optimizer_verifier_config)?;
                },
                301 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.post_optimization_verifier_config)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if self.cpu_layout_conversion != RewriterConfig_CpuLayout::NO_CONVERSION_ON_CPU {
            my_size += ::protobuf::rt::enum_size(50, self.cpu_layout_conversion);
        }
        if self.layout_optimizer != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(1, self.layout_optimizer);
        }
        if self.constant_folding != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(3, self.constant_folding);
        }
        if self.shape_optimization != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(13, self.shape_optimization);
        }
        if self.remapping != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(14, self.remapping);
        }
        if self.common_subgraph_elimination != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(24, self.common_subgraph_elimination);
        }
        if self.arithmetic_optimization != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(7, self.arithmetic_optimization);
        }
        if self.dependency_optimization != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(8, self.dependency_optimization);
        }
        if self.loop_optimization != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(9, self.loop_optimization);
        }
        if self.function_optimization != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(10, self.function_optimization);
        }
        if self.debug_stripper != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(11, self.debug_stripper);
        }
        if self.disable_model_pruning != false {
            my_size += 2;
        }
        if self.scoped_allocator_optimization != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(15, self.scoped_allocator_optimization);
        }
        if self.pin_to_host_optimization != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(18, self.pin_to_host_optimization);
        }
        if self.implementation_selector != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(22, self.implementation_selector);
        }
        if self.auto_mixed_precision != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(23, self.auto_mixed_precision);
        }
        if self.auto_mixed_precision_mkl != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(25, self.auto_mixed_precision_mkl);
        }
        if self.auto_mixed_precision_onednn_bfloat16 != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(31, self.auto_mixed_precision_onednn_bfloat16);
        }
        if self.auto_mixed_precision_cpu != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(29, self.auto_mixed_precision_cpu);
        }
        if self.disable_meta_optimizer != false {
            my_size += 3;
        }
        if self.use_plugin_optimizers != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(28, self.use_plugin_optimizers);
        }
        if self.experimental_conditional_code_motion != RewriterConfig_Toggle::DEFAULT {
            my_size += ::protobuf::rt::enum_size(30, self.experimental_conditional_code_motion);
        }
        if self.meta_optimizer_iterations != RewriterConfig_NumIterationsType::DEFAULT_NUM_ITERS {
            my_size += ::protobuf::rt::enum_size(12, self.meta_optimizer_iterations);
        }
        if self.min_graph_nodes != 0 {
            my_size += ::protobuf::rt::value_size(17, self.min_graph_nodes, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.experimental_disable_compressed_tensor_optimization != false {
            my_size += 3;
        }
        if self.experimental_disable_folding_quantization_emulation != false {
            my_size += 3;
        }
        if self.memory_optimization != RewriterConfig_MemOptType::DEFAULT_MEM_OPT {
            my_size += ::protobuf::rt::enum_size(4, self.memory_optimization);
        }
        if !self.memory_optimizer_target_node_name_scope.is_empty() {
            my_size += ::protobuf::rt::string_size(6, &self.memory_optimizer_target_node_name_scope);
        }
        if self.meta_optimizer_timeout_ms != 0 {
            my_size += ::protobuf::rt::value_size(20, self.meta_optimizer_timeout_ms, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(ref v) = self.auto_parallel.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if self.fail_on_optimizer_errors != false {
            my_size += 3;
        }
        if let Some(ref v) = self.scoped_allocator_opts.as_ref() {
            let len = v.compute_size();
            my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        for value in &self.optimizers {
            my_size += ::protobuf::rt::string_size(100, &value);
        };
        for value in &self.custom_optimizers {
            let len = value.compute_size();
            my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        if let Some(ref v) = self.inter_optimizer_verifier_config.as_ref() {
            let len = v.compute_size();
            my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if let Some(ref v) = self.post_optimization_verifier_config.as_ref() {
            let len = v.compute_size();
            my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if self.cpu_layout_conversion != RewriterConfig_CpuLayout::NO_CONVERSION_ON_CPU {
            os.write_enum(50, ::protobuf::ProtobufEnum::value(&self.cpu_layout_conversion))?;
        }
        if self.layout_optimizer != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.layout_optimizer))?;
        }
        if self.constant_folding != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.constant_folding))?;
        }
        if self.shape_optimization != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(13, ::protobuf::ProtobufEnum::value(&self.shape_optimization))?;
        }
        if self.remapping != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(14, ::protobuf::ProtobufEnum::value(&self.remapping))?;
        }
        if self.common_subgraph_elimination != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(24, ::protobuf::ProtobufEnum::value(&self.common_subgraph_elimination))?;
        }
        if self.arithmetic_optimization != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(7, ::protobuf::ProtobufEnum::value(&self.arithmetic_optimization))?;
        }
        if self.dependency_optimization != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(8, ::protobuf::ProtobufEnum::value(&self.dependency_optimization))?;
        }
        if self.loop_optimization != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(9, ::protobuf::ProtobufEnum::value(&self.loop_optimization))?;
        }
        if self.function_optimization != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(10, ::protobuf::ProtobufEnum::value(&self.function_optimization))?;
        }
        if self.debug_stripper != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(11, ::protobuf::ProtobufEnum::value(&self.debug_stripper))?;
        }
        if self.disable_model_pruning != false {
            os.write_bool(2, self.disable_model_pruning)?;
        }
        if self.scoped_allocator_optimization != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(15, ::protobuf::ProtobufEnum::value(&self.scoped_allocator_optimization))?;
        }
        if self.pin_to_host_optimization != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(18, ::protobuf::ProtobufEnum::value(&self.pin_to_host_optimization))?;
        }
        if self.implementation_selector != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(22, ::protobuf::ProtobufEnum::value(&self.implementation_selector))?;
        }
        if self.auto_mixed_precision != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(23, ::protobuf::ProtobufEnum::value(&self.auto_mixed_precision))?;
        }
        if self.auto_mixed_precision_mkl != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(25, ::protobuf::ProtobufEnum::value(&self.auto_mixed_precision_mkl))?;
        }
        if self.auto_mixed_precision_onednn_bfloat16 != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(31, ::protobuf::ProtobufEnum::value(&self.auto_mixed_precision_onednn_bfloat16))?;
        }
        if self.auto_mixed_precision_cpu != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(29, ::protobuf::ProtobufEnum::value(&self.auto_mixed_precision_cpu))?;
        }
        if self.disable_meta_optimizer != false {
            os.write_bool(19, self.disable_meta_optimizer)?;
        }
        if self.use_plugin_optimizers != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(28, ::protobuf::ProtobufEnum::value(&self.use_plugin_optimizers))?;
        }
        if self.experimental_conditional_code_motion != RewriterConfig_Toggle::DEFAULT {
            os.write_enum(30, ::protobuf::ProtobufEnum::value(&self.experimental_conditional_code_motion))?;
        }
        if self.meta_optimizer_iterations != RewriterConfig_NumIterationsType::DEFAULT_NUM_ITERS {
            os.write_enum(12, ::protobuf::ProtobufEnum::value(&self.meta_optimizer_iterations))?;
        }
        if self.min_graph_nodes != 0 {
            os.write_int32(17, self.min_graph_nodes)?;
        }
        if self.experimental_disable_compressed_tensor_optimization != false {
            os.write_bool(26, self.experimental_disable_compressed_tensor_optimization)?;
        }
        if self.experimental_disable_folding_quantization_emulation != false {
            os.write_bool(27, self.experimental_disable_folding_quantization_emulation)?;
        }
        if self.memory_optimization != RewriterConfig_MemOptType::DEFAULT_MEM_OPT {
            os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.memory_optimization))?;
        }
        if !self.memory_optimizer_target_node_name_scope.is_empty() {
            os.write_string(6, &self.memory_optimizer_target_node_name_scope)?;
        }
        if self.meta_optimizer_timeout_ms != 0 {
            os.write_int64(20, self.meta_optimizer_timeout_ms)?;
        }
        if let Some(ref v) = self.auto_parallel.as_ref() {
            os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if self.fail_on_optimizer_errors != false {
            os.write_bool(21, self.fail_on_optimizer_errors)?;
        }
        if let Some(ref v) = self.scoped_allocator_opts.as_ref() {
            os.write_tag(16, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        for v in &self.optimizers {
            os.write_string(100, &v)?;
        };
        for v in &self.custom_optimizers {
            os.write_tag(200, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        if let Some(ref v) = self.inter_optimizer_verifier_config.as_ref() {
            os.write_tag(300, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if let Some(ref v) = self.post_optimization_verifier_config.as_ref() {
            os.write_tag(301, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> RewriterConfig {
        RewriterConfig::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_CpuLayout>>(
                "cpu_layout_conversion",
                |m: &RewriterConfig| { &m.cpu_layout_conversion },
                |m: &mut RewriterConfig| { &mut m.cpu_layout_conversion },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "layout_optimizer",
                |m: &RewriterConfig| { &m.layout_optimizer },
                |m: &mut RewriterConfig| { &mut m.layout_optimizer },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "constant_folding",
                |m: &RewriterConfig| { &m.constant_folding },
                |m: &mut RewriterConfig| { &mut m.constant_folding },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "shape_optimization",
                |m: &RewriterConfig| { &m.shape_optimization },
                |m: &mut RewriterConfig| { &mut m.shape_optimization },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "remapping",
                |m: &RewriterConfig| { &m.remapping },
                |m: &mut RewriterConfig| { &mut m.remapping },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "common_subgraph_elimination",
                |m: &RewriterConfig| { &m.common_subgraph_elimination },
                |m: &mut RewriterConfig| { &mut m.common_subgraph_elimination },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "arithmetic_optimization",
                |m: &RewriterConfig| { &m.arithmetic_optimization },
                |m: &mut RewriterConfig| { &mut m.arithmetic_optimization },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "dependency_optimization",
                |m: &RewriterConfig| { &m.dependency_optimization },
                |m: &mut RewriterConfig| { &mut m.dependency_optimization },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "loop_optimization",
                |m: &RewriterConfig| { &m.loop_optimization },
                |m: &mut RewriterConfig| { &mut m.loop_optimization },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "function_optimization",
                |m: &RewriterConfig| { &m.function_optimization },
                |m: &mut RewriterConfig| { &mut m.function_optimization },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "debug_stripper",
                |m: &RewriterConfig| { &m.debug_stripper },
                |m: &mut RewriterConfig| { &mut m.debug_stripper },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "disable_model_pruning",
                |m: &RewriterConfig| { &m.disable_model_pruning },
                |m: &mut RewriterConfig| { &mut m.disable_model_pruning },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "scoped_allocator_optimization",
                |m: &RewriterConfig| { &m.scoped_allocator_optimization },
                |m: &mut RewriterConfig| { &mut m.scoped_allocator_optimization },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "pin_to_host_optimization",
                |m: &RewriterConfig| { &m.pin_to_host_optimization },
                |m: &mut RewriterConfig| { &mut m.pin_to_host_optimization },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "implementation_selector",
                |m: &RewriterConfig| { &m.implementation_selector },
                |m: &mut RewriterConfig| { &mut m.implementation_selector },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "auto_mixed_precision",
                |m: &RewriterConfig| { &m.auto_mixed_precision },
                |m: &mut RewriterConfig| { &mut m.auto_mixed_precision },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "auto_mixed_precision_mkl",
                |m: &RewriterConfig| { &m.auto_mixed_precision_mkl },
                |m: &mut RewriterConfig| { &mut m.auto_mixed_precision_mkl },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "auto_mixed_precision_onednn_bfloat16",
                |m: &RewriterConfig| { &m.auto_mixed_precision_onednn_bfloat16 },
                |m: &mut RewriterConfig| { &mut m.auto_mixed_precision_onednn_bfloat16 },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "auto_mixed_precision_cpu",
                |m: &RewriterConfig| { &m.auto_mixed_precision_cpu },
                |m: &mut RewriterConfig| { &mut m.auto_mixed_precision_cpu },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "disable_meta_optimizer",
                |m: &RewriterConfig| { &m.disable_meta_optimizer },
                |m: &mut RewriterConfig| { &mut m.disable_meta_optimizer },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "use_plugin_optimizers",
                |m: &RewriterConfig| { &m.use_plugin_optimizers },
                |m: &mut RewriterConfig| { &mut m.use_plugin_optimizers },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_Toggle>>(
                "experimental_conditional_code_motion",
                |m: &RewriterConfig| { &m.experimental_conditional_code_motion },
                |m: &mut RewriterConfig| { &mut m.experimental_conditional_code_motion },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_NumIterationsType>>(
                "meta_optimizer_iterations",
                |m: &RewriterConfig| { &m.meta_optimizer_iterations },
                |m: &mut RewriterConfig| { &mut m.meta_optimizer_iterations },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
                "min_graph_nodes",
                |m: &RewriterConfig| { &m.min_graph_nodes },
                |m: &mut RewriterConfig| { &mut m.min_graph_nodes },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "experimental_disable_compressed_tensor_optimization",
                |m: &RewriterConfig| { &m.experimental_disable_compressed_tensor_optimization },
                |m: &mut RewriterConfig| { &mut m.experimental_disable_compressed_tensor_optimization },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "experimental_disable_folding_quantization_emulation",
                |m: &RewriterConfig| { &m.experimental_disable_folding_quantization_emulation },
                |m: &mut RewriterConfig| { &mut m.experimental_disable_folding_quantization_emulation },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RewriterConfig_MemOptType>>(
                "memory_optimization",
                |m: &RewriterConfig| { &m.memory_optimization },
                |m: &mut RewriterConfig| { &mut m.memory_optimization },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "memory_optimizer_target_node_name_scope",
                |m: &RewriterConfig| { &m.memory_optimizer_target_node_name_scope },
                |m: &mut RewriterConfig| { &mut m.memory_optimizer_target_node_name_scope },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
                "meta_optimizer_timeout_ms",
                |m: &RewriterConfig| { &m.meta_optimizer_timeout_ms },
                |m: &mut RewriterConfig| { &mut m.meta_optimizer_timeout_ms },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<AutoParallelOptions>>(
                "auto_parallel",
                |m: &RewriterConfig| { &m.auto_parallel },
                |m: &mut RewriterConfig| { &mut m.auto_parallel },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "fail_on_optimizer_errors",
                |m: &RewriterConfig| { &m.fail_on_optimizer_errors },
                |m: &mut RewriterConfig| { &mut m.fail_on_optimizer_errors },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ScopedAllocatorOptions>>(
                "scoped_allocator_opts",
                |m: &RewriterConfig| { &m.scoped_allocator_opts },
                |m: &mut RewriterConfig| { &mut m.scoped_allocator_opts },
            ));
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "optimizers",
                |m: &RewriterConfig| { &m.optimizers },
                |m: &mut RewriterConfig| { &mut m.optimizers },
            ));
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RewriterConfig_CustomGraphOptimizer>>(
                "custom_optimizers",
                |m: &RewriterConfig| { &m.custom_optimizers },
                |m: &mut RewriterConfig| { &mut m.custom_optimizers },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::verifier_config::VerifierConfig>>(
                "inter_optimizer_verifier_config",
                |m: &RewriterConfig| { &m.inter_optimizer_verifier_config },
                |m: &mut RewriterConfig| { &mut m.inter_optimizer_verifier_config },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::verifier_config::VerifierConfig>>(
                "post_optimization_verifier_config",
                |m: &RewriterConfig| { &m.post_optimization_verifier_config },
                |m: &mut RewriterConfig| { &mut m.post_optimization_verifier_config },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<RewriterConfig>(
                "RewriterConfig",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static RewriterConfig {
        static instance: ::protobuf::rt::LazyV2<RewriterConfig> = ::protobuf::rt::LazyV2::INIT;
        instance.get(RewriterConfig::new)
    }
}

impl ::protobuf::Clear for RewriterConfig {
    fn clear(&mut self) {
        self.cpu_layout_conversion = RewriterConfig_CpuLayout::NO_CONVERSION_ON_CPU;
        self.layout_optimizer = RewriterConfig_Toggle::DEFAULT;
        self.constant_folding = RewriterConfig_Toggle::DEFAULT;
        self.shape_optimization = RewriterConfig_Toggle::DEFAULT;
        self.remapping = RewriterConfig_Toggle::DEFAULT;
        self.common_subgraph_elimination = RewriterConfig_Toggle::DEFAULT;
        self.arithmetic_optimization = RewriterConfig_Toggle::DEFAULT;
        self.dependency_optimization = RewriterConfig_Toggle::DEFAULT;
        self.loop_optimization = RewriterConfig_Toggle::DEFAULT;
        self.function_optimization = RewriterConfig_Toggle::DEFAULT;
        self.debug_stripper = RewriterConfig_Toggle::DEFAULT;
        self.disable_model_pruning = false;
        self.scoped_allocator_optimization = RewriterConfig_Toggle::DEFAULT;
        self.pin_to_host_optimization = RewriterConfig_Toggle::DEFAULT;
        self.implementation_selector = RewriterConfig_Toggle::DEFAULT;
        self.auto_mixed_precision = RewriterConfig_Toggle::DEFAULT;
        self.auto_mixed_precision_mkl = RewriterConfig_Toggle::DEFAULT;
        self.auto_mixed_precision_onednn_bfloat16 = RewriterConfig_Toggle::DEFAULT;
        self.auto_mixed_precision_cpu = RewriterConfig_Toggle::DEFAULT;
        self.disable_meta_optimizer = false;
        self.use_plugin_optimizers = RewriterConfig_Toggle::DEFAULT;
        self.experimental_conditional_code_motion = RewriterConfig_Toggle::DEFAULT;
        self.meta_optimizer_iterations = RewriterConfig_NumIterationsType::DEFAULT_NUM_ITERS;
        self.min_graph_nodes = 0;
        self.experimental_disable_compressed_tensor_optimization = false;
        self.experimental_disable_folding_quantization_emulation = false;
        self.memory_optimization = RewriterConfig_MemOptType::DEFAULT_MEM_OPT;
        self.memory_optimizer_target_node_name_scope.clear();
        self.meta_optimizer_timeout_ms = 0;
        self.auto_parallel.clear();
        self.fail_on_optimizer_errors = false;
        self.scoped_allocator_opts.clear();
        self.optimizers.clear();
        self.custom_optimizers.clear();
        self.inter_optimizer_verifier_config.clear();
        self.post_optimization_verifier_config.clear();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for RewriterConfig {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for RewriterConfig {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct RewriterConfig_CustomGraphOptimizer {
    // message fields
    pub name: ::std::string::String,
    pub parameter_map: ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a RewriterConfig_CustomGraphOptimizer {
    fn default() -> &'a RewriterConfig_CustomGraphOptimizer {
        <RewriterConfig_CustomGraphOptimizer as ::protobuf::Message>::default_instance()
    }
}

impl RewriterConfig_CustomGraphOptimizer {
    pub fn new() -> RewriterConfig_CustomGraphOptimizer {
        ::std::default::Default::default()
    }

    // string name = 1;


    pub fn get_name(&self) -> &str {
        &self.name
    }
    pub fn clear_name(&mut self) {
        self.name.clear();
    }

    // Param is passed by value, moved
    pub fn set_name(&mut self, v: ::std::string::String) {
        self.name = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_name(&mut self) -> &mut ::std::string::String {
        &mut self.name
    }

    // Take field
    pub fn take_name(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.name, ::std::string::String::new())
    }

    // repeated .tensorflow.RewriterConfig.CustomGraphOptimizer.ParameterMapEntry parameter_map = 2;


    pub fn get_parameter_map(&self) -> &::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
        &self.parameter_map
    }
    pub fn clear_parameter_map(&mut self) {
        self.parameter_map.clear();
    }

    // Param is passed by value, moved
    pub fn set_parameter_map(&mut self, v: ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue>) {
        self.parameter_map = v;
    }

    // Mutable pointer to the field.
    pub fn mut_parameter_map(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
        &mut self.parameter_map
    }

    // Take field
    pub fn take_parameter_map(&mut self) -> ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
        ::std::mem::replace(&mut self.parameter_map, ::std::collections::HashMap::new())
    }
}

impl ::protobuf::Message for RewriterConfig_CustomGraphOptimizer {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
                },
                2 => {
                    ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(wire_type, is, &mut self.parameter_map)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.name.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.name);
        }
        my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(2, &self.parameter_map);
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if !self.name.is_empty() {
            os.write_string(1, &self.name)?;
        }
        ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(2, &self.parameter_map, os)?;
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> RewriterConfig_CustomGraphOptimizer {
        RewriterConfig_CustomGraphOptimizer::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "name",
                |m: &RewriterConfig_CustomGraphOptimizer| { &m.name },
                |m: &mut RewriterConfig_CustomGraphOptimizer| { &mut m.name },
            ));
            fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(
                "parameter_map",
                |m: &RewriterConfig_CustomGraphOptimizer| { &m.parameter_map },
                |m: &mut RewriterConfig_CustomGraphOptimizer| { &mut m.parameter_map },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<RewriterConfig_CustomGraphOptimizer>(
                "RewriterConfig.CustomGraphOptimizer",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static RewriterConfig_CustomGraphOptimizer {
        static instance: ::protobuf::rt::LazyV2<RewriterConfig_CustomGraphOptimizer> = ::protobuf::rt::LazyV2::INIT;
        instance.get(RewriterConfig_CustomGraphOptimizer::new)
    }
}

impl ::protobuf::Clear for RewriterConfig_CustomGraphOptimizer {
    fn clear(&mut self) {
        self.name.clear();
        self.parameter_map.clear();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for RewriterConfig_CustomGraphOptimizer {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for RewriterConfig_CustomGraphOptimizer {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum RewriterConfig_Toggle {
    DEFAULT = 0,
    ON = 1,
    OFF = 2,
    AGGRESSIVE = 3,
    EXPERIMENTAL_MLIR = 4,
    EXPERIMENTAL_BOTH = 5,
}

impl ::protobuf::ProtobufEnum for RewriterConfig_Toggle {
    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<RewriterConfig_Toggle> {
        match value {
            0 => ::std::option::Option::Some(RewriterConfig_Toggle::DEFAULT),
            1 => ::std::option::Option::Some(RewriterConfig_Toggle::ON),
            2 => ::std::option::Option::Some(RewriterConfig_Toggle::OFF),
            3 => ::std::option::Option::Some(RewriterConfig_Toggle::AGGRESSIVE),
            4 => ::std::option::Option::Some(RewriterConfig_Toggle::EXPERIMENTAL_MLIR),
            5 => ::std::option::Option::Some(RewriterConfig_Toggle::EXPERIMENTAL_BOTH),
            _ => ::std::option::Option::None
        }
    }

    fn values() -> &'static [Self] {
        static values: &'static [RewriterConfig_Toggle] = &[
            RewriterConfig_Toggle::DEFAULT,
            RewriterConfig_Toggle::ON,
            RewriterConfig_Toggle::OFF,
            RewriterConfig_Toggle::AGGRESSIVE,
            RewriterConfig_Toggle::EXPERIMENTAL_MLIR,
            RewriterConfig_Toggle::EXPERIMENTAL_BOTH,
        ];
        values
    }

    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            ::protobuf::reflect::EnumDescriptor::new_pb_name::<RewriterConfig_Toggle>("RewriterConfig.Toggle", file_descriptor_proto())
        })
    }
}

impl ::std::marker::Copy for RewriterConfig_Toggle {
}

impl ::std::default::Default for RewriterConfig_Toggle {
    fn default() -> Self {
        RewriterConfig_Toggle::DEFAULT
    }
}

impl ::protobuf::reflect::ProtobufValue for RewriterConfig_Toggle {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
    }
}

#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum RewriterConfig_CpuLayout {
    NO_CONVERSION_ON_CPU = 0,
    NCHW_TO_NHWC = 1,
    NHWC_TO_NCHW = 2,
}

impl ::protobuf::ProtobufEnum for RewriterConfig_CpuLayout {
    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<RewriterConfig_CpuLayout> {
        match value {
            0 => ::std::option::Option::Some(RewriterConfig_CpuLayout::NO_CONVERSION_ON_CPU),
            1 => ::std::option::Option::Some(RewriterConfig_CpuLayout::NCHW_TO_NHWC),
            2 => ::std::option::Option::Some(RewriterConfig_CpuLayout::NHWC_TO_NCHW),
            _ => ::std::option::Option::None
        }
    }

    fn values() -> &'static [Self] {
        static values: &'static [RewriterConfig_CpuLayout] = &[
            RewriterConfig_CpuLayout::NO_CONVERSION_ON_CPU,
            RewriterConfig_CpuLayout::NCHW_TO_NHWC,
            RewriterConfig_CpuLayout::NHWC_TO_NCHW,
        ];
        values
    }

    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            ::protobuf::reflect::EnumDescriptor::new_pb_name::<RewriterConfig_CpuLayout>("RewriterConfig.CpuLayout", file_descriptor_proto())
        })
    }
}

impl ::std::marker::Copy for RewriterConfig_CpuLayout {
}

impl ::std::default::Default for RewriterConfig_CpuLayout {
    fn default() -> Self {
        RewriterConfig_CpuLayout::NO_CONVERSION_ON_CPU
    }
}

impl ::protobuf::reflect::ProtobufValue for RewriterConfig_CpuLayout {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
    }
}

#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum RewriterConfig_NumIterationsType {
    DEFAULT_NUM_ITERS = 0,
    ONE = 1,
    TWO = 2,
}

impl ::protobuf::ProtobufEnum for RewriterConfig_NumIterationsType {
    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<RewriterConfig_NumIterationsType> {
        match value {
            0 => ::std::option::Option::Some(RewriterConfig_NumIterationsType::DEFAULT_NUM_ITERS),
            1 => ::std::option::Option::Some(RewriterConfig_NumIterationsType::ONE),
            2 => ::std::option::Option::Some(RewriterConfig_NumIterationsType::TWO),
            _ => ::std::option::Option::None
        }
    }

    fn values() -> &'static [Self] {
        static values: &'static [RewriterConfig_NumIterationsType] = &[
            RewriterConfig_NumIterationsType::DEFAULT_NUM_ITERS,
            RewriterConfig_NumIterationsType::ONE,
            RewriterConfig_NumIterationsType::TWO,
        ];
        values
    }

    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            ::protobuf::reflect::EnumDescriptor::new_pb_name::<RewriterConfig_NumIterationsType>("RewriterConfig.NumIterationsType", file_descriptor_proto())
        })
    }
}

impl ::std::marker::Copy for RewriterConfig_NumIterationsType {
}

impl ::std::default::Default for RewriterConfig_NumIterationsType {
    fn default() -> Self {
        RewriterConfig_NumIterationsType::DEFAULT_NUM_ITERS
    }
}

impl ::protobuf::reflect::ProtobufValue for RewriterConfig_NumIterationsType {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
    }
}

#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum RewriterConfig_MemOptType {
    DEFAULT_MEM_OPT = 0,
    NO_MEM_OPT = 1,
    MANUAL = 2,
    SWAPPING_HEURISTICS = 4,
    RECOMPUTATION_HEURISTICS = 5,
    SCHEDULING_HEURISTICS = 6,
    HEURISTICS = 3,
}

impl ::protobuf::ProtobufEnum for RewriterConfig_MemOptType {
    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<RewriterConfig_MemOptType> {
        match value {
            0 => ::std::option::Option::Some(RewriterConfig_MemOptType::DEFAULT_MEM_OPT),
            1 => ::std::option::Option::Some(RewriterConfig_MemOptType::NO_MEM_OPT),
            2 => ::std::option::Option::Some(RewriterConfig_MemOptType::MANUAL),
            4 => ::std::option::Option::Some(RewriterConfig_MemOptType::SWAPPING_HEURISTICS),
            5 => ::std::option::Option::Some(RewriterConfig_MemOptType::RECOMPUTATION_HEURISTICS),
            6 => ::std::option::Option::Some(RewriterConfig_MemOptType::SCHEDULING_HEURISTICS),
            3 => ::std::option::Option::Some(RewriterConfig_MemOptType::HEURISTICS),
            _ => ::std::option::Option::None
        }
    }

    fn values() -> &'static [Self] {
        static values: &'static [RewriterConfig_MemOptType] = &[
            RewriterConfig_MemOptType::DEFAULT_MEM_OPT,
            RewriterConfig_MemOptType::NO_MEM_OPT,
            RewriterConfig_MemOptType::MANUAL,
            RewriterConfig_MemOptType::SWAPPING_HEURISTICS,
            RewriterConfig_MemOptType::RECOMPUTATION_HEURISTICS,
            RewriterConfig_MemOptType::SCHEDULING_HEURISTICS,
            RewriterConfig_MemOptType::HEURISTICS,
        ];
        values
    }

    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            ::protobuf::reflect::EnumDescriptor::new_pb_name::<RewriterConfig_MemOptType>("RewriterConfig.MemOptType", file_descriptor_proto())
        })
    }
}

impl ::std::marker::Copy for RewriterConfig_MemOptType {
}

impl ::std::default::Default for RewriterConfig_MemOptType {
    fn default() -> Self {
        RewriterConfig_MemOptType::DEFAULT_MEM_OPT
    }
}

impl ::protobuf::reflect::ProtobufValue for RewriterConfig_MemOptType {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n.tensorflow/core/protobuf/rewriter_config.proto\x12\ntensorflow\x1a*te\
    nsorflow/core/framework/attr_value.proto\x1a.tensorflow/core/protobuf/ve\
    rifier_config.proto\"P\n\x13AutoParallelOptions\x12\x16\n\x06enable\x18\
    \x01\x20\x01(\x08R\x06enable\x12!\n\x0cnum_replicas\x18\x02\x20\x01(\x05\
    R\x0bnumReplicas\"5\n\x16ScopedAllocatorOptions\x12\x1b\n\tenable_op\x18\
    \x01\x20\x03(\tR\x08enableOp\"\xf0\x1c\n\x0eRewriterConfig\x12X\n\x15cpu\
    _layout_conversion\x182\x20\x01(\x0e2$.tensorflow.RewriterConfig.CpuLayo\
    utR\x13cpuLayoutConversion\x12L\n\x10layout_optimizer\x18\x01\x20\x01(\
    \x0e2!.tensorflow.RewriterConfig.ToggleR\x0flayoutOptimizer\x12L\n\x10co\
    nstant_folding\x18\x03\x20\x01(\x0e2!.tensorflow.RewriterConfig.ToggleR\
    \x0fconstantFolding\x12P\n\x12shape_optimization\x18\r\x20\x01(\x0e2!.te\
    nsorflow.RewriterConfig.ToggleR\x11shapeOptimization\x12?\n\tremapping\
    \x18\x0e\x20\x01(\x0e2!.tensorflow.RewriterConfig.ToggleR\tremapping\x12\
    a\n\x1bcommon_subgraph_elimination\x18\x18\x20\x01(\x0e2!.tensorflow.Rew\
    riterConfig.ToggleR\x19commonSubgraphElimination\x12Z\n\x17arithmetic_op\
    timization\x18\x07\x20\x01(\x0e2!.tensorflow.RewriterConfig.ToggleR\x16a\
    rithmeticOptimization\x12Z\n\x17dependency_optimization\x18\x08\x20\x01(\
    \x0e2!.tensorflow.RewriterConfig.ToggleR\x16dependencyOptimization\x12N\
    \n\x11loop_optimization\x18\t\x20\x01(\x0e2!.tensorflow.RewriterConfig.T\
    oggleR\x10loopOptimization\x12V\n\x15function_optimization\x18\n\x20\x01\
    (\x0e2!.tensorflow.RewriterConfig.ToggleR\x14functionOptimization\x12H\n\
    \x0edebug_stripper\x18\x0b\x20\x01(\x0e2!.tensorflow.RewriterConfig.Togg\
    leR\rdebugStripper\x122\n\x15disable_model_pruning\x18\x02\x20\x01(\x08R\
    \x13disableModelPruning\x12e\n\x1dscoped_allocator_optimization\x18\x0f\
    \x20\x01(\x0e2!.tensorflow.RewriterConfig.ToggleR\x1bscopedAllocatorOpti\
    mization\x12Z\n\x18pin_to_host_optimization\x18\x12\x20\x01(\x0e2!.tenso\
    rflow.RewriterConfig.ToggleR\x15pinToHostOptimization\x12Z\n\x17implemen\
    tation_selector\x18\x16\x20\x01(\x0e2!.tensorflow.RewriterConfig.ToggleR\
    \x16implementationSelector\x12S\n\x14auto_mixed_precision\x18\x17\x20\
    \x01(\x0e2!.tensorflow.RewriterConfig.ToggleR\x12autoMixedPrecision\x12Z\
    \n\x18auto_mixed_precision_mkl\x18\x19\x20\x01(\x0e2!.tensorflow.Rewrite\
    rConfig.ToggleR\x15autoMixedPrecisionMkl\x12q\n$auto_mixed_precision_one\
    dnn_bfloat16\x18\x1f\x20\x01(\x0e2!.tensorflow.RewriterConfig.ToggleR\
    \x20autoMixedPrecisionOnednnBfloat16\x12Z\n\x18auto_mixed_precision_cpu\
    \x18\x1d\x20\x01(\x0e2!.tensorflow.RewriterConfig.ToggleR\x15autoMixedPr\
    ecisionCpu\x124\n\x16disable_meta_optimizer\x18\x13\x20\x01(\x08R\x14dis\
    ableMetaOptimizer\x12U\n\x15use_plugin_optimizers\x18\x1c\x20\x01(\x0e2!\
    .tensorflow.RewriterConfig.ToggleR\x13usePluginOptimizers\x12r\n$experim\
    ental_conditional_code_motion\x18\x1e\x20\x01(\x0e2!.tensorflow.Rewriter\
    Config.ToggleR!experimentalConditionalCodeMotion\x12h\n\x19meta_optimize\
    r_iterations\x18\x0c\x20\x01(\x0e2,.tensorflow.RewriterConfig.NumIterati\
    onsTypeR\x17metaOptimizerIterations\x12&\n\x0fmin_graph_nodes\x18\x11\
    \x20\x01(\x05R\rminGraphNodes\x12l\n3experimental_disable_compressed_ten\
    sor_optimization\x18\x1a\x20\x01(\x08R/experimentalDisableCompressedTens\
    orOptimization\x12l\n3experimental_disable_folding_quantization_emulatio\
    n\x18\x1b\x20\x01(\x08R/experimentalDisableFoldingQuantizationEmulation\
    \x12V\n\x13memory_optimization\x18\x04\x20\x01(\x0e2%.tensorflow.Rewrite\
    rConfig.MemOptTypeR\x12memoryOptimization\x12S\n'memory_optimizer_target\
    _node_name_scope\x18\x06\x20\x01(\tR\"memoryOptimizerTargetNodeNameScope\
    \x129\n\x19meta_optimizer_timeout_ms\x18\x14\x20\x01(\x03R\x16metaOptimi\
    zerTimeoutMs\x12D\n\rauto_parallel\x18\x05\x20\x01(\x0b2\x1f.tensorflow.\
    AutoParallelOptionsR\x0cautoParallel\x127\n\x18fail_on_optimizer_errors\
    \x18\x15\x20\x01(\x08R\x15failOnOptimizerErrors\x12V\n\x15scoped_allocat\
    or_opts\x18\x10\x20\x01(\x0b2\".tensorflow.ScopedAllocatorOptionsR\x13sc\
    opedAllocatorOpts\x12\x1e\n\noptimizers\x18d\x20\x03(\tR\noptimizers\x12\
    ]\n\x11custom_optimizers\x18\xc8\x01\x20\x03(\x0b2/.tensorflow.RewriterC\
    onfig.CustomGraphOptimizerR\x10customOptimizers\x12b\n\x1finter_optimize\
    r_verifier_config\x18\xac\x02\x20\x01(\x0b2\x1a.tensorflow.VerifierConfi\
    gR\x1cinterOptimizerVerifierConfig\x12f\n!post_optimization_verifier_con\
    fig\x18\xad\x02\x20\x01(\x0b2\x1a.tensorflow.VerifierConfigR\x1epostOpti\
    mizationVerifierConfig\x1a\xea\x01\n\x14CustomGraphOptimizer\x12\x12\n\
    \x04name\x18\x01\x20\x01(\tR\x04name\x12f\n\rparameter_map\x18\x02\x20\
    \x03(\x0b2A.tensorflow.RewriterConfig.CustomGraphOptimizer.ParameterMapE\
    ntryR\x0cparameterMap\x1aV\n\x11ParameterMapEntry\x12\x10\n\x03key\x18\
    \x01\x20\x01(\tR\x03key\x12+\n\x05value\x18\x02\x20\x01(\x0b2\x15.tensor\
    flow.AttrValueR\x05value:\x028\x01\"d\n\x06Toggle\x12\x0b\n\x07DEFAULT\
    \x10\0\x12\x06\n\x02ON\x10\x01\x12\x07\n\x03OFF\x10\x02\x12\x0e\n\nAGGRE\
    SSIVE\x10\x03\x12\x15\n\x11EXPERIMENTAL_MLIR\x10\x04\x12\x15\n\x11EXPERI\
    MENTAL_BOTH\x10\x05\"I\n\tCpuLayout\x12\x18\n\x14NO_CONVERSION_ON_CPU\
    \x10\0\x12\x10\n\x0cNCHW_TO_NHWC\x10\x01\x12\x10\n\x0cNHWC_TO_NCHW\x10\
    \x02\"<\n\x11NumIterationsType\x12\x15\n\x11DEFAULT_NUM_ITERS\x10\0\x12\
    \x07\n\x03ONE\x10\x01\x12\x07\n\x03TWO\x10\x02\"\x9f\x01\n\nMemOptType\
    \x12\x13\n\x0fDEFAULT_MEM_OPT\x10\0\x12\x0e\n\nNO_MEM_OPT\x10\x01\x12\n\
    \n\x06MANUAL\x10\x02\x12\x17\n\x13SWAPPING_HEURISTICS\x10\x04\x12\x1c\n\
    \x18RECOMPUTATION_HEURISTICS\x10\x05\x12\x19\n\x15SCHEDULING_HEURISTICS\
    \x10\x06\x12\x0e\n\nHEURISTICS\x10\x03B\x8c\x01\n\x18org.tensorflow.fram\
    eworkB\x14RewriterConfigProtosP\x01ZUgithub.com/tensorflow/tensorflow/te\
    nsorflow/go/core/protobuf/for_core_protos_go_proto\xf8\x01\x01b\x06proto\
    3\
";

static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;

fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
    ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}

pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    file_descriptor_proto_lazy.get(|| {
        parse_descriptor_proto()
    })
}