Skip to content

Commit 0bd2d4c

Browse files
committed
[mlir][sparse] Remove comment w/ code in it
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D107484
1 parent 14cb678 commit 0bd2d4c

File tree

1 file changed

+1
-37
lines changed

1 file changed

+1
-37
lines changed

mlir/test/Integration/data/mttkrp_b.tns

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,8 @@
55
#
66
# see http://frostt.io/tensors/file-formats.html
77
#
8-
# This matrix represents the "B" input to the MTTKRP kernel:
8+
# This tensor represents the "B" input to the MTTKRP kernel:
99
# http://tensor-compiler.org/docs/data_analytics/index.html
10-
#
11-
# It can be generated with the following script, adapted from the above link:
12-
#
13-
#> import pytaco as pt
14-
#> import numpy as np
15-
#> from pytaco import compressed, dense
16-
#> import random
17-
#>
18-
#> # Define formats for storing the sparse tensor and dense matrices.
19-
#> csf = pt.format([compressed, compressed, compressed])
20-
#> rm = pt.format([dense, dense])
21-
#
22-
#> B=pt.tensor((2,3,4),csf)
23-
#> density = 0.25
24-
#> for i in range(2):
25-
#> for j in range(3):
26-
#> for k in range(4):
27-
#> if random.random() > density:
28-
#> B.insert((i,j,k), random.randint(0,100))
29-
#>
30-
#> C = pt.from_array(np.arange(B.shape[1]*5).reshape(B.shape[1],5))
31-
#> D = pt.from_array(np.arange(B.shape[2]*5).reshape(B.shape[2],5))
32-
#>
33-
#> # Declare the result to be a dense matrix.
34-
#> A = pt.tensor([B.shape[0], 5], rm)
35-
#>
36-
#> # Declare index vars.
37-
#> i, j, k, l = pt.get_index_vars(4)
38-
#>
39-
#> # Define the MTTKRP computation.
40-
#> A[i, j] = B[i, k, l] * D[l, j] * C[k, j]
41-
#>
42-
#> # Perform the MTTKRP computation and write the result to file.
43-
#> pt.write("A.tns", A)
44-
#> pt.write("B.tns", B)
45-
#
4610
3 17
4711
2 3 4
4812
1 1 3 3

0 commit comments

Comments
 (0)