@@ -284,17 +284,17 @@ def test_scan_debugprint1():
284
284
| | | | | | |A [id M]
285
285
| | | | | | |InplaceDimShuffle{x} [id N] ''
286
286
| | | | | | |TensorConstant{1.0} [id O]
287
- | | | | | |Constant {0} [id P]
287
+ | | | | | |ScalarConstant {0} [id P]
288
288
| | | | |Subtensor{int64} [id Q] ''
289
289
| | | | |Shape [id R] ''
290
290
| | | | | |Rebroadcast{0} [id J] ''
291
- | | | | |Constant {1} [id S]
291
+ | | | | |ScalarConstant {1} [id S]
292
292
| | | |Rebroadcast{0} [id J] ''
293
293
| | | |ScalarFromTensor [id T] ''
294
294
| | | |Subtensor{int64} [id H] ''
295
295
| | |A [id M]
296
- | |Constant {1} [id U]
297
- |Constant {-1} [id V]
296
+ | |ScalarConstant {1} [id U]
297
+ |ScalarConstant {-1} [id V]
298
298
299
299
Inner graphs of the scan ops:
300
300
@@ -334,17 +334,17 @@ def test_scan_debugprint2():
334
334
| | |Shape [id E] ''
335
335
| | | |Subtensor{int64::} [id F] 'coefficients[0:]'
336
336
| | | |coefficients [id G]
337
- | | | |Constant {0} [id H]
338
- | | |Constant {0} [id I]
337
+ | | | |ScalarConstant {0} [id H]
338
+ | | |ScalarConstant {0} [id I]
339
339
| |Subtensor{int64} [id J] ''
340
340
| |Shape [id K] ''
341
341
| | |Subtensor{int64::} [id L] ''
342
342
| | |ARange{dtype='int64'} [id M] ''
343
343
| | | |TensorConstant{0} [id N]
344
344
| | | |TensorConstant{10000} [id O]
345
345
| | | |TensorConstant{1} [id P]
346
- | | |Constant {0} [id Q]
347
- | |Constant {0} [id R]
346
+ | | |ScalarConstant {0} [id Q]
347
+ | |ScalarConstant {0} [id R]
348
348
|Subtensor{:int64:} [id S] ''
349
349
| |Subtensor{int64::} [id F] 'coefficients[0:]'
350
350
| |ScalarFromTensor [id T] ''
@@ -413,17 +413,17 @@ def compute_A_k(A, k):
413
413
| | |Shape [id E] ''
414
414
| | | |Subtensor{int64::} [id F] 'coefficients[0:]'
415
415
| | | |coefficients [id G]
416
- | | | |Constant {0} [id H]
417
- | | |Constant {0} [id I]
416
+ | | | |ScalarConstant {0} [id H]
417
+ | | |ScalarConstant {0} [id I]
418
418
| |Subtensor{int64} [id J] ''
419
419
| |Shape [id K] ''
420
420
| | |Subtensor{int64::} [id L] ''
421
421
| | |ARange{dtype='int64'} [id M] ''
422
422
| | | |TensorConstant{0} [id N]
423
423
| | | |TensorConstant{10} [id O]
424
424
| | | |TensorConstant{1} [id P]
425
- | | |Constant {0} [id Q]
426
- | |Constant {0} [id R]
425
+ | | |ScalarConstant {0} [id Q]
426
+ | |ScalarConstant {0} [id R]
427
427
|Subtensor{:int64:} [id S] ''
428
428
| |Subtensor{int64::} [id F] 'coefficients[0:]'
429
429
| |ScalarFromTensor [id T] ''
@@ -459,17 +459,17 @@ def compute_A_k(A, k):
459
459
> | | | | | | | |A_copy [id BO] -> [id W]
460
460
> | | | | | | | |InplaceDimShuffle{x} [id BP] ''
461
461
> | | | | | | | |TensorConstant{1.0} [id BQ]
462
- > | | | | | | |Constant {0} [id BR]
462
+ > | | | | | | |ScalarConstant {0} [id BR]
463
463
> | | | | | |Subtensor{int64} [id BS] ''
464
464
> | | | | | |Shape [id BT] ''
465
465
> | | | | | | |Rebroadcast{0} [id BL] ''
466
- > | | | | | |Constant {1} [id BU]
466
+ > | | | | | |ScalarConstant {1} [id BU]
467
467
> | | | | |Rebroadcast{0} [id BL] ''
468
468
> | | | | |ScalarFromTensor [id BV] ''
469
469
> | | | | |Subtensor{int64} [id BJ] ''
470
470
> | | | |A_copy [id BO] -> [id W]
471
- > | | |Constant {1} [id BW]
472
- > | |Constant {-1} [id BX]
471
+ > | | |ScalarConstant {1} [id BW]
472
+ > | |ScalarConstant {-1} [id BX]
473
473
> |InplaceDimShuffle{x} [id BY] ''
474
474
> |<TensorType(int64, scalar)> [id BZ] -> [id U]
475
475
@@ -514,8 +514,8 @@ def fn(a_m2, a_m1, b_m2, b_m1):
514
514
| | | | |Shape [id I] ''
515
515
| | | | | |Subtensor{:int64:} [id J] ''
516
516
| | | | | |<TensorType(int64, vector)> [id K]
517
- | | | | | |Constant {2} [id L]
518
- | | | | |Constant {0} [id M]
517
+ | | | | | |ScalarConstant {2} [id L]
518
+ | | | | |ScalarConstant {0} [id M]
519
519
| | | |Subtensor{:int64:} [id J] ''
520
520
| | | |ScalarFromTensor [id N] ''
521
521
| | | |Subtensor{int64} [id H] ''
@@ -527,15 +527,15 @@ def fn(a_m2, a_m1, b_m2, b_m1):
527
527
| | | |Shape [id S] ''
528
528
| | | | |Subtensor{:int64:} [id T] ''
529
529
| | | | |<TensorType(int64, vector)> [id U]
530
- | | | | |Constant {2} [id V]
531
- | | | |Constant {0} [id W]
530
+ | | | | |ScalarConstant {2} [id V]
531
+ | | | |ScalarConstant {0} [id W]
532
532
| | |Subtensor{:int64:} [id T] ''
533
533
| | |ScalarFromTensor [id X] ''
534
534
| | |Subtensor{int64} [id R] ''
535
- | |Constant {2} [id Y]
535
+ | |ScalarConstant {2} [id Y]
536
536
|Subtensor{int64::} [id Z] ''
537
537
|for{cpu,scan_fn}.1 [id C] ''
538
- |Constant {2} [id BA]
538
+ |ScalarConstant {2} [id BA]
539
539
540
540
Inner graphs of the scan ops:
541
541
@@ -592,31 +592,31 @@ def test_scan_debugprint5():
592
592
| | | | | | | | |A [id P]
593
593
| | | | | | | | |InplaceDimShuffle{x} [id Q] ''
594
594
| | | | | | | | |TensorConstant{1.0} [id R]
595
- | | | | | | | |Constant {0} [id S]
595
+ | | | | | | | |ScalarConstant {0} [id S]
596
596
| | | | | | |Subtensor{int64} [id T] ''
597
597
| | | | | | |Shape [id U] ''
598
598
| | | | | | | |Rebroadcast{0} [id M] ''
599
- | | | | | | |Constant {1} [id V]
599
+ | | | | | | |ScalarConstant {1} [id V]
600
600
| | | | | |Rebroadcast{0} [id M] ''
601
601
| | | | | |ScalarFromTensor [id W] ''
602
602
| | | | | |Subtensor{int64} [id K] ''
603
603
| | | | |A [id P]
604
- | | | |Constant {0} [id X]
604
+ | | | |ScalarConstant {0} [id X]
605
605
| | |TensorConstant{1} [id Y]
606
606
| |Subtensor{:int64:} [id Z] ''
607
607
| | |Subtensor{::int64} [id BA] ''
608
608
| | | |Subtensor{:int64:} [id BB] ''
609
609
| | | | |for{cpu,scan_fn} [id F] ''
610
- | | | | |Constant {-1} [id BC]
611
- | | | |Constant {-1} [id BD]
610
+ | | | | |ScalarConstant {-1} [id BC]
611
+ | | | |ScalarConstant {-1} [id BD]
612
612
| | |ScalarFromTensor [id BE] ''
613
613
| | |Elemwise{sub,no_inplace} [id C] ''
614
614
| |Subtensor{:int64:} [id BF] ''
615
615
| | |Subtensor{:int64:} [id BG] ''
616
616
| | | |Subtensor{::int64} [id BH] ''
617
617
| | | | |for{cpu,scan_fn} [id F] ''
618
- | | | | |Constant {-1} [id BI]
619
- | | | |Constant {-1} [id BJ]
618
+ | | | | |ScalarConstant {-1} [id BI]
619
+ | | | |ScalarConstant {-1} [id BJ]
620
620
| | |ScalarFromTensor [id BK] ''
621
621
| | |Elemwise{sub,no_inplace} [id C] ''
622
622
| |Subtensor{::int64} [id BL] ''
@@ -629,21 +629,21 @@ def test_scan_debugprint5():
629
629
| | | | |Elemwise{second,no_inplace} [id BR] ''
630
630
| | | | | |Subtensor{int64::} [id BS] ''
631
631
| | | | | | |for{cpu,scan_fn} [id F] ''
632
- | | | | | | |Constant {1} [id BT]
632
+ | | | | | | |ScalarConstant {1} [id BT]
633
633
| | | | | |InplaceDimShuffle{x,x} [id BU] ''
634
634
| | | | | |TensorConstant{0.0} [id BV]
635
635
| | | | |Elemwise{second} [id BW] ''
636
636
| | | | | |Subtensor{int64} [id BX] ''
637
637
| | | | | | |Subtensor{int64::} [id BS] ''
638
- | | | | | | |Constant {-1} [id BY]
638
+ | | | | | | |ScalarConstant {-1} [id BY]
639
639
| | | | | |InplaceDimShuffle{x} [id BZ] ''
640
640
| | | | | |Elemwise{second,no_inplace} [id CA] ''
641
641
| | | | | |Sum{acc_dtype=float64} [id CB] ''
642
642
| | | | | | |Subtensor{int64} [id BX] ''
643
643
| | | | | |TensorConstant{1.0} [id CC]
644
- | | | | |Constant {-1} [id BY]
645
- | | | |Constant {1} [id BT]
646
- | | |Constant {-1} [id CD]
644
+ | | | | |ScalarConstant {-1} [id BY]
645
+ | | | |ScalarConstant {1} [id BT]
646
+ | | |ScalarConstant {-1} [id CD]
647
647
| |Alloc [id CE] ''
648
648
| | |TensorConstant{0.0} [id CF]
649
649
| | |Elemwise{add,no_inplace} [id CG] ''
@@ -652,9 +652,9 @@ def test_scan_debugprint5():
652
652
| | |Subtensor{int64} [id CI] ''
653
653
| | |Shape [id CJ] ''
654
654
| | | |A [id P]
655
- | | |Constant {0} [id CK]
655
+ | | |ScalarConstant {0} [id CK]
656
656
| |A [id P]
657
- |Constant {-1} [id CL]
657
+ |ScalarConstant {-1} [id CL]
658
658
659
659
Inner graphs of the scan ops:
660
660
@@ -711,4 +711,4 @@ def f_pow2(x_tm1):
711
711
def test_subtensor ():
712
712
x = dvector ()
713
713
y = x [1 ]
714
- assert pp (y ) == "<TensorType(float64, vector)>[Constant {1}]"
714
+ assert pp (y ) == "<TensorType(float64, vector)>[ScalarConstant {1}]"
0 commit comments