Skip to content

Commit 5257e7d

Browse files
authored
fix: speed up Mooncake by avoiding tuple broadcasting (#853)
* fix: speed up Mooncake by avoiding tuple broadcasting * chore: bump changelog and project
1 parent f8ffd05 commit 5257e7d

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

DifferentiationInterface/CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,22 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterface-v0.7.7...main)
8+
## [Unreleased](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterface-v0.7.8...main)
9+
10+
## [0.7.8](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterface-v0.7.7...DifferentiationInterface-v0.7.8)
11+
12+
### Added
913

1014
- Support the new `ADTypes.NoAutoDiff` ([#851](https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/851))
1115

16+
### Fixed
17+
18+
- Speed up Mooncake by avoiding tuple broadcasting ([#853](https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/853))
19+
1220
## [0.7.7](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterface-v0.7.6...DifferentiationInterface-v0.7.7)
1321

22+
### Fixed
23+
1424
- Improve support for empty inputs (still not guaranteed) ([#835](https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/835))
1525

1626
## [0.7.6](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterface-v0.7.5...DifferentiationInterface-v0.7.6)

DifferentiationInterface/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "DifferentiationInterface"
22
uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
33
authors = ["Guillaume Dalle", "Adrian Hill"]
4-
version = "0.7.7"
4+
version = "0.7.8"
55

66
[deps]
77
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"

DifferentiationInterface/ext/DifferentiationInterfaceMooncakeExt/forward_onearg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function DI.value_and_pushforward(
4747
return y, dy
4848
end
4949
y = first(ys_and_ty[1])
50-
ty = last.(ys_and_ty)
50+
ty = map(last, ys_and_ty)
5151
return y, ty
5252
end
5353

DifferentiationInterface/ext/DifferentiationInterfaceMooncakeExt/onearg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function DI.value_and_pullback(
5555
y, _copy_output(new_dx)
5656
end
5757
y = first(ys_and_tx[1])
58-
tx = last.(ys_and_tx)
58+
tx = map(last, ys_and_tx)
5959
return y, tx
6060
end
6161

0 commit comments

Comments
 (0)