Skip to content

Commit b040693

Browse files
committed
Remove Enzyme special handling on windows
1 parent 441c5ea commit b040693

File tree

6 files changed

+14
-78
lines changed

6 files changed

+14
-78
lines changed

.github/workflows/FormatCheck.yml

Lines changed: 5 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,9 @@
1-
name: format-check
1+
name: Format suggestions
22

3-
on:
4-
push:
5-
branches:
6-
- 'master'
7-
- 'release-'
8-
tags: '*'
9-
pull_request:
3+
on: [pull_request]
104

115
jobs:
12-
build:
13-
runs-on: ${{ matrix.os }}
14-
strategy:
15-
matrix:
16-
julia-version: [1]
17-
julia-arch: [x86]
18-
os: [ubuntu-latest]
6+
code-style:
7+
runs-on: ubuntu-latest
198
steps:
20-
- uses: julia-actions/setup-julia@latest
21-
with:
22-
version: ${{ matrix.julia-version }}
23-
24-
- uses: actions/checkout@v4
25-
- name: Install JuliaFormatter and format
26-
# This will use the latest version by default but you can set the version like so:
27-
#
28-
# julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter", version="0.13.0"))'
29-
run: |
30-
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
31-
julia -e 'using JuliaFormatter; format(".", verbose=true)'
32-
- name: Format check
33-
run: |
34-
julia -e '
35-
out = Cmd(`git diff --name-only`) |> read |> String
36-
if out == ""
37-
exit(0)
38-
else
39-
@error "Some files have not been formatted !!!"
40-
write(stdout, out)
41-
exit(1)
42-
end'
9+
- uses: julia-actions/julia-format@v2

Project.toml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ BenchmarkTools = "1.4"
6565
CUDA = "5.2"
6666
ConcreteStructs = "0.2.3"
6767
DiffEqBase = "6.149.0"
68-
Enzyme = "0.11.15, 0.12"
68+
Enzyme = "0.12"
6969
FastBroadcast = "0.2.8"
7070
FastClosures = "0.3.2"
7171
FastLevenbergMarquardt = "0.1"
@@ -103,8 +103,8 @@ StableRNGs = "1"
103103
StaticArrays = "1.9"
104104
StaticArraysCore = "1.4"
105105
Sundials = "4.23.1"
106-
Symbolics = "5.13"
107106
SymbolicIndexingInterface = "0.3.15"
107+
Symbolics = "5.13"
108108
Test = "1.10"
109109
TimerOutputs = "0.5.23"
110110
Zygote = "0.6.69"
@@ -115,15 +115,12 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
115115
BandedMatrices = "aae01518-5342-5314-be14-df237901396f"
116116
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
117117
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
118-
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
119118
Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
120119
FastLevenbergMarquardt = "7a0df574-e128-4d35-8cbd-3d84502bf7ce"
121120
FixedPointAcceleration = "817d07cb-a79a-5c30-9a31-890123675176"
122-
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
123121
LeastSquaresOptim = "0fc2ff8b-aaa3-5acd-a817-1944a5e08891"
124-
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
125-
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
126122
MINPACK = "4854310b-de5a-5eb6-a2a5-c1dee2bd17f9"
123+
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
127124
NLSolvers = "337daf1e-9722-11e9-073e-8b9effe078ba"
128125
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
129126
NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
@@ -132,10 +129,8 @@ OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
132129
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
133130
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
134131
ReTestItems = "817f1d60-ba6b-4fd5-9520-3cf149f6a823"
135-
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
136132
SIAMFANLEquations = "084e46ad-d928-497d-ad5e-07fa361a48c4"
137133
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
138-
SparseDiffTools = "47a9eef4-7e08-11e9-0b38-333d64bd3804"
139134
SpeedMapping = "f1835b91-879b-4a3f-a438-e4baacf14412"
140135
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
141136
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
@@ -145,4 +140,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
145140
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
146141

147142
[targets]
148-
test = ["Aqua", "Enzyme", "BenchmarkTools", "SafeTestsets", "Pkg", "Test", "ForwardDiff", "StaticArrays", "Symbolics", "LinearSolve", "Random", "LinearAlgebra", "Zygote", "SparseDiffTools", "NonlinearProblemLibrary", "LeastSquaresOptim", "FastLevenbergMarquardt", "NaNMath", "BandedMatrices", "DiffEqBase", "StableRNGs", "MINPACK", "NLsolve", "OrdinaryDiffEq", "SpeedMapping", "FixedPointAcceleration", "SIAMFANLEquations", "Sundials", "ReTestItems", "Reexport", "CUDA", "NLSolvers"]
143+
test = ["Aqua", "BandedMatrices", "BenchmarkTools", "CUDA", "Enzyme", "FastLevenbergMarquardt", "FixedPointAcceleration", "LeastSquaresOptim", "MINPACK", "ModelingToolkit", "NLSolvers", "NLsolve", "NaNMath", "NonlinearProblemLibrary", "OrdinaryDiffEq", "Pkg", "Random", "ReTestItems", "SIAMFANLEquations", "SafeTestsets", "SparseDiffTools", "SpeedMapping", "StableRNGs", "StaticArrays", "Sundials", "Symbolics", "Test", "Zygote"]

test/core/rootfind_tests.jl

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,6 @@ using Reexport
33
@reexport using BenchmarkTools, LinearSolve, NonlinearSolve, StaticArrays, Random,
44
LinearAlgebra, ForwardDiff, Zygote, Enzyme, SparseDiffTools, DiffEqBase
55

6-
function __autosparseenzyme()
7-
@static if Sys.iswindows()
8-
@warn "Enzyme on Windows stalls. Using AutoSparse(AutoFiniteDiff()) instead till \
9-
https://github.com/EnzymeAD/Enzyme.jl/issues/1236 is resolved."
10-
return AutoSparse(AutoFiniteDiff())
11-
else
12-
return AutoSparse(AutoEnzyme())
13-
end
14-
end
15-
166
_nameof(x) = applicable(nameof, x) ? nameof(x) : _nameof(typeof(x))
177

188
quadratic_f(u, p) = u .* u .- p
@@ -58,8 +48,7 @@ function nlprob_iterator_interface(f, p_range, ::Val{iip}, solver) where {iip}
5848
end
5949

6050
export nlprob_iterator_interface, benchmark_nlsolve_oop, benchmark_nlsolve_iip,
61-
TERMINATION_CONDITIONS, _nameof, newton_fails, quadratic_f, quadratic_f!,
62-
__autosparseenzyme
51+
TERMINATION_CONDITIONS, _nameof, newton_fails, quadratic_f, quadratic_f!
6352
end
6453

6554
# --- NewtonRaphson tests ---
@@ -113,7 +102,7 @@ end
113102

114103
@testset "ADType: $(autodiff) u0: $(_nameof(u0))" for autodiff in (
115104
AutoSparse(AutoForwardDiff()), AutoSparse(AutoFiniteDiff()),
116-
AutoZygote(), AutoSparse(AutoZygote()), __autosparseenzyme()),
105+
AutoZygote(), AutoSparse(AutoZygote()), AutoSparse(AutoEnzyme())),
117106
u0 in (1.0, [1.0, 1.0])
118107

119108
probN = NonlinearProblem(quadratic_f, u0, 2.0)
@@ -176,7 +165,7 @@ end
176165

177166
@testset "ADType: $(autodiff) u0: $(_nameof(u0)) radius_update_scheme: $(radius_update_scheme)" for autodiff in (
178167
AutoSparse(AutoForwardDiff()), AutoSparse(AutoFiniteDiff()),
179-
AutoZygote(), AutoSparse(AutoZygote()), __autosparseenzyme()),
168+
AutoZygote(), AutoSparse(AutoZygote()), AutoSparse(AutoEnzyme())),
180169
u0 in (1.0, [1.0, 1.0]),
181170
radius_update_scheme in radius_update_schemes
182171

@@ -272,7 +261,7 @@ end
272261

273262
@testset "ADType: $(autodiff) u0: $(_nameof(u0))" for autodiff in (
274263
AutoSparse(AutoForwardDiff()), AutoSparse(AutoFiniteDiff()),
275-
AutoZygote(), AutoSparse(AutoZygote()), __autosparseenzyme()),
264+
AutoZygote(), AutoSparse(AutoZygote()), AutoSparse(AutoEnzyme())),
276265
u0 in (1.0, [1.0, 1.0])
277266

278267
probN = NonlinearProblem(quadratic_f, u0, 2.0)
@@ -454,7 +443,7 @@ end
454443

455444
@testset "ADType: $(autodiff) u0: $(_nameof(u0))" for autodiff in (
456445
AutoSparse(AutoForwardDiff()), AutoSparse(AutoFiniteDiff()),
457-
AutoZygote(), AutoSparse(AutoZygote()), __autosparseenzyme()),
446+
AutoZygote(), AutoSparse(AutoZygote()), AutoSparse(AutoEnzyme())),
458447
u0 in (1.0, [1.0, 1.0])
459448

460449
probN = NonlinearProblem(quadratic_f, u0, 2.0)

test/downstream/Project.toml

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/downstream/downstream_tests.jl

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)