Skip to content

Conversation

@Vindaar
Copy link
Collaborator

@Vindaar Vindaar commented Sep 20, 2024

When adding the more type safe approach to [], []= in #653 I also forgot to add openArray to the allowed types.

This should also fix the CI by compiling with -d:ssl to download the MNIST dataset.

edit:
Also fixes a regression that appeared as a result of PR #659. See the added test case and commits.

This was simply an oversight obviously
By not resetting the offset here, operating on a Tensor view without
cloning could cause undefined behavior, because we would be accessing
elements outside the tensor buffer.
@Vindaar
Copy link
Collaborator Author

Vindaar commented Sep 20, 2024

Merging, because OSX CI is still borked.

@Vindaar Vindaar merged commit 5f8ef9d into master Sep 20, 2024
metagn pushed a commit to metagn/Arraymancer that referenced this pull request Mar 29, 2025
…im#666)

* explicitly allow `openArray` in `[]`, `[]=` for tensors

This was simply an oversight obviously

* fix CI by compiling tests with `-d:ssl`

* need a space, duh

* use AWS mirror from PyTorch for MNIST download

* fix regression caused by PR mratsim#659

By not resetting the offset here, operating on a Tensor view without
cloning could cause undefined behavior, because we would be accessing
elements outside the tensor buffer.

* add test case for regression of mratsim#659
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.

2 participants