From bc7d1bdc3aec17c70ac80ac5522ea97f380bdefd Mon Sep 17 00:00:00 2001 From: Billy Moses Date: Wed, 24 Jun 2026 13:32:52 -0500 Subject: [PATCH 1/8] [DEBUG] Windows bigfloat error --- .buildkite/pipeline.yml | 78 -------------------- .github/workflows/CI.yml | 152 --------------------------------------- test/runtests.jl | 61 ++++++---------- 3 files changed, 23 insertions(+), 268 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 05af54d9a3..8b13789179 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,79 +1 @@ -steps: - - label: "CUDA Julia v{{matrix.version}}" - matrix: - setup: - version: - - "1.10" - - "1.11" - - "1.12" - plugins: - - JuliaCI/julia#v1: - version: "{{matrix.version}}" - agents: - queue: "cuda" - if: build.message !~ /\[skip tests\]/ - timeout_in_minutes: 60 - commands: | - echo "--- Setup Julia packages" - JULIA_PKG_PRECOMPILE_AUTO="false" julia --color=yes -e ' - using Pkg - pkgs = [PackageSpec(; path) for path in (".", "lib/EnzymeCore", "lib/EnzymeTestUtils")] - Pkg.develop(pkgs) - Pkg.add(PackageSpec(; name="CUDA", version="6"))' || exit 3 - echo "+++ Run tests" - julia --color=yes test/cuda.jl - env: - JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager - -# - label: "AMDGPU Julia v{{matrix.version}}" -# matrix: -# setup: -# version: -# - "1.10" -# plugins: -# - JuliaCI/julia#v1: -# version: "{{matrix.version}}" -# agents: -# queue: "rocm" -# if: build.message !~ /\[skip tests\]/ -# timeout_in_minutes: 60 -# commands: | -# echo "--- Setup Julia packages" -# julia --color=yes -e ' -# using Pkg -# pkgs = [PackageSpec(; path) for path in (".", "lib/EnzymeCore", "lib/EnzymeTestUtils")] -# push!(pkgs, PackageSpec(; name="AMDGPU")) -# Pkg.develop(pkgs)' || exit 3 -# -# echo "+++ Run tests" -# julia --color=yes test/amdgpu.jl -# env: -# JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager -# -# - label: "Metal Julia v{{matrix.version}}" -# matrix: -# setup: -# version: -# - "1.10" -# plugins: -# - JuliaCI/julia#v1: -# version: "{{matrix.version}}" -# agents: -# queue: "juliaecosystem" -# os: "macos" -# arch: "aarch64" -# if: build.message !~ /\[skip tests\]/ -# timeout_in_minutes: 60 -# commands: | -# echo "--- Setup Julia packages" -# julia --color=yes -e ' -# using Pkg -# pkgs = [PackageSpec(; path) for path in (".", "lib/EnzymeCore", "lib/EnzymeTestUtils")] -# push!(pkgs, PackageSpec(; name="Metal")) -# Pkg.develop(pkgs)' || exit 3 -# -# echo "+++ Run tests" -# julia --color=yes test/metal.jl -# env: -# JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b3e095e483..ccd594f8cf 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -45,8 +45,6 @@ jobs: - '1.12' - 'nightly' os: - - ubuntu-24.04 - - macOS-latest - windows-latest llvm_args: - '' @@ -59,44 +57,6 @@ jobs: - os: windows-latest arch: default libEnzyme: local - include: - - os: ubuntu-24.04 - arch: x86 - libEnzyme: packaged - version: '1.10' - assertions: false - - os: ubuntu-24.04 - arch: default - libEnzyme: packaged - version: '1.10' - assertions: true - - os: ubuntu-24.04 - arch: default - libEnzyme: packaged - version: '1.11' - assertions: true - - os: ubuntu-24.04 - arch: default - libEnzyme: packaged - version: '1.12' - assertions: true - - os: ubuntu-24.04 - arch: default - libEnzyme: packaged - version: '1.13' - assertions: true - - os: ubuntu-24.04 - arch: default - libEnzyme: packaged - version: '1.10' - assertions: true - llvm_args: '--opaque-pointers' - - os: ubuntu-24.04 - arch: default - libEnzyme: packaged - version: '1.11' - assertions: false - llvm_args: '--opaque-pointers' steps: - uses: actions/checkout@v7 - uses: julia-actions/setup-julia@v3 @@ -177,115 +137,3 @@ jobs: files: lcov.info token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: false # or true if you want CI to fail when Codecov fails - - enzymetestutils: - timeout-minutes: 60 - name: EnzymeTestUtils - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.libEnzyme }} libEnzyme - ${{ github.event_name }} - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.version == 'nightly' }} - env: - JULIA_PROJECT: "lib/EnzymeTestUtils" - strategy: - fail-fast: false - matrix: - version: - - '1.10' - - '1.11' - - '1.12' - - 'nightly' - os: - - ubuntu-latest - arch: - - default - libEnzyme: [packaged] - steps: - - uses: actions/checkout@v7 - - uses: julia-actions/setup-julia@v3 - with: - version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - - uses: julia-actions/cache@v3 - - name: setup EnzymeTestUtils - shell: julia --color=yes {0} - id: setup_testutils - continue-on-error: ${{ matrix.version == 'nightly' }} - run: | - using Pkg - Pkg.develop([PackageSpec(; path) for path in (".", "lib/EnzymeCore")]) - Pkg.instantiate() - env: - JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager - - name: Run the tests - if: matrix.version != 'nightly' || steps.setup_testutils.outcome == 'success' - continue-on-error: ${{ matrix.version == 'nightly' }} - id: run_tests - shell: julia --color=yes {0} - run: | - using Pkg - Pkg.test("EnzymeTestUtils"; coverage=true) - - uses: julia-actions/julia-processcoverage@v1 - if: matrix.version != 'nightly' || steps.run_tests.outcome == 'success' - with: - directories: lib/EnzymeTestUtils/src - - uses: codecov/codecov-action@v7 - if: matrix.version != 'nightly' || steps.run_tests.outcome == 'success' - with: - files: lcov.info - token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: false # or true if you want CI to fail when Codecov fails - - enzymecore: - timeout-minutes: 20 - name: EnzymeCore - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.libEnzyme }} libEnzyme - ${{ github.event_name }} - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.version == 'nightly' }} - env: - JULIA_PROJECT: "lib/EnzymeCore" - strategy: - fail-fast: false - matrix: - version: - - '1.10' - - '1.11' - - '1.12' - - 'nightly' - os: - - ubuntu-latest - arch: - - default - libEnzyme: [packaged] - steps: - - uses: actions/checkout@v7 - - uses: julia-actions/setup-julia@v3 - with: - version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - - uses: julia-actions/cache@v3 - - name: setup EnzymeCore - shell: julia --color=yes {0} - id: setup_testutils - continue-on-error: ${{ matrix.version == 'nightly' }} - run: | - using Pkg - Pkg.develop([PackageSpec(; path) for path in (".",)]) - Pkg.instantiate() - env: - JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager - - name: Run the tests - if: matrix.version != 'nightly' || steps.setup_testutils.outcome == 'success' - continue-on-error: ${{ matrix.version == 'nightly' }} - id: run_tests - shell: julia --color=yes {0} - run: | - using Pkg - Pkg.test("EnzymeCore"; coverage=true) - - uses: julia-actions/julia-processcoverage@v1 - if: matrix.version != 'nightly' || steps.run_tests.outcome == 'success' - with: - directories: lib/EnzymeCore/src - - uses: codecov/codecov-action@v7 - if: matrix.version != 'nightly' || steps.run_tests.outcome == 'success' - with: - files: lcov.info - token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: false # or true if you want CI to fail when Codecov fails diff --git a/test/runtests.jl b/test/runtests.jl index 31dcf8b65b..f9e78383b2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,42 +1,27 @@ -import Enzyme -import Enzyme_jll -using ParallelTestRunner: addworker, filter_tests!, find_tests, parse_args, runtests +using Enzyme +using Test -# Start with autodiscovered tests -testsuite = find_tests(@__DIR__) -# Add threads tests to be run with multiple Julia threads (will be configured in -# `test_worker`). -testsuite["threads/2"] = :(include($(joinpath(@__DIR__, "threads.jl")))) -# Exclude integration tests, they're handled differently (they each run in their -# own environment) -for (k, _) in testsuite - startswith(k, "integration/") && delete!(testsuite, k) -end - -# Parse arguments -args = parse_args(ARGS) - -if filter_tests!(testsuite, args) - # Skip GPU-specific tests by default. - delete!(testsuite, "metal") - delete!(testsuite, "cuda") - delete!(testsuite, "amdgpu") - delete!(testsuite, "common") +@testset "BigFloat arithmetic" begin + a = BigFloat(1.234) + da = BigFloat(-0.23) + b = BigFloat(0.56) + db = BigFloat(0.27) + af64 = 1.234 # for testing mixed methods + daf64 = -0.23 # for testing mixed methods + bf64 = 0.56 # for testing mixed methods + dbf64 = 0.27 # for testing mixed methods - # Skipped until https://github.com/EnzymeAD/Enzyme.jl/issues/2620 is fixed. - if Sys.iswindows() - delete!(testsuite, "ext/specialfunctions") - end -end + @test autodiff(Enzyme.Forward, +, Duplicated, Duplicated(a, da), Duplicated(b, db))[:1] ≈ da+db + @test autodiff(Enzyme.Forward, +, Duplicated, Duplicated(a, da), Duplicated(bf64, dbf64))[:1] ≈ da+dbf64 + @test autodiff(Enzyme.Forward, -, Duplicated, Duplicated(a, da), Duplicated(b, db))[:1] ≈ da-db + @test autodiff(Enzyme.Forward, -, Duplicated, Duplicated(a, da), Duplicated(bf64, dbf64))[:1] ≈ da-dbf64 + @test autodiff(Enzyme.Forward, *, Duplicated, Duplicated(a, da), Duplicated(b, db))[:1] ≈ b*da + a*db + @test autodiff(Enzyme.Forward, *, Duplicated, Duplicated(a, da), Duplicated(bf64, dbf64))[:1] ≈ bf64*da + a*dbf64 + @test autodiff(Enzyme.Forward, /, Duplicated, Duplicated(a, da), Duplicated(b, db))[:1] ≈ da/b - db * a/b^2 + @test autodiff(Enzyme.Forward, /, Duplicated, Duplicated(a, da), Duplicated(bf64, dbf64))[:1] ≈ da/bf64 - dbf64 * a/bf64^2 -function test_worker(name) - if name == "threads/2" - # Run the `threads/2` testset, with multiple threads. - return addworker(; exeflags = ["--threads=2"]) - end + @test autodiff(Enzyme.Forward, inv, Duplicated, Duplicated(a, da))[:1] ≈ -(one(BigFloat)/a^2) * da + @test autodiff(Enzyme.Forward, sin, Duplicated, Duplicated(a, da))[:1] ≈ cos(a) * da + @test autodiff(Enzyme.Forward, cos, Duplicated, Duplicated(a, da))[:1] ≈ -sin(a) * da + @test autodiff(Enzyme.Forward, tan, Duplicated, Duplicated(a, da))[:1] ≈ autodiff(Enzyme.Forward, tan, Duplicated, Duplicated(af64, daf64))[1] end - -const init_code = quote end - -@info "Testing against" Enzyme_jll.libEnzyme -runtests(Enzyme, args; testsuite, init_code, test_worker) From 9fbb0466621b09fa2b27dce566c3a2a0ad50e019 Mon Sep 17 00:00:00 2001 From: William Moses Date: Wed, 24 Jun 2026 13:40:12 -0500 Subject: [PATCH 2/8] Update runtests.jl --- test/runtests.jl | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index f9e78383b2..35d841b7cc 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -19,9 +19,4 @@ using Test @test autodiff(Enzyme.Forward, *, Duplicated, Duplicated(a, da), Duplicated(bf64, dbf64))[:1] ≈ bf64*da + a*dbf64 @test autodiff(Enzyme.Forward, /, Duplicated, Duplicated(a, da), Duplicated(b, db))[:1] ≈ da/b - db * a/b^2 @test autodiff(Enzyme.Forward, /, Duplicated, Duplicated(a, da), Duplicated(bf64, dbf64))[:1] ≈ da/bf64 - dbf64 * a/bf64^2 - - @test autodiff(Enzyme.Forward, inv, Duplicated, Duplicated(a, da))[:1] ≈ -(one(BigFloat)/a^2) * da - @test autodiff(Enzyme.Forward, sin, Duplicated, Duplicated(a, da))[:1] ≈ cos(a) * da - @test autodiff(Enzyme.Forward, cos, Duplicated, Duplicated(a, da))[:1] ≈ -sin(a) * da - @test autodiff(Enzyme.Forward, tan, Duplicated, Duplicated(a, da))[:1] ≈ autodiff(Enzyme.Forward, tan, Duplicated, Duplicated(af64, daf64))[1] end From b4ad28dfbb20747033b1323f3e3eca3368bf78e1 Mon Sep 17 00:00:00 2001 From: William Moses Date: Wed, 24 Jun 2026 13:50:18 -0500 Subject: [PATCH 3/8] Remove redundant autodiff tests for BigFloat Removed several tests for arithmetic operations using autodiff. --- test/runtests.jl | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 35d841b7cc..485cdd258d 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,6 +1,9 @@ using Enzyme using Test +Enzyme.API.printall!(true) +Enzyme.Compiler.DumpPostOpt[] = true + @testset "BigFloat arithmetic" begin a = BigFloat(1.234) da = BigFloat(-0.23) @@ -13,10 +16,4 @@ using Test @test autodiff(Enzyme.Forward, +, Duplicated, Duplicated(a, da), Duplicated(b, db))[:1] ≈ da+db @test autodiff(Enzyme.Forward, +, Duplicated, Duplicated(a, da), Duplicated(bf64, dbf64))[:1] ≈ da+dbf64 - @test autodiff(Enzyme.Forward, -, Duplicated, Duplicated(a, da), Duplicated(b, db))[:1] ≈ da-db - @test autodiff(Enzyme.Forward, -, Duplicated, Duplicated(a, da), Duplicated(bf64, dbf64))[:1] ≈ da-dbf64 - @test autodiff(Enzyme.Forward, *, Duplicated, Duplicated(a, da), Duplicated(b, db))[:1] ≈ b*da + a*db - @test autodiff(Enzyme.Forward, *, Duplicated, Duplicated(a, da), Duplicated(bf64, dbf64))[:1] ≈ bf64*da + a*dbf64 - @test autodiff(Enzyme.Forward, /, Duplicated, Duplicated(a, da), Duplicated(b, db))[:1] ≈ da/b - db * a/b^2 - @test autodiff(Enzyme.Forward, /, Duplicated, Duplicated(a, da), Duplicated(bf64, dbf64))[:1] ≈ da/bf64 - dbf64 * a/bf64^2 end From e0a27678e9f05d83f4b20e8fb60e90321f3f9639 Mon Sep 17 00:00:00 2001 From: William Moses Date: Wed, 24 Jun 2026 14:04:37 -0500 Subject: [PATCH 4/8] Remove test case for mixed method autodiff --- test/runtests.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 485cdd258d..10920de6b7 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -15,5 +15,4 @@ Enzyme.Compiler.DumpPostOpt[] = true dbf64 = 0.27 # for testing mixed methods @test autodiff(Enzyme.Forward, +, Duplicated, Duplicated(a, da), Duplicated(b, db))[:1] ≈ da+db - @test autodiff(Enzyme.Forward, +, Duplicated, Duplicated(a, da), Duplicated(bf64, dbf64))[:1] ≈ da+dbf64 end From 2c784b53e728247759fa9661fdb4833e313d20ca Mon Sep 17 00:00:00 2001 From: William Moses Date: Wed, 24 Jun 2026 14:25:40 -0500 Subject: [PATCH 5/8] Update validation.jl --- src/compiler/validation.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/validation.jl b/src/compiler/validation.jl index 7b7da60ab7..9249b47ab5 100644 --- a/src/compiler/validation.jl +++ b/src/compiler/validation.jl @@ -155,6 +155,7 @@ function restore_lookups(mod::LLVM.Module)::Nothing if isa(fattr, LLVM.StringAttribute) if kind(fattr) == "enzymejl_needs_restoration" v = parse(UInt, LLVM.value(fattr)) + Core.println("replaced (1)", string(f), " with ", v) replace_uses!( f, LLVM.Value( @@ -192,6 +193,7 @@ function restore_lookups(mod::LLVM.Module)::Nothing ) eraseInst(mod, f) else + Core.println("replaced (2)", string(f), " with ", v) replace_uses!( f, LLVM.Value( From a27601c23ba5c6fad77e27dc099dc57d73c3b9a7 Mon Sep 17 00:00:00 2001 From: Billy Moses Date: Thu, 25 Jun 2026 14:47:02 -0500 Subject: [PATCH 6/8] try explicit root lock --- src/compiler/validation.jl | 2 -- src/utils.jl | 17 ++++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/compiler/validation.jl b/src/compiler/validation.jl index 9249b47ab5..7b7da60ab7 100644 --- a/src/compiler/validation.jl +++ b/src/compiler/validation.jl @@ -155,7 +155,6 @@ function restore_lookups(mod::LLVM.Module)::Nothing if isa(fattr, LLVM.StringAttribute) if kind(fattr) == "enzymejl_needs_restoration" v = parse(UInt, LLVM.value(fattr)) - Core.println("replaced (1)", string(f), " with ", v) replace_uses!( f, LLVM.Value( @@ -193,7 +192,6 @@ function restore_lookups(mod::LLVM.Module)::Nothing ) eraseInst(mod, f) else - Core.println("replaced (2)", string(f), " with ", v) replace_uses!( f, LLVM.Value( diff --git a/src/utils.jl b/src/utils.jl index bb12d3dc5d..933d6ce3d2 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -8,8 +8,11 @@ function unsafe_to_pointer end export unsafe_to_pointer +const compiler_roots = Dict{Ptr{Cvoid}, Any}() +const compiler_roots_lock = ReentrantLock() + if VERSION >= v"1.12-" - @inline function unsafe_to_pointer(@nospecialize(val::Type)) + @inline function _unsafe_to_pointer(@nospecialize(val::Type)) return Core.Intrinsics.llvmcall(( """ declare nonnull ptr @julia.pointer_from_objref(ptr addrspace(11)) @@ -22,7 +25,7 @@ if VERSION >= v"1.12-" """, "f"), Ptr{Cvoid}, Tuple{Any}, val) end elseif Int == Int64 - @inline function unsafe_to_pointer(@nospecialize(val::Type)) + @inline function _unsafe_to_pointer(@nospecialize(val::Type)) return Base.llvmcall(( """ declare nonnull {}* @julia.pointer_from_objref({} addrspace(11)*) @@ -36,7 +39,7 @@ elseif Int == Int64 """, "f"), Ptr{Cvoid}, Tuple{Any}, val) end else - @inline function unsafe_to_pointer(@nospecialize(val::Type)) + @inline function _unsafe_to_pointer(@nospecialize(val::Type)) return Base.llvmcall(( """ declare nonnull {}* @julia.pointer_from_objref({} addrspace(11)*) @@ -51,6 +54,14 @@ else end end +function unsafe_to_pointer(@nospecialize(val::Type)) + ptr = _unsafe_to_pointer(val) + lock(compiler_roots_lock) do + compiler_roots[ptr] = val + end + return ptr +end + @inline is_concrete_tuple(x::Type{T2}) where {T2} = (T2 <: Tuple) && !(T2 === Tuple) && !(T2 isa UnionAll) From 8bb1a1d16848e63409751fe74a6f058b37afec7e Mon Sep 17 00:00:00 2001 From: Billy Moses Date: Fri, 26 Jun 2026 12:33:29 -0500 Subject: [PATCH 7/8] Revert GC rooting changes and add isolated test case --- test/runtests.jl | 13 +----------- test/test_isolated.jl | 47 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 12 deletions(-) create mode 100644 test/test_isolated.jl diff --git a/test/runtests.jl b/test/runtests.jl index 10920de6b7..5728f84dcc 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,15 +4,4 @@ using Test Enzyme.API.printall!(true) Enzyme.Compiler.DumpPostOpt[] = true -@testset "BigFloat arithmetic" begin - a = BigFloat(1.234) - da = BigFloat(-0.23) - b = BigFloat(0.56) - db = BigFloat(0.27) - af64 = 1.234 # for testing mixed methods - daf64 = -0.23 # for testing mixed methods - bf64 = 0.56 # for testing mixed methods - dbf64 = 0.27 # for testing mixed methods - - @test autodiff(Enzyme.Forward, +, Duplicated, Duplicated(a, da), Duplicated(b, db))[:1] ≈ da+db -end +include("test_isolated.jl") diff --git a/test/test_isolated.jl b/test/test_isolated.jl new file mode 100644 index 0000000000..571c02b927 --- /dev/null +++ b/test/test_isolated.jl @@ -0,0 +1,47 @@ +using Enzyme, LinearAlgebra, Test + +function run_test() + T = UpperTriangular + TE = ComplexF64 + sizeB = (3,) + n = sizeB[1] + M = rand(TE, n, n) + B = rand(TE, sizeB...) + Y = zeros(TE, sizeB...) + A = T(M) + _A = T(A) + f!(Y, A, B, ::T) where {T} = ldiv!(Y, T(A), B) + + dY = (zeros(TE, sizeB...), zeros(TE, sizeB...)) + dM = (zeros(TE, n, n), zeros(TE, n, n)) + + activities = ( + Const(f!), + BatchDuplicated(Y, dY), + BatchDuplicated(M, dM), + Const(B), + Const(_A) + ) + + forward, reverse = autodiff_thunk( + ReverseSplitWithPrimal, + Const{typeof(f!)}, + BatchDuplicated, # return activity + map(typeof, Base.tail(activities))... # argument activities + ) + + println("Running targeted thunk forward...") + tape, y_ad, shadow_result = forward(Const(f!), Base.tail(activities)...) + + ȳ = (ones(TE, sizeB...), ones(TE, sizeB...)) + for (sr, dy) in zip(shadow_result, ȳ) + copyto!(sr, dy) + end + + println("Running targeted thunk reverse...") + reverse(Const(f!), Base.tail(activities)..., tape) +end + +@testset "Isolated custom test" begin + run_test() +end From 202a43646d1df16d30297a2ee085b224658d7854 Mon Sep 17 00:00:00 2001 From: Billy Moses Date: Sat, 27 Jun 2026 21:15:16 -0500 Subject: [PATCH 8/8] Restore BigFloat testset to reproduce Windows failure on CI --- test/runtests.jl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 5728f84dcc..10920de6b7 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,4 +4,15 @@ using Test Enzyme.API.printall!(true) Enzyme.Compiler.DumpPostOpt[] = true -include("test_isolated.jl") +@testset "BigFloat arithmetic" begin + a = BigFloat(1.234) + da = BigFloat(-0.23) + b = BigFloat(0.56) + db = BigFloat(0.27) + af64 = 1.234 # for testing mixed methods + daf64 = -0.23 # for testing mixed methods + bf64 = 0.56 # for testing mixed methods + dbf64 = 0.27 # for testing mixed methods + + @test autodiff(Enzyme.Forward, +, Duplicated, Duplicated(a, da), Duplicated(b, db))[:1] ≈ da+db +end