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

More than 26 indices? #31

Open
davidweichiang opened this issue Dec 1, 2022 · 3 comments
Open

More than 26 indices? #31

davidweichiang opened this issue Dec 1, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@davidweichiang
Copy link
Contributor

torch.einsum limits you to 26 indices but can semiring_einsum provide a non-string interface that allows more than 26?

@bdusell
Copy link
Owner

bdusell commented Dec 1, 2022

That would be a good idea. How about something like:

compile_equation('abc,cde->bd')

can be written as

compile_equation(inputs=[['a', 'b', 'c'], ['c', 'd', 'e']], output=['b', 'd'])

or

compile_equation(inputs=[[0, 1, 2], [2, 3, 4]], output=[1, 3])

@davidweichiang
Copy link
Contributor Author

That looks good to me. It's pretty close to numpy.einsum's alternative interface.

@ccshan
Copy link
Contributor

ccshan commented Feb 20, 2023

Indeed, Python's common sequence operations make it easy to support

inputs=[['a', 'b', 'c'], ['c', 'd', 'e']], output=['b', 'd']

and

inputs=["abc", "cde"], output="bd"

with the same code.

@bdusell bdusell added the enhancement New feature or request label Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants