1 | #include "glow/IR/IR.h" |
2 | #include "glow/IR/Instrs.h" |
3 | #include "glow/Base/Type.h" |
4 | #include "glow/Support/Support.h" |
5 | |
6 | using namespace glow; |
7 | |
8 | void AllocActivationInst::dump(llvm::raw_ostream &os) const { |
9 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
10 | dumpOperands(os); |
11 | os << " {" |
12 | << " Ty: " << getTy() |
13 | << "}" ; |
14 | } |
15 | |
16 | Instruction* AllocActivationInst::clone() const { |
17 | return new AllocActivationInst(getName(), getTy()); |
18 | } |
19 | |
20 | llvm::StringRef AllocActivationInst::getOperandName(unsigned idx) const { |
21 | llvm_unreachable("Invalid index" ); |
22 | } |
23 | |
24 | void AllocActivationInst::setTy(TypeRef Ty) { Ty_ = Ty; } |
25 | |
26 | void TensorViewInst::dump(llvm::raw_ostream &os) const { |
27 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
28 | dumpOperands(os); |
29 | os << " {" |
30 | << " Ty: " << getTy() |
31 | << ", Offsets: " << getOffsets() |
32 | << "}" ; |
33 | } |
34 | |
35 | Instruction* TensorViewInst::clone() const { |
36 | return new TensorViewInst(getName(), getSrc(), getTy(), getOffsets()); |
37 | } |
38 | |
39 | llvm::StringRef TensorViewInst::getOperandName(unsigned idx) const { |
40 | if (idx == 0) { return "Src" ; } |
41 | llvm_unreachable("Invalid index" ); |
42 | } |
43 | |
44 | void DeallocActivationInst::dump(llvm::raw_ostream &os) const { |
45 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
46 | dumpOperands(os); |
47 | } |
48 | |
49 | Instruction* DeallocActivationInst::clone() const { |
50 | return new DeallocActivationInst(getName(), getSrc()); |
51 | } |
52 | |
53 | llvm::StringRef DeallocActivationInst::getOperandName(unsigned idx) const { |
54 | if (idx == 0) { return "Src" ; } |
55 | llvm_unreachable("Invalid index" ); |
56 | } |
57 | |
58 | AllocActivationInst *DeallocActivationInst::getAlloc() const { return llvm::cast<AllocActivationInst>(getSrc()); } |
59 | |
60 | void CopyInst::dump(llvm::raw_ostream &os) const { |
61 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
62 | dumpOperands(os); |
63 | } |
64 | |
65 | Instruction* CopyInst::clone() const { |
66 | return new CopyInst(getName(), getDest(), getSrc()); |
67 | } |
68 | |
69 | llvm::StringRef CopyInst::getOperandName(unsigned idx) const { |
70 | if (idx == 0) { return "Dest" ; } |
71 | if (idx == 1) { return "Src" ; } |
72 | llvm_unreachable("Invalid index" ); |
73 | } |
74 | |
75 | void ConvolutionGradInst::dump(llvm::raw_ostream &os) const { |
76 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
77 | dumpOperands(os); |
78 | os << " {" |
79 | << " Kernels: " << getKernels() |
80 | << ", Strides: " << getStrides() |
81 | << ", Pads: " << getPads() |
82 | << ", Group: " << getGroup() |
83 | << ", Dilation: " << getDilation() |
84 | << ", Layout: " << getLayout() |
85 | << ", FusedActivation: " << getFusedActivation() |
86 | << ", FusedActivationArgs: " << getFusedActivationArgs() |
87 | << "}" ; |
88 | } |
89 | |
90 | Instruction* ConvolutionGradInst::clone() const { |
91 | return new ConvolutionGradInst(getName(), getSrc(), getFilter(), getDestGrad(), getSrcGrad(), getFilterGrad(), getBiasGrad(), getKernels(), getStrides(), getPads(), getGroup(), getDilation(), getLayout(), getFusedActivation(), getFusedActivationArgs()); |
92 | } |
93 | |
94 | llvm::StringRef ConvolutionGradInst::getOperandName(unsigned idx) const { |
95 | if (idx == 0) { return "Src" ; } |
96 | if (idx == 1) { return "Filter" ; } |
97 | if (idx == 2) { return "DestGrad" ; } |
98 | if (idx == 3) { return "SrcGrad" ; } |
99 | if (idx == 4) { return "FilterGrad" ; } |
100 | if (idx == 5) { return "BiasGrad" ; } |
101 | llvm_unreachable("Invalid index" ); |
102 | } |
103 | |
104 | void ConvolutionInst::dump(llvm::raw_ostream &os) const { |
105 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
106 | dumpOperands(os); |
107 | os << " {" |
108 | << " Kernels: " << getKernels() |
109 | << ", Strides: " << getStrides() |
110 | << ", Pads: " << getPads() |
111 | << ", Group: " << getGroup() |
112 | << ", Dilation: " << getDilation() |
113 | << ", Layout: " << getLayout() |
114 | << ", FusedActivation: " << getFusedActivation() |
115 | << ", FusedActivationArgs: " << getFusedActivationArgs() |
116 | << "}" ; |
117 | } |
118 | |
119 | Instruction* ConvolutionInst::clone() const { |
120 | return new ConvolutionInst(getName(), getDest(), getSrc(), getFilter(), getBias(), getKernels(), getStrides(), getPads(), getGroup(), getDilation(), getLayout(), getFusedActivation(), getFusedActivationArgs()); |
121 | } |
122 | |
123 | llvm::StringRef ConvolutionInst::getOperandName(unsigned idx) const { |
124 | if (idx == 0) { return "Dest" ; } |
125 | if (idx == 1) { return "Src" ; } |
126 | if (idx == 2) { return "Filter" ; } |
127 | if (idx == 3) { return "Bias" ; } |
128 | llvm_unreachable("Invalid index" ); |
129 | } |
130 | |
131 | void ChannelwiseQuantizedConvolutionInst::dump(llvm::raw_ostream &os) const { |
132 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
133 | dumpOperands(os); |
134 | os << " {" |
135 | << " Kernels: " << getKernels() |
136 | << ", Strides: " << getStrides() |
137 | << ", Pads: " << getPads() |
138 | << ", Group: " << getGroup() |
139 | << ", Dilation: " << getDilation() |
140 | << ", FusedActivation: " << getFusedActivation() |
141 | << ", FusedActivationArgs: " << getFusedActivationArgs() |
142 | << "}" ; |
143 | } |
144 | |
145 | Instruction* ChannelwiseQuantizedConvolutionInst::clone() const { |
146 | return new ChannelwiseQuantizedConvolutionInst(getName(), getDest(), getSrc(), getFilter(), getBias(), getFilterScales(), getFilterOffsets(), getBiasScales(), getBiasOffsets(), getKernels(), getStrides(), getPads(), getGroup(), getDilation(), getFusedActivation(), getFusedActivationArgs()); |
147 | } |
148 | |
149 | llvm::StringRef ChannelwiseQuantizedConvolutionInst::getOperandName(unsigned idx) const { |
150 | if (idx == 0) { return "Dest" ; } |
151 | if (idx == 1) { return "Src" ; } |
152 | if (idx == 2) { return "Filter" ; } |
153 | if (idx == 3) { return "Bias" ; } |
154 | if (idx == 4) { return "FilterScales" ; } |
155 | if (idx == 5) { return "FilterOffsets" ; } |
156 | if (idx == 6) { return "BiasScales" ; } |
157 | if (idx == 7) { return "BiasOffsets" ; } |
158 | llvm_unreachable("Invalid index" ); |
159 | } |
160 | |
161 | void ConvTransposeInst::dump(llvm::raw_ostream &os) const { |
162 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
163 | dumpOperands(os); |
164 | os << " {" |
165 | << " Kernels: " << getKernels() |
166 | << ", Strides: " << getStrides() |
167 | << ", Pads: " << getPads() |
168 | << ", Group: " << getGroup() |
169 | << ", Dilation: " << getDilation() |
170 | << "}" ; |
171 | } |
172 | |
173 | Instruction* ConvTransposeInst::clone() const { |
174 | return new ConvTransposeInst(getName(), getDest(), getSrc(), getFilter(), getBias(), getKernels(), getStrides(), getPads(), getGroup(), getDilation()); |
175 | } |
176 | |
177 | llvm::StringRef ConvTransposeInst::getOperandName(unsigned idx) const { |
178 | if (idx == 0) { return "Dest" ; } |
179 | if (idx == 1) { return "Src" ; } |
180 | if (idx == 2) { return "Filter" ; } |
181 | if (idx == 3) { return "Bias" ; } |
182 | llvm_unreachable("Invalid index" ); |
183 | } |
184 | |
185 | void Convolution3DGradInst::dump(llvm::raw_ostream &os) const { |
186 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
187 | dumpOperands(os); |
188 | os << " {" |
189 | << " Kernels: " << getKernels() |
190 | << ", Strides: " << getStrides() |
191 | << ", Pads: " << getPads() |
192 | << ", Group: " << getGroup() |
193 | << "}" ; |
194 | } |
195 | |
196 | Instruction* Convolution3DGradInst::clone() const { |
197 | return new Convolution3DGradInst(getName(), getSrc(), getFilter(), getDestGrad(), getSrcGrad(), getFilterGrad(), getBiasGrad(), getKernels(), getStrides(), getPads(), getGroup()); |
198 | } |
199 | |
200 | llvm::StringRef Convolution3DGradInst::getOperandName(unsigned idx) const { |
201 | if (idx == 0) { return "Src" ; } |
202 | if (idx == 1) { return "Filter" ; } |
203 | if (idx == 2) { return "DestGrad" ; } |
204 | if (idx == 3) { return "SrcGrad" ; } |
205 | if (idx == 4) { return "FilterGrad" ; } |
206 | if (idx == 5) { return "BiasGrad" ; } |
207 | llvm_unreachable("Invalid index" ); |
208 | } |
209 | |
210 | void Convolution3DInst::dump(llvm::raw_ostream &os) const { |
211 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
212 | dumpOperands(os); |
213 | os << " {" |
214 | << " Kernels: " << getKernels() |
215 | << ", Strides: " << getStrides() |
216 | << ", Pads: " << getPads() |
217 | << ", Group: " << getGroup() |
218 | << "}" ; |
219 | } |
220 | |
221 | Instruction* Convolution3DInst::clone() const { |
222 | return new Convolution3DInst(getName(), getDest(), getSrc(), getFilter(), getBias(), getKernels(), getStrides(), getPads(), getGroup()); |
223 | } |
224 | |
225 | llvm::StringRef Convolution3DInst::getOperandName(unsigned idx) const { |
226 | if (idx == 0) { return "Dest" ; } |
227 | if (idx == 1) { return "Src" ; } |
228 | if (idx == 2) { return "Filter" ; } |
229 | if (idx == 3) { return "Bias" ; } |
230 | llvm_unreachable("Invalid index" ); |
231 | } |
232 | |
233 | void BatchNormalizationInst::dump(llvm::raw_ostream &os) const { |
234 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
235 | dumpOperands(os); |
236 | os << " {" |
237 | << " ChannelIdx: " << getChannelIdx() |
238 | << ", Epsilon: " << getEpsilon() |
239 | << ", Momentum: " << getMomentum() |
240 | << "}" ; |
241 | } |
242 | |
243 | Instruction* BatchNormalizationInst::clone() const { |
244 | return new BatchNormalizationInst(getName(), getDest(), getSrc(), getScale(), getBias(), getMean(), getVar(), getChannelIdx(), getEpsilon(), getMomentum()); |
245 | } |
246 | |
247 | llvm::StringRef BatchNormalizationInst::getOperandName(unsigned idx) const { |
248 | if (idx == 0) { return "Dest" ; } |
249 | if (idx == 1) { return "Src" ; } |
250 | if (idx == 2) { return "Scale" ; } |
251 | if (idx == 3) { return "Bias" ; } |
252 | if (idx == 4) { return "Mean" ; } |
253 | if (idx == 5) { return "Var" ; } |
254 | llvm_unreachable("Invalid index" ); |
255 | } |
256 | |
257 | void MaxPoolWithArgmaxGradInst::dump(llvm::raw_ostream &os) const { |
258 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
259 | dumpOperands(os); |
260 | os << " {" |
261 | << " Kernels: " << getKernels() |
262 | << ", Strides: " << getStrides() |
263 | << ", Pads: " << getPads() |
264 | << ", Layout: " << getLayout() |
265 | << "}" ; |
266 | } |
267 | |
268 | Instruction* MaxPoolWithArgmaxGradInst::clone() const { |
269 | return new MaxPoolWithArgmaxGradInst(getName(), getDest(), getSrc(), getArgmax(), getDestGrad(), getSrcGrad(), getKernels(), getStrides(), getPads(), getLayout()); |
270 | } |
271 | |
272 | llvm::StringRef MaxPoolWithArgmaxGradInst::getOperandName(unsigned idx) const { |
273 | if (idx == 0) { return "Dest" ; } |
274 | if (idx == 1) { return "Src" ; } |
275 | if (idx == 2) { return "Argmax" ; } |
276 | if (idx == 3) { return "DestGrad" ; } |
277 | if (idx == 4) { return "SrcGrad" ; } |
278 | llvm_unreachable("Invalid index" ); |
279 | } |
280 | |
281 | void MaxPoolWithArgmaxInst::dump(llvm::raw_ostream &os) const { |
282 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
283 | dumpOperands(os); |
284 | os << " {" |
285 | << " Kernels: " << getKernels() |
286 | << ", Strides: " << getStrides() |
287 | << ", Pads: " << getPads() |
288 | << ", Layout: " << getLayout() |
289 | << "}" ; |
290 | } |
291 | |
292 | Instruction* MaxPoolWithArgmaxInst::clone() const { |
293 | return new MaxPoolWithArgmaxInst(getName(), getDest(), getSrc(), getArgmax(), getKernels(), getStrides(), getPads(), getLayout()); |
294 | } |
295 | |
296 | llvm::StringRef MaxPoolWithArgmaxInst::getOperandName(unsigned idx) const { |
297 | if (idx == 0) { return "Dest" ; } |
298 | if (idx == 1) { return "Src" ; } |
299 | if (idx == 2) { return "Argmax" ; } |
300 | llvm_unreachable("Invalid index" ); |
301 | } |
302 | |
303 | void MaxPoolInst::dump(llvm::raw_ostream &os) const { |
304 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
305 | dumpOperands(os); |
306 | os << " {" |
307 | << " Kernels: " << getKernels() |
308 | << ", Strides: " << getStrides() |
309 | << ", Pads: " << getPads() |
310 | << ", Layout: " << getLayout() |
311 | << "}" ; |
312 | } |
313 | |
314 | Instruction* MaxPoolInst::clone() const { |
315 | return new MaxPoolInst(getName(), getDest(), getSrc(), getKernels(), getStrides(), getPads(), getLayout()); |
316 | } |
317 | |
318 | llvm::StringRef MaxPoolInst::getOperandName(unsigned idx) const { |
319 | if (idx == 0) { return "Dest" ; } |
320 | if (idx == 1) { return "Src" ; } |
321 | llvm_unreachable("Invalid index" ); |
322 | } |
323 | |
324 | void AvgPoolGradInst::dump(llvm::raw_ostream &os) const { |
325 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
326 | dumpOperands(os); |
327 | os << " {" |
328 | << " Kernels: " << getKernels() |
329 | << ", Strides: " << getStrides() |
330 | << ", Pads: " << getPads() |
331 | << ", Layout: " << getLayout() |
332 | << ", CountIncludePads: " << getCountIncludePads() |
333 | << "}" ; |
334 | } |
335 | |
336 | Instruction* AvgPoolGradInst::clone() const { |
337 | return new AvgPoolGradInst(getName(), getDest(), getSrc(), getDestGrad(), getSrcGrad(), getKernels(), getStrides(), getPads(), getLayout(), getCountIncludePads()); |
338 | } |
339 | |
340 | llvm::StringRef AvgPoolGradInst::getOperandName(unsigned idx) const { |
341 | if (idx == 0) { return "Dest" ; } |
342 | if (idx == 1) { return "Src" ; } |
343 | if (idx == 2) { return "DestGrad" ; } |
344 | if (idx == 3) { return "SrcGrad" ; } |
345 | llvm_unreachable("Invalid index" ); |
346 | } |
347 | |
348 | void AvgPoolInst::dump(llvm::raw_ostream &os) const { |
349 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
350 | dumpOperands(os); |
351 | os << " {" |
352 | << " Kernels: " << getKernels() |
353 | << ", Strides: " << getStrides() |
354 | << ", Pads: " << getPads() |
355 | << ", Layout: " << getLayout() |
356 | << ", CountIncludePads: " << getCountIncludePads() |
357 | << "}" ; |
358 | } |
359 | |
360 | Instruction* AvgPoolInst::clone() const { |
361 | return new AvgPoolInst(getName(), getDest(), getSrc(), getKernels(), getStrides(), getPads(), getLayout(), getCountIncludePads()); |
362 | } |
363 | |
364 | llvm::StringRef AvgPoolInst::getOperandName(unsigned idx) const { |
365 | if (idx == 0) { return "Dest" ; } |
366 | if (idx == 1) { return "Src" ; } |
367 | llvm_unreachable("Invalid index" ); |
368 | } |
369 | |
370 | void ArgMaxInst::dump(llvm::raw_ostream &os) const { |
371 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
372 | dumpOperands(os); |
373 | os << " {" |
374 | << " Axis: " << getAxis() |
375 | << ", KeepDims: " << getKeepDims() |
376 | << "}" ; |
377 | } |
378 | |
379 | Instruction* ArgMaxInst::clone() const { |
380 | return new ArgMaxInst(getName(), getDest(), getSrc(), getAxis(), getKeepDims()); |
381 | } |
382 | |
383 | llvm::StringRef ArgMaxInst::getOperandName(unsigned idx) const { |
384 | if (idx == 0) { return "Dest" ; } |
385 | if (idx == 1) { return "Src" ; } |
386 | llvm_unreachable("Invalid index" ); |
387 | } |
388 | |
389 | void ArgMinInst::dump(llvm::raw_ostream &os) const { |
390 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
391 | dumpOperands(os); |
392 | os << " {" |
393 | << " Axis: " << getAxis() |
394 | << ", KeepDims: " << getKeepDims() |
395 | << "}" ; |
396 | } |
397 | |
398 | Instruction* ArgMinInst::clone() const { |
399 | return new ArgMinInst(getName(), getDest(), getSrc(), getAxis(), getKeepDims()); |
400 | } |
401 | |
402 | llvm::StringRef ArgMinInst::getOperandName(unsigned idx) const { |
403 | if (idx == 0) { return "Dest" ; } |
404 | if (idx == 1) { return "Src" ; } |
405 | llvm_unreachable("Invalid index" ); |
406 | } |
407 | |
408 | void AdaptiveAvgPoolGradInst::dump(llvm::raw_ostream &os) const { |
409 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
410 | dumpOperands(os); |
411 | } |
412 | |
413 | Instruction* AdaptiveAvgPoolGradInst::clone() const { |
414 | return new AdaptiveAvgPoolGradInst(getName(), getDest(), getDestGrad(), getSrcGrad()); |
415 | } |
416 | |
417 | llvm::StringRef AdaptiveAvgPoolGradInst::getOperandName(unsigned idx) const { |
418 | if (idx == 0) { return "Dest" ; } |
419 | if (idx == 1) { return "DestGrad" ; } |
420 | if (idx == 2) { return "SrcGrad" ; } |
421 | llvm_unreachable("Invalid index" ); |
422 | } |
423 | |
424 | void AdaptiveAvgPoolInst::dump(llvm::raw_ostream &os) const { |
425 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
426 | dumpOperands(os); |
427 | } |
428 | |
429 | Instruction* AdaptiveAvgPoolInst::clone() const { |
430 | return new AdaptiveAvgPoolInst(getName(), getDest(), getSrc()); |
431 | } |
432 | |
433 | llvm::StringRef AdaptiveAvgPoolInst::getOperandName(unsigned idx) const { |
434 | if (idx == 0) { return "Dest" ; } |
435 | if (idx == 1) { return "Src" ; } |
436 | llvm_unreachable("Invalid index" ); |
437 | } |
438 | |
439 | void FullyConnectedInst::dump(llvm::raw_ostream &os) const { |
440 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
441 | dumpOperands(os); |
442 | } |
443 | |
444 | Instruction* FullyConnectedInst::clone() const { |
445 | return new FullyConnectedInst(getName(), getDest(), getSrc(), getWeights(), getBias()); |
446 | } |
447 | |
448 | llvm::StringRef FullyConnectedInst::getOperandName(unsigned idx) const { |
449 | if (idx == 0) { return "Dest" ; } |
450 | if (idx == 1) { return "Src" ; } |
451 | if (idx == 2) { return "Weights" ; } |
452 | if (idx == 3) { return "Bias" ; } |
453 | llvm_unreachable("Invalid index" ); |
454 | } |
455 | |
456 | void RowwiseQuantizedFullyConnectedInst::dump(llvm::raw_ostream &os) const { |
457 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
458 | dumpOperands(os); |
459 | } |
460 | |
461 | Instruction* RowwiseQuantizedFullyConnectedInst::clone() const { |
462 | return new RowwiseQuantizedFullyConnectedInst(getName(), getDest(), getSrc(), getWeights(), getBias(), getScales(), getOffsets()); |
463 | } |
464 | |
465 | llvm::StringRef RowwiseQuantizedFullyConnectedInst::getOperandName(unsigned idx) const { |
466 | if (idx == 0) { return "Dest" ; } |
467 | if (idx == 1) { return "Src" ; } |
468 | if (idx == 2) { return "Weights" ; } |
469 | if (idx == 3) { return "Bias" ; } |
470 | if (idx == 4) { return "Scales" ; } |
471 | if (idx == 5) { return "Offsets" ; } |
472 | llvm_unreachable("Invalid index" ); |
473 | } |
474 | |
475 | void DynamicQuantizedFullyConnectedInst::dump(llvm::raw_ostream &os) const { |
476 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
477 | dumpOperands(os); |
478 | os << " {" |
479 | << " IsSymmetric: " << getIsSymmetric() |
480 | << ", IsPerBatchElement: " << getIsPerBatchElement() |
481 | << "}" ; |
482 | } |
483 | |
484 | Instruction* DynamicQuantizedFullyConnectedInst::clone() const { |
485 | return new DynamicQuantizedFullyConnectedInst(getName(), getDest(), getSrc(), getWeights(), getBias(), getIsSymmetric(), getIsPerBatchElement()); |
486 | } |
487 | |
488 | llvm::StringRef DynamicQuantizedFullyConnectedInst::getOperandName(unsigned idx) const { |
489 | if (idx == 0) { return "Dest" ; } |
490 | if (idx == 1) { return "Src" ; } |
491 | if (idx == 2) { return "Weights" ; } |
492 | if (idx == 3) { return "Bias" ; } |
493 | llvm_unreachable("Invalid index" ); |
494 | } |
495 | |
496 | void DynamicRowwiseQuantizedFullyConnectedInst::dump(llvm::raw_ostream &os) const { |
497 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
498 | dumpOperands(os); |
499 | os << " {" |
500 | << " IsSymmetric: " << getIsSymmetric() |
501 | << ", IsPerBatchElement: " << getIsPerBatchElement() |
502 | << "}" ; |
503 | } |
504 | |
505 | Instruction* DynamicRowwiseQuantizedFullyConnectedInst::clone() const { |
506 | return new DynamicRowwiseQuantizedFullyConnectedInst(getName(), getDest(), getSrc(), getWeights(), getBias(), getScales(), getOffsets(), getIsSymmetric(), getIsPerBatchElement()); |
507 | } |
508 | |
509 | llvm::StringRef DynamicRowwiseQuantizedFullyConnectedInst::getOperandName(unsigned idx) const { |
510 | if (idx == 0) { return "Dest" ; } |
511 | if (idx == 1) { return "Src" ; } |
512 | if (idx == 2) { return "Weights" ; } |
513 | if (idx == 3) { return "Bias" ; } |
514 | if (idx == 4) { return "Scales" ; } |
515 | if (idx == 5) { return "Offsets" ; } |
516 | llvm_unreachable("Invalid index" ); |
517 | } |
518 | |
519 | void LocalResponseNormalizationGradInst::dump(llvm::raw_ostream &os) const { |
520 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
521 | dumpOperands(os); |
522 | os << " {" |
523 | << " HalfWindowSize: " << getHalfWindowSize() |
524 | << ", Alpha: " << getAlpha() |
525 | << ", Beta: " << getBeta() |
526 | << ", K: " << getK() |
527 | << "}" ; |
528 | } |
529 | |
530 | Instruction* LocalResponseNormalizationGradInst::clone() const { |
531 | return new LocalResponseNormalizationGradInst(getName(), getDest(), getSrc(), getScale(), getDestGrad(), getSrcGrad(), getHalfWindowSize(), getAlpha(), getBeta(), getK()); |
532 | } |
533 | |
534 | llvm::StringRef LocalResponseNormalizationGradInst::getOperandName(unsigned idx) const { |
535 | if (idx == 0) { return "Dest" ; } |
536 | if (idx == 1) { return "Src" ; } |
537 | if (idx == 2) { return "Scale" ; } |
538 | if (idx == 3) { return "DestGrad" ; } |
539 | if (idx == 4) { return "SrcGrad" ; } |
540 | llvm_unreachable("Invalid index" ); |
541 | } |
542 | |
543 | void LocalResponseNormalizationInst::dump(llvm::raw_ostream &os) const { |
544 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
545 | dumpOperands(os); |
546 | os << " {" |
547 | << " HalfWindowSize: " << getHalfWindowSize() |
548 | << ", Alpha: " << getAlpha() |
549 | << ", Beta: " << getBeta() |
550 | << ", K: " << getK() |
551 | << "}" ; |
552 | } |
553 | |
554 | Instruction* LocalResponseNormalizationInst::clone() const { |
555 | return new LocalResponseNormalizationInst(getName(), getDest(), getSrc(), getScale(), getHalfWindowSize(), getAlpha(), getBeta(), getK()); |
556 | } |
557 | |
558 | llvm::StringRef LocalResponseNormalizationInst::getOperandName(unsigned idx) const { |
559 | if (idx == 0) { return "Dest" ; } |
560 | if (idx == 1) { return "Src" ; } |
561 | if (idx == 2) { return "Scale" ; } |
562 | llvm_unreachable("Invalid index" ); |
563 | } |
564 | |
565 | void BucketizeInst::dump(llvm::raw_ostream &os) const { |
566 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
567 | dumpOperands(os); |
568 | os << " {" |
569 | << " Boundaries: " << getBoundaries() |
570 | << "}" ; |
571 | } |
572 | |
573 | Instruction* BucketizeInst::clone() const { |
574 | return new BucketizeInst(getName(), getDest(), getSrc(), getBoundaries()); |
575 | } |
576 | |
577 | llvm::StringRef BucketizeInst::getOperandName(unsigned idx) const { |
578 | if (idx == 0) { return "Dest" ; } |
579 | if (idx == 1) { return "Src" ; } |
580 | llvm_unreachable("Invalid index" ); |
581 | } |
582 | |
583 | void LayerNormalizationInst::dump(llvm::raw_ostream &os) const { |
584 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
585 | dumpOperands(os); |
586 | os << " {" |
587 | << " Epsilon: " << getEpsilon() |
588 | << "}" ; |
589 | } |
590 | |
591 | Instruction* LayerNormalizationInst::clone() const { |
592 | return new LayerNormalizationInst(getName(), getDest(), getSrc(), getScale(), getBias(), getEpsilon()); |
593 | } |
594 | |
595 | llvm::StringRef LayerNormalizationInst::getOperandName(unsigned idx) const { |
596 | if (idx == 0) { return "Dest" ; } |
597 | if (idx == 1) { return "Src" ; } |
598 | if (idx == 2) { return "Scale" ; } |
599 | if (idx == 3) { return "Bias" ; } |
600 | llvm_unreachable("Invalid index" ); |
601 | } |
602 | |
603 | void SoftMaxInst::dump(llvm::raw_ostream &os) const { |
604 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
605 | dumpOperands(os); |
606 | } |
607 | |
608 | Instruction* SoftMaxInst::clone() const { |
609 | return new SoftMaxInst(getName(), getDest(), getSrc()); |
610 | } |
611 | |
612 | llvm::StringRef SoftMaxInst::getOperandName(unsigned idx) const { |
613 | if (idx == 0) { return "Dest" ; } |
614 | if (idx == 1) { return "Src" ; } |
615 | llvm_unreachable("Invalid index" ); |
616 | } |
617 | |
618 | void SoftMaxGradInst::dump(llvm::raw_ostream &os) const { |
619 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
620 | dumpOperands(os); |
621 | } |
622 | |
623 | Instruction* SoftMaxGradInst::clone() const { |
624 | return new SoftMaxGradInst(getName(), getOrigDest(), getOrigSrc(), getSelected(), getSrcGrad()); |
625 | } |
626 | |
627 | llvm::StringRef SoftMaxGradInst::getOperandName(unsigned idx) const { |
628 | if (idx == 0) { return "OrigDest" ; } |
629 | if (idx == 1) { return "OrigSrc" ; } |
630 | if (idx == 2) { return "Selected" ; } |
631 | if (idx == 3) { return "SrcGrad" ; } |
632 | llvm_unreachable("Invalid index" ); |
633 | } |
634 | |
635 | void LogSoftMaxInst::dump(llvm::raw_ostream &os) const { |
636 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
637 | dumpOperands(os); |
638 | } |
639 | |
640 | Instruction* LogSoftMaxInst::clone() const { |
641 | return new LogSoftMaxInst(getName(), getDest(), getSrc()); |
642 | } |
643 | |
644 | llvm::StringRef LogSoftMaxInst::getOperandName(unsigned idx) const { |
645 | if (idx == 0) { return "Dest" ; } |
646 | if (idx == 1) { return "Src" ; } |
647 | llvm_unreachable("Invalid index" ); |
648 | } |
649 | |
650 | void CrossEntropyLossInst::dump(llvm::raw_ostream &os) const { |
651 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
652 | dumpOperands(os); |
653 | } |
654 | |
655 | Instruction* CrossEntropyLossInst::clone() const { |
656 | return new CrossEntropyLossInst(getName(), getP(), getLabels(), getCE()); |
657 | } |
658 | |
659 | llvm::StringRef CrossEntropyLossInst::getOperandName(unsigned idx) const { |
660 | if (idx == 0) { return "P" ; } |
661 | if (idx == 1) { return "Labels" ; } |
662 | if (idx == 2) { return "CE" ; } |
663 | llvm_unreachable("Invalid index" ); |
664 | } |
665 | |
666 | void CrossEntropyLossGradInst::dump(llvm::raw_ostream &os) const { |
667 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
668 | dumpOperands(os); |
669 | } |
670 | |
671 | Instruction* CrossEntropyLossGradInst::clone() const { |
672 | return new CrossEntropyLossGradInst(getName(), getCEGrad(), getP(), getLabels(), getPgrad(), getLabelsgrad()); |
673 | } |
674 | |
675 | llvm::StringRef CrossEntropyLossGradInst::getOperandName(unsigned idx) const { |
676 | if (idx == 0) { return "CEGrad" ; } |
677 | if (idx == 1) { return "P" ; } |
678 | if (idx == 2) { return "Labels" ; } |
679 | if (idx == 3) { return "Pgrad" ; } |
680 | if (idx == 4) { return "Labelsgrad" ; } |
681 | llvm_unreachable("Invalid index" ); |
682 | } |
683 | |
684 | void MatMulInst::dump(llvm::raw_ostream &os) const { |
685 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
686 | dumpOperands(os); |
687 | } |
688 | |
689 | Instruction* MatMulInst::clone() const { |
690 | return new MatMulInst(getName(), getDest(), getLHS(), getRHS()); |
691 | } |
692 | |
693 | llvm::StringRef MatMulInst::getOperandName(unsigned idx) const { |
694 | if (idx == 0) { return "Dest" ; } |
695 | if (idx == 1) { return "LHS" ; } |
696 | if (idx == 2) { return "RHS" ; } |
697 | llvm_unreachable("Invalid index" ); |
698 | } |
699 | |
700 | void BatchMatMulInst::dump(llvm::raw_ostream &os) const { |
701 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
702 | dumpOperands(os); |
703 | } |
704 | |
705 | Instruction* BatchMatMulInst::clone() const { |
706 | return new BatchMatMulInst(getName(), getDest(), getLHS(), getRHS()); |
707 | } |
708 | |
709 | llvm::StringRef BatchMatMulInst::getOperandName(unsigned idx) const { |
710 | if (idx == 0) { return "Dest" ; } |
711 | if (idx == 1) { return "LHS" ; } |
712 | if (idx == 2) { return "RHS" ; } |
713 | llvm_unreachable("Invalid index" ); |
714 | } |
715 | |
716 | void BatchedReduceAddInst::dump(llvm::raw_ostream &os) const { |
717 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
718 | dumpOperands(os); |
719 | os << " {" |
720 | << " Axis: " << getAxis() |
721 | << "}" ; |
722 | } |
723 | |
724 | Instruction* BatchedReduceAddInst::clone() const { |
725 | return new BatchedReduceAddInst(getName(), getDest(), getBatch(), getAxis()); |
726 | } |
727 | |
728 | llvm::StringRef BatchedReduceAddInst::getOperandName(unsigned idx) const { |
729 | if (idx == 0) { return "Dest" ; } |
730 | if (idx == 1) { return "Batch" ; } |
731 | llvm_unreachable("Invalid index" ); |
732 | } |
733 | |
734 | void BatchedReduceMinInst::dump(llvm::raw_ostream &os) const { |
735 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
736 | dumpOperands(os); |
737 | os << " {" |
738 | << " Axes: " << getAxes() |
739 | << "}" ; |
740 | } |
741 | |
742 | Instruction* BatchedReduceMinInst::clone() const { |
743 | return new BatchedReduceMinInst(getName(), getDest(), getBatch(), getAxes()); |
744 | } |
745 | |
746 | llvm::StringRef BatchedReduceMinInst::getOperandName(unsigned idx) const { |
747 | if (idx == 0) { return "Dest" ; } |
748 | if (idx == 1) { return "Batch" ; } |
749 | llvm_unreachable("Invalid index" ); |
750 | } |
751 | |
752 | void BatchedReduceMaxInst::dump(llvm::raw_ostream &os) const { |
753 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
754 | dumpOperands(os); |
755 | os << " {" |
756 | << " Axes: " << getAxes() |
757 | << "}" ; |
758 | } |
759 | |
760 | Instruction* BatchedReduceMaxInst::clone() const { |
761 | return new BatchedReduceMaxInst(getName(), getDest(), getBatch(), getAxes()); |
762 | } |
763 | |
764 | llvm::StringRef BatchedReduceMaxInst::getOperandName(unsigned idx) const { |
765 | if (idx == 0) { return "Dest" ; } |
766 | if (idx == 1) { return "Batch" ; } |
767 | llvm_unreachable("Invalid index" ); |
768 | } |
769 | |
770 | void BatchedReduceProdInst::dump(llvm::raw_ostream &os) const { |
771 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
772 | dumpOperands(os); |
773 | os << " {" |
774 | << " Axis: " << getAxis() |
775 | << "}" ; |
776 | } |
777 | |
778 | Instruction* BatchedReduceProdInst::clone() const { |
779 | return new BatchedReduceProdInst(getName(), getDest(), getBatch(), getAxis()); |
780 | } |
781 | |
782 | llvm::StringRef BatchedReduceProdInst::getOperandName(unsigned idx) const { |
783 | if (idx == 0) { return "Dest" ; } |
784 | if (idx == 1) { return "Batch" ; } |
785 | llvm_unreachable("Invalid index" ); |
786 | } |
787 | |
788 | void CumSumInst::dump(llvm::raw_ostream &os) const { |
789 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
790 | dumpOperands(os); |
791 | os << " {" |
792 | << " Dim: " << getDim() |
793 | << ", Exclusive: " << getExclusive() |
794 | << ", Reverse: " << getReverse() |
795 | << "}" ; |
796 | } |
797 | |
798 | Instruction* CumSumInst::clone() const { |
799 | return new CumSumInst(getName(), getDest(), getInput(), getDim(), getExclusive(), getReverse()); |
800 | } |
801 | |
802 | llvm::StringRef CumSumInst::getOperandName(unsigned idx) const { |
803 | if (idx == 0) { return "Dest" ; } |
804 | if (idx == 1) { return "Input" ; } |
805 | llvm_unreachable("Invalid index" ); |
806 | } |
807 | |
808 | void LengthsSumInst::dump(llvm::raw_ostream &os) const { |
809 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
810 | dumpOperands(os); |
811 | } |
812 | |
813 | Instruction* LengthsSumInst::clone() const { |
814 | return new LengthsSumInst(getName(), getDest(), getData(), getLengths()); |
815 | } |
816 | |
817 | llvm::StringRef LengthsSumInst::getOperandName(unsigned idx) const { |
818 | if (idx == 0) { return "Dest" ; } |
819 | if (idx == 1) { return "Data" ; } |
820 | if (idx == 2) { return "Lengths" ; } |
821 | llvm_unreachable("Invalid index" ); |
822 | } |
823 | |
824 | void SparseLengthsSumGradInst::dump(llvm::raw_ostream &os) const { |
825 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
826 | dumpOperands(os); |
827 | os << " {" |
828 | << " LengthsMode: " << getLengthsMode() |
829 | << ", AvgLength: " << getAvgLength() |
830 | << "}" ; |
831 | } |
832 | |
833 | Instruction* SparseLengthsSumGradInst::clone() const { |
834 | return new SparseLengthsSumGradInst(getName(), getData(), getIndices(), getLengths(), getDestGrad(), getDataGrad(), getLengthsMode(), getAvgLength()); |
835 | } |
836 | |
837 | llvm::StringRef SparseLengthsSumGradInst::getOperandName(unsigned idx) const { |
838 | if (idx == 0) { return "Data" ; } |
839 | if (idx == 1) { return "Indices" ; } |
840 | if (idx == 2) { return "Lengths" ; } |
841 | if (idx == 3) { return "DestGrad" ; } |
842 | if (idx == 4) { return "DataGrad" ; } |
843 | llvm_unreachable("Invalid index" ); |
844 | } |
845 | |
846 | void SparseLengthsSumInst::dump(llvm::raw_ostream &os) const { |
847 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
848 | dumpOperands(os); |
849 | os << " {" |
850 | << " LengthsMode: " << getLengthsMode() |
851 | << ", AvgLength: " << getAvgLength() |
852 | << "}" ; |
853 | } |
854 | |
855 | Instruction* SparseLengthsSumInst::clone() const { |
856 | return new SparseLengthsSumInst(getName(), getDest(), getData(), getIndices(), getLengths(), getLengthsMode(), getAvgLength()); |
857 | } |
858 | |
859 | llvm::StringRef SparseLengthsSumInst::getOperandName(unsigned idx) const { |
860 | if (idx == 0) { return "Dest" ; } |
861 | if (idx == 1) { return "Data" ; } |
862 | if (idx == 2) { return "Indices" ; } |
863 | if (idx == 3) { return "Lengths" ; } |
864 | llvm_unreachable("Invalid index" ); |
865 | } |
866 | |
867 | void SparseLengthsWeightedSumGradInst::dump(llvm::raw_ostream &os) const { |
868 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
869 | dumpOperands(os); |
870 | os << " {" |
871 | << " LengthsMode: " << getLengthsMode() |
872 | << ", AvgLength: " << getAvgLength() |
873 | << "}" ; |
874 | } |
875 | |
876 | Instruction* SparseLengthsWeightedSumGradInst::clone() const { |
877 | return new SparseLengthsWeightedSumGradInst(getName(), getData(), getWeights(), getIndices(), getLengths(), getDestGrad(), getDataGrad(), getWeightsGrad(), getLengthsMode(), getAvgLength()); |
878 | } |
879 | |
880 | llvm::StringRef SparseLengthsWeightedSumGradInst::getOperandName(unsigned idx) const { |
881 | if (idx == 0) { return "Data" ; } |
882 | if (idx == 1) { return "Weights" ; } |
883 | if (idx == 2) { return "Indices" ; } |
884 | if (idx == 3) { return "Lengths" ; } |
885 | if (idx == 4) { return "DestGrad" ; } |
886 | if (idx == 5) { return "DataGrad" ; } |
887 | if (idx == 6) { return "WeightsGrad" ; } |
888 | llvm_unreachable("Invalid index" ); |
889 | } |
890 | |
891 | void SparseLengthsWeightedSumInst::dump(llvm::raw_ostream &os) const { |
892 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
893 | dumpOperands(os); |
894 | os << " {" |
895 | << " LengthsMode: " << getLengthsMode() |
896 | << ", AvgLength: " << getAvgLength() |
897 | << "}" ; |
898 | } |
899 | |
900 | Instruction* SparseLengthsWeightedSumInst::clone() const { |
901 | return new SparseLengthsWeightedSumInst(getName(), getDest(), getData(), getWeights(), getIndices(), getLengths(), getLengthsMode(), getAvgLength()); |
902 | } |
903 | |
904 | llvm::StringRef SparseLengthsWeightedSumInst::getOperandName(unsigned idx) const { |
905 | if (idx == 0) { return "Dest" ; } |
906 | if (idx == 1) { return "Data" ; } |
907 | if (idx == 2) { return "Weights" ; } |
908 | if (idx == 3) { return "Indices" ; } |
909 | if (idx == 4) { return "Lengths" ; } |
910 | llvm_unreachable("Invalid index" ); |
911 | } |
912 | |
913 | void EmbeddingInst::dump(llvm::raw_ostream &os) const { |
914 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
915 | dumpOperands(os); |
916 | os << " {" |
917 | << " PadIdx: " << getPadIdx() |
918 | << ", Scale: " << getScale() |
919 | << ", Sparse: " << getSparse() |
920 | << "}" ; |
921 | } |
922 | |
923 | Instruction* EmbeddingInst::clone() const { |
924 | return new EmbeddingInst(getName(), getDest(), getWeights(), getIndices(), getPadIdx(), getScale(), getSparse()); |
925 | } |
926 | |
927 | llvm::StringRef EmbeddingInst::getOperandName(unsigned idx) const { |
928 | if (idx == 0) { return "Dest" ; } |
929 | if (idx == 1) { return "Weights" ; } |
930 | if (idx == 2) { return "Indices" ; } |
931 | llvm_unreachable("Invalid index" ); |
932 | } |
933 | |
934 | void EmbeddingBagInst::dump(llvm::raw_ostream &os) const { |
935 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
936 | dumpOperands(os); |
937 | os << " {" |
938 | << " HasEndOffset: " << getHasEndOffset() |
939 | << ", LengthsMode: " << getLengthsMode() |
940 | << ", AvgLength: " << getAvgLength() |
941 | << "}" ; |
942 | } |
943 | |
944 | Instruction* EmbeddingBagInst::clone() const { |
945 | return new EmbeddingBagInst(getName(), getDest(), getData(), getWeights(), getIndices(), getOffsets(), getHasEndOffset(), getLengthsMode(), getAvgLength()); |
946 | } |
947 | |
948 | llvm::StringRef EmbeddingBagInst::getOperandName(unsigned idx) const { |
949 | if (idx == 0) { return "Dest" ; } |
950 | if (idx == 1) { return "Data" ; } |
951 | if (idx == 2) { return "Weights" ; } |
952 | if (idx == 3) { return "Indices" ; } |
953 | if (idx == 4) { return "Offsets" ; } |
954 | llvm_unreachable("Invalid index" ); |
955 | } |
956 | |
957 | void RowwiseQuantizedSparseLengthsWeightedSumInst::dump(llvm::raw_ostream &os) const { |
958 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
959 | dumpOperands(os); |
960 | os << " {" |
961 | << " UseFP16Accumulation: " << getUseFP16Accumulation() |
962 | << ", LengthsMode: " << getLengthsMode() |
963 | << ", AvgLength: " << getAvgLength() |
964 | << "}" ; |
965 | } |
966 | |
967 | Instruction* RowwiseQuantizedSparseLengthsWeightedSumInst::clone() const { |
968 | return new RowwiseQuantizedSparseLengthsWeightedSumInst(getName(), getDest(), getData(), getScales(), getOffsets(), getWeights(), getIndices(), getLengths(), getUseFP16Accumulation(), getLengthsMode(), getAvgLength()); |
969 | } |
970 | |
971 | llvm::StringRef RowwiseQuantizedSparseLengthsWeightedSumInst::getOperandName(unsigned idx) const { |
972 | if (idx == 0) { return "Dest" ; } |
973 | if (idx == 1) { return "Data" ; } |
974 | if (idx == 2) { return "Scales" ; } |
975 | if (idx == 3) { return "Offsets" ; } |
976 | if (idx == 4) { return "Weights" ; } |
977 | if (idx == 5) { return "Indices" ; } |
978 | if (idx == 6) { return "Lengths" ; } |
979 | llvm_unreachable("Invalid index" ); |
980 | } |
981 | |
982 | void FusedRowwiseQuantizedSparseLengthsWeightedSumInst::dump(llvm::raw_ostream &os) const { |
983 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
984 | dumpOperands(os); |
985 | os << " {" |
986 | << " UseFP16Accumulation: " << getUseFP16Accumulation() |
987 | << ", LengthsMode: " << getLengthsMode() |
988 | << ", AvgLength: " << getAvgLength() |
989 | << "}" ; |
990 | } |
991 | |
992 | Instruction* FusedRowwiseQuantizedSparseLengthsWeightedSumInst::clone() const { |
993 | return new FusedRowwiseQuantizedSparseLengthsWeightedSumInst(getName(), getDest(), getData(), getWeights(), getIndices(), getLengths(), getUseFP16Accumulation(), getLengthsMode(), getAvgLength()); |
994 | } |
995 | |
996 | llvm::StringRef FusedRowwiseQuantizedSparseLengthsWeightedSumInst::getOperandName(unsigned idx) const { |
997 | if (idx == 0) { return "Dest" ; } |
998 | if (idx == 1) { return "Data" ; } |
999 | if (idx == 2) { return "Weights" ; } |
1000 | if (idx == 3) { return "Indices" ; } |
1001 | if (idx == 4) { return "Lengths" ; } |
1002 | llvm_unreachable("Invalid index" ); |
1003 | } |
1004 | |
1005 | void FusedRowwiseQuantizedSparseLengthsSumInst::dump(llvm::raw_ostream &os) const { |
1006 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1007 | dumpOperands(os); |
1008 | os << " {" |
1009 | << " UseFP16Accumulation: " << getUseFP16Accumulation() |
1010 | << ", LengthsMode: " << getLengthsMode() |
1011 | << ", AvgLength: " << getAvgLength() |
1012 | << "}" ; |
1013 | } |
1014 | |
1015 | Instruction* FusedRowwiseQuantizedSparseLengthsSumInst::clone() const { |
1016 | return new FusedRowwiseQuantizedSparseLengthsSumInst(getName(), getDest(), getData(), getIndices(), getLengths(), getUseFP16Accumulation(), getLengthsMode(), getAvgLength()); |
1017 | } |
1018 | |
1019 | llvm::StringRef FusedRowwiseQuantizedSparseLengthsSumInst::getOperandName(unsigned idx) const { |
1020 | if (idx == 0) { return "Dest" ; } |
1021 | if (idx == 1) { return "Data" ; } |
1022 | if (idx == 2) { return "Indices" ; } |
1023 | if (idx == 3) { return "Lengths" ; } |
1024 | llvm_unreachable("Invalid index" ); |
1025 | } |
1026 | |
1027 | void EmbeddingBagByteRowwiseOffsetsInst::dump(llvm::raw_ostream &os) const { |
1028 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1029 | dumpOperands(os); |
1030 | os << " {" |
1031 | << " UseFP16Accumulation: " << getUseFP16Accumulation() |
1032 | << ", HasEndOffset: " << getHasEndOffset() |
1033 | << ", LengthsMode: " << getLengthsMode() |
1034 | << ", AvgLength: " << getAvgLength() |
1035 | << "}" ; |
1036 | } |
1037 | |
1038 | Instruction* EmbeddingBagByteRowwiseOffsetsInst::clone() const { |
1039 | return new EmbeddingBagByteRowwiseOffsetsInst(getName(), getDest(), getData(), getWeights(), getIndices(), getOffsets(), getUseFP16Accumulation(), getHasEndOffset(), getLengthsMode(), getAvgLength()); |
1040 | } |
1041 | |
1042 | llvm::StringRef EmbeddingBagByteRowwiseOffsetsInst::getOperandName(unsigned idx) const { |
1043 | if (idx == 0) { return "Dest" ; } |
1044 | if (idx == 1) { return "Data" ; } |
1045 | if (idx == 2) { return "Weights" ; } |
1046 | if (idx == 3) { return "Indices" ; } |
1047 | if (idx == 4) { return "Offsets" ; } |
1048 | llvm_unreachable("Invalid index" ); |
1049 | } |
1050 | |
1051 | void LengthsToRangesInst::dump(llvm::raw_ostream &os) const { |
1052 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1053 | dumpOperands(os); |
1054 | } |
1055 | |
1056 | Instruction* LengthsToRangesInst::clone() const { |
1057 | return new LengthsToRangesInst(getName(), getDest(), getLengths()); |
1058 | } |
1059 | |
1060 | llvm::StringRef LengthsToRangesInst::getOperandName(unsigned idx) const { |
1061 | if (idx == 0) { return "Dest" ; } |
1062 | if (idx == 1) { return "Lengths" ; } |
1063 | llvm_unreachable("Invalid index" ); |
1064 | } |
1065 | |
1066 | void LengthsRangeFillInst::dump(llvm::raw_ostream &os) const { |
1067 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1068 | dumpOperands(os); |
1069 | } |
1070 | |
1071 | Instruction* LengthsRangeFillInst::clone() const { |
1072 | return new LengthsRangeFillInst(getName(), getDest(), getLengths()); |
1073 | } |
1074 | |
1075 | llvm::StringRef LengthsRangeFillInst::getOperandName(unsigned idx) const { |
1076 | if (idx == 0) { return "Dest" ; } |
1077 | if (idx == 1) { return "Lengths" ; } |
1078 | llvm_unreachable("Invalid index" ); |
1079 | } |
1080 | |
1081 | void BatchSparseToDenseInst::dump(llvm::raw_ostream &os) const { |
1082 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1083 | dumpOperands(os); |
1084 | os << " {" |
1085 | << " DefaultValue: " << getDefaultValue() |
1086 | << ", DenseLastDim: " << getDenseLastDim() |
1087 | << "}" ; |
1088 | } |
1089 | |
1090 | Instruction* BatchSparseToDenseInst::clone() const { |
1091 | return new BatchSparseToDenseInst(getName(), getDest(), getLengths(), getIndices(), getValues(), getDefaultValue(), getDenseLastDim()); |
1092 | } |
1093 | |
1094 | llvm::StringRef BatchSparseToDenseInst::getOperandName(unsigned idx) const { |
1095 | if (idx == 0) { return "Dest" ; } |
1096 | if (idx == 1) { return "Lengths" ; } |
1097 | if (idx == 2) { return "Indices" ; } |
1098 | if (idx == 3) { return "Values" ; } |
1099 | llvm_unreachable("Invalid index" ); |
1100 | } |
1101 | |
1102 | void FillExamplesWithIndicatorInst::dump(llvm::raw_ostream &os) const { |
1103 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1104 | dumpOperands(os); |
1105 | } |
1106 | |
1107 | Instruction* FillExamplesWithIndicatorInst::clone() const { |
1108 | return new FillExamplesWithIndicatorInst(getName(), getDest(), getData(), getIndicator()); |
1109 | } |
1110 | |
1111 | llvm::StringRef FillExamplesWithIndicatorInst::getOperandName(unsigned idx) const { |
1112 | if (idx == 0) { return "Dest" ; } |
1113 | if (idx == 1) { return "Data" ; } |
1114 | if (idx == 2) { return "Indicator" ; } |
1115 | llvm_unreachable("Invalid index" ); |
1116 | } |
1117 | |
1118 | void SparseToDenseMaskInst::dump(llvm::raw_ostream &os) const { |
1119 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1120 | dumpOperands(os); |
1121 | os << " {" |
1122 | << " Mask: " << getMask() |
1123 | << "}" ; |
1124 | } |
1125 | |
1126 | Instruction* SparseToDenseMaskInst::clone() const { |
1127 | return new SparseToDenseMaskInst(getName(), getDest(), getIndices(), getValues(), getDefaultValue(), getLengths(), getMask()); |
1128 | } |
1129 | |
1130 | llvm::StringRef SparseToDenseMaskInst::getOperandName(unsigned idx) const { |
1131 | if (idx == 0) { return "Dest" ; } |
1132 | if (idx == 1) { return "Indices" ; } |
1133 | if (idx == 2) { return "Values" ; } |
1134 | if (idx == 3) { return "DefaultValue" ; } |
1135 | if (idx == 4) { return "Lengths" ; } |
1136 | llvm_unreachable("Invalid index" ); |
1137 | } |
1138 | |
1139 | void BatchedAddInst::dump(llvm::raw_ostream &os) const { |
1140 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1141 | dumpOperands(os); |
1142 | } |
1143 | |
1144 | Instruction* BatchedAddInst::clone() const { |
1145 | return new BatchedAddInst(getName(), getDest(), getBatch(), getSlice()); |
1146 | } |
1147 | |
1148 | llvm::StringRef BatchedAddInst::getOperandName(unsigned idx) const { |
1149 | if (idx == 0) { return "Dest" ; } |
1150 | if (idx == 1) { return "Batch" ; } |
1151 | if (idx == 2) { return "Slice" ; } |
1152 | llvm_unreachable("Invalid index" ); |
1153 | } |
1154 | |
1155 | void ElementAddInst::dump(llvm::raw_ostream &os) const { |
1156 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1157 | dumpOperands(os); |
1158 | } |
1159 | |
1160 | Instruction* ElementAddInst::clone() const { |
1161 | return new ElementAddInst(getName(), getDest(), getLHS(), getRHS()); |
1162 | } |
1163 | |
1164 | llvm::StringRef ElementAddInst::getOperandName(unsigned idx) const { |
1165 | if (idx == 0) { return "Dest" ; } |
1166 | if (idx == 1) { return "LHS" ; } |
1167 | if (idx == 2) { return "RHS" ; } |
1168 | llvm_unreachable("Invalid index" ); |
1169 | } |
1170 | |
1171 | void ElementSubInst::dump(llvm::raw_ostream &os) const { |
1172 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1173 | dumpOperands(os); |
1174 | } |
1175 | |
1176 | Instruction* ElementSubInst::clone() const { |
1177 | return new ElementSubInst(getName(), getDest(), getLHS(), getRHS()); |
1178 | } |
1179 | |
1180 | llvm::StringRef ElementSubInst::getOperandName(unsigned idx) const { |
1181 | if (idx == 0) { return "Dest" ; } |
1182 | if (idx == 1) { return "LHS" ; } |
1183 | if (idx == 2) { return "RHS" ; } |
1184 | llvm_unreachable("Invalid index" ); |
1185 | } |
1186 | |
1187 | void ElementMulInst::dump(llvm::raw_ostream &os) const { |
1188 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1189 | dumpOperands(os); |
1190 | } |
1191 | |
1192 | Instruction* ElementMulInst::clone() const { |
1193 | return new ElementMulInst(getName(), getDest(), getLHS(), getRHS()); |
1194 | } |
1195 | |
1196 | llvm::StringRef ElementMulInst::getOperandName(unsigned idx) const { |
1197 | if (idx == 0) { return "Dest" ; } |
1198 | if (idx == 1) { return "LHS" ; } |
1199 | if (idx == 2) { return "RHS" ; } |
1200 | llvm_unreachable("Invalid index" ); |
1201 | } |
1202 | |
1203 | void ElementDivInst::dump(llvm::raw_ostream &os) const { |
1204 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1205 | dumpOperands(os); |
1206 | } |
1207 | |
1208 | Instruction* ElementDivInst::clone() const { |
1209 | return new ElementDivInst(getName(), getDest(), getLHS(), getRHS()); |
1210 | } |
1211 | |
1212 | llvm::StringRef ElementDivInst::getOperandName(unsigned idx) const { |
1213 | if (idx == 0) { return "Dest" ; } |
1214 | if (idx == 1) { return "LHS" ; } |
1215 | if (idx == 2) { return "RHS" ; } |
1216 | llvm_unreachable("Invalid index" ); |
1217 | } |
1218 | |
1219 | void ElementFmodInst::dump(llvm::raw_ostream &os) const { |
1220 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1221 | dumpOperands(os); |
1222 | } |
1223 | |
1224 | Instruction* ElementFmodInst::clone() const { |
1225 | return new ElementFmodInst(getName(), getDest(), getLHS(), getRHS()); |
1226 | } |
1227 | |
1228 | llvm::StringRef ElementFmodInst::getOperandName(unsigned idx) const { |
1229 | if (idx == 0) { return "Dest" ; } |
1230 | if (idx == 1) { return "LHS" ; } |
1231 | if (idx == 2) { return "RHS" ; } |
1232 | llvm_unreachable("Invalid index" ); |
1233 | } |
1234 | |
1235 | void ElementMaxInst::dump(llvm::raw_ostream &os) const { |
1236 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1237 | dumpOperands(os); |
1238 | } |
1239 | |
1240 | Instruction* ElementMaxInst::clone() const { |
1241 | return new ElementMaxInst(getName(), getDest(), getLHS(), getRHS()); |
1242 | } |
1243 | |
1244 | llvm::StringRef ElementMaxInst::getOperandName(unsigned idx) const { |
1245 | if (idx == 0) { return "Dest" ; } |
1246 | if (idx == 1) { return "LHS" ; } |
1247 | if (idx == 2) { return "RHS" ; } |
1248 | llvm_unreachable("Invalid index" ); |
1249 | } |
1250 | |
1251 | void ElementMinInst::dump(llvm::raw_ostream &os) const { |
1252 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1253 | dumpOperands(os); |
1254 | } |
1255 | |
1256 | Instruction* ElementMinInst::clone() const { |
1257 | return new ElementMinInst(getName(), getDest(), getLHS(), getRHS()); |
1258 | } |
1259 | |
1260 | llvm::StringRef ElementMinInst::getOperandName(unsigned idx) const { |
1261 | if (idx == 0) { return "Dest" ; } |
1262 | if (idx == 1) { return "LHS" ; } |
1263 | if (idx == 2) { return "RHS" ; } |
1264 | llvm_unreachable("Invalid index" ); |
1265 | } |
1266 | |
1267 | void ElementCmpEQInst::dump(llvm::raw_ostream &os) const { |
1268 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1269 | dumpOperands(os); |
1270 | } |
1271 | |
1272 | Instruction* ElementCmpEQInst::clone() const { |
1273 | return new ElementCmpEQInst(getName(), getDest(), getLHS(), getRHS()); |
1274 | } |
1275 | |
1276 | llvm::StringRef ElementCmpEQInst::getOperandName(unsigned idx) const { |
1277 | if (idx == 0) { return "Dest" ; } |
1278 | if (idx == 1) { return "LHS" ; } |
1279 | if (idx == 2) { return "RHS" ; } |
1280 | llvm_unreachable("Invalid index" ); |
1281 | } |
1282 | |
1283 | void ElementCmpNEQInst::dump(llvm::raw_ostream &os) const { |
1284 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1285 | dumpOperands(os); |
1286 | } |
1287 | |
1288 | Instruction* ElementCmpNEQInst::clone() const { |
1289 | return new ElementCmpNEQInst(getName(), getDest(), getLHS(), getRHS()); |
1290 | } |
1291 | |
1292 | llvm::StringRef ElementCmpNEQInst::getOperandName(unsigned idx) const { |
1293 | if (idx == 0) { return "Dest" ; } |
1294 | if (idx == 1) { return "LHS" ; } |
1295 | if (idx == 2) { return "RHS" ; } |
1296 | llvm_unreachable("Invalid index" ); |
1297 | } |
1298 | |
1299 | void ElementCmpLTInst::dump(llvm::raw_ostream &os) const { |
1300 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1301 | dumpOperands(os); |
1302 | } |
1303 | |
1304 | Instruction* ElementCmpLTInst::clone() const { |
1305 | return new ElementCmpLTInst(getName(), getDest(), getLHS(), getRHS()); |
1306 | } |
1307 | |
1308 | llvm::StringRef ElementCmpLTInst::getOperandName(unsigned idx) const { |
1309 | if (idx == 0) { return "Dest" ; } |
1310 | if (idx == 1) { return "LHS" ; } |
1311 | if (idx == 2) { return "RHS" ; } |
1312 | llvm_unreachable("Invalid index" ); |
1313 | } |
1314 | |
1315 | void ElementCmpLTEInst::dump(llvm::raw_ostream &os) const { |
1316 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1317 | dumpOperands(os); |
1318 | } |
1319 | |
1320 | Instruction* ElementCmpLTEInst::clone() const { |
1321 | return new ElementCmpLTEInst(getName(), getDest(), getLHS(), getRHS()); |
1322 | } |
1323 | |
1324 | llvm::StringRef ElementCmpLTEInst::getOperandName(unsigned idx) const { |
1325 | if (idx == 0) { return "Dest" ; } |
1326 | if (idx == 1) { return "LHS" ; } |
1327 | if (idx == 2) { return "RHS" ; } |
1328 | llvm_unreachable("Invalid index" ); |
1329 | } |
1330 | |
1331 | void ElementIsNaNInst::dump(llvm::raw_ostream &os) const { |
1332 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1333 | dumpOperands(os); |
1334 | } |
1335 | |
1336 | Instruction* ElementIsNaNInst::clone() const { |
1337 | return new ElementIsNaNInst(getName(), getDest(), getSrc()); |
1338 | } |
1339 | |
1340 | llvm::StringRef ElementIsNaNInst::getOperandName(unsigned idx) const { |
1341 | if (idx == 0) { return "Dest" ; } |
1342 | if (idx == 1) { return "Src" ; } |
1343 | llvm_unreachable("Invalid index" ); |
1344 | } |
1345 | |
1346 | void ElementPowInst::dump(llvm::raw_ostream &os) const { |
1347 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1348 | dumpOperands(os); |
1349 | } |
1350 | |
1351 | Instruction* ElementPowInst::clone() const { |
1352 | return new ElementPowInst(getName(), getDest(), getLHS(), getRHS()); |
1353 | } |
1354 | |
1355 | llvm::StringRef ElementPowInst::getOperandName(unsigned idx) const { |
1356 | if (idx == 0) { return "Dest" ; } |
1357 | if (idx == 1) { return "LHS" ; } |
1358 | if (idx == 2) { return "RHS" ; } |
1359 | llvm_unreachable("Invalid index" ); |
1360 | } |
1361 | |
1362 | void ElementAndInst::dump(llvm::raw_ostream &os) const { |
1363 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1364 | dumpOperands(os); |
1365 | } |
1366 | |
1367 | Instruction* ElementAndInst::clone() const { |
1368 | return new ElementAndInst(getName(), getDest(), getLHS(), getRHS()); |
1369 | } |
1370 | |
1371 | llvm::StringRef ElementAndInst::getOperandName(unsigned idx) const { |
1372 | if (idx == 0) { return "Dest" ; } |
1373 | if (idx == 1) { return "LHS" ; } |
1374 | if (idx == 2) { return "RHS" ; } |
1375 | llvm_unreachable("Invalid index" ); |
1376 | } |
1377 | |
1378 | void ElementBitwiseAndInst::dump(llvm::raw_ostream &os) const { |
1379 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1380 | dumpOperands(os); |
1381 | } |
1382 | |
1383 | Instruction* ElementBitwiseAndInst::clone() const { |
1384 | return new ElementBitwiseAndInst(getName(), getDest(), getLHS(), getRHS()); |
1385 | } |
1386 | |
1387 | llvm::StringRef ElementBitwiseAndInst::getOperandName(unsigned idx) const { |
1388 | if (idx == 0) { return "Dest" ; } |
1389 | if (idx == 1) { return "LHS" ; } |
1390 | if (idx == 2) { return "RHS" ; } |
1391 | llvm_unreachable("Invalid index" ); |
1392 | } |
1393 | |
1394 | void ElementOrInst::dump(llvm::raw_ostream &os) const { |
1395 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1396 | dumpOperands(os); |
1397 | } |
1398 | |
1399 | Instruction* ElementOrInst::clone() const { |
1400 | return new ElementOrInst(getName(), getDest(), getLHS(), getRHS()); |
1401 | } |
1402 | |
1403 | llvm::StringRef ElementOrInst::getOperandName(unsigned idx) const { |
1404 | if (idx == 0) { return "Dest" ; } |
1405 | if (idx == 1) { return "LHS" ; } |
1406 | if (idx == 2) { return "RHS" ; } |
1407 | llvm_unreachable("Invalid index" ); |
1408 | } |
1409 | |
1410 | void ElementBitwiseOrInst::dump(llvm::raw_ostream &os) const { |
1411 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1412 | dumpOperands(os); |
1413 | } |
1414 | |
1415 | Instruction* ElementBitwiseOrInst::clone() const { |
1416 | return new ElementBitwiseOrInst(getName(), getDest(), getLHS(), getRHS()); |
1417 | } |
1418 | |
1419 | llvm::StringRef ElementBitwiseOrInst::getOperandName(unsigned idx) const { |
1420 | if (idx == 0) { return "Dest" ; } |
1421 | if (idx == 1) { return "LHS" ; } |
1422 | if (idx == 2) { return "RHS" ; } |
1423 | llvm_unreachable("Invalid index" ); |
1424 | } |
1425 | |
1426 | void ElementXorInst::dump(llvm::raw_ostream &os) const { |
1427 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1428 | dumpOperands(os); |
1429 | } |
1430 | |
1431 | Instruction* ElementXorInst::clone() const { |
1432 | return new ElementXorInst(getName(), getDest(), getLHS(), getRHS()); |
1433 | } |
1434 | |
1435 | llvm::StringRef ElementXorInst::getOperandName(unsigned idx) const { |
1436 | if (idx == 0) { return "Dest" ; } |
1437 | if (idx == 1) { return "LHS" ; } |
1438 | if (idx == 2) { return "RHS" ; } |
1439 | llvm_unreachable("Invalid index" ); |
1440 | } |
1441 | |
1442 | void ElementBitwiseXorInst::dump(llvm::raw_ostream &os) const { |
1443 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1444 | dumpOperands(os); |
1445 | } |
1446 | |
1447 | Instruction* ElementBitwiseXorInst::clone() const { |
1448 | return new ElementBitwiseXorInst(getName(), getDest(), getLHS(), getRHS()); |
1449 | } |
1450 | |
1451 | llvm::StringRef ElementBitwiseXorInst::getOperandName(unsigned idx) const { |
1452 | if (idx == 0) { return "Dest" ; } |
1453 | if (idx == 1) { return "LHS" ; } |
1454 | if (idx == 2) { return "RHS" ; } |
1455 | llvm_unreachable("Invalid index" ); |
1456 | } |
1457 | |
1458 | void ElementNotInst::dump(llvm::raw_ostream &os) const { |
1459 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1460 | dumpOperands(os); |
1461 | } |
1462 | |
1463 | Instruction* ElementNotInst::clone() const { |
1464 | return new ElementNotInst(getName(), getDest(), getSrc()); |
1465 | } |
1466 | |
1467 | llvm::StringRef ElementNotInst::getOperandName(unsigned idx) const { |
1468 | if (idx == 0) { return "Dest" ; } |
1469 | if (idx == 1) { return "Src" ; } |
1470 | llvm_unreachable("Invalid index" ); |
1471 | } |
1472 | |
1473 | void ElementBitwiseNotInst::dump(llvm::raw_ostream &os) const { |
1474 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1475 | dumpOperands(os); |
1476 | } |
1477 | |
1478 | Instruction* ElementBitwiseNotInst::clone() const { |
1479 | return new ElementBitwiseNotInst(getName(), getDest(), getSrc()); |
1480 | } |
1481 | |
1482 | llvm::StringRef ElementBitwiseNotInst::getOperandName(unsigned idx) const { |
1483 | if (idx == 0) { return "Dest" ; } |
1484 | if (idx == 1) { return "Src" ; } |
1485 | llvm_unreachable("Invalid index" ); |
1486 | } |
1487 | |
1488 | void ElementNegInst::dump(llvm::raw_ostream &os) const { |
1489 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1490 | dumpOperands(os); |
1491 | } |
1492 | |
1493 | Instruction* ElementNegInst::clone() const { |
1494 | return new ElementNegInst(getName(), getDest(), getSrc()); |
1495 | } |
1496 | |
1497 | llvm::StringRef ElementNegInst::getOperandName(unsigned idx) const { |
1498 | if (idx == 0) { return "Dest" ; } |
1499 | if (idx == 1) { return "Src" ; } |
1500 | llvm_unreachable("Invalid index" ); |
1501 | } |
1502 | |
1503 | void ElementAbsInst::dump(llvm::raw_ostream &os) const { |
1504 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1505 | dumpOperands(os); |
1506 | } |
1507 | |
1508 | Instruction* ElementAbsInst::clone() const { |
1509 | return new ElementAbsInst(getName(), getDest(), getSrc()); |
1510 | } |
1511 | |
1512 | llvm::StringRef ElementAbsInst::getOperandName(unsigned idx) const { |
1513 | if (idx == 0) { return "Dest" ; } |
1514 | if (idx == 1) { return "Src" ; } |
1515 | llvm_unreachable("Invalid index" ); |
1516 | } |
1517 | |
1518 | void ElementFloorInst::dump(llvm::raw_ostream &os) const { |
1519 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1520 | dumpOperands(os); |
1521 | } |
1522 | |
1523 | Instruction* ElementFloorInst::clone() const { |
1524 | return new ElementFloorInst(getName(), getDest(), getSrc()); |
1525 | } |
1526 | |
1527 | llvm::StringRef ElementFloorInst::getOperandName(unsigned idx) const { |
1528 | if (idx == 0) { return "Dest" ; } |
1529 | if (idx == 1) { return "Src" ; } |
1530 | llvm_unreachable("Invalid index" ); |
1531 | } |
1532 | |
1533 | void ElementSignInst::dump(llvm::raw_ostream &os) const { |
1534 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1535 | dumpOperands(os); |
1536 | } |
1537 | |
1538 | Instruction* ElementSignInst::clone() const { |
1539 | return new ElementSignInst(getName(), getDest(), getSrc()); |
1540 | } |
1541 | |
1542 | llvm::StringRef ElementSignInst::getOperandName(unsigned idx) const { |
1543 | if (idx == 0) { return "Dest" ; } |
1544 | if (idx == 1) { return "Src" ; } |
1545 | llvm_unreachable("Invalid index" ); |
1546 | } |
1547 | |
1548 | void ElementCeilInst::dump(llvm::raw_ostream &os) const { |
1549 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1550 | dumpOperands(os); |
1551 | } |
1552 | |
1553 | Instruction* ElementCeilInst::clone() const { |
1554 | return new ElementCeilInst(getName(), getDest(), getSrc()); |
1555 | } |
1556 | |
1557 | llvm::StringRef ElementCeilInst::getOperandName(unsigned idx) const { |
1558 | if (idx == 0) { return "Dest" ; } |
1559 | if (idx == 1) { return "Src" ; } |
1560 | llvm_unreachable("Invalid index" ); |
1561 | } |
1562 | |
1563 | void ElementTruncateInst::dump(llvm::raw_ostream &os) const { |
1564 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1565 | dumpOperands(os); |
1566 | } |
1567 | |
1568 | Instruction* ElementTruncateInst::clone() const { |
1569 | return new ElementTruncateInst(getName(), getDest(), getSrc()); |
1570 | } |
1571 | |
1572 | llvm::StringRef ElementTruncateInst::getOperandName(unsigned idx) const { |
1573 | if (idx == 0) { return "Dest" ; } |
1574 | if (idx == 1) { return "Src" ; } |
1575 | llvm_unreachable("Invalid index" ); |
1576 | } |
1577 | |
1578 | void ElementRoundInst::dump(llvm::raw_ostream &os) const { |
1579 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1580 | dumpOperands(os); |
1581 | } |
1582 | |
1583 | Instruction* ElementRoundInst::clone() const { |
1584 | return new ElementRoundInst(getName(), getDest(), getSrc()); |
1585 | } |
1586 | |
1587 | llvm::StringRef ElementRoundInst::getOperandName(unsigned idx) const { |
1588 | if (idx == 0) { return "Dest" ; } |
1589 | if (idx == 1) { return "Src" ; } |
1590 | llvm_unreachable("Invalid index" ); |
1591 | } |
1592 | |
1593 | void ElementSqrtInst::dump(llvm::raw_ostream &os) const { |
1594 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1595 | dumpOperands(os); |
1596 | } |
1597 | |
1598 | Instruction* ElementSqrtInst::clone() const { |
1599 | return new ElementSqrtInst(getName(), getDest(), getSrc()); |
1600 | } |
1601 | |
1602 | llvm::StringRef ElementSqrtInst::getOperandName(unsigned idx) const { |
1603 | if (idx == 0) { return "Dest" ; } |
1604 | if (idx == 1) { return "Src" ; } |
1605 | llvm_unreachable("Invalid index" ); |
1606 | } |
1607 | |
1608 | void ElementRsqrtInst::dump(llvm::raw_ostream &os) const { |
1609 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1610 | dumpOperands(os); |
1611 | } |
1612 | |
1613 | Instruction* ElementRsqrtInst::clone() const { |
1614 | return new ElementRsqrtInst(getName(), getDest(), getSrc()); |
1615 | } |
1616 | |
1617 | llvm::StringRef ElementRsqrtInst::getOperandName(unsigned idx) const { |
1618 | if (idx == 0) { return "Dest" ; } |
1619 | if (idx == 1) { return "Src" ; } |
1620 | llvm_unreachable("Invalid index" ); |
1621 | } |
1622 | |
1623 | void ElementReciprocalInst::dump(llvm::raw_ostream &os) const { |
1624 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1625 | dumpOperands(os); |
1626 | } |
1627 | |
1628 | Instruction* ElementReciprocalInst::clone() const { |
1629 | return new ElementReciprocalInst(getName(), getDest(), getSrc()); |
1630 | } |
1631 | |
1632 | llvm::StringRef ElementReciprocalInst::getOperandName(unsigned idx) const { |
1633 | if (idx == 0) { return "Dest" ; } |
1634 | if (idx == 1) { return "Src" ; } |
1635 | llvm_unreachable("Invalid index" ); |
1636 | } |
1637 | |
1638 | void ElementSinInst::dump(llvm::raw_ostream &os) const { |
1639 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1640 | dumpOperands(os); |
1641 | } |
1642 | |
1643 | Instruction* ElementSinInst::clone() const { |
1644 | return new ElementSinInst(getName(), getDest(), getSrc()); |
1645 | } |
1646 | |
1647 | llvm::StringRef ElementSinInst::getOperandName(unsigned idx) const { |
1648 | if (idx == 0) { return "Dest" ; } |
1649 | if (idx == 1) { return "Src" ; } |
1650 | llvm_unreachable("Invalid index" ); |
1651 | } |
1652 | |
1653 | void ElementCosInst::dump(llvm::raw_ostream &os) const { |
1654 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1655 | dumpOperands(os); |
1656 | } |
1657 | |
1658 | Instruction* ElementCosInst::clone() const { |
1659 | return new ElementCosInst(getName(), getDest(), getSrc()); |
1660 | } |
1661 | |
1662 | llvm::StringRef ElementCosInst::getOperandName(unsigned idx) const { |
1663 | if (idx == 0) { return "Dest" ; } |
1664 | if (idx == 1) { return "Src" ; } |
1665 | llvm_unreachable("Invalid index" ); |
1666 | } |
1667 | |
1668 | void ElementLogInst::dump(llvm::raw_ostream &os) const { |
1669 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1670 | dumpOperands(os); |
1671 | } |
1672 | |
1673 | Instruction* ElementLogInst::clone() const { |
1674 | return new ElementLogInst(getName(), getDest(), getSrc()); |
1675 | } |
1676 | |
1677 | llvm::StringRef ElementLogInst::getOperandName(unsigned idx) const { |
1678 | if (idx == 0) { return "Dest" ; } |
1679 | if (idx == 1) { return "Src" ; } |
1680 | llvm_unreachable("Invalid index" ); |
1681 | } |
1682 | |
1683 | void ElementExpInst::dump(llvm::raw_ostream &os) const { |
1684 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1685 | dumpOperands(os); |
1686 | } |
1687 | |
1688 | Instruction* ElementExpInst::clone() const { |
1689 | return new ElementExpInst(getName(), getDest(), getSrc()); |
1690 | } |
1691 | |
1692 | llvm::StringRef ElementExpInst::getOperandName(unsigned idx) const { |
1693 | if (idx == 0) { return "Dest" ; } |
1694 | if (idx == 1) { return "Src" ; } |
1695 | llvm_unreachable("Invalid index" ); |
1696 | } |
1697 | |
1698 | void ElementAcosInst::dump(llvm::raw_ostream &os) const { |
1699 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1700 | dumpOperands(os); |
1701 | } |
1702 | |
1703 | Instruction* ElementAcosInst::clone() const { |
1704 | return new ElementAcosInst(getName(), getDest(), getSrc()); |
1705 | } |
1706 | |
1707 | llvm::StringRef ElementAcosInst::getOperandName(unsigned idx) const { |
1708 | if (idx == 0) { return "Dest" ; } |
1709 | if (idx == 1) { return "Src" ; } |
1710 | llvm_unreachable("Invalid index" ); |
1711 | } |
1712 | |
1713 | void ElementAsinInst::dump(llvm::raw_ostream &os) const { |
1714 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1715 | dumpOperands(os); |
1716 | } |
1717 | |
1718 | Instruction* ElementAsinInst::clone() const { |
1719 | return new ElementAsinInst(getName(), getDest(), getSrc()); |
1720 | } |
1721 | |
1722 | llvm::StringRef ElementAsinInst::getOperandName(unsigned idx) const { |
1723 | if (idx == 0) { return "Dest" ; } |
1724 | if (idx == 1) { return "Src" ; } |
1725 | llvm_unreachable("Invalid index" ); |
1726 | } |
1727 | |
1728 | void ElementAtanInst::dump(llvm::raw_ostream &os) const { |
1729 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1730 | dumpOperands(os); |
1731 | } |
1732 | |
1733 | Instruction* ElementAtanInst::clone() const { |
1734 | return new ElementAtanInst(getName(), getDest(), getSrc()); |
1735 | } |
1736 | |
1737 | llvm::StringRef ElementAtanInst::getOperandName(unsigned idx) const { |
1738 | if (idx == 0) { return "Dest" ; } |
1739 | if (idx == 1) { return "Src" ; } |
1740 | llvm_unreachable("Invalid index" ); |
1741 | } |
1742 | |
1743 | void ElementErfInst::dump(llvm::raw_ostream &os) const { |
1744 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1745 | dumpOperands(os); |
1746 | } |
1747 | |
1748 | Instruction* ElementErfInst::clone() const { |
1749 | return new ElementErfInst(getName(), getDest(), getSrc()); |
1750 | } |
1751 | |
1752 | llvm::StringRef ElementErfInst::getOperandName(unsigned idx) const { |
1753 | if (idx == 0) { return "Dest" ; } |
1754 | if (idx == 1) { return "Src" ; } |
1755 | llvm_unreachable("Invalid index" ); |
1756 | } |
1757 | |
1758 | void NonZeroInst::dump(llvm::raw_ostream &os) const { |
1759 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1760 | dumpOperands(os); |
1761 | } |
1762 | |
1763 | Instruction* NonZeroInst::clone() const { |
1764 | return new NonZeroInst(getName(), getDest(), getCond()); |
1765 | } |
1766 | |
1767 | llvm::StringRef NonZeroInst::getOperandName(unsigned idx) const { |
1768 | if (idx == 0) { return "Dest" ; } |
1769 | if (idx == 1) { return "Cond" ; } |
1770 | llvm_unreachable("Invalid index" ); |
1771 | } |
1772 | |
1773 | void ElementSelectInst::dump(llvm::raw_ostream &os) const { |
1774 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1775 | dumpOperands(os); |
1776 | } |
1777 | |
1778 | Instruction* ElementSelectInst::clone() const { |
1779 | return new ElementSelectInst(getName(), getDest(), getCond(), getLHS(), getRHS()); |
1780 | } |
1781 | |
1782 | llvm::StringRef ElementSelectInst::getOperandName(unsigned idx) const { |
1783 | if (idx == 0) { return "Dest" ; } |
1784 | if (idx == 1) { return "Cond" ; } |
1785 | if (idx == 2) { return "LHS" ; } |
1786 | if (idx == 3) { return "RHS" ; } |
1787 | llvm_unreachable("Invalid index" ); |
1788 | } |
1789 | |
1790 | void ModuloInst::dump(llvm::raw_ostream &os) const { |
1791 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1792 | dumpOperands(os); |
1793 | os << " {" |
1794 | << " Divisor: " << getDivisor() |
1795 | << ", SignFollowDivisor: " << getSignFollowDivisor() |
1796 | << "}" ; |
1797 | } |
1798 | |
1799 | Instruction* ModuloInst::clone() const { |
1800 | return new ModuloInst(getName(), getDest(), getSrc(), getDivisor(), getSignFollowDivisor()); |
1801 | } |
1802 | |
1803 | llvm::StringRef ModuloInst::getOperandName(unsigned idx) const { |
1804 | if (idx == 0) { return "Dest" ; } |
1805 | if (idx == 1) { return "Src" ; } |
1806 | llvm_unreachable("Invalid index" ); |
1807 | } |
1808 | |
1809 | void BatchedPairwiseDotProductInst::dump(llvm::raw_ostream &os) const { |
1810 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1811 | dumpOperands(os); |
1812 | os << " {" |
1813 | << " NumInputs: " << getNumInputs() |
1814 | << ", VectorSize: " << getVectorSize() |
1815 | << "}" ; |
1816 | } |
1817 | |
1818 | Instruction* BatchedPairwiseDotProductInst::clone() const { |
1819 | return new BatchedPairwiseDotProductInst(getName(), getDest(), getNumInputs(), getVectorSize()); |
1820 | } |
1821 | |
1822 | llvm::StringRef BatchedPairwiseDotProductInst::getOperandName(unsigned idx) const { |
1823 | if (idx == 0) { return "Dest" ; } |
1824 | llvm_unreachable("Invalid index" ); |
1825 | } |
1826 | |
1827 | void BatchedPairwiseDotProductGradInst::dump(llvm::raw_ostream &os) const { |
1828 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1829 | dumpOperands(os); |
1830 | os << " {" |
1831 | << " NumInputs: " << getNumInputs() |
1832 | << ", VectorSize: " << getVectorSize() |
1833 | << "}" ; |
1834 | } |
1835 | |
1836 | Instruction* BatchedPairwiseDotProductGradInst::clone() const { |
1837 | return new BatchedPairwiseDotProductGradInst(getName(), getDestGrad(), getNumInputs(), getVectorSize()); |
1838 | } |
1839 | |
1840 | llvm::StringRef BatchedPairwiseDotProductGradInst::getOperandName(unsigned idx) const { |
1841 | if (idx == 0) { return "DestGrad" ; } |
1842 | llvm_unreachable("Invalid index" ); |
1843 | } |
1844 | |
1845 | void BatchedUnaryEmbeddingsBagsInst::dump(llvm::raw_ostream &os) const { |
1846 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1847 | dumpOperands(os); |
1848 | } |
1849 | |
1850 | Instruction* BatchedUnaryEmbeddingsBagsInst::clone() const { |
1851 | return new BatchedUnaryEmbeddingsBagsInst(getName(), getDest(), getWeights(), getTableOffsets(), getOffsets(), getIndices()); |
1852 | } |
1853 | |
1854 | llvm::StringRef BatchedUnaryEmbeddingsBagsInst::getOperandName(unsigned idx) const { |
1855 | if (idx == 0) { return "Dest" ; } |
1856 | if (idx == 1) { return "Weights" ; } |
1857 | if (idx == 2) { return "TableOffsets" ; } |
1858 | if (idx == 3) { return "Offsets" ; } |
1859 | if (idx == 4) { return "Indices" ; } |
1860 | llvm_unreachable("Invalid index" ); |
1861 | } |
1862 | |
1863 | void IntNBitSplitEmbeddingBagsInst::dump(llvm::raw_ostream &os) const { |
1864 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1865 | dumpOperands(os); |
1866 | os << " {" |
1867 | << " TotalDims: " << getTotalDims() |
1868 | << ", PoolingMode: " << getPoolingMode() |
1869 | << ", OutputDType: " << getOutputDType() |
1870 | << "}" ; |
1871 | } |
1872 | |
1873 | Instruction* IntNBitSplitEmbeddingBagsInst::clone() const { |
1874 | return new IntNBitSplitEmbeddingBagsInst(getName(), getDest(), getDevWeights(), getUvmWeights(), getWeightsPlacements(), getWeightsOffsets(), getWeightsTys(), getDimOffsets(), getIndices(), getOffsets(), getTotalDims(), getPoolingMode(), getOutputDType()); |
1875 | } |
1876 | |
1877 | llvm::StringRef IntNBitSplitEmbeddingBagsInst::getOperandName(unsigned idx) const { |
1878 | if (idx == 0) { return "Dest" ; } |
1879 | if (idx == 1) { return "DevWeights" ; } |
1880 | if (idx == 2) { return "UvmWeights" ; } |
1881 | if (idx == 3) { return "WeightsPlacements" ; } |
1882 | if (idx == 4) { return "WeightsOffsets" ; } |
1883 | if (idx == 5) { return "WeightsTys" ; } |
1884 | if (idx == 6) { return "DimOffsets" ; } |
1885 | if (idx == 7) { return "Indices" ; } |
1886 | if (idx == 8) { return "Offsets" ; } |
1887 | llvm_unreachable("Invalid index" ); |
1888 | } |
1889 | |
1890 | void IntNBitSplitEmbeddingWeightedBagsInst::dump(llvm::raw_ostream &os) const { |
1891 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1892 | dumpOperands(os); |
1893 | os << " {" |
1894 | << " TotalDims: " << getTotalDims() |
1895 | << ", PoolingMode: " << getPoolingMode() |
1896 | << ", OutputDType: " << getOutputDType() |
1897 | << "}" ; |
1898 | } |
1899 | |
1900 | Instruction* IntNBitSplitEmbeddingWeightedBagsInst::clone() const { |
1901 | return new IntNBitSplitEmbeddingWeightedBagsInst(getName(), getDest(), getDevWeights(), getUvmWeights(), getWeightsPlacements(), getWeightsOffsets(), getWeightsTys(), getDimOffsets(), getIndices(), getOffsets(), getIndiceWeight(), getTotalDims(), getPoolingMode(), getOutputDType()); |
1902 | } |
1903 | |
1904 | llvm::StringRef IntNBitSplitEmbeddingWeightedBagsInst::getOperandName(unsigned idx) const { |
1905 | if (idx == 0) { return "Dest" ; } |
1906 | if (idx == 1) { return "DevWeights" ; } |
1907 | if (idx == 2) { return "UvmWeights" ; } |
1908 | if (idx == 3) { return "WeightsPlacements" ; } |
1909 | if (idx == 4) { return "WeightsOffsets" ; } |
1910 | if (idx == 5) { return "WeightsTys" ; } |
1911 | if (idx == 6) { return "DimOffsets" ; } |
1912 | if (idx == 7) { return "Indices" ; } |
1913 | if (idx == 8) { return "Offsets" ; } |
1914 | if (idx == 9) { return "IndiceWeight" ; } |
1915 | llvm_unreachable("Invalid index" ); |
1916 | } |
1917 | |
1918 | void GaussianFillInst::dump(llvm::raw_ostream &os) const { |
1919 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1920 | dumpOperands(os); |
1921 | os << " {" |
1922 | << " Mean: " << getMean() |
1923 | << ", Scale: " << getScale() |
1924 | << ", Seed: " << getSeed() |
1925 | << "}" ; |
1926 | } |
1927 | |
1928 | Instruction* GaussianFillInst::clone() const { |
1929 | return new GaussianFillInst(getName(), getDest(), getInput(), getMean(), getScale(), getSeed()); |
1930 | } |
1931 | |
1932 | llvm::StringRef GaussianFillInst::getOperandName(unsigned idx) const { |
1933 | if (idx == 0) { return "Dest" ; } |
1934 | if (idx == 1) { return "Input" ; } |
1935 | llvm_unreachable("Invalid index" ); |
1936 | } |
1937 | |
1938 | void ReluGradInst::dump(llvm::raw_ostream &os) const { |
1939 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1940 | dumpOperands(os); |
1941 | } |
1942 | |
1943 | Instruction* ReluGradInst::clone() const { |
1944 | return new ReluGradInst(getName(), getDest(), getDestGrad(), getSrcGrad()); |
1945 | } |
1946 | |
1947 | llvm::StringRef ReluGradInst::getOperandName(unsigned idx) const { |
1948 | if (idx == 0) { return "Dest" ; } |
1949 | if (idx == 1) { return "DestGrad" ; } |
1950 | if (idx == 2) { return "SrcGrad" ; } |
1951 | llvm_unreachable("Invalid index" ); |
1952 | } |
1953 | |
1954 | void ReluInst::dump(llvm::raw_ostream &os) const { |
1955 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1956 | dumpOperands(os); |
1957 | } |
1958 | |
1959 | Instruction* ReluInst::clone() const { |
1960 | return new ReluInst(getName(), getDest(), getSrc()); |
1961 | } |
1962 | |
1963 | llvm::StringRef ReluInst::getOperandName(unsigned idx) const { |
1964 | if (idx == 0) { return "Dest" ; } |
1965 | if (idx == 1) { return "Src" ; } |
1966 | llvm_unreachable("Invalid index" ); |
1967 | } |
1968 | |
1969 | void ClipInst::dump(llvm::raw_ostream &os) const { |
1970 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1971 | dumpOperands(os); |
1972 | os << " {" |
1973 | << " Min: " << getMin() |
1974 | << ", Max: " << getMax() |
1975 | << "}" ; |
1976 | } |
1977 | |
1978 | Instruction* ClipInst::clone() const { |
1979 | return new ClipInst(getName(), getDest(), getSrc(), getMin(), getMax()); |
1980 | } |
1981 | |
1982 | llvm::StringRef ClipInst::getOperandName(unsigned idx) const { |
1983 | if (idx == 0) { return "Dest" ; } |
1984 | if (idx == 1) { return "Src" ; } |
1985 | llvm_unreachable("Invalid index" ); |
1986 | } |
1987 | |
1988 | void SigmoidInst::dump(llvm::raw_ostream &os) const { |
1989 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
1990 | dumpOperands(os); |
1991 | } |
1992 | |
1993 | Instruction* SigmoidInst::clone() const { |
1994 | return new SigmoidInst(getName(), getDest(), getSrc()); |
1995 | } |
1996 | |
1997 | llvm::StringRef SigmoidInst::getOperandName(unsigned idx) const { |
1998 | if (idx == 0) { return "Dest" ; } |
1999 | if (idx == 1) { return "Src" ; } |
2000 | llvm_unreachable("Invalid index" ); |
2001 | } |
2002 | |
2003 | void TanhInst::dump(llvm::raw_ostream &os) const { |
2004 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2005 | dumpOperands(os); |
2006 | } |
2007 | |
2008 | Instruction* TanhInst::clone() const { |
2009 | return new TanhInst(getName(), getDest(), getSrc()); |
2010 | } |
2011 | |
2012 | llvm::StringRef TanhInst::getOperandName(unsigned idx) const { |
2013 | if (idx == 0) { return "Dest" ; } |
2014 | if (idx == 1) { return "Src" ; } |
2015 | llvm_unreachable("Invalid index" ); |
2016 | } |
2017 | |
2018 | void LeakyReluInst::dump(llvm::raw_ostream &os) const { |
2019 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2020 | dumpOperands(os); |
2021 | os << " {" |
2022 | << " Alpha: " << getAlpha() |
2023 | << "}" ; |
2024 | } |
2025 | |
2026 | Instruction* LeakyReluInst::clone() const { |
2027 | return new LeakyReluInst(getName(), getDest(), getSrc(), getAlpha()); |
2028 | } |
2029 | |
2030 | llvm::StringRef LeakyReluInst::getOperandName(unsigned idx) const { |
2031 | if (idx == 0) { return "Dest" ; } |
2032 | if (idx == 1) { return "Src" ; } |
2033 | llvm_unreachable("Invalid index" ); |
2034 | } |
2035 | |
2036 | void SoftPlusInst::dump(llvm::raw_ostream &os) const { |
2037 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2038 | dumpOperands(os); |
2039 | } |
2040 | |
2041 | Instruction* SoftPlusInst::clone() const { |
2042 | return new SoftPlusInst(getName(), getDest(), getSrc()); |
2043 | } |
2044 | |
2045 | llvm::StringRef SoftPlusInst::getOperandName(unsigned idx) const { |
2046 | if (idx == 0) { return "Dest" ; } |
2047 | if (idx == 1) { return "Src" ; } |
2048 | llvm_unreachable("Invalid index" ); |
2049 | } |
2050 | |
2051 | void TransposeInst::dump(llvm::raw_ostream &os) const { |
2052 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2053 | dumpOperands(os); |
2054 | os << " {" |
2055 | << " Shuffle: " << getShuffle() |
2056 | << "}" ; |
2057 | } |
2058 | |
2059 | Instruction* TransposeInst::clone() const { |
2060 | return new TransposeInst(getName(), getDest(), getSrc(), getShuffle()); |
2061 | } |
2062 | |
2063 | llvm::StringRef TransposeInst::getOperandName(unsigned idx) const { |
2064 | if (idx == 0) { return "Dest" ; } |
2065 | if (idx == 1) { return "Src" ; } |
2066 | llvm_unreachable("Invalid index" ); |
2067 | } |
2068 | |
2069 | void ConcatInst::dump(llvm::raw_ostream &os) const { |
2070 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2071 | dumpOperands(os); |
2072 | os << " {" |
2073 | << " Axis: " << getAxis() |
2074 | << "}" ; |
2075 | } |
2076 | |
2077 | Instruction* ConcatInst::clone() const { |
2078 | return new ConcatInst(getName(), getDest(), getAxis()); |
2079 | } |
2080 | |
2081 | llvm::StringRef ConcatInst::getOperandName(unsigned idx) const { |
2082 | if (idx == 0) { return "Dest" ; } |
2083 | llvm_unreachable("Invalid index" ); |
2084 | } |
2085 | |
2086 | void SplatInst::dump(llvm::raw_ostream &os) const { |
2087 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2088 | dumpOperands(os); |
2089 | os << " {" |
2090 | << " Value: " << getValue() |
2091 | << "}" ; |
2092 | } |
2093 | |
2094 | Instruction* SplatInst::clone() const { |
2095 | return new SplatInst(getName(), getDest(), getValue()); |
2096 | } |
2097 | |
2098 | llvm::StringRef SplatInst::getOperandName(unsigned idx) const { |
2099 | if (idx == 0) { return "Dest" ; } |
2100 | llvm_unreachable("Invalid index" ); |
2101 | } |
2102 | |
2103 | void TouchInst::dump(llvm::raw_ostream &os) const { |
2104 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2105 | dumpOperands(os); |
2106 | } |
2107 | |
2108 | Instruction* TouchInst::clone() const { |
2109 | return new TouchInst(getName(), getDest()); |
2110 | } |
2111 | |
2112 | llvm::StringRef TouchInst::getOperandName(unsigned idx) const { |
2113 | if (idx == 0) { return "Dest" ; } |
2114 | llvm_unreachable("Invalid index" ); |
2115 | } |
2116 | |
2117 | void InsertTensorInst::dump(llvm::raw_ostream &os) const { |
2118 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2119 | dumpOperands(os); |
2120 | os << " {" |
2121 | << " Offsets: " << getOffsets() |
2122 | << ", Count: " << getCount() |
2123 | << ", Axis: " << getAxis() |
2124 | << "}" ; |
2125 | } |
2126 | |
2127 | Instruction* InsertTensorInst::clone() const { |
2128 | return new InsertTensorInst(getName(), getDest(), getSrc(), getOffsets(), getCount(), getAxis()); |
2129 | } |
2130 | |
2131 | llvm::StringRef InsertTensorInst::getOperandName(unsigned idx) const { |
2132 | if (idx == 0) { return "Dest" ; } |
2133 | if (idx == 1) { return "Src" ; } |
2134 | llvm_unreachable("Invalid index" ); |
2135 | } |
2136 | |
2137 | void ExtractTensorInst::(llvm::raw_ostream &os) const { |
2138 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2139 | dumpOperands(os); |
2140 | os << " {" |
2141 | << " Offsets: " << getOffsets() |
2142 | << "}" ; |
2143 | } |
2144 | |
2145 | Instruction* ExtractTensorInst::() const { |
2146 | return new ExtractTensorInst(getName(), getDest(), getSrc(), getOffsets()); |
2147 | } |
2148 | |
2149 | llvm::StringRef ExtractTensorInst::getOperandName(unsigned idx) const { |
2150 | if (idx == 0) { return "Dest" ; } |
2151 | if (idx == 1) { return "Src" ; } |
2152 | llvm_unreachable("Invalid index" ); |
2153 | } |
2154 | |
2155 | void GatherInst::dump(llvm::raw_ostream &os) const { |
2156 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2157 | dumpOperands(os); |
2158 | os << " {" |
2159 | << " BatchDims: " << getBatchDims() |
2160 | << "}" ; |
2161 | } |
2162 | |
2163 | Instruction* GatherInst::clone() const { |
2164 | return new GatherInst(getName(), getDest(), getData(), getIndices(), getBatchDims()); |
2165 | } |
2166 | |
2167 | llvm::StringRef GatherInst::getOperandName(unsigned idx) const { |
2168 | if (idx == 0) { return "Dest" ; } |
2169 | if (idx == 1) { return "Data" ; } |
2170 | if (idx == 2) { return "Indices" ; } |
2171 | llvm_unreachable("Invalid index" ); |
2172 | } |
2173 | |
2174 | void GatherNDInst::dump(llvm::raw_ostream &os) const { |
2175 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2176 | dumpOperands(os); |
2177 | os << " {" |
2178 | << " BatchDims: " << getBatchDims() |
2179 | << "}" ; |
2180 | } |
2181 | |
2182 | Instruction* GatherNDInst::clone() const { |
2183 | return new GatherNDInst(getName(), getDest(), getData(), getIndices(), getBatchDims()); |
2184 | } |
2185 | |
2186 | llvm::StringRef GatherNDInst::getOperandName(unsigned idx) const { |
2187 | if (idx == 0) { return "Dest" ; } |
2188 | if (idx == 1) { return "Data" ; } |
2189 | if (idx == 2) { return "Indices" ; } |
2190 | llvm_unreachable("Invalid index" ); |
2191 | } |
2192 | |
2193 | void GatherElementsInst::dump(llvm::raw_ostream &os) const { |
2194 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2195 | dumpOperands(os); |
2196 | os << " {" |
2197 | << " Dim: " << getDim() |
2198 | << "}" ; |
2199 | } |
2200 | |
2201 | Instruction* GatherElementsInst::clone() const { |
2202 | return new GatherElementsInst(getName(), getDest(), getData(), getIndices(), getDim()); |
2203 | } |
2204 | |
2205 | llvm::StringRef GatherElementsInst::getOperandName(unsigned idx) const { |
2206 | if (idx == 0) { return "Dest" ; } |
2207 | if (idx == 1) { return "Data" ; } |
2208 | if (idx == 2) { return "Indices" ; } |
2209 | llvm_unreachable("Invalid index" ); |
2210 | } |
2211 | |
2212 | void GatherRangesInst::dump(llvm::raw_ostream &os) const { |
2213 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2214 | dumpOperands(os); |
2215 | } |
2216 | |
2217 | Instruction* GatherRangesInst::clone() const { |
2218 | return new GatherRangesInst(getName(), getOutput(), getLengths(), getData(), getRanges()); |
2219 | } |
2220 | |
2221 | llvm::StringRef GatherRangesInst::getOperandName(unsigned idx) const { |
2222 | if (idx == 0) { return "Output" ; } |
2223 | if (idx == 1) { return "Lengths" ; } |
2224 | if (idx == 2) { return "Data" ; } |
2225 | if (idx == 3) { return "Ranges" ; } |
2226 | llvm_unreachable("Invalid index" ); |
2227 | } |
2228 | |
2229 | void ScatterDataInst::dump(llvm::raw_ostream &os) const { |
2230 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2231 | dumpOperands(os); |
2232 | os << " {" |
2233 | << " Cumulative: " << getCumulative() |
2234 | << "}" ; |
2235 | } |
2236 | |
2237 | Instruction* ScatterDataInst::clone() const { |
2238 | return new ScatterDataInst(getName(), getData(), getIndices(), getSlices(), getCumulative()); |
2239 | } |
2240 | |
2241 | llvm::StringRef ScatterDataInst::getOperandName(unsigned idx) const { |
2242 | if (idx == 0) { return "Data" ; } |
2243 | if (idx == 1) { return "Indices" ; } |
2244 | if (idx == 2) { return "Slices" ; } |
2245 | llvm_unreachable("Invalid index" ); |
2246 | } |
2247 | |
2248 | void BatchOneHotInst::dump(llvm::raw_ostream &os) const { |
2249 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2250 | dumpOperands(os); |
2251 | } |
2252 | |
2253 | Instruction* BatchOneHotInst::clone() const { |
2254 | return new BatchOneHotInst(getName(), getDest(), getData(), getLengths(), getValues()); |
2255 | } |
2256 | |
2257 | llvm::StringRef BatchOneHotInst::getOperandName(unsigned idx) const { |
2258 | if (idx == 0) { return "Dest" ; } |
2259 | if (idx == 1) { return "Data" ; } |
2260 | if (idx == 2) { return "Lengths" ; } |
2261 | if (idx == 3) { return "Values" ; } |
2262 | llvm_unreachable("Invalid index" ); |
2263 | } |
2264 | |
2265 | void SpaceToDepthInst::dump(llvm::raw_ostream &os) const { |
2266 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2267 | dumpOperands(os); |
2268 | os << " {" |
2269 | << " BlockSize: " << getBlockSize() |
2270 | << "}" ; |
2271 | } |
2272 | |
2273 | Instruction* SpaceToDepthInst::clone() const { |
2274 | return new SpaceToDepthInst(getName(), getDest(), getSrc(), getBlockSize()); |
2275 | } |
2276 | |
2277 | llvm::StringRef SpaceToDepthInst::getOperandName(unsigned idx) const { |
2278 | if (idx == 0) { return "Dest" ; } |
2279 | if (idx == 1) { return "Src" ; } |
2280 | llvm_unreachable("Invalid index" ); |
2281 | } |
2282 | |
2283 | void ResizeNearestInst::dump(llvm::raw_ostream &os) const { |
2284 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2285 | dumpOperands(os); |
2286 | os << " {" |
2287 | << " Scale: " << getScale() |
2288 | << "}" ; |
2289 | } |
2290 | |
2291 | Instruction* ResizeNearestInst::clone() const { |
2292 | return new ResizeNearestInst(getName(), getDest(), getSrc(), getScale()); |
2293 | } |
2294 | |
2295 | llvm::StringRef ResizeNearestInst::getOperandName(unsigned idx) const { |
2296 | if (idx == 0) { return "Dest" ; } |
2297 | if (idx == 1) { return "Src" ; } |
2298 | llvm_unreachable("Invalid index" ); |
2299 | } |
2300 | |
2301 | void ResizeBilinearInst::dump(llvm::raw_ostream &os) const { |
2302 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2303 | dumpOperands(os); |
2304 | os << " {" |
2305 | << " Scale: " << getScale() |
2306 | << "}" ; |
2307 | } |
2308 | |
2309 | Instruction* ResizeBilinearInst::clone() const { |
2310 | return new ResizeBilinearInst(getName(), getDest(), getSrc(), getScale()); |
2311 | } |
2312 | |
2313 | llvm::StringRef ResizeBilinearInst::getOperandName(unsigned idx) const { |
2314 | if (idx == 0) { return "Dest" ; } |
2315 | if (idx == 1) { return "Src" ; } |
2316 | llvm_unreachable("Invalid index" ); |
2317 | } |
2318 | |
2319 | void SparseLabelSplitInst::dump(llvm::raw_ostream &os) const { |
2320 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2321 | dumpOperands(os); |
2322 | os << " {" |
2323 | << " NumLabels: " << getNumLabels() |
2324 | << "}" ; |
2325 | } |
2326 | |
2327 | Instruction* SparseLabelSplitInst::clone() const { |
2328 | return new SparseLabelSplitInst(getName(), getLabelValues(), getExampleIds(), getGradientOffsetMap(), getLengths(), getIndices(), getValues(), getNumLabels()); |
2329 | } |
2330 | |
2331 | llvm::StringRef SparseLabelSplitInst::getOperandName(unsigned idx) const { |
2332 | if (idx == 0) { return "LabelValues" ; } |
2333 | if (idx == 1) { return "ExampleIds" ; } |
2334 | if (idx == 2) { return "GradientOffsetMap" ; } |
2335 | if (idx == 3) { return "Lengths" ; } |
2336 | if (idx == 4) { return "Indices" ; } |
2337 | if (idx == 5) { return "Values" ; } |
2338 | llvm_unreachable("Invalid index" ); |
2339 | } |
2340 | |
2341 | void FlipInst::dump(llvm::raw_ostream &os) const { |
2342 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2343 | dumpOperands(os); |
2344 | os << " {" |
2345 | << " Axis: " << getAxis() |
2346 | << "}" ; |
2347 | } |
2348 | |
2349 | Instruction* FlipInst::clone() const { |
2350 | return new FlipInst(getName(), getDest(), getSrc(), getAxis()); |
2351 | } |
2352 | |
2353 | llvm::StringRef FlipInst::getOperandName(unsigned idx) const { |
2354 | if (idx == 0) { return "Dest" ; } |
2355 | if (idx == 1) { return "Src" ; } |
2356 | llvm_unreachable("Invalid index" ); |
2357 | } |
2358 | |
2359 | void DebugPrintInst::dump(llvm::raw_ostream &os) const { |
2360 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2361 | dumpOperands(os); |
2362 | os << " {" |
2363 | << " Format: " << getFormat() |
2364 | << ", FileName: " << getFileName() |
2365 | << "}" ; |
2366 | } |
2367 | |
2368 | Instruction* DebugPrintInst::clone() const { |
2369 | return new DebugPrintInst(getName(), getSrc(), getFormat(), getFileName()); |
2370 | } |
2371 | |
2372 | llvm::StringRef DebugPrintInst::getOperandName(unsigned idx) const { |
2373 | if (idx == 0) { return "Src" ; } |
2374 | llvm_unreachable("Invalid index" ); |
2375 | } |
2376 | |
2377 | void TraceEventInst::dump(llvm::raw_ostream &os) const { |
2378 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2379 | dumpOperands(os); |
2380 | os << " {" |
2381 | << " Index: " << getIndex() |
2382 | << "}" ; |
2383 | } |
2384 | |
2385 | Instruction* TraceEventInst::clone() const { |
2386 | return new TraceEventInst(getName(), getData(), getIndex()); |
2387 | } |
2388 | |
2389 | llvm::StringRef TraceEventInst::getOperandName(unsigned idx) const { |
2390 | if (idx == 0) { return "Data" ; } |
2391 | llvm_unreachable("Invalid index" ); |
2392 | } |
2393 | |
2394 | void InstrumentInst::dump(llvm::raw_ostream &os) const { |
2395 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2396 | dumpOperands(os); |
2397 | os << " {" |
2398 | << " InstrRef: " << getInstrRef() |
2399 | << ", ID: " << getID() |
2400 | << ", InstrumentKind: " << getInstrumentKind() |
2401 | << "}" ; |
2402 | } |
2403 | |
2404 | Instruction* InstrumentInst::clone() const { |
2405 | return new InstrumentInst(getName(), getOperandsInfo(), getInstrRef(), getID(), getInstrumentKind()); |
2406 | } |
2407 | |
2408 | llvm::StringRef InstrumentInst::getOperandName(unsigned idx) const { |
2409 | if (idx == 0) { return "OperandsInfo" ; } |
2410 | llvm_unreachable("Invalid index" ); |
2411 | } |
2412 | |
2413 | void QuantizationProfileInst::dump(llvm::raw_ostream &os) const { |
2414 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2415 | dumpOperands(os); |
2416 | } |
2417 | |
2418 | Instruction* QuantizationProfileInst::clone() const { |
2419 | return new QuantizationProfileInst(getName(), getInputTensor(), getHistogram(), getComputationInfo()); |
2420 | } |
2421 | |
2422 | llvm::StringRef QuantizationProfileInst::getOperandName(unsigned idx) const { |
2423 | if (idx == 0) { return "InputTensor" ; } |
2424 | if (idx == 1) { return "Histogram" ; } |
2425 | if (idx == 2) { return "ComputationInfo" ; } |
2426 | llvm_unreachable("Invalid index" ); |
2427 | } |
2428 | |
2429 | void IntLookupTableInst::dump(llvm::raw_ostream &os) const { |
2430 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2431 | dumpOperands(os); |
2432 | } |
2433 | |
2434 | Instruction* IntLookupTableInst::clone() const { |
2435 | return new IntLookupTableInst(getName(), getDest(), getSrc(), getMapping()); |
2436 | } |
2437 | |
2438 | llvm::StringRef IntLookupTableInst::getOperandName(unsigned idx) const { |
2439 | if (idx == 0) { return "Dest" ; } |
2440 | if (idx == 1) { return "Src" ; } |
2441 | if (idx == 2) { return "Mapping" ; } |
2442 | llvm_unreachable("Invalid index" ); |
2443 | } |
2444 | |
2445 | void QuantizeInst::dump(llvm::raw_ostream &os) const { |
2446 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2447 | dumpOperands(os); |
2448 | } |
2449 | |
2450 | Instruction* QuantizeInst::clone() const { |
2451 | return new QuantizeInst(getName(), getDest(), getSrc()); |
2452 | } |
2453 | |
2454 | llvm::StringRef QuantizeInst::getOperandName(unsigned idx) const { |
2455 | if (idx == 0) { return "Dest" ; } |
2456 | if (idx == 1) { return "Src" ; } |
2457 | llvm_unreachable("Invalid index" ); |
2458 | } |
2459 | |
2460 | void DequantizeInst::dump(llvm::raw_ostream &os) const { |
2461 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2462 | dumpOperands(os); |
2463 | } |
2464 | |
2465 | Instruction* DequantizeInst::clone() const { |
2466 | return new DequantizeInst(getName(), getDest(), getSrc()); |
2467 | } |
2468 | |
2469 | llvm::StringRef DequantizeInst::getOperandName(unsigned idx) const { |
2470 | if (idx == 0) { return "Dest" ; } |
2471 | if (idx == 1) { return "Src" ; } |
2472 | llvm_unreachable("Invalid index" ); |
2473 | } |
2474 | |
2475 | void RescaleQuantizedInst::dump(llvm::raw_ostream &os) const { |
2476 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2477 | dumpOperands(os); |
2478 | } |
2479 | |
2480 | Instruction* RescaleQuantizedInst::clone() const { |
2481 | return new RescaleQuantizedInst(getName(), getDest(), getSrc()); |
2482 | } |
2483 | |
2484 | llvm::StringRef RescaleQuantizedInst::getOperandName(unsigned idx) const { |
2485 | if (idx == 0) { return "Dest" ; } |
2486 | if (idx == 1) { return "Src" ; } |
2487 | llvm_unreachable("Invalid index" ); |
2488 | } |
2489 | |
2490 | void TopKInst::dump(llvm::raw_ostream &os) const { |
2491 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2492 | dumpOperands(os); |
2493 | os << " {" |
2494 | << " K: " << getK() |
2495 | << "}" ; |
2496 | } |
2497 | |
2498 | Instruction* TopKInst::clone() const { |
2499 | return new TopKInst(getName(), getValues(), getIndices(), getInput(), getScratch(), getK()); |
2500 | } |
2501 | |
2502 | llvm::StringRef TopKInst::getOperandName(unsigned idx) const { |
2503 | if (idx == 0) { return "Values" ; } |
2504 | if (idx == 1) { return "Indices" ; } |
2505 | if (idx == 2) { return "Input" ; } |
2506 | if (idx == 3) { return "Scratch" ; } |
2507 | llvm_unreachable("Invalid index" ); |
2508 | } |
2509 | |
2510 | void ConvertToInst::dump(llvm::raw_ostream &os) const { |
2511 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2512 | dumpOperands(os); |
2513 | } |
2514 | |
2515 | Instruction* ConvertToInst::clone() const { |
2516 | return new ConvertToInst(getName(), getResult(), getInput()); |
2517 | } |
2518 | |
2519 | llvm::StringRef ConvertToInst::getOperandName(unsigned idx) const { |
2520 | if (idx == 0) { return "Result" ; } |
2521 | if (idx == 1) { return "Input" ; } |
2522 | llvm_unreachable("Invalid index" ); |
2523 | } |
2524 | |
2525 | void ExternalFunctionCallInst::dump(llvm::raw_ostream &os) const { |
2526 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2527 | dumpOperands(os); |
2528 | os << " {" |
2529 | << " FunctionName: " << getFunctionName() |
2530 | << ", FunctionImpl: " << getFunctionImpl() |
2531 | << ", FunctionKind: " << getFunctionKind() |
2532 | << "}" ; |
2533 | } |
2534 | |
2535 | Instruction* ExternalFunctionCallInst::clone() const { |
2536 | return new ExternalFunctionCallInst(getName(), getDest(), getFunctionName(), getFunctionImpl(), getFunctionKind()); |
2537 | } |
2538 | |
2539 | llvm::StringRef ExternalFunctionCallInst::getOperandName(unsigned idx) const { |
2540 | if (idx == 0) { return "Dest" ; } |
2541 | llvm_unreachable("Invalid index" ); |
2542 | } |
2543 | |
2544 | void AudioSpectrogramInst::dump(llvm::raw_ostream &os) const { |
2545 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2546 | dumpOperands(os); |
2547 | os << " {" |
2548 | << " WindowSize: " << getWindowSize() |
2549 | << ", WindowStride: " << getWindowStride() |
2550 | << ", MagnitudeSquared: " << getMagnitudeSquared() |
2551 | << "}" ; |
2552 | } |
2553 | |
2554 | Instruction* AudioSpectrogramInst::clone() const { |
2555 | return new AudioSpectrogramInst(getName(), getSpectrogram(), getInput(), getWindow(), getTwiddleFactors(), getBitReverseIndices(), getComplexToRealWeights(), getWinOutScratch(), getFftOutScratch(), getWindowSize(), getWindowStride(), getMagnitudeSquared()); |
2556 | } |
2557 | |
2558 | llvm::StringRef AudioSpectrogramInst::getOperandName(unsigned idx) const { |
2559 | if (idx == 0) { return "Spectrogram" ; } |
2560 | if (idx == 1) { return "Input" ; } |
2561 | if (idx == 2) { return "Window" ; } |
2562 | if (idx == 3) { return "TwiddleFactors" ; } |
2563 | if (idx == 4) { return "BitReverseIndices" ; } |
2564 | if (idx == 5) { return "ComplexToRealWeights" ; } |
2565 | if (idx == 6) { return "WinOutScratch" ; } |
2566 | if (idx == 7) { return "FftOutScratch" ; } |
2567 | llvm_unreachable("Invalid index" ); |
2568 | } |
2569 | |
2570 | void MFCCInst::dump(llvm::raw_ostream &os) const { |
2571 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2572 | dumpOperands(os); |
2573 | os << " {" |
2574 | << " SampleRate: " << getSampleRate() |
2575 | << ", LowerFrequency: " << getLowerFrequency() |
2576 | << ", UpperFrequency: " << getUpperFrequency() |
2577 | << ", FilterBankCount: " << getFilterBankCount() |
2578 | << ", NumCoefficients: " << getNumCoefficients() |
2579 | << "}" ; |
2580 | } |
2581 | |
2582 | Instruction* MFCCInst::clone() const { |
2583 | return new MFCCInst(getName(), getCoefficients(), getSpectrogram(), getMelWeights(), getMelRanges(), getDctMat(), getScratch(), getSampleRate(), getLowerFrequency(), getUpperFrequency(), getFilterBankCount(), getNumCoefficients()); |
2584 | } |
2585 | |
2586 | llvm::StringRef MFCCInst::getOperandName(unsigned idx) const { |
2587 | if (idx == 0) { return "Coefficients" ; } |
2588 | if (idx == 1) { return "Spectrogram" ; } |
2589 | if (idx == 2) { return "MelWeights" ; } |
2590 | if (idx == 3) { return "MelRanges" ; } |
2591 | if (idx == 4) { return "DctMat" ; } |
2592 | if (idx == 5) { return "Scratch" ; } |
2593 | llvm_unreachable("Invalid index" ); |
2594 | } |
2595 | |
2596 | void NonMaxSuppressionInst::dump(llvm::raw_ostream &os) const { |
2597 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2598 | dumpOperands(os); |
2599 | os << " {" |
2600 | << " CenterPointBox: " << getCenterPointBox() |
2601 | << ", MaxOutputBoxesPerClass: " << getMaxOutputBoxesPerClass() |
2602 | << ", IouThreshold: " << getIouThreshold() |
2603 | << ", ScoreThreshold: " << getScoreThreshold() |
2604 | << ", IsTFVersion4: " << getIsTFVersion4() |
2605 | << "}" ; |
2606 | } |
2607 | |
2608 | Instruction* NonMaxSuppressionInst::clone() const { |
2609 | return new NonMaxSuppressionInst(getName(), getIndices(), getNumberOfSelectedIndices(), getBoxes(), getScores(), getCenterPointBox(), getMaxOutputBoxesPerClass(), getIouThreshold(), getScoreThreshold(), getIsTFVersion4()); |
2610 | } |
2611 | |
2612 | llvm::StringRef NonMaxSuppressionInst::getOperandName(unsigned idx) const { |
2613 | if (idx == 0) { return "Indices" ; } |
2614 | if (idx == 1) { return "NumberOfSelectedIndices" ; } |
2615 | if (idx == 2) { return "Boxes" ; } |
2616 | if (idx == 3) { return "Scores" ; } |
2617 | llvm_unreachable("Invalid index" ); |
2618 | } |
2619 | |
2620 | void TFLiteDetectionPostProcessInst::dump(llvm::raw_ostream &os) const { |
2621 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2622 | dumpOperands(os); |
2623 | os << " {" |
2624 | << " NumClasses: " << getNumClasses() |
2625 | << ", MaxDetections: " << getMaxDetections() |
2626 | << ", MaxClassesPerDetection: " << getMaxClassesPerDetection() |
2627 | << ", MaxDetectionsPerClass: " << getMaxDetectionsPerClass() |
2628 | << ", IouThreshold: " << getIouThreshold() |
2629 | << ", ScoreThreshold: " << getScoreThreshold() |
2630 | << ", XScale: " << getXScale() |
2631 | << ", YScale: " << getYScale() |
2632 | << ", HScale: " << getHScale() |
2633 | << ", WScale: " << getWScale() |
2634 | << ", RegularNMS: " << getRegularNMS() |
2635 | << "}" ; |
2636 | } |
2637 | |
2638 | Instruction* TFLiteDetectionPostProcessInst::clone() const { |
2639 | return new TFLiteDetectionPostProcessInst(getName(), getDetectionBoxes(), getDetectionClasses(), getDetectionScores(), getNumDetections(), getBoxes(), getScores(), getAnchors(), getScratch(), getNumClasses(), getMaxDetections(), getMaxClassesPerDetection(), getMaxDetectionsPerClass(), getIouThreshold(), getScoreThreshold(), getXScale(), getYScale(), getHScale(), getWScale(), getRegularNMS()); |
2640 | } |
2641 | |
2642 | llvm::StringRef TFLiteDetectionPostProcessInst::getOperandName(unsigned idx) const { |
2643 | if (idx == 0) { return "DetectionBoxes" ; } |
2644 | if (idx == 1) { return "DetectionClasses" ; } |
2645 | if (idx == 2) { return "DetectionScores" ; } |
2646 | if (idx == 3) { return "NumDetections" ; } |
2647 | if (idx == 4) { return "Boxes" ; } |
2648 | if (idx == 5) { return "Scores" ; } |
2649 | if (idx == 6) { return "Anchors" ; } |
2650 | if (idx == 7) { return "Scratch" ; } |
2651 | llvm_unreachable("Invalid index" ); |
2652 | } |
2653 | |
2654 | void ROIAlignInst::dump(llvm::raw_ostream &os) const { |
2655 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2656 | dumpOperands(os); |
2657 | os << " {" |
2658 | << " Mode: " << getMode() |
2659 | << ", OutputHeight: " << getOutputHeight() |
2660 | << ", OutputWidth: " << getOutputWidth() |
2661 | << ", SamplingRatio: " << getSamplingRatio() |
2662 | << ", SpatialScale: " << getSpatialScale() |
2663 | << ", Aligned: " << getAligned() |
2664 | << ", Rotated: " << getRotated() |
2665 | << "}" ; |
2666 | } |
2667 | |
2668 | Instruction* ROIAlignInst::clone() const { |
2669 | return new ROIAlignInst(getName(), getResult(), getFeatureMap(), getBoxes(), getBatchIndices(), getMode(), getOutputHeight(), getOutputWidth(), getSamplingRatio(), getSpatialScale(), getAligned(), getRotated()); |
2670 | } |
2671 | |
2672 | llvm::StringRef ROIAlignInst::getOperandName(unsigned idx) const { |
2673 | if (idx == 0) { return "Result" ; } |
2674 | if (idx == 1) { return "FeatureMap" ; } |
2675 | if (idx == 2) { return "Boxes" ; } |
2676 | if (idx == 3) { return "BatchIndices" ; } |
2677 | llvm_unreachable("Invalid index" ); |
2678 | } |
2679 | |
2680 | void BBoxTransformInst::dump(llvm::raw_ostream &os) const { |
2681 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2682 | dumpOperands(os); |
2683 | os << " {" |
2684 | << " Weights: " << getWeights() |
2685 | << ", ApplyScale: " << getApplyScale() |
2686 | << ", Rotated: " << getRotated() |
2687 | << ", AngleBoundOn: " << getAngleBoundOn() |
2688 | << ", AngleBoundLo: " << getAngleBoundLo() |
2689 | << ", AngleBoundHi: " << getAngleBoundHi() |
2690 | << ", ClipAngleThresh: " << getClipAngleThresh() |
2691 | << ", LegacyPlusOne: " << getLegacyPlusOne() |
2692 | << "}" ; |
2693 | } |
2694 | |
2695 | Instruction* BBoxTransformInst::clone() const { |
2696 | return new BBoxTransformInst(getName(), getBoxOut(), getRoiBatchSplits(), getRois(), getDeltas(), getImInfo(), getWeights(), getApplyScale(), getRotated(), getAngleBoundOn(), getAngleBoundLo(), getAngleBoundHi(), getClipAngleThresh(), getLegacyPlusOne()); |
2697 | } |
2698 | |
2699 | llvm::StringRef BBoxTransformInst::getOperandName(unsigned idx) const { |
2700 | if (idx == 0) { return "BoxOut" ; } |
2701 | if (idx == 1) { return "RoiBatchSplits" ; } |
2702 | if (idx == 2) { return "Rois" ; } |
2703 | if (idx == 3) { return "Deltas" ; } |
2704 | if (idx == 4) { return "ImInfo" ; } |
2705 | llvm_unreachable("Invalid index" ); |
2706 | } |
2707 | |
2708 | void CollectRpnProposalsInst::dump(llvm::raw_ostream &os) const { |
2709 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2710 | dumpOperands(os); |
2711 | os << " {" |
2712 | << " RpnMaxLevel: " << getRpnMaxLevel() |
2713 | << ", RpnMinLevel: " << getRpnMinLevel() |
2714 | << ", RpnPostNmsTopN: " << getRpnPostNmsTopN() |
2715 | << "}" ; |
2716 | } |
2717 | |
2718 | Instruction* CollectRpnProposalsInst::clone() const { |
2719 | return new CollectRpnProposalsInst(getName(), getResult(), getRpnMaxLevel(), getRpnMinLevel(), getRpnPostNmsTopN()); |
2720 | } |
2721 | |
2722 | llvm::StringRef CollectRpnProposalsInst::getOperandName(unsigned idx) const { |
2723 | if (idx == 0) { return "Result" ; } |
2724 | llvm_unreachable("Invalid index" ); |
2725 | } |
2726 | |
2727 | void LookupTableInst::dump(llvm::raw_ostream &os) const { |
2728 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2729 | dumpOperands(os); |
2730 | os << " {" |
2731 | << " Operator: " << getOperator() |
2732 | << ", OperatorArgs: " << getOperatorArgs() |
2733 | << "}" ; |
2734 | } |
2735 | |
2736 | Instruction* LookupTableInst::clone() const { |
2737 | return new LookupTableInst(getName(), getDest(), getSrc(), getTable(), getTableIdx(), getOperator(), getOperatorArgs()); |
2738 | } |
2739 | |
2740 | llvm::StringRef LookupTableInst::getOperandName(unsigned idx) const { |
2741 | if (idx == 0) { return "Dest" ; } |
2742 | if (idx == 1) { return "Src" ; } |
2743 | if (idx == 2) { return "Table" ; } |
2744 | if (idx == 3) { return "TableIdx" ; } |
2745 | llvm_unreachable("Invalid index" ); |
2746 | } |
2747 | |
2748 | void CPUMaxSplatInst::dump(llvm::raw_ostream &os) const { |
2749 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2750 | dumpOperands(os); |
2751 | os << " {" |
2752 | << " SplatValue: " << getSplatValue() |
2753 | << "}" ; |
2754 | } |
2755 | |
2756 | Instruction* CPUMaxSplatInst::clone() const { |
2757 | return new CPUMaxSplatInst(getName(), getDest(), getSrc(), getSplatValue()); |
2758 | } |
2759 | |
2760 | llvm::StringRef CPUMaxSplatInst::getOperandName(unsigned idx) const { |
2761 | if (idx == 0) { return "Dest" ; } |
2762 | if (idx == 1) { return "Src" ; } |
2763 | llvm_unreachable("Invalid index" ); |
2764 | } |
2765 | |
2766 | void CPUConvDKKC8Inst::dump(llvm::raw_ostream &os) const { |
2767 | os << "%" << (std::string) getName() << " = " << getKindName() << " " ; |
2768 | dumpOperands(os); |
2769 | os << " {" |
2770 | << " Kernels: " << getKernels() |
2771 | << ", Strides: " << getStrides() |
2772 | << ", Pads: " << getPads() |
2773 | << ", Group: " << getGroup() |
2774 | << "}" ; |
2775 | } |
2776 | |
2777 | Instruction* CPUConvDKKC8Inst::clone() const { |
2778 | return new CPUConvDKKC8Inst(getName(), getDest(), getSrc(), getFilter(), getBias(), getKernels(), getStrides(), getPads(), getGroup()); |
2779 | } |
2780 | |
2781 | llvm::StringRef CPUConvDKKC8Inst::getOperandName(unsigned idx) const { |
2782 | if (idx == 0) { return "Dest" ; } |
2783 | if (idx == 1) { return "Src" ; } |
2784 | if (idx == 2) { return "Filter" ; } |
2785 | if (idx == 3) { return "Bias" ; } |
2786 | llvm_unreachable("Invalid index" ); |
2787 | } |
2788 | |
2789 | #include "glow/CPUSpecificInstrsVerification.h" |
2790 | |