comp_op_cost.py 43.5 KB
Newer Older
C
caozhou 已提交
1
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
2 3 4 5 6 7 8 9 10 11 12 13 14
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License

15
from .base_cost import CompOpCost, register_op_cost
C
caozhou 已提交
16 17


C
caozhou 已提交
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
@register_op_cost
class AdamOpCost(CompOpCost):
    OP_TYPE = "adam"

    def __init__(self, op=None, op_desc=None, cluster=None):
        super(AdamOpCost, self).__init__(op=op,
                                         op_desc=op_desc,
                                         cluster=cluster)

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


C
caozhou 已提交
37 38 39 40 41
@register_op_cost
class AssignOpCost(CompOpCost):
    OP_TYPE = "assign"

    def __init__(self, op=None, op_desc=None, cluster=None):
42 43 44
        super(AssignOpCost, self).__init__(op=op,
                                           op_desc=op_desc,
                                           cluster=cluster)
C
caozhou 已提交
45

C
caozhou 已提交
46
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
47 48 49 50 51 52 53 54 55 56 57 58 59 60
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class AssignValueOpCost(CompOpCost):
    OP_TYPE = "assign_value"

    def __init__(self, op=None, op_desc=None, cluster=None):
61 62 63
        super(AssignValueOpCost, self).__init__(op=op,
                                                op_desc=op_desc,
                                                cluster=cluster)
C
caozhou 已提交
64

C
caozhou 已提交
65
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
66 67 68 69 70 71 72 73 74 75 76 77 78 79
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class BeamSearchOpCost(CompOpCost):
    OP_TYPE = "beam_search"

    def __init__(self, op=None, op_desc=None, cluster=None):
80 81 82
        super(BeamSearchOpCost, self).__init__(op=op,
                                               op_desc=op_desc,
                                               cluster=cluster)
C
caozhou 已提交
83

C
caozhou 已提交
84
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
85 86 87 88 89 90 91 92 93 94 95 96 97 98
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class BeamSearchDecodeOpCost(CompOpCost):
    OP_TYPE = "beam_search_decode"

    def __init__(self, op=None, op_desc=None, cluster=None):
99 100 101
        super(BeamSearchDecodeOpCost, self).__init__(op=op,
                                                     op_desc=op_desc,
                                                     cluster=cluster)
C
caozhou 已提交
102

C
caozhou 已提交
103
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
104 105 106 107 108 109 110 111 112 113 114 115 116 117
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class CastOpCost(CompOpCost):
    OP_TYPE = "cast"

    def __init__(self, op=None, op_desc=None, cluster=None):
118 119 120
        super(CastOpCost, self).__init__(op=op,
                                         op_desc=op_desc,
                                         cluster=cluster)
C
caozhou 已提交
121

C
caozhou 已提交
122
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
123 124 125 126 127 128 129 130 131 132 133 134 135 136
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class ConcatOpCost(CompOpCost):
    OP_TYPE = "concat"

    def __init__(self, op=None, op_desc=None, cluster=None):
137 138 139
        super(ConcatOpCost, self).__init__(op=op,
                                           op_desc=op_desc,
                                           cluster=cluster)
C
caozhou 已提交
140

C
caozhou 已提交
141
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
142 143 144 145 146 147 148 149 150
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
@register_op_cost
class DropoutOpCost(CompOpCost):
    OP_TYPE = "dropout"

    def __init__(self, op=None, op_desc=None, cluster=None):
        super(DropoutOpCost, self).__init__(op=op,
                                            op_desc=op_desc,
                                            cluster=cluster)

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
@register_op_cost
class DropoutGradOpCost(CompOpCost):
    OP_TYPE = "dropout_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
        super(DropoutGradOpCost, self).__init__(op=op,
                                                op_desc=op_desc,
                                                cluster=cluster)

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


C
caozhou 已提交
189 190 191 192 193
@register_op_cost
class ElementwiseAddOpCost(CompOpCost):
    OP_TYPE = "elementwise_add"

    def __init__(self, op=None, op_desc=None, cluster=None):
194 195 196
        super(ElementwiseAddOpCost, self).__init__(op=op,
                                                   op_desc=op_desc,
                                                   cluster=cluster)
C
caozhou 已提交
197

C
caozhou 已提交
198
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
199 200 201 202 203 204 205 206 207 208 209 210 211 212
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class ElementwiseAddGradOpCost(CompOpCost):
    OP_TYPE = "elementwise_add_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
