Skip to content

Commit

Permalink
[ITensors] Fix Zygote failures (#1613)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman authored Jan 31, 2025
1 parent d8e3658 commit 37d1570
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ITensors"
uuid = "9136182c-28ba-11e9-034c-db9fb085ebd5"
authors = ["Matthew Fishman <[email protected]>", "Miles Stoudenmire <[email protected]>"]
version = "0.7.11"
version = "0.7.12"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
4 changes: 2 additions & 2 deletions ext/ITensorsChainRulesCoreExt/itensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function rrule(::Type{ITensor}, x1::AllowAlias, x2::TensorStorage, x3)
y = ITensor(x1, x2, x3)
function ITensor_pullback(ȳ)
x̄1 = NoTangent()
x̄2 = .tensor.storage
x̄2 = unthunk(ȳ).tensor.storage
x̄3 = NoTangent()
return (NoTangent(), x̄1, x̄2, x̄3)
end
Expand Down Expand Up @@ -84,7 +84,7 @@ end
function rrule(::typeof(tensor), x1::ITensor)
y = tensor(x1)
function tensor_pullback(ȳ)
x̄1 = ITensor(typeof(storage(x1))(.storage.data), inds(x1))
x̄1 = ITensor(typeof(storage(x1))(unthunk(ȳ).storage.data), inds(x1))
return (NoTangent(), x̄1)
end
return y, tensor_pullback
Expand Down

2 comments on commit 37d1570

@mtfishman
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/124123

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.12 -m "<description of version>" 37d1570fe688539d16a9a9a806e41a789d3ddb12
git push origin v0.7.12

Please sign in to comment.