cyclops-community / ctf

Cyclops Tensor Framework: parallel arithmetic on multidimensional arrays
Other
199 stars 53 forks source link

Python interface error on sparse tensor einsum #54

Closed zechengz closed 5 years ago

zechengz commented 6 years ago

When using ctf.einsum for sparse tensor (tensor sp=1)

n = 11
a1 = ctf.tensor((n,n,n), sp=1)

Sometimes ctf.einsum works well, but sometimes there are different errors generated. This issue possibly appear only on macOS. Possible errors:

  1. Checksum error
    .python(98705,0x7fff8b2d9380) malloc: *** error for object 0x7f8f0fc17cd0: incorrect checksum for freed object - object was probably modified after being freed.
    *** set a breakpoint in malloc_error_break to debug
    Abort trap: 
  2. The resulting tensor is incorrect. (e.g. by running the test_sparse.py in test/python)
    .F...
    ======================================================================
    FAIL: test_einsum_hadamard (__main__.KnowValues)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
    File "test_sparse.py", line 32, in test_einsum_hadamard
    self.assertTrue(allclose(d2,e2))
    AssertionError: False is not true
  3. Stuck by the test_sparse.py in test/python, (need to quit manually)
    Tests for sparse functionality
    .Killed: 9
  4. Seg fault error
    .Segmentation fault: 11
solomonik commented 5 years ago

Looks like this was fixed by recent commits address issues with Hadamard-product-like cotnractions for the sparse case.