213 214 215
        super(ElementwiseAddGradOpCost, self).__init__(op=op,
                                                       op_desc=op_desc,
                                                       cluster=cluster)
C
caozhou 已提交
216

C
caozhou 已提交
217
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
218 219 220 221 222 223 224 225 226 227 228 229 230 231
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class ElementwiseDivOpCost(CompOpCost):
    OP_TYPE = "elementwise_div"

    def __init__(self, op=None, op_desc=None, cluster=None):
232 233 234
        super(ElementwiseDivOpCost, self).__init__(op=op,
                                                   op_desc=op_desc,
                                                   cluster=cluster)
C
caozhou 已提交
235

C
caozhou 已提交
236
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
237 238 239 240 241 242 243 244 245 246 247 248 249 250
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class ElementwiseDivGradOpCost(CompOpCost):
    OP_TYPE = "elementwise_div_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
251 252 253
        super(ElementwiseDivGradOpCost, self).__init__(op=op,
                                                       op_desc=op_desc,
                                                       cluster=cluster)
C
caozhou 已提交
254

C
caozhou 已提交
255
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
256 257 258 259 260 261 262 263 264 265 266 267 268 269
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class ElementwiseMulOpCost(CompOpCost):
    OP_TYPE = "elementwise_mul"

    def __init__(self, op=None, op_desc=None, cluster=None):
270 271 272
        super(ElementwiseMulOpCost, self).__init__(op=op,
                                                   op_desc=op_desc,
                                                   cluster=cluster)
C
caozhou 已提交
273

C
caozhou 已提交
274
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
275 276 277 278 279 280 281 282 283 284 285 286 287 288
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class ElementwiseMulGradOpCost(CompOpCost):
    OP_TYPE = "elementwise_mul_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
289 290 291
        super(ElementwiseMulGradOpCost, self).__init__(op=op,
                                                       op_desc=op_desc,
                                                       cluster=cluster)
C
caozhou 已提交
292

C
caozhou 已提交
293
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
294 295 296 297 298 299 300 301 302 303 304 305 306 307
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class ElementwiseSubOpCost(CompOpCost):
    OP_TYPE = "elementwise_sub"

    def __init__(self, op=None, op_desc=None, cluster=None):
308 309 310
        super(ElementwiseSubOpCost, self).__init__(op=op,
                                                   op_desc=op_desc,
                                                   cluster=cluster)
C
caozhou 已提交
311

C
caozhou 已提交
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class ElementwiseSubGradOpCost(CompOpCost):
    OP_TYPE = "elementwise_sub_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
327 328 329
        super(ElementwiseSubGradOpCost, self).__init__(op=op,
                                                       op_desc=op_desc,
                                                       cluster=cluster)
C
caozhou 已提交
330 331

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
332 333 334 335 336 337 338 339 340 341 342 343 344 345
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class EmbeddingOpCost(CompOpCost):
    OP_TYPE = "c_embedding"

    def __init__(self, op=None, op_desc=None, cluster=None):
346 347 348
        super(EmbeddingOpCost, self).__init__(op=op,
                                              op_desc=op_desc,
                                              cluster=cluster)
C
caozhou 已提交
349

C
caozhou 已提交
350
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
351 352 353 354 355 356 357 358 359 360 361 362 363 364
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class EmbeddingGradOpCost(CompOpCost):
    OP_TYPE = "c_embedding_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
365 366 367
        super(EmbeddingGradOpCost, self).__init__(op=op,
                                                  op_desc=op_desc,
                                                  cluster=cluster)
C
caozhou 已提交
368

C
caozhou 已提交
369
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
370 371 372 373 374 375 376 377 378 379 380 381 382 383
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class FillConstantOpCost(CompOpCost):
    OP_TYPE = "fill_constant"

    def __init__(self, op=None, op_desc=None, cluster=None):
384 385 386
        super(FillConstantOpCost, self).__init__(op=op,
                                                 op_desc=op_desc,
                                                 cluster=cluster)
C
caozhou 已提交
387

C
caozhou 已提交
388
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
389 390 391 392 393 394 395 396 397 398 399 400 401 402
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class FillConstantBatchSizeLikeOpCost(CompOpCost):
    OP_TYPE = "fill_constant_batch_size_like"

    def __init__(self, op=None, op_desc=None, cluster=None):
403 404 405
        super(FillConstantBatchSizeLikeOpCost, self).__init__(op=op,
                                                              op_desc=op_desc,
                                                              cluster=cluster)
C
caozhou 已提交
406

