Skip to content

Commit edc29d4

Browse files
committed
Merge branch 'main' into gd/testenzyme12
2 parents 42a0801 + a5ecbe0 commit edc29d4

22 files changed

Lines changed: 243 additions & 122 deletions

File tree

.github/workflows/Documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- uses: julia-actions/setup-julia@v2
4040
with:
4141
version: '1' # TODO: 1
42-
- uses: julia-actions/cache@v1
42+
- uses: julia-actions/cache@v3
4343
- name: Install dependencies
4444
run: julia --project=${{ matrix.pkg.dir}}/docs/ --color=yes -e '
4545
using Pkg;

.github/workflows/PreCommit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v6
2222
- uses: julia-actions/setup-julia@v2
23-
- uses: julia-actions/cache@v2
23+
- uses: julia-actions/cache@v3
2424
- run: julia -e 'using Pkg; Pkg.add("Runic")'
2525
- uses: astral-sh/setup-uv@v7
2626
- run: uv tool install pre-commit

.github/workflows/Test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
with:
5555
version: ${{ matrix.version }}
5656
arch: x64
57-
- uses: julia-actions/cache@v2
57+
- uses: julia-actions/cache@v3
5858
- name: Install dependencies & run tests
5959
run: julia --color=yes -e '
6060
using Pkg;
@@ -75,7 +75,7 @@ jobs:
7575
- uses: julia-actions/julia-processcoverage@v1
7676
with:
7777
directories: ./DifferentiationInterface/src,./DifferentiationInterface/ext,./DifferentiationInterface/test
78-
- uses: codecov/codecov-action@v5
78+
- uses: codecov/codecov-action@v6
7979
with:
8080
files: lcov.info
8181
flags: DI
@@ -135,7 +135,7 @@ jobs:
135135
with:
136136
version: ${{ matrix.version }}
137137
arch: x64
138-
- uses: julia-actions/cache@v2
138+
- uses: julia-actions/cache@v3
139139
- name: Install dependencies & run tests
140140
run: julia --code-coverage=user --color=yes -e '
141141
using Pkg;
@@ -146,7 +146,7 @@ jobs:
146146
- uses: julia-actions/julia-processcoverage@v1
147147
with:
148148
directories: ./DifferentiationInterface/src,./DifferentiationInterface/ext,./DifferentiationInterface/test
149-
- uses: codecov/codecov-action@v5
149+
- uses: codecov/codecov-action@v6
150150
with:
151151
files: lcov.info
152152
flags: DI
@@ -191,7 +191,7 @@ jobs:
191191
with:
192192
version: ${{ matrix.version }}
193193
arch: x64
194-
- uses: julia-actions/cache@v2
194+
- uses: julia-actions/cache@v3
195195
- name: Install dependencies & run tests
196196
run: julia --project=./DifferentiationInterfaceTest --color=yes -e '
197197
using Pkg;
@@ -205,7 +205,7 @@ jobs:
205205
- uses: julia-actions/julia-processcoverage@v1
206206
with:
207207
directories: ./DifferentiationInterfaceTest/src,./DifferentiationInterfaceTest/ext,./DifferentiationInterfaceTest/test
208-
- uses: codecov/codecov-action@v5
208+
- uses: codecov/codecov-action@v6
209209
with:
210210
files: lcov.info
211211
flags: DIT

CITATION.cff

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ references:
5858
abstract: An abstract interface for automatic differentiation.
5959
license: MIT
6060
preferred-citation:
61-
type: generic
61+
type: article
6262
authors:
6363
- family-names: "Dalle"
6464
given-names: "Guillaume"
@@ -67,9 +67,9 @@ preferred-citation:
6767
given-names: "Adrian"
6868
orcid: "https://orcid.org/0009-0009-5977-301X"
6969
title: "A Common Interface for Automatic Differentiation"
70-
year: 2025
71-
eprint: "2505.05542"
72-
archivePrefix: "arXiv"
73-
primaryClass: "cs.MS"
74-
url: "https://arxiv.org/abs/2505.05542"
75-
doi: "10.48550/arXiv.2505.05542"
70+
year: 2026
71+
journal: "Journal of Machine Learning Research"
72+
volume: 27
73+
number: 25
74+
pages: "1--13"
75+
url: "http://jmlr.org/papers/v27/25-1024.html"

DifferentiationInterface/Project.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
name = "DifferentiationInterface"
22
uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
3-
authors = ["Guillaume Dalle", "Adrian Hill"]
43
version = "0.7.16"
4+
authors = ["Guillaume Dalle", "Adrian Hill"]
55

66
[deps]
77
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
88
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
99

1010
[weakdeps]
11+
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
1112
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
1213
DiffResults = "163ba53b-c6d8-5494-b064-1a9d43ac40c5"
1314
Diffractor = "9f5e2b26-1114-432f-b630-d3fe2085c51c"
@@ -38,7 +39,7 @@ DifferentiationInterfaceFastDifferentiationExt = "FastDifferentiation"
3839
DifferentiationInterfaceFiniteDiffExt = "FiniteDiff"
3940
DifferentiationInterfaceFiniteDifferencesExt = "FiniteDifferences"
4041
DifferentiationInterfaceForwardDiffExt = ["ForwardDiff", "DiffResults"]
41-
DifferentiationInterfaceGPUArraysCoreExt = "GPUArraysCore"
42+
DifferentiationInterfaceGPUArraysCoreExt = ["GPUArraysCore", "Adapt"]
4243
DifferentiationInterfaceGTPSAExt = "GTPSA"
4344
DifferentiationInterfaceMooncakeExt = "Mooncake"
4445
DifferentiationInterfacePolyesterForwardDiffExt = [
@@ -56,6 +57,7 @@ DifferentiationInterfaceTrackerExt = "Tracker"
5657
DifferentiationInterfaceZygoteExt = ["Zygote", "ForwardDiff"]
5758

5859
[compat]
60+
Adapt = "4.5.0"
5961
ADTypes = "1.18.0"
6062
ChainRulesCore = "1.23.0"
6163
DiffResults = "1.1.0"

DifferentiationInterface/README.md

Lines changed: 55 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,45 @@
22

33
# DifferentiationInterface
44

5-
[![Build Status](https://github.com/JuliaDiff/DifferentiationInterface.jl/actions/workflows/Test.yml/badge.svg?branch=main)](https://github.com/JuliaDiff/DifferentiationInterface.jl/actions/workflows/Test.yml?query=branch%3Amain)
6-
[![Coverage](https://codecov.io/gh/JuliaDiff/DifferentiationInterface.jl/branch/main/graph/badge.svg?flag=DI)](https://app.codecov.io/gh/JuliaDiff/DifferentiationInterface.jl)
7-
[![code style: runic](https://img.shields.io/badge/code_style-%E1%9A%B1%E1%9A%A2%E1%9A%BE%E1%9B%81%E1%9A%B2-black)](https://github.com/fredrikekre/Runic.jl)
8-
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
9-
[![DOI](https://zenodo.org/badge/740973714.svg)](https://zenodo.org/doi/10.5281/zenodo.11092033)
10-
11-
| Package | Docs |
12-
| :--------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
13-
| DifferentiationInterface | [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterface/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterface/dev/) |
14-
| DifferentiationInterfaceTest | [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterfaceTest/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterfaceTest/dev/) |
5+
| Category | Badges |
6+
|---|---|
7+
| Build status | [![Tests](https://github.com/JuliaDiff/DifferentiationInterface.jl/actions/workflows/Test.yml/badge.svg?branch=main)](https://github.com/JuliaDiff/DifferentiationInterface.jl/actions/workflows/Test.yml?query=branch%3Amain) [![Coverage](https://codecov.io/gh/JuliaDiff/DifferentiationInterface.jl/branch/main/graph/badge.svg?flag=DI)](https://app.codecov.io/gh/JuliaDiff/DifferentiationInterface.jl) |
8+
| Documentation | [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterface/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterface/dev/) [![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac) |
9+
| Code quality | [![code style: runic](https://img.shields.io/badge/code_style-%E1%9A%B1%E1%9A%A2%E1%9A%BE%E1%9B%81%E1%9A%B2-black)](https://github.com/fredrikekre/Runic.jl) [![Aqua QA](https://juliatesting.github.io/Aqua.jl/dev/assets/badge.svg)](https://github.com/JuliaTesting/Aqua.jl) |
10+
| Downloads | [![Downloads](https://img.shields.io/badge/dynamic/json?url=http%3A%2F%2Fjuliapkgstats.com%2Fapi%2Fv2%2Fmonthly_downloads%2FDifferentiationInterface&query=total_requests&suffix=%2Fmonth&label=Downloads)](http://juliapkgstats.com/pkg/DifferentiationInterface) [![Dependents](https://juliahub.com/docs/General/DifferentiationInterface/stable/deps.svg)](https://juliahub.com/ui/Packages/General/DifferentiationInterface?#dependents) |
11+
| References | [![DOI](https://zenodo.org/badge/740973714.svg)](https://zenodo.org/doi/10.5281/zenodo.11092033) |
1512

1613
An interface to various automatic differentiation (AD) backends in Julia.
1714

1815
## Goal
1916

2017
This package provides a unified syntax to differentiate functions, including:
2118

22-
- First- and second-order operators (gradients, Jacobians, Hessians and more)
23-
- In-place and out-of-place differentiation
24-
- Preparation mechanism (e.g. to pre-allocate a cache or record a tape)
25-
- Built-in sparsity handling
26-
- Thorough validation on standard inputs and outputs (numbers, vectors, matrices)
27-
- Testing and benchmarking utilities accessible to users with [DifferentiationInterfaceTest](https://github.com/JuliaDiff/DifferentiationInterface.jl/tree/main/DifferentiationInterfaceTest)
19+
- First- and second-order operators (gradients, Jacobians, Hessians and more)
20+
- In-place and out-of-place differentiation
21+
- Preparation mechanism (e.g. to pre-allocate a cache or record a tape)
22+
- Built-in sparsity handling
23+
- Thorough validation on standard inputs and outputs (numbers, vectors, matrices)
24+
- Testing and benchmarking utilities accessible to users with [DifferentiationInterfaceTest](https://github.com/JuliaDiff/DifferentiationInterface.jl/tree/main/DifferentiationInterfaceTest)
2825

2926
## Compatibility
3027

3128
We support the following backends defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl):
3229

33-
- [ChainRulesCore.jl](https://github.com/JuliaDiff/ChainRulesCore.jl)
34-
- [Diffractor.jl](https://github.com/JuliaDiff/Diffractor.jl) (currently broken)
35-
- [Enzyme.jl](https://github.com/EnzymeAD/Enzyme.jl) (see below)
36-
- [FastDifferentiation.jl](https://github.com/brianguenter/FastDifferentiation.jl)
37-
- [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl)
38-
- [FiniteDifferences.jl](https://github.com/JuliaDiff/FiniteDifferences.jl)
39-
- [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl)
40-
- [GTPSA.jl](https://github.com/bmad-sim/GTPSA.jl)
41-
- [Mooncake.jl](https://github.com/chalk-lab/Mooncake.jl)
42-
- [PolyesterForwardDiff.jl](https://github.com/JuliaDiff/PolyesterForwardDiff.jl)
43-
- [ReverseDiff.jl](https://github.com/JuliaDiff/ReverseDiff.jl)
44-
- [Symbolics.jl](https://github.com/JuliaSymbolics/Symbolics.jl)
45-
- [Tracker.jl](https://github.com/FluxML/Tracker.jl)
46-
- [Zygote.jl](https://github.com/FluxML/Zygote.jl)
30+
- [ChainRulesCore.jl](https://github.com/JuliaDiff/ChainRulesCore.jl)
31+
- [Diffractor.jl](https://github.com/JuliaDiff/Diffractor.jl) (currently broken)
32+
- [Enzyme.jl](https://github.com/EnzymeAD/Enzyme.jl) (see below)
33+
- [FastDifferentiation.jl](https://github.com/brianguenter/FastDifferentiation.jl)
34+
- [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl)
35+
- [FiniteDifferences.jl](https://github.com/JuliaDiff/FiniteDifferences.jl)
36+
- [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl)
37+
- [GTPSA.jl](https://github.com/bmad-sim/GTPSA.jl)
38+
- [Mooncake.jl](https://github.com/chalk-lab/Mooncake.jl)
39+
- [PolyesterForwardDiff.jl](https://github.com/JuliaDiff/PolyesterForwardDiff.jl)
40+
- [ReverseDiff.jl](https://github.com/JuliaDiff/ReverseDiff.jl)
41+
- [Symbolics.jl](https://github.com/JuliaSymbolics/Symbolics.jl)
42+
- [Tracker.jl](https://github.com/FluxML/Tracker.jl)
43+
- [Zygote.jl](https://github.com/FluxML/Zygote.jl)
4744

4845
> [!CAUTION]
4946
> Note that in some cases, going through DifferentiationInterface.jl might be slower or cause more errors than a direct call to the backend's API. This is especially true for Enzyme.jl, whose handling of activities and multiple arguments is not fully supported here. We are working on this challenge, and welcome any suggestions or contributions. Meanwhile, if differentiation fails or takes too long, consider using Enzyme.jl through its [native API](https://enzymead.github.io/Enzyme.jl/stable/) instead.
@@ -92,42 +89,44 @@ To improve your performance by up to several orders of magnitude compared to thi
9289

9390
Whenever you refer to this package or the ideas it contains, please cite:
9491

95-
1. our preprint [*A Common Interface for Automatic Differentiation*](https://arxiv.org/abs/2505.05542);
92+
1. our JMLR paper [*A Common Interface for Automatic Differentiation*](https://jmlr.org/papers/v27/25-1024.html);
9693
2. our inspiration [AbstractDifferentiation.jl](https://github.com/JuliaDiff/AbstractDifferentiation.jl).
94+
3. if you use sparse differentiation capabilities, our companion packages [SparseConnectivityTracer.jl](https://github.com/adrhill/SparseConnectivityTracer.jl) and [SparseMatrixColorings.jl](https://github.com/JuliaDiff/SparseMatrixColorings.jl) which provide these capabilities (see their respective repositories for guidelines).
9795

98-
You can use the provided [`CITATION.cff`](https://github.com/JuliaDiff/DifferentiationInterface.jl/blob/main/CITATION.cff) file or the following BibTeX entries:
96+
For the first two items, you can use the provided [`CITATION.cff`](https://github.com/JuliaDiff/DifferentiationInterface.jl/blob/main/CITATION.cff) file or the following BibTeX entries:
9997

10098
```bibtex
101-
@misc{dalle2025commoninterfaceautomaticdifferentiation,
102-
title={A Common Interface for Automatic Differentiation},
103-
author={Guillaume Dalle and Adrian Hill},
104-
year={2025},
105-
eprint={2505.05542},
106-
archivePrefix={arXiv},
107-
primaryClass={cs.MS},
108-
url={https://arxiv.org/abs/2505.05542},
99+
@article{dalle2026commoninterfaceautomaticdifferentiation,
100+
author = {Guillaume Dalle and Adrian Hill},
101+
title = {A Common Interface for Automatic Differentiation},
102+
journal = {Journal of Machine Learning Research},
103+
year = {2026},
104+
volume = {27},
105+
number = {25},
106+
pages = {1--13},
107+
url = {http://jmlr.org/papers/v27/25-1024.html}
109108
}
110109
111-
@misc{schäfer2022abstractdifferentiationjlbackendagnosticdifferentiableprogramming,
112-
title={AbstractDifferentiation.jl: Backend-Agnostic Differentiable Programming in Julia},
113-
author={Frank Schäfer and Mohamed Tarek and Lyndon White and Chris Rackauckas},
114-
year={2022},
115-
eprint={2109.12449},
116-
archivePrefix={arXiv},
117-
primaryClass={cs.MS},
118-
url={https://arxiv.org/abs/2109.12449},
110+
@misc{schäfer2022abstractdifferentiationjlbackendagnostic,
111+
title = {AbstractDifferentiation.jl: Backend-Agnostic Differentiable Programming in Julia},
112+
author = {Frank Schäfer and Mohamed Tarek and Lyndon White and Chris Rackauckas},
113+
year = {2022},
114+
eprint = {2109.12449},
115+
archiveprefix = {arXiv},
116+
primaryclass = {cs.MS},
117+
url = {https://arxiv.org/abs/2109.12449}
119118
}
120119
```
121120

122-
If you use the software, additionally cite us using the precise [Zenodo DOI](https://zenodo.org/records/11092033) of the package version you used, or the BibTeX entry below:
121+
If you run the actual software as part of your experiments, please cite the precise [Zenodo DOI](https://zenodo.org/records/11092033) of the package version you used, or the BibTeX entry below:
123122

124123
```bibtex
125-
@software{dalleDifferentiationInterface2025,
126-
author={Dalle, Guillaume and Hill, Adrian},
127-
title={Differentiation{I}nterface.jl},
128-
year={2024},
129-
publisher={Zenodo},
130-
doi={10.5281/zenodo.11092033},
131-
url={https://doi.org/10.5281/zenodo.11092033},
124+
@software{dalle2024DifferentiationInterface202,
125+
author = {Dalle, Guillaume and Hill, Adrian},
126+
title = {Differentiation{I}nterface.jl},
127+
year = {2024},
128+
publisher = {Zenodo},
129+
doi = {10.5281/zenodo.11092033},
130+
url = {https://doi.org/10.5281/zenodo.11092033}
132131
}
133132
```

DifferentiationInterface/docs/make.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ using Zygote: Zygote
1111
links = InterLinks(
1212
"ADTypes" => "https://sciml.github.io/ADTypes.jl/stable/",
1313
"SparseConnectivityTracer" => "https://adrianhill.de/SparseConnectivityTracer.jl/stable/",
14-
"SparseMatrixColorings" => "https://gdalle.github.io/SparseMatrixColorings.jl/stable/",
14+
"SparseMatrixColorings" => "https://juliadiff.org/SparseMatrixColorings.jl/stable/",
1515
"Symbolics" => "https://symbolics.juliasymbolics.org/stable/",
1616
)
1717

DifferentiationInterface/docs/src/explanation/advanced.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ An `AutoSparse` backend must be constructed from three ingredients:
2323
+ [`DenseSparsityDetector`](@ref) from DifferentiationInterface.jl (beware that this detector only gives a locally valid pattern)
2424
+ [`KnownJacobianSparsityDetector`](@extref ADTypes.KnownJacobianSparsityDetector) or [`KnownHessianSparsityDetector`](@extref ADTypes.KnownHessianSparsityDetector) from [ADTypes.jl](https://github.com/SciML/ADTypes.jl) (if you already know the pattern)
2525

26-
3. A coloring algorithm following the [`ADTypes.AbstractColoringAlgorithm`](@extref ADTypes.AbstractColoringAlgorithm) interface, such as those from [SparseMatrixColorings.jl](https://github.com/gdalle/SparseMatrixColorings.jl):
26+
3. A coloring algorithm following the [`ADTypes.AbstractColoringAlgorithm`](@extref ADTypes.AbstractColoringAlgorithm) interface, such as those from [SparseMatrixColorings.jl](https://github.com/JuliaDiff/SparseMatrixColorings.jl):
2727

2828
+ [`GreedyColoringAlgorithm`](@extref SparseMatrixColorings.GreedyColoringAlgorithm) (our generic recommendation, don't forget to tune the `order` parameter)
2929
+ [`ConstantColoringAlgorithm`](@extref SparseMatrixColorings.ConstantColoringAlgorithm) (if you have already computed the optimal coloring and always want to return it)
@@ -48,7 +48,7 @@ But after preparation, the more zeros are present in the matrix, the greater the
4848
The complexity of sparse Jacobians or Hessians grows with the number of distinct colors in a coloring of the sparsity pattern.
4949
To reduce this number of colors, [`GreedyColoringAlgorithm`](@extref SparseMatrixColorings.GreedyColoringAlgorithm) has two main settings: the order used for vertices and the decompression method.
5050
Depending on your use case, you may want to modify either of these options to increase performance.
51-
See the documentation of [SparseMatrixColorings.jl](https://github.com/gdalle/SparseMatrixColorings.jl) for details.
51+
See the documentation of [SparseMatrixColorings.jl](https://github.com/JuliaDiff/SparseMatrixColorings.jl) for details.
5252

5353
### Mixed mode
5454

DifferentiationInterface/docs/src/tutorials/advanced.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ In the examples above, we didn't use preparation.
127127
Sparse preparation is more costly than dense preparation, but it is even more essential.
128128
Indeed, once preparation is done, sparse differentiation is much faster than dense differentiation, because it makes fewer calls to the underlying function.
129129

130-
Some result analysis functions from [SparseMatrixColorings.jl](https://github.com/gdalle/SparseMatrixColorings.jl) can help you figure out what the preparation contains.
130+
Some result analysis functions from [SparseMatrixColorings.jl](https://github.com/JuliaDiff/SparseMatrixColorings.jl) can help you figure out what the preparation contains.
131131
First, it records the sparsity pattern itself (the one returned by the detector).
132132

133133
```@example tuto_advanced

DifferentiationInterface/ext/DifferentiationInterfaceGPUArraysCoreExt/DifferentiationInterfaceGPUArraysCoreExt.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module DifferentiationInterfaceGPUArraysCoreExt
22

3+
using Adapt: adapt
34
import DifferentiationInterface as DI
45
using GPUArraysCore: @allowscalar, AbstractGPUArray
56

@@ -17,4 +18,10 @@ function DI.multibasis(a::AbstractGPUArray{T}, inds) where {T}
1718
return b
1819
end
1920

21+
function DI.arroftup_to_tupofarr(
22+
tx::AbstractArray{<:NTuple{B, <:Number}}, x::AbstractGPUArray{<:Number}
23+
) where {B}
24+
return ntuple(b -> adapt(typeof(x), getindex.(tx, b)), Val(B))
25+
end
26+
2027
end

0 commit comments

Comments
 (0)