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

Fix broadcast failure for VectorOfArray with SVector{1} #406

Merged
merged 3 commits into from
Oct 29, 2024

Conversation

huiyuxie
Copy link
Contributor

@huiyuxie huiyuxie commented Oct 28, 2024

Fix #378.

The corner case was considered but was never included in tests, so the error was not caught during development.

@huiyuxie
Copy link
Contributor Author

Approval is required @ChrisRackauckas

@jlchan
Copy link
Contributor

jlchan commented Oct 28, 2024

Out of curiosity @huiyuxie, does the MWE in #378 work under this PR?

@huiyuxie
Copy link
Contributor Author

Yes it worked locally and I added it to the tests. But the CI seems need approval to be triggered.

@jlchan
Copy link
Contributor

jlchan commented Oct 28, 2024

Thanks for checking! Lets be patient; Chris is very responsive to PRs and will approve the workflow, he just gets a ton of PRs/issues/messages between all the packages in the SciML ecosystem.

@huiyuxie
Copy link
Contributor Author

Sure 👌

@ChrisRackauckas
Copy link
Member

https://github.com/SciML/RecursiveArrayTools.jl/actions/runs/11546823342/job/32141320198?pr=406#step:6:419

Looks like this gets a test failure. Look at LTS since the non-LTS inference failure has not been investigated.

@huiyuxie
Copy link
Contributor Author

Thanks! Looks like my version doesn’t work for constant broadcasting. I’ll fix it tomorrow.

@@ -905,7 +905,9 @@ for (type, N_expr) in [
else
unpacked = unpack_voa(bc, i)
arr_type = StaticArraysCore.similar_type(dest[:, i])
dest[:, i] = if length(unpacked) == 1
dest[:, i] = if length(unpacked) == 1 && length(dest[:, i]) == 1
arr_type(unpacked[1])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added one more condition to deal with our special case - it worked in my place please rerun CI @ChrisRackauckas

There might be room for improvement, but for now, I just need to make it pass all tests.

@huiyuxie
Copy link
Contributor Author

@jlchan
Copy link
Contributor

jlchan commented Oct 28, 2024

https://github.com/SciML/RecursiveArrayTools.jl/actions/runs/11562374105/job/32187348125?pr=406 This error seems not related to this PR

Just to double check, does the same error show up on a “dummy” PR too?

@huiyuxie
Copy link
Contributor Author

Just to double check, does the same error show up on a “dummy” PR too?

Yes before I ran this branch I also tested master branch forked from upstream master - it showed this error

@ChrisRackauckas
Copy link
Member

It just needed a rebase, and seems fine now on v1.10. I'll track down the inference issue separately.

@ChrisRackauckas ChrisRackauckas merged commit 3819dee into SciML:master Oct 29, 2024
15 of 27 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.

Broadcasted assignment fails for VectorOfArray(Array{<:SVector{1}})
3 participants