C
caozhou 已提交
407
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
408 409 410 411 412 413 414 415 416
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452
@register_op_cost
class FusedSoftmaxMaskUpperTriangleOpCost(CompOpCost):
    OP_TYPE = "fused_softmax_mask_upper_triangle"

    def __init__(self, op=None, op_desc=None, cluster=None):
        super(FusedSoftmaxMaskUpperTriangleOpCost,
              self).__init__(op=op, op_desc=op_desc, cluster=cluster)

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class FusedSoftmaxMaskUpperTriangleGradOpCost(CompOpCost):
    OP_TYPE = "fused_softmax_mask_upper_triangle_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
        super(FusedSoftmaxMaskUpperTriangleGradOpCost,
              self).__init__(op=op, op_desc=op_desc, cluster=cluster)

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


C
caozhou 已提交
453 454 455 456 457
@register_op_cost
class GatherOpCost(CompOpCost):
    OP_TYPE = "gather"

    def __init__(self, op=None, op_desc=None, cluster=None):
458 459 460
        super(GatherOpCost, self).__init__(op=op,
                                           op_desc=op_desc,
                                           cluster=cluster)
C
caozhou 已提交
461

C
caozhou 已提交
462
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
463 464 465 466 467 468 469 470 471 472 473 474 475 476
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class GeluOpCost(CompOpCost):
    OP_TYPE = "gelu"

    def __init__(self, op=None, op_desc=None, cluster=None):
477 478 479
        super(GeluOpCost, self).__init__(op=op,
                                         op_desc=op_desc,
                                         cluster=cluster)
C
caozhou 已提交
480

C
caozhou 已提交
481
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
482 483 484 485 486 487 488 489 490 491 492 493 494 495
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class GeluGradOpCost(CompOpCost):
    OP_TYPE = "gelu_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
496 497 498
        super(GeluGradOpCost, self).__init__(op=op,
                                             op_desc=op_desc,
                                             cluster=cluster)
C
caozhou 已提交
499

C
caozhou 已提交
500
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
501 502 503 504 505 506 507 508 509 510 511 512 513 514
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class GreaterEqualOpCost(CompOpCost):
    OP_TYPE = "greater_equal"

    def __init__(self, op=None, op_desc=None, cluster=None):
515 516 517
        super(GreaterEqualOpCost, self).__init__(op=op,
                                                 op_desc=op_desc,
                                                 cluster=cluster)
C
caozhou 已提交
518

C
caozhou 已提交
519
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
520 521 522 523 524 525 526 527 528 529 530 531 532 533
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class IncrementOpCost(CompOpCost):
    OP_TYPE = "increment"

    def __init__(self, op=None, op_desc=None, cluster=None):
534 535 536
        super(IncrementOpCost, self).__init__(op=op,
                                              op_desc=op_desc,
                                              cluster=cluster)
C
caozhou 已提交
537

C
caozhou 已提交
538
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
539 540 541 542 543 544 545 546 547 548
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class IsEmptyOpCost(CompOpCost):
    OP_TYPE = "is_empty"

    def __init__(self, op=None, op_desc=None, cluster=None):
549 550 551
        super(IsEmptyOpCost, self).__init__(op=op,
                                            op_desc=op_desc,
                                            cluster=cluster)
C
caozhou 已提交
552

C
caozhou 已提交
553
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
554 555 556 557 558 559 560 561 562 563
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class LayerNormOpCost(CompOpCost):
    OP_TYPE = "layer_norm"

    def __init__(self, op=None, op_desc=None, cluster=None):
564 565 566
        super(LayerNormOpCost, self).__init__(op=op,
                                              op_desc=op_desc,
                                              cluster=cluster)
C
caozhou 已提交
567

C
caozhou 已提交
568
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
569 570 571 572 573 574 575 576 577 578 579 580 581 582
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class LayerNormGradOpCost(CompOpCost):
    OP_TYPE = "layer_norm_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
583 584 585
        super(LayerNormGradOpCost, self).__init__(op=op,
                                                  op_desc=op_desc,
                                                  cluster=cluster)
C
caozhou 已提交
586

C
caozhou 已提交
587
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
588 589 590 591 592 593 594 595 596 597 598 599 600 601
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class LessThanOpCost(CompOpCost):
    OP_TYPE = "less_than"

    def __init__(self, op=None, op_desc=None, cluster=None):
602 603 604
        super(LessThanOpCost, self).__init__(op=op,
                                             op_desc=op_desc,
                                             cluster=cluster)
