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

Shape analyzer and exposing properties of tensor expressions #40

Merged
merged 4 commits into from
Nov 23, 2021

Conversation

campsd
Copy link
Collaborator

@campsd campsd commented Nov 23, 2021

Closes #31.

Example usage:

A = ff.tensor('A', 2, 3, 4)
B = ff.tensor('B', 4, 3, 5)
i, j, k, l = ff.indices('i, j, k, l')
tsrex = A[i, j, k] * B[k, ~j, l]
f = Factorization(tsrex)
print(f.shape)
print(tsrex.shape)
print(tsrex.ndim)
print(tsrex.live_indices)
print(tsrex.einspec)

@campsd campsd requested a review from yhtang November 23, 2021 00:01
funfact/lang/_tsrex.py Show resolved Hide resolved
funfact/lang/interpreter/_shape.py Outdated Show resolved Hide resolved
@yhtang yhtang merged commit d257d40 into yhtang:develop Nov 23, 2021
@campsd campsd deleted the feature/shape branch December 2, 2021 16:38
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

Successfully merging this pull request may close these issues.

Exposing properties of the underlying AST for tensor expressions
2 participants