/
xla_data.pb.go
4857 lines (4334 loc) · 187 KB
/
xla_data.pb.go
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
// Copyright 2017 The TensorFlow Authors. All Rights Reserved.
//
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//==============================================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc (unknown)
// source: tensorflow/compiler/xla/xla_data.proto
package data
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Primitive types are the individual values that can be held in rectangular
// multidimensional arrays. A description of the rectangular multidimensional
// array dimensions / primitive type is given by Shape, below.
//
// LINT.IfChange
type PrimitiveType int32
const (
// Invalid primitive type to serve as default.
PrimitiveType_PRIMITIVE_TYPE_INVALID PrimitiveType = 0
// Predicates are two-state booleans.
PrimitiveType_PRED PrimitiveType = 1
// Signed integral values of fixed width.
PrimitiveType_S4 PrimitiveType = 21
PrimitiveType_S8 PrimitiveType = 2
PrimitiveType_S16 PrimitiveType = 3
PrimitiveType_S32 PrimitiveType = 4
PrimitiveType_S64 PrimitiveType = 5
// Unsigned integral values of fixed width.
PrimitiveType_U4 PrimitiveType = 22
PrimitiveType_U8 PrimitiveType = 6
PrimitiveType_U16 PrimitiveType = 7
PrimitiveType_U32 PrimitiveType = 8
PrimitiveType_U64 PrimitiveType = 9
// Floating-point values of fixed width.
//
// Note: if f16s are not natively supported on the device, they will be
// converted to f16 from f32 at arbirary points in the computation.
PrimitiveType_F16 PrimitiveType = 10
PrimitiveType_F32 PrimitiveType = 11
// Truncated 16 bit floating-point format. This is similar to IEEE's 16 bit
// floating-point format, but uses 1 bit for the sign, 8 bits for the exponent
// and 7 bits for the mantissa.
PrimitiveType_BF16 PrimitiveType = 16
PrimitiveType_F64 PrimitiveType = 12
// FP8 dtypes, as described in this paper: https://arxiv.org/abs/2209.05433
//
// F8E5M2 has 5 exponent bits and 2 mantissa bits, and is similar to the
// existing IEEE types.
//
// F8E4M3FN has 4 exponent bits and 3 mantissa bits. The "FN" means only
// Finite and NaN values are supported. Unlike IEEE types, infinities are not
// supported. NaN is represented when the exponent and mantissa bits are all
// 1s. All other values are finite.
//
// F8E4M3B11FNUZ has 4 exponent bits and 3 mantissa bits and a bias of 11. The
// "FNUZ" means only Finite and NaN values are supported; zero is unsigned.
// Unlike IEEE types, infinities are not supported. NaN is represented when
// the exponent and mantissa bits are all 0s with a sign bit of 1. All other
// values are finite.
//
// Support for these dtypes is under development. They do not yet work
// properly in most cases.
// TODO(b/259609697): Fully support FP8.
PrimitiveType_F8E5M2 PrimitiveType = 19
PrimitiveType_F8E4M3FN PrimitiveType = 20
PrimitiveType_F8E4M3B11FNUZ PrimitiveType = 23
// FP8 dtypes, as described in this paper: https://arxiv.org/abs/2206.02915
//
// F8E5M2FNUZ has 5 exponent bits and 2 mantissa bits.
// F8E4M3FNUZ has 4 exponent bits and 3 mantissa bits.
//
// The "FNUZ" means only Finite and NaN values are supported; zero is
// unsigned. Unlike IEEE types, infinities are not supported. NaN is
// represented when the exponent and mantissa bits are all 0s with a sign bit
// of 1. All other values are finite.
//
// These differences mean there's an additional exponent value available. To
// keep the same dynamic range as an IEEE-like FP8 type, the exponent is
// biased one more than would be expected given the number of exponent bits
// (8 for Float8E4M3FNUZ and 16 for Float8E5M2FNUZ).
PrimitiveType_F8E5M2FNUZ PrimitiveType = 24
PrimitiveType_F8E4M3FNUZ PrimitiveType = 25
// Complex values of fixed width.
PrimitiveType_C64 PrimitiveType = 15 // Paired F32 (real, imag), as in std::complex<float>.
PrimitiveType_C128 PrimitiveType = 18 // Paired F64 (real, imag), as in std::complex<double>.
// A tuple is a polymorphic sequence; e.g. a shape that holds different
// sub-shapes. They are used for things like returning multiple values from a
// computation; e.g. a computation that returns weights and biases may have a
// signature that results in a tuple like (f32[784x2000], f32[2000])
//
// If a shape proto has the tuple element type, it may not have any entries
// in the dimensions field.
PrimitiveType_TUPLE PrimitiveType = 13
// An opaque type used for passing context-specific data to a custom
// operation. Shapes of this primitive type will have empty dimensions and
// tuple_shapes fields.
//
// (OPAQUE would be a better name for this identifier, but that conflicts with
// a macro defined in windows.h.)
PrimitiveType_OPAQUE_TYPE PrimitiveType = 14
// A token type threaded between side-effecting operations. Shapes of this
// primitive type will have empty dimensions and tuple_shapes fields.
PrimitiveType_TOKEN PrimitiveType = 17
)
// Enum value maps for PrimitiveType.
var (
PrimitiveType_name = map[int32]string{
0: "PRIMITIVE_TYPE_INVALID",
1: "PRED",
21: "S4",
2: "S8",
3: "S16",
4: "S32",
5: "S64",
22: "U4",
6: "U8",
7: "U16",
8: "U32",
9: "U64",
10: "F16",
11: "F32",
16: "BF16",
12: "F64",
19: "F8E5M2",
20: "F8E4M3FN",
23: "F8E4M3B11FNUZ",
24: "F8E5M2FNUZ",
25: "F8E4M3FNUZ",
15: "C64",
18: "C128",
13: "TUPLE",
14: "OPAQUE_TYPE",
17: "TOKEN",
}
PrimitiveType_value = map[string]int32{
"PRIMITIVE_TYPE_INVALID": 0,
"PRED": 1,
"S4": 21,
"S8": 2,
"S16": 3,
"S32": 4,
"S64": 5,
"U4": 22,
"U8": 6,
"U16": 7,
"U32": 8,
"U64": 9,
"F16": 10,
"F32": 11,
"BF16": 16,
"F64": 12,
"F8E5M2": 19,
"F8E4M3FN": 20,
"F8E4M3B11FNUZ": 23,
"F8E5M2FNUZ": 24,
"F8E4M3FNUZ": 25,
"C64": 15,
"C128": 18,
"TUPLE": 13,
"OPAQUE_TYPE": 14,
"TOKEN": 17,
}
)
func (x PrimitiveType) Enum() *PrimitiveType {
p := new(PrimitiveType)
*p = x
return p
}
func (x PrimitiveType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PrimitiveType) Descriptor() protoreflect.EnumDescriptor {
return file_tensorflow_compiler_xla_xla_data_proto_enumTypes[0].Descriptor()
}
func (PrimitiveType) Type() protoreflect.EnumType {
return &file_tensorflow_compiler_xla_xla_data_proto_enumTypes[0]
}
func (x PrimitiveType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PrimitiveType.Descriptor instead.
func (PrimitiveType) EnumDescriptor() ([]byte, []int) {
return file_tensorflow_compiler_xla_xla_data_proto_rawDescGZIP(), []int{0}
}
// A DimLevelType indicates the encoding method for a dimension in an array.
// The semantics of this field are identical to those of the MLIR SparseTensor
// dialect.
// This should be kept in sync with the SparseTensor DimLevelType enum:
// https://github.com/llvm/llvm-project/blob/5674a3c88088e668b684326c2194a6282e8270ff/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td#L86
type DimLevelType int32
const (
// The corresponding dimension is Dense, every entry is stored.
DimLevelType_DIM_DENSE DimLevelType = 0
// The corresponding dimension is Compressed, only nonzeros are stored.
DimLevelType_DIM_COMPRESSED DimLevelType = 1
// The corresponding dimension contains a single coordinate, no sibling
// elements for each parent.
DimLevelType_DIM_SINGLETON DimLevelType = 2
// The corresponding dimension is Compressed, but with potential trailing
// zeros, thus an extra upper bound (high) is used to exclude those zeros.
// E.g., indices = [1, 2, 0, 0, 3, 4, 0, 0], position = [(0, 2), (4, 6)].
DimLevelType_DIM_COMPRESSED_WITH_HI DimLevelType = 3
)
// Enum value maps for DimLevelType.
var (
DimLevelType_name = map[int32]string{
0: "DIM_DENSE",
1: "DIM_COMPRESSED",
2: "DIM_SINGLETON",
3: "DIM_COMPRESSED_WITH_HI",
}
DimLevelType_value = map[string]int32{
"DIM_DENSE": 0,
"DIM_COMPRESSED": 1,
"DIM_SINGLETON": 2,
"DIM_COMPRESSED_WITH_HI": 3,
}
)
func (x DimLevelType) Enum() *DimLevelType {
p := new(DimLevelType)
*p = x
return p
}
func (x DimLevelType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (DimLevelType) Descriptor() protoreflect.EnumDescriptor {
return file_tensorflow_compiler_xla_xla_data_proto_enumTypes[1].Descriptor()
}
func (DimLevelType) Type() protoreflect.EnumType {
return &file_tensorflow_compiler_xla_xla_data_proto_enumTypes[1]
}
func (x DimLevelType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use DimLevelType.Descriptor instead.
func (DimLevelType) EnumDescriptor() ([]byte, []int) {
return file_tensorflow_compiler_xla_xla_data_proto_rawDescGZIP(), []int{1}
}
// The type optimization profiles in use for Op-level optimizations.
type ProfileType int32
const (
ProfileType_INVALID ProfileType = 0
ProfileType_WINDOW ProfileType = 1
ProfileType_FLAG ProfileType = 2
ProfileType_INTEGER ProfileType = 3
)
// Enum value maps for ProfileType.
var (
ProfileType_name = map[int32]string{
0: "INVALID",
1: "WINDOW",
2: "FLAG",
3: "INTEGER",
}
ProfileType_value = map[string]int32{
"INVALID": 0,
"WINDOW": 1,
"FLAG": 2,
"INTEGER": 3,
}
)
func (x ProfileType) Enum() *ProfileType {
p := new(ProfileType)
*p = x
return p
}
func (x ProfileType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ProfileType) Descriptor() protoreflect.EnumDescriptor {
return file_tensorflow_compiler_xla_xla_data_proto_enumTypes[2].Descriptor()
}
func (ProfileType) Type() protoreflect.EnumType {
return &file_tensorflow_compiler_xla_xla_data_proto_enumTypes[2]
}
func (x ProfileType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ProfileType.Descriptor instead.
func (ProfileType) EnumDescriptor() ([]byte, []int) {
return file_tensorflow_compiler_xla_xla_data_proto_rawDescGZIP(), []int{2}
}
// The source of the optimization profile.
type ProfileSource int32
const (
ProfileSource_PROFILE_SOURCE_UNKNOWN_SOURCE ProfileSource = 0
ProfileSource_PROFILE_SOURCE_EMBEDDED ProfileSource = 1
ProfileSource_PROFILE_SOURCE_REMOTE ProfileSource = 2
)
// Enum value maps for ProfileSource.
var (
ProfileSource_name = map[int32]string{
0: "PROFILE_SOURCE_UNKNOWN_SOURCE",
1: "PROFILE_SOURCE_EMBEDDED",
2: "PROFILE_SOURCE_REMOTE",
}
ProfileSource_value = map[string]int32{
"PROFILE_SOURCE_UNKNOWN_SOURCE": 0,
"PROFILE_SOURCE_EMBEDDED": 1,
"PROFILE_SOURCE_REMOTE": 2,
}
)
func (x ProfileSource) Enum() *ProfileSource {
p := new(ProfileSource)
*p = x
return p
}
func (x ProfileSource) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ProfileSource) Descriptor() protoreflect.EnumDescriptor {
return file_tensorflow_compiler_xla_xla_data_proto_enumTypes[3].Descriptor()
}
func (ProfileSource) Type() protoreflect.EnumType {
return &file_tensorflow_compiler_xla_xla_data_proto_enumTypes[3]
}
func (x ProfileSource) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ProfileSource.Descriptor instead.
func (ProfileSource) EnumDescriptor() ([]byte, []int) {
return file_tensorflow_compiler_xla_xla_data_proto_rawDescGZIP(), []int{3}
}
// The compilation event that triggered the use of the profile.
type CompilationEvent int32
const (
CompilationEvent_COMPILATION_EVENT_UNKNOWN_EVENT CompilationEvent = 0
CompilationEvent_COMPILATION_EVENT_FIRST_COMPILATION CompilationEvent = 1
CompilationEvent_COMPILATION_EVENT_RECOMPILATION CompilationEvent = 2
)
// Enum value maps for CompilationEvent.
var (
CompilationEvent_name = map[int32]string{
0: "COMPILATION_EVENT_UNKNOWN_EVENT",
1: "COMPILATION_EVENT_FIRST_COMPILATION",
2: "COMPILATION_EVENT_RECOMPILATION",
}
CompilationEvent_value = map[string]int32{
"COMPILATION_EVENT_UNKNOWN_EVENT": 0,
"COMPILATION_EVENT_FIRST_COMPILATION": 1,
"COMPILATION_EVENT_RECOMPILATION": 2,
}
)
func (x CompilationEvent) Enum() *CompilationEvent {
p := new(CompilationEvent)
*p = x
return p
}
func (x CompilationEvent) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CompilationEvent) Descriptor() protoreflect.EnumDescriptor {
return file_tensorflow_compiler_xla_xla_data_proto_enumTypes[4].Descriptor()
}
func (CompilationEvent) Type() protoreflect.EnumType {
return &file_tensorflow_compiler_xla_xla_data_proto_enumTypes[4]
}
func (x CompilationEvent) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CompilationEvent.Descriptor instead.
func (CompilationEvent) EnumDescriptor() ([]byte, []int) {
return file_tensorflow_compiler_xla_xla_data_proto_rawDescGZIP(), []int{4}
}
type PaddingType int32
const (
PaddingType_PADDING_INVALID PaddingType = 0
PaddingType_PADDING_VALID PaddingType = 1 // Only valid portion of the base are covered.
PaddingType_PADDING_SAME PaddingType = 2 // Extra is added to produce same output size as the input.
)
// Enum value maps for PaddingType.
var (
PaddingType_name = map[int32]string{
0: "PADDING_INVALID",
1: "PADDING_VALID",
2: "PADDING_SAME",
}
PaddingType_value = map[string]int32{
"PADDING_INVALID": 0,
"PADDING_VALID": 1,
"PADDING_SAME": 2,
}
)
func (x PaddingType) Enum() *PaddingType {
p := new(PaddingType)
*p = x
return p
}
func (x PaddingType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PaddingType) Descriptor() protoreflect.EnumDescriptor {
return file_tensorflow_compiler_xla_xla_data_proto_enumTypes[5].Descriptor()
}
func (PaddingType) Type() protoreflect.EnumType {
return &file_tensorflow_compiler_xla_xla_data_proto_enumTypes[5]
}
func (x PaddingType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PaddingType.Descriptor instead.
func (PaddingType) EnumDescriptor() ([]byte, []int) {
return file_tensorflow_compiler_xla_xla_data_proto_rawDescGZIP(), []int{5}
}
type FftType int32
const (
FftType_FFT FftType = 0 // Forward FFT; complex in, complex out.
FftType_IFFT FftType = 1 // Inverse FFT; complex in, complex out.
FftType_RFFT FftType = 2 // Forward real FFT; real in, fft_length / 2 + 1 complex out
FftType_IRFFT FftType = 3 // Inverse real FFT; fft_length / 2 + 1 complex in,
)
// Enum value maps for FftType.
var (
FftType_name = map[int32]string{
0: "FFT",
1: "IFFT",
2: "RFFT",
3: "IRFFT",
}
FftType_value = map[string]int32{
"FFT": 0,
"IFFT": 1,
"RFFT": 2,
"IRFFT": 3,
}
)
func (x FftType) Enum() *FftType {
p := new(FftType)
*p = x
return p
}
func (x FftType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (FftType) Descriptor() protoreflect.EnumDescriptor {
return file_tensorflow_compiler_xla_xla_data_proto_enumTypes[6].Descriptor()
}
func (FftType) Type() protoreflect.EnumType {
return &file_tensorflow_compiler_xla_xla_data_proto_enumTypes[6]
}
func (x FftType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use FftType.Descriptor instead.
func (FftType) EnumDescriptor() ([]byte, []int) {
return file_tensorflow_compiler_xla_xla_data_proto_rawDescGZIP(), []int{6}
}
type RandomDistribution int32
const (
RandomDistribution_RNG_INVALID RandomDistribution = 0
// Creates a uniform-distribution-generated random number on the semi-open
// interval [parameter[0], parameter[1]).
RandomDistribution_RNG_UNIFORM RandomDistribution = 1
// Creates a normal-distribution-generated random number with mean
// parameter[0] and standard deviation parameter[1].
RandomDistribution_RNG_NORMAL RandomDistribution = 2
)
// Enum value maps for RandomDistribution.
var (
RandomDistribution_name = map[int32]string{
0: "RNG_INVALID",
1: "RNG_UNIFORM",
2: "RNG_NORMAL",
}
RandomDistribution_value = map[string]int32{
"RNG_INVALID": 0,
"RNG_UNIFORM": 1,
"RNG_NORMAL": 2,
}
)
func (x RandomDistribution) Enum() *RandomDistribution {
p := new(RandomDistribution)
*p = x
return p
}
func (x RandomDistribution) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (RandomDistribution) Descriptor() protoreflect.EnumDescriptor {
return file_tensorflow_compiler_xla_xla_data_proto_enumTypes[7].Descriptor()
}
func (RandomDistribution) Type() protoreflect.EnumType {
return &file_tensorflow_compiler_xla_xla_data_proto_enumTypes[7]
}
func (x RandomDistribution) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use RandomDistribution.Descriptor instead.
func (RandomDistribution) EnumDescriptor() ([]byte, []int) {
return file_tensorflow_compiler_xla_xla_data_proto_rawDescGZIP(), []int{7}
}
type RandomAlgorithm int32
const (
RandomAlgorithm_RNG_DEFAULT RandomAlgorithm = 0 // Backend dependent default algorithm.
RandomAlgorithm_RNG_THREE_FRY RandomAlgorithm = 1
RandomAlgorithm_RNG_PHILOX RandomAlgorithm = 2 // Next: 2
)
// Enum value maps for RandomAlgorithm.
var (
RandomAlgorithm_name = map[int32]string{
0: "RNG_DEFAULT",
1: "RNG_THREE_FRY",
2: "RNG_PHILOX",
}
RandomAlgorithm_value = map[string]int32{
"RNG_DEFAULT": 0,
"RNG_THREE_FRY": 1,
"RNG_PHILOX": 2,
}
)
func (x RandomAlgorithm) Enum() *RandomAlgorithm {
p := new(RandomAlgorithm)
*p = x
return p
}
func (x RandomAlgorithm) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (RandomAlgorithm) Descriptor() protoreflect.EnumDescriptor {
return file_tensorflow_compiler_xla_xla_data_proto_enumTypes[8].Descriptor()
}
func (RandomAlgorithm) Type() protoreflect.EnumType {
return &file_tensorflow_compiler_xla_xla_data_proto_enumTypes[8]
}
func (x RandomAlgorithm) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use RandomAlgorithm.Descriptor instead.
func (RandomAlgorithm) EnumDescriptor() ([]byte, []int) {
return file_tensorflow_compiler_xla_xla_data_proto_rawDescGZIP(), []int{8}
}
type ChannelHandle_ChannelType int32
const (
// Invalid primitive type to serve as default.
ChannelHandle_CHANNEL_TYPE_INVALID ChannelHandle_ChannelType = 0
// A channel for sending data between devices.
ChannelHandle_DEVICE_TO_DEVICE ChannelHandle_ChannelType = 1
// A channel for sending data from the device to the host. Can only be used
// with a Send operation.
ChannelHandle_DEVICE_TO_HOST ChannelHandle_ChannelType = 2
// A channel for sending data from the host to the device. Can only be used
// with a Recv operation.
ChannelHandle_HOST_TO_DEVICE ChannelHandle_ChannelType = 3
)
// Enum value maps for ChannelHandle_ChannelType.
var (
ChannelHandle_ChannelType_name = map[int32]string{
0: "CHANNEL_TYPE_INVALID",
1: "DEVICE_TO_DEVICE",
2: "DEVICE_TO_HOST",
3: "HOST_TO_DEVICE",
}
ChannelHandle_ChannelType_value = map[string]int32{
"CHANNEL_TYPE_INVALID": 0,
"DEVICE_TO_DEVICE": 1,
"DEVICE_TO_HOST": 2,
"HOST_TO_DEVICE": 3,
}
)
func (x ChannelHandle_ChannelType) Enum() *ChannelHandle_ChannelType {
p := new(ChannelHandle_ChannelType)
*p = x
return p
}
func (x ChannelHandle_ChannelType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ChannelHandle_ChannelType) Descriptor() protoreflect.EnumDescriptor {
return file_tensorflow_compiler_xla_xla_data_proto_enumTypes[9].Descriptor()
}
func (ChannelHandle_ChannelType) Type() protoreflect.EnumType {
return &file_tensorflow_compiler_xla_xla_data_proto_enumTypes[9]
}
func (x ChannelHandle_ChannelType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ChannelHandle_ChannelType.Descriptor instead.
func (ChannelHandle_ChannelType) EnumDescriptor() ([]byte, []int) {
return file_tensorflow_compiler_xla_xla_data_proto_rawDescGZIP(), []int{11, 0}
}
// Should we transpose or use the adjoint of 'a'?
type TriangularSolveOptions_Transpose int32
const (
TriangularSolveOptions_TRANSPOSE_INVALID TriangularSolveOptions_Transpose = 0
TriangularSolveOptions_NO_TRANSPOSE TriangularSolveOptions_Transpose = 1 // Don't transpose 'a'.
TriangularSolveOptions_TRANSPOSE TriangularSolveOptions_Transpose = 2 // Transpose 'a'.
TriangularSolveOptions_ADJOINT TriangularSolveOptions_Transpose = 3 // Complex conjugate and transpose 'a'.
)
// Enum value maps for TriangularSolveOptions_Transpose.
var (
TriangularSolveOptions_Transpose_name = map[int32]string{
0: "TRANSPOSE_INVALID",
1: "NO_TRANSPOSE",
2: "TRANSPOSE",
3: "ADJOINT",
}
TriangularSolveOptions_Transpose_value = map[string]int32{
"TRANSPOSE_INVALID": 0,
"NO_TRANSPOSE": 1,
"TRANSPOSE": 2,
"ADJOINT": 3,
}
)
func (x TriangularSolveOptions_Transpose) Enum() *TriangularSolveOptions_Transpose {
p := new(TriangularSolveOptions_Transpose)
*p = x
return p
}
func (x TriangularSolveOptions_Transpose) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TriangularSolveOptions_Transpose) Descriptor() protoreflect.EnumDescriptor {
return file_tensorflow_compiler_xla_xla_data_proto_enumTypes[10].Descriptor()
}
func (TriangularSolveOptions_Transpose) Type() protoreflect.EnumType {
return &file_tensorflow_compiler_xla_xla_data_proto_enumTypes[10]
}
func (x TriangularSolveOptions_Transpose) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TriangularSolveOptions_Transpose.Descriptor instead.
func (TriangularSolveOptions_Transpose) EnumDescriptor() ([]byte, []int) {
return file_tensorflow_compiler_xla_xla_data_proto_rawDescGZIP(), []int{20, 0}
}
type OpSharding_Type int32
const (
// This sharding is replicated across all devices (implies maximal,
// all other fields are unused).
OpSharding_REPLICATED OpSharding_Type = 0
// This sharding is maximal - one device runs the entire operation.
OpSharding_MAXIMAL OpSharding_Type = 1
// This sharding is a tuple - only the tuple_shardings field is valid.
OpSharding_TUPLE OpSharding_Type = 2
// None of the above; tile_shape and tile_assignment are both used.
OpSharding_OTHER OpSharding_Type = 3
// This op is manually sharded: the shapes are already partitioned and the
// partitioner should not change this op.
OpSharding_MANUAL OpSharding_Type = 4
)
// Enum value maps for OpSharding_Type.
var (
OpSharding_Type_name = map[int32]string{
0: "REPLICATED",
1: "MAXIMAL",
2: "TUPLE",
3: "OTHER",
4: "MANUAL",
}
OpSharding_Type_value = map[string]int32{
"REPLICATED": 0,
"MAXIMAL": 1,
"TUPLE": 2,
"OTHER": 3,
"MANUAL": 4,
}
)
func (x OpSharding_Type) Enum() *OpSharding_Type {
p := new(OpSharding_Type)
*p = x
return p
}
func (x OpSharding_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (OpSharding_Type) Descriptor() protoreflect.EnumDescriptor {
return file_tensorflow_compiler_xla_xla_data_proto_enumTypes[11].Descriptor()
}
func (OpSharding_Type) Type() protoreflect.EnumType {
return &file_tensorflow_compiler_xla_xla_data_proto_enumTypes[11]
}
func (x OpSharding_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use OpSharding_Type.Descriptor instead.
func (OpSharding_Type) EnumDescriptor() ([]byte, []int) {
return file_tensorflow_compiler_xla_xla_data_proto_rawDescGZIP(), []int{25, 0}
}
type PrecisionConfig_Precision int32
const (
PrecisionConfig_DEFAULT PrecisionConfig_Precision = 0
PrecisionConfig_HIGH PrecisionConfig_Precision = 1
PrecisionConfig_HIGHEST PrecisionConfig_Precision = 2
// Each U8/S8 value in a tensor actually represents 2 nibble values.
PrecisionConfig_PACKED_NIBBLE PrecisionConfig_Precision = 3
)
// Enum value maps for PrecisionConfig_Precision.
var (
PrecisionConfig_Precision_name = map[int32]string{
0: "DEFAULT",
1: "HIGH",
2: "HIGHEST",
3: "PACKED_NIBBLE",
}
PrecisionConfig_Precision_value = map[string]int32{
"DEFAULT": 0,
"HIGH": 1,
"HIGHEST": 2,
"PACKED_NIBBLE": 3,
}
)
func (x PrecisionConfig_Precision) Enum() *PrecisionConfig_Precision {
p := new(PrecisionConfig_Precision)
*p = x
return p
}
func (x PrecisionConfig_Precision) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PrecisionConfig_Precision) Descriptor() protoreflect.EnumDescriptor {
return file_tensorflow_compiler_xla_xla_data_proto_enumTypes[12].Descriptor()
}
func (PrecisionConfig_Precision) Type() protoreflect.EnumType {
return &file_tensorflow_compiler_xla_xla_data_proto_enumTypes[12]
}
func (x PrecisionConfig_Precision) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PrecisionConfig_Precision.Descriptor instead.
func (PrecisionConfig_Precision) EnumDescriptor() ([]byte, []int) {
return file_tensorflow_compiler_xla_xla_data_proto_rawDescGZIP(), []int{28, 0}
}
// Describes the padding configuration for Pad operation. The padding amount on
// both edges as well as between the elements are specified for each dimension.
type PaddingConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The padding configuration for all dimensions.
Dimensions []*PaddingConfig_PaddingConfigDimension `protobuf:"bytes,1,rep,name=dimensions,proto3" json:"dimensions,omitempty"`
}
func (x *PaddingConfig) Reset() {
*x = PaddingConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_tensorflow_compiler_xla_xla_data_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PaddingConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PaddingConfig) ProtoMessage() {}
func (x *PaddingConfig) ProtoReflect() protoreflect.Message {
mi := &file_tensorflow_compiler_xla_xla_data_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PaddingConfig.ProtoReflect.Descriptor instead.
func (*PaddingConfig) Descriptor() ([]byte, []int) {
return file_tensorflow_compiler_xla_xla_data_proto_rawDescGZIP(), []int{0}
}
func (x *PaddingConfig) GetDimensions() []*PaddingConfig_PaddingConfigDimension {
if x != nil {
return x.Dimensions
}
return nil
}
// Describes a tile used in tiling-based layout. Refer to
// g3doc/third_party/tensorflow/compiler/xla/g3doc/tiled_layout.md for
// details about tiling-based layout.
type TileProto struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Number of elements in each dimension of the tile. It's ordered from the
// most major dimension of the tile to the most minor dimension of the tile.
// The dimensions correspond to a suffix of the dimensions of the shape being
// tiled.
Dimensions []int64 `protobuf:"varint,1,rep,packed,name=dimensions,proto3" json:"dimensions,omitempty"`
}
func (x *TileProto) Reset() {
*x = TileProto{}
if protoimpl.UnsafeEnabled {
mi := &file_tensorflow_compiler_xla_xla_data_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TileProto) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TileProto) ProtoMessage() {}
func (x *TileProto) ProtoReflect() protoreflect.Message {
mi := &file_tensorflow_compiler_xla_xla_data_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TileProto.ProtoReflect.Descriptor instead.
func (*TileProto) Descriptor() ([]byte, []int) {
return file_tensorflow_compiler_xla_xla_data_proto_rawDescGZIP(), []int{1}
}
func (x *TileProto) GetDimensions() []int64 {
if x != nil {
return x.Dimensions
}
return nil
}
// A layout describes how the array is placed in (1D) memory space. This
// includes the minor-to-major ordering of dimensions within a shape.
//
// Clients must specify the layouts of input Literals to the
// computation. Layouts specified in interior operations which take Shapes (for
// example, Convert) are ignored.
//
// See the XLA documentation for more information on shapes and layouts.
//
// LINT.IfChange
type LayoutProto struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The dimension level type list for this array, specifying the way in which
// each array dimension is represented in memory. If this list is empty, the
// array is assumed to be dense.
DimLevelTypes []DimLevelType `protobuf:"varint,9,rep,packed,name=dim_level_types,json=dimLevelTypes,proto3,enum=xla.DimLevelType" json:"dim_level_types,omitempty"`
// Whether each dimension is unique or ordered. Each of the following lists
// must be empty, or have one entry for each entry of dim_level_types. If
// either list is empty, all dimensions are assumed to be unique and ordered,
// respectively. Entries in this list may not be false for some DimLevelType
// values (such as DIM_DENSE in particular).
DimUnique []bool `protobuf:"varint,13,rep,packed,name=dim_unique,json=dimUnique,proto3" json:"dim_unique,omitempty"`
DimOrdered []bool `protobuf:"varint,14,rep,packed,name=dim_ordered,json=dimOrdered,proto3" json:"dim_ordered,omitempty"`
// Sequence of dimension numbers, from minor (fastest varying index) to major
// (slowest varying index). This field is required.
MinorToMajor []int64 `protobuf:"varint,1,rep,packed,name=minor_to_major,json=minorToMajor,proto3" json:"minor_to_major,omitempty"`
// A sequence of tiles, starting from the tile that's applied first to the