[Mlir-commits] [mlir] 0bd2d4c - [mlir][sparse] Remove comment w/ code in it

Gus Smith llvmlistbot at llvm.org
Wed Aug 4 14:41:43 PDT 2021


Author: Gus Smith
Date: 2021-08-04T21:41:36Z
New Revision: 0bd2d4c4b163303ff5211920bdb81328c1ac1f7f

URL: https://github.com/llvm/llvm-project/commit/0bd2d4c4b163303ff5211920bdb81328c1ac1f7f
DIFF: https://github.com/llvm/llvm-project/commit/0bd2d4c4b163303ff5211920bdb81328c1ac1f7f.diff

LOG: [mlir][sparse] Remove comment w/ code in it

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D107484

Added: 
    

Modified: 
    mlir/test/Integration/data/mttkrp_b.tns

Removed: 
    


################################################################################
diff  --git a/mlir/test/Integration/data/mttkrp_b.tns b/mlir/test/Integration/data/mttkrp_b.tns
index 6a64e6bcb6368..db3464343b383 100644
--- a/mlir/test/Integration/data/mttkrp_b.tns
+++ b/mlir/test/Integration/data/mttkrp_b.tns
@@ -5,44 +5,8 @@
 #
 # see http://frostt.io/tensors/file-formats.html
 #
-# This matrix represents the "B" input to the MTTKRP kernel:
+# This tensor represents the "B" input to the MTTKRP kernel:
 # http://tensor-compiler.org/docs/data_analytics/index.html
-#
-# It can be generated with the following script, adapted from the above link:
-#
-#> import pytaco as pt
-#> import numpy as np
-#> from pytaco import compressed, dense
-#> import random
-#>
-#> # Define formats for storing the sparse tensor and dense matrices.
-#> csf = pt.format([compressed, compressed, compressed])
-#> rm  = pt.format([dense, dense])
-#
-#> B=pt.tensor((2,3,4),csf)
-#> density = 0.25
-#> for i in range(2):
-#>   for j in range(3):
-#>     for k in range(4):
-#>       if random.random() > density:
-#>         B.insert((i,j,k), random.randint(0,100))
-#>
-#> C = pt.from_array(np.arange(B.shape[1]*5).reshape(B.shape[1],5))
-#> D = pt.from_array(np.arange(B.shape[2]*5).reshape(B.shape[2],5))
-#>
-#> # Declare the result to be a dense matrix.
-#> A = pt.tensor([B.shape[0], 5], rm)
-#>
-#> # Declare index vars.
-#> i, j, k, l = pt.get_index_vars(4)
-#>
-#> # Define the MTTKRP computation.
-#> A[i, j] = B[i, k, l] * D[l, j] * C[k, j]
-#>
-#> # Perform the MTTKRP computation and write the result to file.
-#> pt.write("A.tns", A)
-#> pt.write("B.tns", B)
-#
 3 17
 2 3 4
 1 1 3 3


        


More information about the Mlir-commits mailing list