C
caozhou 已提交
605

C
caozhou 已提交
606
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
607 608 609 610 611 612 613 614 615 616 617 618 619 620
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class LogicalNotOpCost(CompOpCost):
    OP_TYPE = "logical_not"

    def __init__(self, op=None, op_desc=None, cluster=None):
621 622 623
        super(LogicalNotOpCost, self).__init__(op=op,
                                               op_desc=op_desc,
                                               cluster=cluster)
C
caozhou 已提交
624

C
caozhou 已提交
625
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
626 627 628 629 630 631 632 633 634 635 636 637 638 639
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class LogicalAndOpCost(CompOpCost):
    OP_TYPE = "logical_and"

    def __init__(self, op=None, op_desc=None, cluster=None):
640 641 642
        super(LogicalAndOpCost, self).__init__(op=op,
                                               op_desc=op_desc,
                                               cluster=cluster)
C
caozhou 已提交
643

C
caozhou 已提交
644
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
645 646 647 648 649 650 651 652 653 654 655 656 657 658
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class LodResetOpCost(CompOpCost):
    OP_TYPE = "lod_reset"

    def __init__(self, op=None, op_desc=None, cluster=None):
659 660 661
        super(LodResetOpCost, self).__init__(op=op,
                                             op_desc=op_desc,
                                             cluster=cluster)
C
caozhou 已提交
662

C
caozhou 已提交
663
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class LogOpCost(CompOpCost):
    OP_TYPE = "log"

    def __init__(self, op=None, op_desc=None, cluster=None):
        super(LogOpCost, self).__init__(op=op, op_desc=op_desc, cluster=cluster)

C
caozhou 已提交
680
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
681 682 683 684 685 686 687 688 689 690 691 692 693 694
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class LookupTableV2OpCost(CompOpCost):
    OP_TYPE = "lookup_table_v2"

    def __init__(self, op=None, op_desc=None, cluster=None):
695 696 697
        super(LookupTableV2OpCost, self).__init__(op=op,
                                                  op_desc=op_desc,
                                                  cluster=cluster)
C
caozhou 已提交
698

C
caozhou 已提交
699
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
700 701 702 703 704 705 706 707 708 709 710 711 712 713
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class LookupTableV2GradOpCost(CompOpCost):
    OP_TYPE = "lookup_table_v2_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
714 715 716
        super(LookupTableV2GradOpCost, self).__init__(op=op,
                                                      op_desc=op_desc,
                                                      cluster=cluster)
C
caozhou 已提交
717

C
caozhou 已提交
718
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
719 720 721 722 723 724 725 726 727 728 729 730 731 732
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class MatmulOpCost(CompOpCost):
    OP_TYPE = "matmul"

    def __init__(self, op=None, op_desc=None, cluster=None):
733 734 735
        super(MatmulOpCost, self).__init__(op=op,
                                           op_desc=op_desc,
                                           cluster=cluster)
C
caozhou 已提交
736

C
caozhou 已提交
737
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
738 739 740 741 742 743 744 745 746 747 748 749 750 751
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class MatmulGradOpCost(CompOpCost):
    OP_TYPE = "matmul_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
752 753 754
        super(MatmulGradOpCost, self).__init__(op=op,
                                               op_desc=op_desc,
                                               cluster=cluster)
C
caozhou 已提交
755

C
caozhou 已提交
756
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
C
caozhou 已提交
757 758 759 760 761 762 763
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0
764 765 766 767 768 769 770


@register_op_cost
class MatmulV2OpCost(CompOpCost):
    OP_TYPE = "matmul_v2"

    def __init__(self, op=None, op_desc=None, cluster=None):
771 772 773
        super(MatmulV2OpCost, self).__init__(op=op,
                                             op_desc=op_desc,
                                             cluster=cluster)
774

C
caozhou 已提交
775 776 777 778 779 780 781 782 783 784 785 786 787 788 789
    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class MatmulV2GradOpCost(CompOpCost):
    OP_TYPE = "matmul_v2_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
790 791 792
        super(MatmulV2GradOpCost, self).__init__(op=op,
                                                 op_desc=op_desc,
                                                 cluster=cluster)
C
caozhou 已提交
793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class MemcpyOpCost(CompOpCost):
    OP_TYPE = "memcpy"

    def __init__(self, op=None, op_desc=None, cluster=None):
809 810 811
        super(MemcpyOpCost, self).__init__(op=op,
                                           op_desc=op_desc,
                                           cluster=cluster)
