You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is an in-place operation that doesn't update the string representation (t->repr) of the tensor.
Or did I miss the line somewhere else?
Adding a dirty flag at the tensor level that flips to true when t->repr would help, but not fully. Because if we have two tensors, t1 and t2, where t1->storage == t2->storage, and if we then perform an in-place operation on t1, t2 wouldn't get the memo, so to speak. We'd need a dirty flag at the storage level as well.
In a micro-implementation like this, it's probably better to nix the conditional in the tensor_to_string function, allow it to regenerate the string on the fly, since we only need it for text output, which is an infrequent task in the context of tensor ops.
The text was updated successfully, but these errors were encountered:
I think you should remove the conditional at the top of the
tensor_to_string
function intensor1d.c
. Tell me if I'm wrong.Here's the current code:
However,
is an in-place operation that doesn't update the string representation (
t->repr
) of the tensor.Or did I miss the line somewhere else?
Adding a dirty flag at the tensor level that flips to
true
whent->repr
would help, but not fully. Because if we have two tensors,t1
andt2
, wheret1->storage == t2->storage
, and if we then perform an in-place operation ont1
,t2
wouldn't get the memo, so to speak. We'd need a dirty flag at the storage level as well.In a micro-implementation like this, it's probably better to nix the conditional in the tensor_to_string function, allow it to regenerate the string on the fly, since we only need it for text output, which is an infrequent task in the context of tensor ops.
The text was updated successfully, but these errors were encountered: