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

[NDTensors] Scalar diag calls expose to skip scalar indexing #1517

Merged
merged 4 commits into from
Sep 3, 2024

Conversation

kmp5VT
Copy link
Collaborator

@kmp5VT kmp5VT commented Jul 9, 2024

Description

When Diag is a scalar we should call the expose version of getindex to allow this to work on CPU and GPU without scalar indexing issue. Related to this issue on discourse https://itensor.discourse.group/t/scalar-on-a-zero-rank-tensor-on-gpu/1863/2

@emstoudenmire
Copy link
Collaborator

Looks good

Copy link
Collaborator

@emstoudenmire emstoudenmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed this with Karl in person, and seems good and is consistent with other uses of expose and other places where we allow scaling indexing for getindex of GPU arrays.

@mtfishman
Copy link
Member

Looks good to me, can you add a test?

@mtfishman mtfishman merged commit ace49ee into ITensor:main Sep 3, 2024
15 checks passed
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.

3 participants