C
caozhou 已提交
812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class MulOpCost(CompOpCost):
    OP_TYPE = "mul"

    def __init__(self, op=None, op_desc=None, cluster=None):
        super(MulOpCost, self).__init__(op=op, op_desc=op_desc, cluster=cluster)

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class MulGradOpCost(CompOpCost):
    OP_TYPE = "mul_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
845 846 847
        super(MulGradOpCost, self).__init__(op=op,
                                            op_desc=op_desc,
                                            cluster=cluster)
C
caozhou 已提交
848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class OneHotOpCost(CompOpCost):
    OP_TYPE = "one_hot"

    def __init__(self, op=None, op_desc=None, cluster=None):
864 865 866
        super(OneHotOpCost, self).__init__(op=op,
                                           op_desc=op_desc,
                                           cluster=cluster)
C
caozhou 已提交
867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class ReadFromArrayOpCost(CompOpCost):
    OP_TYPE = "read_from_array"

    def __init__(self, op=None, op_desc=None, cluster=None):
883 884 885
        super(ReadFromArrayOpCost, self).__init__(op=op,
                                                  op_desc=op_desc,
                                                  cluster=cluster)
C
caozhou 已提交
886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class ReduceSumOpCost(CompOpCost):
    OP_TYPE = "reduce_sum"

    def __init__(self, op=None, op_desc=None, cluster=None):
902 903 904
        super(ReduceSumOpCost, self).__init__(op=op,
                                              op_desc=op_desc,
                                              cluster=cluster)
C
caozhou 已提交
905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class ReduceSumGradOpCost(CompOpCost):
    OP_TYPE = "reduce_sum_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
921 922 923
        super(ReduceSumGradOpCost, self).__init__(op=op,
                                                  op_desc=op_desc,
                                                  cluster=cluster)
C
caozhou 已提交
924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class Reshape2OpCost(CompOpCost):
    OP_TYPE = "reshape2"

    def __init__(self, op=None, op_desc=None, cluster=None):
940 941 942
        super(Reshape2OpCost, self).__init__(op=op,
                                             op_desc=op_desc,
                                             cluster=cluster)
C
caozhou 已提交
943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class Reshape2GradOpCost(CompOpCost):
    OP_TYPE = "reshape2_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
959 960 961
        super(Reshape2GradOpCost, self).__init__(op=op,
                                                 op_desc=op_desc,
                                                 cluster=cluster)
C
caozhou 已提交
962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class ReduceMeanOpCost(CompOpCost):
    OP_TYPE = "reduce_mean"

    def __init__(self, op=None, op_desc=None, cluster=None):
978 979 980
        super(ReduceMeanOpCost, self).__init__(op=op,
                                               op_desc=op_desc,
                                               cluster=cluster)
C
caozhou 已提交
981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class ReduceMeanGradOpCost(CompOpCost):
    OP_TYPE = "reduce_mean_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
997 998 999
        super(ReduceMeanGradOpCost, self).__init__(op=op,
                                                   op_desc=op_desc,
                                                   cluster=cluster)
C
caozhou 已提交
1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class SamplingIdOpCost(CompOpCost):
    OP_TYPE = "sampling_id"

    def __init__(self, op=None, op_desc=None, cluster=None):
1016 1017 1018
        super(SamplingIdOpCost, self).__init__(op=op,
                                               op_desc=op_desc,
                                               cluster=cluster)
C
caozhou 已提交
1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class ScaleOpCost(CompOpCost):
    OP_TYPE = "scale"

    def __init__(self, op=None, op_desc=None, cluster=None):
1035 1036 1037
        super(ScaleOpCost, self).__init__(op=op,
                                          op_desc=op_desc,
                                          cluster=cluster)
C
caozhou 已提交
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class SliceOpCost(CompOpCost):
    OP_TYPE = "slice"

    def __init__(self, op=None, op_desc=None, cluster=None):
1054 1055 1056
        super(SliceOpCost, self).__init__(op=op,
                                          op_desc=op_desc,
                                          cluster=cluster)
C
caozhou 已提交
1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class SoftmaxOpCost(CompOpCost):
    OP_TYPE = "softmax"

    def __init__(self, op=None, op_desc=None, cluster=None):
1073 1074 1075
        super(SoftmaxOpCost, self).__init__(op=op,
                                            op_desc=op_desc,
                                            cluster=cluster)
C
caozhou 已提交
1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class SoftmaxGradOpCost(CompOpCost):
    OP_TYPE = "softmax_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
1092 1093 1094
        super(SoftmaxGradOpCost, self).__init__(op=op,
                                                op_desc=op_desc,
                                                cluster=cluster)
C
caozhou 已提交
1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class SoftmaxWithCrossEntropyOpCost(CompOpCost):
    OP_TYPE = "softmax_with_cross_entropy"

    def __init__(self, op=None, op_desc=None, cluster=None):
1111 1112 1113
        super(SoftmaxWithCrossEntropyOpCost, self).__init__(op=op,
                                                            op_desc=op_desc,
                                                            cluster=cluster)
C
caozhou 已提交
1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class SoftmaxWithCrossEntropyGradOpCost(CompOpCost):
    OP_TYPE = "softmax_with_cross_entropy_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
1130 1131 1132
        super(SoftmaxWithCrossEntropyGradOpCost, self).__init__(op=op,
                                                                op_desc=op_desc,
                                                                cluster=cluster)
C
caozhou 已提交
1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class SplitOpCost(CompOpCost):
    OP_TYPE = "split"

    def __init__(self, op=None, op_desc=None, cluster=None):
1149 1150 1151
        super(SplitOpCost, self).__init__(op=op,
                                          op_desc=op_desc,
                                          cluster=cluster)
C
caozhou 已提交
1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class Squeeze2OpCost(CompOpCost):
    OP_TYPE = "squeeze2"

    def __init__(self, op=None, op_desc=None, cluster=None):
1168 1169 1170
        super(Squeeze2OpCost, self).__init__(op=op,
                                             op_desc=op_desc,
                                             cluster=cluster)
C
caozhou 已提交
1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class SquareOpCost(CompOpCost):
    OP_TYPE = "square"

    def __init__(self, op=None, op_desc=None, cluster=None):
1187 1188 1189
        super(SquareOpCost, self).__init__(op=op,
                                           op_desc=op_desc,
                                           cluster=cluster)
C
caozhou 已提交
1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class SquareGradOpCost(CompOpCost):
    OP_TYPE = "square_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
1206 1207 1208
        super(SquareGradOpCost, self).__init__(op=op,
                                               op_desc=op_desc,
                                               cluster=cluster)
C
caozhou 已提交
1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class SumOpCost(CompOpCost):
    OP_TYPE = "sum"

    def __init__(self, op=None, op_desc=None, cluster=None):
        super(SumOpCost, self).__init__(op=op, op_desc=op_desc, cluster=cluster)

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class TopKOpCost(CompOpCost):
    OP_TYPE = "top_k"

    def __init__(self, op=None, op_desc=None, cluster=None):
1242 1243 1244
        super(TopKOpCost, self).__init__(op=op,
                                         op_desc=op_desc,
                                         cluster=cluster)
C
caozhou 已提交
1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class Transpose2OpCost(CompOpCost):
    OP_TYPE = "transpose2"

    def __init__(self, op=None, op_desc=None, cluster=None):
1261 1262 1263
        super(Transpose2OpCost, self).__init__(op=op,
                                               op_desc=op_desc,
                                               cluster=cluster)
C
caozhou 已提交
1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class Transpose2GradOpCost(CompOpCost):
    OP_TYPE = "transpose2_grad"

    def __init__(self, op=None, op_desc=None, cluster=None):
1280 1281 1282
        super(Transpose2GradOpCost, self).__init__(op=op,
                                                   op_desc=op_desc,
                                                   cluster=cluster)
C
caozhou 已提交
1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class Unsqueeze2OpCost(CompOpCost):
    OP_TYPE = "unsqueeze2"

    def __init__(self, op=None, op_desc=None, cluster=None):
1299 1300 1301
        super(Unsqueeze2OpCost, self).__init__(op=op,
                                               op_desc=op_desc,
                                               cluster=cluster)
C
caozhou 已提交
1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0


@register_op_cost
class WriteToArrayOpCost(CompOpCost):
    OP_TYPE = "write_to_array"

    def __init__(self, op=None, op_desc=None, cluster=None):
1318 1319 1320
        super(WriteToArrayOpCost, self).__init__(op=op,
                                                 op_desc=op_desc,
                                                 cluster=cluster)
C
caozhou 已提交
1321 1322

    # For a concrete COMP OP, the calc_time and calc_flops function need to be overrided
1323 1324 1325 1326 1327 1328 1329
    def calc_flops(self):
        # NOTE: The actual formula will be filled in the future
        return 0

    def calc_time(self):
        # NOTE: The actual formula will be filled in the future
        return 0