diff --git a/Project.toml b/Project.toml index f82ce567..3f1c6232 100644 --- a/Project.toml +++ b/Project.toml @@ -51,8 +51,8 @@ ChainRulesTestUtils = "1" DynamicPolynomials = "0.5, 0.6" Enzyme = "0.13.183" EnzymeTestUtils = "0.2" -GPUArrays = "11" -JLArrays = "0.3" +GPUArrays = "11, 12" +JLArrays = "0.3, 0.4" LRUCache = "1" LinearAlgebra = "1.6" Logging = "1.6" diff --git a/docs/src/changelog.md b/docs/src/changelog.md index 399232cc..5e5dc88e 100644 --- a/docs/src/changelog.md +++ b/docs/src/changelog.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Compat with GPUArrays is extended to include 12, and with JLArrays to include 0.4. + ### Deprecated ### Removed diff --git a/test/allocator.jl b/test/allocator.jl index 32d9c3f6..030e4dcc 100644 --- a/test/allocator.jl +++ b/test/allocator.jl @@ -361,17 +361,19 @@ end @test buffer.offset == 0 @test buffer.max_offset > 0 - # Disjoint JLArray slices are reported as aliases once the buffer is warm. + # Disjoint JLArray slices are reported as aliases once the buffer is warm, unless + # JLArrays implements `GPUArrays.memory_location` (JLArrays v0.4.2, GPUArrays v12.1). # https://github.com/JuliaGPU/GPUArrays.jl/pull/803 # https://github.com/QuantumKitHub/StridedViews.jl/pull/57 - @test_broken begin + aliasing_fixed = pkgversion(JLArrays) ≥ v"0.4.2" + @test begin @tensor allocator = buffer begin HRAA3[a, s1, s2, c] := ρₗ[a, a'] * A1[a', t1, b] * A2[b, t2, c'] * ρᵣ[c', c] * H[s1, s2, t1, t2] end collect(HRAA3) ≈ collect(HRAA1) - end - continue # Later checks require the warm-buffer contraction to succeed. + end broken = !aliasing_fixed + aliasing_fixed || continue # Later checks require the warm-buffer contraction to succeed. # the first contraction already recorded the full requirement, so it no longer grows max0 = buffer.max_offset diff --git a/test/gpu.jl b/test/gpu.jl index 0a49ebb9..bc5a5e39 100644 --- a/test/gpu.jl +++ b/test/gpu.jl @@ -183,8 +183,9 @@ end @test buffer.offset == 0 @test buffer.max_offset > 0 - if AT === JLArray - # Disjoint JLArray slices are reported as aliases once the buffer is warm. + if AT === JLArray && pkgversion(JLArrays) < v"0.4.2" + # Disjoint JLArray slices are reported as aliases once the buffer is warm, unless + # JLArrays implements `GPUArrays.memory_location` (JLArrays v0.4.2, GPUArrays v12.1). # https://github.com/JuliaGPU/GPUArrays.jl/pull/803 # https://github.com/QuantumKitHub/StridedViews.jl/pull/57 @test_broken begin