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

Silent wrong shapes #21

Open
frostedoyster opened this issue Nov 18, 2023 · 1 comment
Open

Silent wrong shapes #21

frostedoyster opened this issue Nov 18, 2023 · 1 comment

Comments

@frostedoyster
Copy link
Collaborator

When calling Mops from C++ and implicitly initializing mops::Tensors,
something like
{O.data(), {1000}}
can silently initialize a 3D Mops tensor.

@Luthaf
Copy link
Contributor

Luthaf commented Nov 20, 2023

The problem is that the other two dimensions are initialized to 0, right? I don't think there is much we can do about this, it's how brace initialization works in C++. We might be able to define constructors that take the shape as three arguments, but I'm not sure how this would look like, since we would need to have different constructors for different values of the shape size template parameter.

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