Skip to content
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

Is there a way to ask TildeArray to print all the intermediate quantities and operations (i.e. permutation, GEMM, etc.)? #221

Open
xlliu98 opened this issue Oct 15, 2020 · 3 comments

Comments

@xlliu98
Copy link

xlliu98 commented Oct 15, 2020

No description provided.

@justusc
Copy link
Member

justusc commented Oct 15, 2020

Yes there is. You can find the interface code here. https://github.com/ValeevGroup/tiledarray/blob/master/src/TiledArray/expressions/expr_trace.h

It has been a while, but if I remember the code was

std::cout << c("i,k") << a("i,j") * b("i,k");

which prints out the equivalent to the expression

c("i,k") = a("i,j") * b("i,k");

the print does not actually evaluate the expression. It just walks the expression tree to generate the expected operations, including permutations.

It was not a feature that was often used, so I am not sure if the feature was broken or not implemented for certain expression types since I last worked on the code. If their are missing implementations, extending the code should be fairly simple as you would only need to add a print function that matches the interface of other expressions.

@xlliu98
Copy link
Author

xlliu98 commented Oct 15, 2020

Thanks. Is there a similar way for block expressions?

@justusc
Copy link
Member

justusc commented Oct 16, 2020

I think that may not have been implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants