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

Tests II: more Julia function tests #969

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

jgreener64
Copy link
Contributor

I added tests for more Julia functions, including some which have had Enzyme issues fixed recently. I also added a nested reverse mode test and turned on previous tests that now pass on older Julia versions.

All pass on my machine, let's see what CI says.

@codecov-commenter
Copy link

codecov-commenter commented Jul 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.64%. Comparing base (90e07c1) to head (80bf0d8).
Report is 3 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #969      +/-   ##
==========================================
- Coverage   75.39%   74.64%   -0.75%     
==========================================
  Files          35       35              
  Lines       10653    10650       -3     
==========================================
- Hits         8032     7950      -82     
- Misses       2621     2700      +79     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wsmoses
Copy link
Member

wsmoses commented Jul 30, 2023

@jgreener64 can you isolate the 1.8 segfault into an issue?

@jgreener64
Copy link
Contributor Author

Opened #970 and #971 and disabled the failing tests for now.

test/runtests.jl Outdated
# On Julia 1.6 the gradients are wrong (0.7 not 1.2) and on 1.7 it errors
@static if VERSION ≥ v"1.8-"
# On Julia 1.6 the gradients are wrong (0.7 not 1.2)
@static if VERSION ≥ v"1.7-"
Copy link
Member

Choose a reason for hiding this comment

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

Open a bug for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

remove the version now?

@wsmoses
Copy link
Member

wsmoses commented Jul 31, 2023

Can you isolate that 1.7 assertion error or segfault?

@jgreener64
Copy link
Contributor Author

I can't reproduce the Julia 1.7 issue locally, pushing some print statements to isolate it in CI.

@jgreener64
Copy link
Contributor Author

Julia 1.7 issue reported at #974.

A Julia 1.6 issue in try/catch reported at #971.

test/runtests.jl Outdated
return 2x
end
end
@test autodiff(Reverse, f25, Active, Active(2.0))[1][1] == 2
Copy link
Member

Choose a reason for hiding this comment

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

add the test_broken for 1.6?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, unfortunately the @test 1==1 broken=cond syntax is not available on Julia 1.6 so we have to use an if and @test_broken.

By the way I can remove the print statements just before this is merged, they are for debugging.

@jgreener64
Copy link
Contributor Author

Raised two new issues: #1118 and #1119.

@jgreener64
Copy link
Contributor Author

I think the only unresolved issue is #970, I could remove that test to merge this PR.

test/runtests.jl Outdated
f26(x) = circshift([1.0, 2x, 3.0], 1)[end]
@test autodiff(Reverse, f26, Active, Active(2.0))[1][1] == 2
@test autodiff(Forward, f26, Duplicated(2.0, 1.0))[1] == 2
println("Done 26")
Copy link
Member

Choose a reason for hiding this comment

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

remove these prints?

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.

None yet

4 participants