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

small fix for static array onehot #1732

Merged
merged 2 commits into from
Aug 21, 2024
Merged

Conversation

ExpandingMan
Copy link
Contributor

This fixes what I think was essentially a typo in the StaticArrays extension and adds some tests to check for it. Think the only reason it wasn't caught was because it was occurring only in the 3-argument version.

@ExpandingMan
Copy link
Contributor Author

From the looks of it I assume these failures are normal. Locally I tested x86_64 linux on 1.10 which passes here.

@wsmoses
Copy link
Member

wsmoses commented Aug 15, 2024

hm 1.6/7/8 arent supposed to fail here.

Error is

Gradient & NamedTuples |    8      8
Gradient & SparseArrays / StaticArrays: Test Failed at /home/runner/work/Enzyme.jl/Enzyme.jl/test/runtests.jl:2779
  Expression: eltype(y) ≡ SVector{3, Float64}
   Evaluated: MVector{3, Float64} ≡ SVector{3, Float64}
Stacktrace:
 [1] macro expansion
   @ ~/work/Enzyme.jl/Enzyme.jl/test/runtests.jl:2779 [inlined]
 [2] macro expansion
   @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1151 [inlined]
 [3] top-level scope
   @ ~/work/Enzyme.jl/Enzyme.jl/test/runtests.jl:2762
Gradient & SparseArrays / StaticArrays: Test Failed at /home/runner/work/Enzyme.jl/Enzyme.jl/test/runtests.jl:2786
  Expression: eltype(y) ≡ SVector{3, Float64}
   Evaluated: MVector{3, Float64} ≡ SVector{3, Float64}
Stacktrace:
 [1] macro expansion
   @ ~/work/Enzyme.jl/Enzyme.jl/test/runtests.jl:2786 [inlined]
 [2] macro expansion
   @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1151 [inlined]
 [3] top-level scope
   @ ~/work/Enzyme.jl/Enzyme.jl/test/runtests.jl:2762
Test Summary:                          | Pass  Fail  Total
Gradient & SparseArrays / StaticArrays |   13     2     15
ERROR: LoadError: Some tests did not pass: 13 passed, 2 failed, 0 errored, 0 broken.
in expression starting at /home/runner/work/Enzyme.jl/Enzyme.jl/test/runtests.jl:2761
Package Enzyme errored during testing

@ExpandingMan
Copy link
Contributor Author

Woah, that's incredibly strange considering that it's the result of calling SArray...

@ExpandingMan
Copy link
Contributor Author

Well, I don't know what in the world is going on there, but considering this wasn't tested before I assume whatever the issue is was already present. I've weakened the tests so they shouldn't fail on older versions, so hopefully it wouldn't have to hold up this PR which is essentially just a bug fix.

@wsmoses wsmoses merged commit c75bbd4 into EnzymeAD:main Aug 21, 2024
32 of 54 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.

2 participants