Consolidate Enzyme tests#469
Conversation
0f9729f to
4396568
Compare
| rTαs = if α === Zero() | ||
| (Const,) | ||
| elseif !is_ci | ||
| (Active, Const) | ||
| else | ||
| (Active,) | ||
| end |
There was a problem hiding this comment.
| rTαs = if α === Zero() | |
| (Const,) | |
| elseif !is_ci | |
| (Active, Const) | |
| else | |
| (Active,) | |
| end | |
| rTαs = [] | |
| α === Zero() || push!(rTαs, Active) | |
| (α === Zero() || !is_ci) && push!(rTαs, Const) |
Just a small suggestion for code style, I tend to find it a bit easier to see what is going on if there aren't too many lines
There was a problem hiding this comment.
I don't quite like that this is now changed just here in this one instance, while the test file is full of these constructs. I don't mind the three case separation and keeping rTαs a tuple (though clearly that doesn't have any real advantages here). I would suggest to revert it to the previous state, unless @lkdvos feels strongly, but then they should probably be changed everywhere
There was a problem hiding this comment.
I kind of meant to change it everywhere but got pulled into a meeting midway through my suggestions 😁
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
Co-authored-by: Lukas Devos <ldevos98@gmail.com>
bef6af8 to
513299c
Compare
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/test/enzyme/indexmanipulations.jl b/test/enzyme/indexmanipulations.jl
index 3d47cfc..8e47e4c 100644
--- a/test/enzyme/indexmanipulations.jl
+++ b/test/enzyme/indexmanipulations.jl
@@ -67,7 +67,7 @@ Tβs = is_ci ? (Active,) : (Active, Const)
end
end
if !Sys.iswindows() && VERSION > v"1.11.0-rc"
- has_braiding && @timedtestset "flip_n_twist! TA ($TA)" for TA in (Duplicated,)
+ has_braiding && @timedtestset "flip_n_twist! TA ($TA)" for TA in (Duplicated,)
A = randn(T, V[1] ⊗ V[2] ← (V[3] ⊗ V[4] ⊗ V[5])')
if !(T <: Real && !(sectorscalartype(sectortype(A)) <: Real))
EnzymeTestUtils.test_reverse(twist!, TA, (copy(A), TA), (1, Const); atol, rtol, fkwargs = (inv = false,))
@@ -81,7 +81,7 @@ Tβs = is_ci ? (Active,) : (Active, Const)
EnzymeTestUtils.test_reverse(flip, TA, (A, TA), ([1, 3], Const); atol, rtol)
end
end
-
+
@timedtestset "insert and remove units TA ($TA)" for TA in (Duplicated,)
A = randn(T, V[1] ⊗ V[2] ← (V[3] ⊗ V[4] ⊗ V[5])')
@testset for insertunit in (insertleftunit, insertrightunit) |
Fixes to the caching for CI runs and some Enzyme improvements have cut the runtime of Enzyme tests substantially, so we can probably fold these back into smaller files to reduce the amount of CI runs.