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

Relax type constraints to permit AbstractVectors #230

Merged
merged 1 commit into from
Jan 23, 2024
Merged

Relax type constraints to permit AbstractVectors #230

merged 1 commit into from
Jan 23, 2024

Conversation

oxinabox
Copy link
Member

I think this is safe.
We do still convert everything to Vector{<:Real} via to_vec.
But if someone wants to bypass that by defining something like

FiniteDifferences.to_vec(x::CuVector{Float32}) = x, y->y

then this might make there lives easier.
It is stepping well off the beaten track, but I don't think we get anything from blocking them like this

Copy link
Member

@wesselb wesselb left a comment

Choose a reason for hiding this comment

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

Sounds very sensible! If the failing CI tests are not related to this, then looks like we can just merge this.

Perhaps @willtebbutt would want to have a quick look too?

@oxinabox
Copy link
Member Author

yeah CI failures are unrelated

@oxinabox oxinabox merged commit a370b9b into main Jan 23, 2024
15 of 18 checks passed
@oxinabox oxinabox deleted the ox/relax branch January 23, 2024 08:39
@Keno
Copy link

Keno commented Jul 31, 2024

I'm updating DAECompiler, which has a test here: https://github.com/CedarEDA/DAECompiler.jl/blob/main/test/sensitivity.jl#L120

which uses an immutable AbstractVector, which is unhappy with this code path, but worked fine before. I'll work around it, but flagging this, since @oxinabox wrote that test.

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