@@ -58,8 +58,8 @@ def test_debugprint_sitsot():
58
58
59
59
for{cpu,scan_fn} [id C] (outer_out_sit_sot-0)
60
60
>Mul [id W] (inner_out_sit_sot-0)
61
- > |*0-<TensorType (float64, (?,))> [id X] -> [id E] (inner_in_sit_sot-0)
62
- > |*1-<TensorType (float64, (?,))> [id Y] -> [id M] (inner_in_non_seqs-0)"""
61
+ > |*0-<Vector (float64, shape= (?,))> [id X] -> [id E] (inner_in_sit_sot-0)
62
+ > |*1-<Vector (float64, shape= (?,))> [id Y] -> [id M] (inner_in_non_seqs-0)"""
63
63
64
64
for truth , out in zip (expected_output .split ("\n " ), lines ):
65
65
assert truth .strip () == out .strip ()
@@ -113,8 +113,8 @@ def test_debugprint_sitsot_no_extra_info():
113
113
114
114
for{cpu,scan_fn} [id C]
115
115
>Mul [id W]
116
- > |*0-<TensorType (float64, (?,))> [id X] -> [id E]
117
- > |*1-<TensorType (float64, (?,))> [id Y] -> [id M]"""
116
+ > |*0-<Vector (float64, shape= (?,))> [id X] -> [id E]
117
+ > |*1-<Vector (float64, shape= (?,))> [id Y] -> [id M]"""
118
118
119
119
for truth , out in zip (expected_output .split ("\n " ), lines ):
120
120
assert truth .strip () == out .strip ()
@@ -174,10 +174,10 @@ def test_debugprint_nitsot():
174
174
175
175
for{cpu,scan_fn} [id B] (outer_out_nit_sot-0)
176
176
>Mul [id X] (inner_out_nit_sot-0)
177
- > |*0-<TensorType (float64, ())> [id Y] -> [id S] (inner_in_seqs-0)
177
+ > |*0-<Scalar (float64, shape= ())> [id Y] -> [id S] (inner_in_seqs-0)
178
178
> |Pow [id Z]
179
- > |*2-<TensorType (float64, ())> [id BA] -> [id W] (inner_in_non_seqs-0)
180
- > |*1-<TensorType (int64, ())> [id BB] -> [id U] (inner_in_seqs-1)"""
179
+ > |*2-<Scalar (float64, shape= ())> [id BA] -> [id W] (inner_in_non_seqs-0)
180
+ > |*1-<Scalar (int64, shape= ())> [id BB] -> [id U] (inner_in_seqs-1)"""
181
181
182
182
for truth , out in zip (expected_output .split ("\n " ), lines ):
183
183
assert truth .strip () == out .strip ()
@@ -249,22 +249,22 @@ def compute_A_k(A, k):
249
249
for{cpu,scan_fn} [id B] (outer_out_nit_sot-0)
250
250
>Mul [id Y] (inner_out_nit_sot-0)
251
251
> |ExpandDims{axis=0} [id Z]
252
- > | |*0-<TensorType (float64, ())> [id BA] -> [id S] (inner_in_seqs-0)
252
+ > | |*0-<Scalar (float64, shape= ())> [id BA] -> [id S] (inner_in_seqs-0)
253
253
> |Pow [id BB]
254
254
> |Subtensor{i} [id BC]
255
255
> | |Subtensor{start:} [id BD]
256
256
> | | |for{cpu,scan_fn} [id BE] (outer_out_sit_sot-0)
257
- > | | | |*3-<TensorType (int32, ())> [id BF] -> [id X] (inner_in_non_seqs-1) (n_steps)
257
+ > | | | |*3-<Scalar (int32, shape= ())> [id BF] -> [id X] (inner_in_non_seqs-1) (n_steps)
258
258
> | | | |SetSubtensor{:stop} [id BG] (outer_in_sit_sot-0)
259
259
> | | | | |AllocEmpty{dtype='float64'} [id BH]
260
260
> | | | | | |Add [id BI]
261
- > | | | | | | |*3-<TensorType (int32, ())> [id BF] -> [id X] (inner_in_non_seqs-1)
261
+ > | | | | | | |*3-<Scalar (int32, shape= ())> [id BF] -> [id X] (inner_in_non_seqs-1)
262
262
> | | | | | | |Subtensor{i} [id BJ]
263
263
> | | | | | | |Shape [id BK]
264
264
> | | | | | | | |Unbroadcast{0} [id BL]
265
265
> | | | | | | | |ExpandDims{axis=0} [id BM]
266
266
> | | | | | | | |Second [id BN]
267
- > | | | | | | | |*2-<TensorType (float64, (?,))> [id BO] -> [id W] (inner_in_non_seqs-0)
267
+ > | | | | | | | |*2-<Vector (float64, shape= (?,))> [id BO] -> [id W] (inner_in_non_seqs-0)
268
268
> | | | | | | | |ExpandDims{axis=0} [id BP]
269
269
> | | | | | | | |TensorConstant{1.0} [id BQ]
270
270
> | | | | | | |ScalarConstant{0} [id BR]
@@ -275,16 +275,16 @@ def compute_A_k(A, k):
275
275
> | | | | |Unbroadcast{0} [id BL]
276
276
> | | | | |ScalarFromTensor [id BV]
277
277
> | | | | |Subtensor{i} [id BJ]
278
- > | | | |*2-<TensorType (float64, (?,))> [id BO] -> [id W] (inner_in_non_seqs-0) (outer_in_non_seqs-0)
278
+ > | | | |*2-<Vector (float64, shape= (?,))> [id BO] -> [id W] (inner_in_non_seqs-0) (outer_in_non_seqs-0)
279
279
> | | |ScalarConstant{1} [id BW]
280
280
> | |ScalarConstant{-1} [id BX]
281
281
> |ExpandDims{axis=0} [id BY]
282
- > |*1-<TensorType (int64, ())> [id BZ] -> [id U] (inner_in_seqs-1)
282
+ > |*1-<Scalar (int64, shape= ())> [id BZ] -> [id U] (inner_in_seqs-1)
283
283
284
284
for{cpu,scan_fn} [id BE] (outer_out_sit_sot-0)
285
285
>Mul [id CA] (inner_out_sit_sot-0)
286
- > |*0-<TensorType (float64, (?,))> [id CB] -> [id BG] (inner_in_sit_sot-0)
287
- > |*1-<TensorType (float64, (?,))> [id CC] -> [id BO] (inner_in_non_seqs-0)"""
286
+ > |*0-<Vector (float64, shape= (?,))> [id CB] -> [id BG] (inner_in_sit_sot-0)
287
+ > |*1-<Vector (float64, shape= (?,))> [id CC] -> [id BO] (inner_in_non_seqs-0)"""
288
288
289
289
for truth , out in zip (expected_output .split ("\n " ), lines ):
290
290
assert truth .strip () == out .strip ()
@@ -332,28 +332,28 @@ def compute_A_k(A, k):
332
332
Inner graphs:
333
333
334
334
for{cpu,scan_fn} [id E] (outer_out_nit_sot-0)
335
- -*0-<TensorType (float64, ())> [id Y] -> [id U] (inner_in_seqs-0)
336
- -*1-<TensorType (int64, ())> [id Z] -> [id W] (inner_in_seqs-1)
337
- -*2-<TensorType (float64, (?,))> [id BA] -> [id C] (inner_in_non_seqs-0)
338
- -*3-<TensorType (int32, ())> [id BB] -> [id B] (inner_in_non_seqs-1)
335
+ -*0-<Scalar (float64, shape= ())> [id Y] -> [id U] (inner_in_seqs-0)
336
+ -*1-<Scalar (int64, shape= ())> [id Z] -> [id W] (inner_in_seqs-1)
337
+ -*2-<Vector (float64, shape= (?,))> [id BA] -> [id C] (inner_in_non_seqs-0)
338
+ -*3-<Scalar (int32, shape= ())> [id BB] -> [id B] (inner_in_non_seqs-1)
339
339
>Mul [id BC] (inner_out_nit_sot-0)
340
340
> |ExpandDims{axis=0} [id BD]
341
- > | |*0-<TensorType (float64, ())> [id Y] (inner_in_seqs-0)
341
+ > | |*0-<Scalar (float64, shape= ())> [id Y] (inner_in_seqs-0)
342
342
> |Pow [id BE]
343
343
> |Subtensor{i} [id BF]
344
344
> | |Subtensor{start:} [id BG]
345
345
> | | |for{cpu,scan_fn} [id BH] (outer_out_sit_sot-0)
346
- > | | | |*3-<TensorType (int32, ())> [id BB] (inner_in_non_seqs-1) (n_steps)
346
+ > | | | |*3-<Scalar (int32, shape= ())> [id BB] (inner_in_non_seqs-1) (n_steps)
347
347
> | | | |SetSubtensor{:stop} [id BI] (outer_in_sit_sot-0)
348
348
> | | | | |AllocEmpty{dtype='float64'} [id BJ]
349
349
> | | | | | |Add [id BK]
350
- > | | | | | | |*3-<TensorType (int32, ())> [id BB] (inner_in_non_seqs-1)
350
+ > | | | | | | |*3-<Scalar (int32, shape= ())> [id BB] (inner_in_non_seqs-1)
351
351
> | | | | | | |Subtensor{i} [id BL]
352
352
> | | | | | | |Shape [id BM]
353
353
> | | | | | | | |Unbroadcast{0} [id BN]
354
354
> | | | | | | | |ExpandDims{axis=0} [id BO]
355
355
> | | | | | | | |Second [id BP]
356
- > | | | | | | | |*2-<TensorType (float64, (?,))> [id BA] (inner_in_non_seqs-0)
356
+ > | | | | | | | |*2-<Vector (float64, shape= (?,))> [id BA] (inner_in_non_seqs-0)
357
357
> | | | | | | | |ExpandDims{axis=0} [id BQ]
358
358
> | | | | | | | |TensorConstant{1.0} [id BR]
359
359
> | | | | | | |ScalarConstant{0} [id BS]
@@ -364,18 +364,18 @@ def compute_A_k(A, k):
364
364
> | | | | |Unbroadcast{0} [id BN]
365
365
> | | | | |ScalarFromTensor [id BW]
366
366
> | | | | |Subtensor{i} [id BL]
367
- > | | | |*2-<TensorType (float64, (?,))> [id BA] (inner_in_non_seqs-0) (outer_in_non_seqs-0)
367
+ > | | | |*2-<Vector (float64, shape= (?,))> [id BA] (inner_in_non_seqs-0) (outer_in_non_seqs-0)
368
368
> | | |ScalarConstant{1} [id BX]
369
369
> | |ScalarConstant{-1} [id BY]
370
370
> |ExpandDims{axis=0} [id BZ]
371
- > |*1-<TensorType (int64, ())> [id Z] (inner_in_seqs-1)
371
+ > |*1-<Scalar (int64, shape= ())> [id Z] (inner_in_seqs-1)
372
372
373
373
for{cpu,scan_fn} [id BH] (outer_out_sit_sot-0)
374
- -*0-<TensorType (float64, (?,))> [id CA] -> [id BI] (inner_in_sit_sot-0)
375
- -*1-<TensorType (float64, (?,))> [id CB] -> [id BA] (inner_in_non_seqs-0)
374
+ -*0-<Vector (float64, shape= (?,))> [id CA] -> [id BI] (inner_in_sit_sot-0)
375
+ -*1-<Vector (float64, shape= (?,))> [id CB] -> [id BA] (inner_in_non_seqs-0)
376
376
>Mul [id CC] (inner_out_sit_sot-0)
377
- > |*0-<TensorType (float64, (?,))> [id CA] (inner_in_sit_sot-0)
378
- > |*1-<TensorType (float64, (?,))> [id CB] (inner_in_non_seqs-0)"""
377
+ > |*0-<Vector (float64, shape= (?,))> [id CA] (inner_in_sit_sot-0)
378
+ > |*1-<Vector (float64, shape= (?,))> [id CB] (inner_in_non_seqs-0)"""
379
379
380
380
for truth , out in zip (expected_output .split ("\n " ), lines ):
381
381
assert truth .strip () == out .strip ()
@@ -413,7 +413,7 @@ def fn(a_m2, a_m1, b_m2, b_m1):
413
413
| | | | |Subtensor{i} [id H]
414
414
| | | | |Shape [id I]
415
415
| | | | | |Subtensor{:stop} [id J]
416
- | | | | | |<TensorType (int64, (?,))> [id K]
416
+ | | | | | |<Vector (int64, shape= (?,))> [id K]
417
417
| | | | | |ScalarConstant{2} [id L]
418
418
| | | | |ScalarConstant{0} [id M]
419
419
| | | |Subtensor{:stop} [id J]
@@ -426,7 +426,7 @@ def fn(a_m2, a_m1, b_m2, b_m1):
426
426
| | | |Subtensor{i} [id R]
427
427
| | | |Shape [id S]
428
428
| | | | |Subtensor{:stop} [id T]
429
- | | | | |<TensorType (int64, (?,))> [id U]
429
+ | | | | |<Vector (int64, shape= (?,))> [id U]
430
430
| | | | |ScalarConstant{2} [id V]
431
431
| | | |ScalarConstant{0} [id W]
432
432
| | |Subtensor{:stop} [id T]
@@ -441,11 +441,11 @@ def fn(a_m2, a_m1, b_m2, b_m1):
441
441
442
442
for{cpu,scan_fn}.0 [id C] (outer_out_mit_sot-0)
443
443
>Add [id BB] (inner_out_mit_sot-0)
444
- > |*1-<TensorType (int64, ())> [id BC] -> [id E] (inner_in_mit_sot-0-1)
445
- > |*0-<TensorType (int64, ())> [id BD] -> [id E] (inner_in_mit_sot-0-0)
444
+ > |*1-<Scalar (int64, shape= ())> [id BC] -> [id E] (inner_in_mit_sot-0-1)
445
+ > |*0-<Scalar (int64, shape= ())> [id BD] -> [id E] (inner_in_mit_sot-0-0)
446
446
>Add [id BE] (inner_out_mit_sot-1)
447
- > |*3-<TensorType (int64, ())> [id BF] -> [id O] (inner_in_mit_sot-1-1)
448
- > |*2-<TensorType (int64, ())> [id BG] -> [id O] (inner_in_mit_sot-1-0)
447
+ > |*3-<Scalar (int64, shape= ())> [id BF] -> [id O] (inner_in_mit_sot-1-1)
448
+ > |*2-<Scalar (int64, shape= ())> [id BG] -> [id O] (inner_in_mit_sot-1-0)
449
449
450
450
for{cpu,scan_fn}.1 [id C] (outer_out_mit_sot-1)
451
451
>Add [id BB] (inner_out_mit_sot-0)
@@ -561,19 +561,19 @@ def test_debugprint_mitmot():
561
561
for{cpu,grad_of_scan_fn}.1 [id B] (outer_out_sit_sot-0)
562
562
>Add [id CM] (inner_out_mit_mot-0-0)
563
563
> |Mul [id CN]
564
- > | |*2-<TensorType (float64, (?,))> [id CO] -> [id BL] (inner_in_mit_mot-0-0)
565
- > | |*5-<TensorType (float64, (?,))> [id CP] -> [id P] (inner_in_non_seqs-0)
566
- > |*3-<TensorType (float64, (?,))> [id CQ] -> [id BL] (inner_in_mit_mot-0-1)
564
+ > | |*2-<Vector (float64, shape= (?,))> [id CO] -> [id BL] (inner_in_mit_mot-0-0)
565
+ > | |*5-<Vector (float64, shape= (?,))> [id CP] -> [id P] (inner_in_non_seqs-0)
566
+ > |*3-<Vector (float64, shape= (?,))> [id CQ] -> [id BL] (inner_in_mit_mot-0-1)
567
567
>Add [id CR] (inner_out_sit_sot-0)
568
568
> |Mul [id CS]
569
- > | |*2-<TensorType (float64, (?,))> [id CO] -> [id BL] (inner_in_mit_mot-0-0)
570
- > | |*0-<TensorType (float64, (?,))> [id CT] -> [id Z] (inner_in_seqs-0)
571
- > |*4-<TensorType (float64, (?,))> [id CU] -> [id CE] (inner_in_sit_sot-0)
569
+ > | |*2-<Vector (float64, shape= (?,))> [id CO] -> [id BL] (inner_in_mit_mot-0-0)
570
+ > | |*0-<Vector (float64, shape= (?,))> [id CT] -> [id Z] (inner_in_seqs-0)
571
+ > |*4-<Vector (float64, shape= (?,))> [id CU] -> [id CE] (inner_in_sit_sot-0)
572
572
573
573
for{cpu,scan_fn} [id F] (outer_out_sit_sot-0)
574
574
>Mul [id CV] (inner_out_sit_sot-0)
575
- > |*0-<TensorType (float64, (?,))> [id CT] -> [id H] (inner_in_sit_sot-0)
576
- > |*1-<TensorType (float64, (?,))> [id CW] -> [id P] (inner_in_non_seqs-0)"""
575
+ > |*0-<Vector (float64, shape= (?,))> [id CT] -> [id H] (inner_in_sit_sot-0)
576
+ > |*1-<Vector (float64, shape= (?,))> [id CW] -> [id P] (inner_in_non_seqs-0)"""
577
577
578
578
for truth , out in zip (expected_output .split ("\n " ), lines ):
579
579
assert truth .strip () == out .strip ()
@@ -603,25 +603,25 @@ def no_shared_fn(n, x_tm1, M):
603
603
604
604
expected_output = """forall_inplace,cpu,scan_fn} [id A] 2 (outer_out_sit_sot-0)
605
605
|TensorConstant{20000} [id B] (n_steps)
606
- |TensorConstant{[ 0 .. 998 19999]} [id C] (outer_in_seqs-0)
606
+ |TensorConstant{[ 0 ... 998 19999]} [id C] (outer_in_seqs-0)
607
607
|SetSubtensor{:stop} [id D] 1 (outer_in_sit_sot-0)
608
608
| |AllocEmpty{dtype='int64'} [id E] 0
609
609
| | |TensorConstant{20000} [id B]
610
610
| |TensorConstant{(1,) of 0} [id F]
611
611
| |ScalarConstant{1} [id G]
612
- |<TensorType (float64, (20000, 2, 2))> [id H] (outer_in_non_seqs-0)
612
+ |<Tensor3 (float64, shape= (20000, 2, 2))> [id H] (outer_in_non_seqs-0)
613
613
614
614
Inner graphs:
615
615
616
616
forall_inplace,cpu,scan_fn} [id A] (outer_out_sit_sot-0)
617
617
>Composite{switch(lt(i0, i1), i2, i0)} [id I] (inner_out_sit_sot-0)
618
618
> |TensorConstant{0} [id J]
619
619
> |Subtensor{i, j, k} [id K]
620
- > | |*2-<TensorType (float64, (20000, 2, 2))> [id L] -> [id H] (inner_in_non_seqs-0)
620
+ > | |*2-<Tensor3 (float64, shape= (20000, 2, 2))> [id L] -> [id H] (inner_in_non_seqs-0)
621
621
> | |ScalarFromTensor [id M]
622
- > | | |*0-<TensorType (int64, ())> [id N] -> [id C] (inner_in_seqs-0)
622
+ > | | |*0-<Scalar (int64, shape= ())> [id N] -> [id C] (inner_in_seqs-0)
623
623
> | |ScalarFromTensor [id O]
624
- > | | |*1-<TensorType (int64, ())> [id P] -> [id D] (inner_in_sit_sot-0)
624
+ > | | |*1-<Scalar (int64, shape= ())> [id P] -> [id D] (inner_in_sit_sot-0)
625
625
> | |ScalarConstant{0} [id Q]
626
626
> |TensorConstant{1} [id R]
627
627
0 commit comments