Closed zhenkun closed 3 years ago
I will add this property but note that a slice of tensor cannot be used alone. In other words, you cannot write something like A[0]+A[1]
.
@zhenkun please check #369 and see if that fixes your issue. Thanks!
@seanlatias , thanks for the quick update! I will try it, and let you know.
works now! Thanks.
A = hcl.compute((2,10), lambda i,j: 0)
A[1].shape
will result in this: _Error in sys.excepthook: Traceback (most recent call last): File ".../heterocl-0.1-py3.7.egg/heterocl/debug.py", line 70, in hcl_excepthook print("\33[1;34m[HeteroCL Error]\33[0m" + value.message) AttributeError: 'TensorError' object has no attribute 'message'
Original exception was: Traceback (most recent call last): File "", line 1, in
File ".../heterocl-0.1-py3.7.egg/heterocl/tensor.py", line 164, in getattr
"Cannot access attribute if type is not struct")
heterocl.debug.TensorError: [Tensor] Cannot access attribute if type is not struct_