Skip to content

Commit 1b5bd5c

Browse files
committed
Updates and small fixes
1 parent 52e7eaf commit 1b5bd5c

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

Project.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ CUDA = "5.9"
4545
ChainRulesCore = "1"
4646
ChainRulesTestUtils = "1"
4747
Combinatorics = "1"
48-
Enzyme = "0.13.131"
48+
Enzyme = "0.13.134"
4949
EnzymeTestUtils = "0.2.5"
5050
FiniteDifferences = "0.12"
5151
GPUArrays = "11.3.1"
@@ -95,6 +95,3 @@ cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1"
9595

9696
[targets]
9797
test = ["ArgParse", "Adapt", "Aqua", "AllocCheck", "Combinatorics", "CUDA", "cuTENSOR", "GPUArrays", "LinearAlgebra", "SafeTestsets", "TensorOperations", "Test", "TestExtras", "ChainRulesCore", "ChainRulesTestUtils", "FiniteDifferences", "Zygote", "Mooncake", "Enzyme", "EnzymeTestUtils", "JET"]
98-
99-
[sources]
100-
TensorOperations = {url = "https://github.com/quantumkithub/tensoroperations.jl", rev = "ksh/enzyme_update"}

ext/TensorKitEnzymeExt/linalg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function EnzymeRules.augmented_primal(
159159
) where {RT}
160160
ret = inv(A.val)
161161
primal = EnzymeRules.needs_primal(config) ? ret : nothing
162-
shadow = EnzymeRules.needs_shadow(config) ? zero(ret) : nothing
162+
shadow = EnzymeRules.needs_shadow(config) ? make_zero(ret) : nothing
163163
cache = (ret, shadow)
164164
return EnzymeRules.AugmentedReturn(primal, shadow, cache)
165165
end

ext/TensorKitEnzymeExt/utility.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ end
5656

5757
@inline EnzymeRules.inactive_type(::Type{<:TensorKit.FusionTree}) = true
5858
@inline EnzymeRules.inactive_type(::Type{<:TensorKit.GenericTreeTransformer}) = true
59+
@inline EnzymeRules.inactive_type(::Type{<:TensorKit.VectorSpace}) = true
5960

60-
@inline EnzymeRules.inactive(::typeof(TensorKit.fusionblockstructure), arg) = nothing
61+
@inline EnzymeRules.inactive(::typeof(TensorKit.fusionblockstructure), arg::Any) = nothing
6162
@inline EnzymeRules.inactive(::typeof(TensorKit.select), s::HomSpace, i::Index2Tuple) = nothing
6263
@inline EnzymeRules.inactive(::typeof(TensorKit.flip), s::HomSpace, i::Any) = nothing
6364
@inline EnzymeRules.inactive(::typeof(TensorKit.permute), s::HomSpace, i::Index2Tuple) = nothing

0 commit comments

Comments
 (0)