-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
btas::group does not seem working for TensorView #48
Comments
Hi Toru, I'd be happy to look into this. Could you tell me what the rank and index extents of the two tensors passed to group(...,1,3) were for the case(s) that failed? |
The rank is both 3, and the extents are both (95, 4, 14) in which 95 runs fastest. I am making a slice of (95,4,1) of one of them (with column being specified by the function argument), and call contract between two Tensor2 to produce Tensor 2 of extent (4*14, 4).
I know that btas::group is working for Tensor3, and that contract has been verified for Tensor2 times Tensor2 (since I am using it a lot). bagel::varray is basically btas::varray that has the capacity information. I may as well be my bug, so if you find something strange, just let me know. |
Hi Toru, was the bug you were seeing a runtime bug? I am finding that calling contract with TensorView arguments does not compile, and the reason seems pretty deeply "baked in" to the logic of contract at the moment. Specifically, inside contract in many cases the "A" and "B" tensors are permuted / reshaped into new temporary tensors which are instantiated as objects of the same type (_TensorA and _TensorB types, respectively). If one of these types is a TensorView then the resulting object doesn't allocate its own storage and can't be used to hold the permuted data. It's not clear to me the best way to proceed. Maybe contract should permute (reshape) the data into a temporary of type _TensorA::storage_type instead of type _TensorA itself. |
Hi Miles, it was a runtime bug, because I used my own version of contract that is in btas/optimize/contract.h. This version does not involve permute (these codes are not general enough, so it is not defaulted), and my slice was contiguous. I am not sure either how we should proceed with permute. |
I hit a bug that most likely originates from a bug in btas::group for TensorView. Here is my code. @emstoudenmire Do you have any ideas?
The text was updated successfully, but these errors were encountered: