Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit b6d1dc6

Browse files
committed
fix: mark replicate as non-differentiable
1 parent f7180a6 commit b6d1dc6

File tree

5 files changed

+41
-1
lines changed

5 files changed

+41
-1
lines changed

.buildkite/testing.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ steps:
77
version: "1"
88
- JuliaCI/julia-coverage#v1:
99
codecov: true
10+
dirs:
11+
- src
12+
- ext
1013
command: julia --code-coverage=user --color=yes --project .buildkite/scripts/downstream.jl "{{matrix.repo}}" "CUDA"
1114
agents:
1215
queue: "juliagpu"
@@ -26,6 +29,9 @@ steps:
2629
version: "1"
2730
- JuliaCI/julia-coverage#v1:
2831
codecov: true
32+
dirs:
33+
- src
34+
- ext
2935
command: julia --code-coverage=user --color=yes --project .buildkite/scripts/downstream.jl "{{matrix.repo}}" "AMDGPU"
3036
agents:
3137
queue: "juliagpu"

.github/workflows/CI.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ jobs:
5050
- uses: julia-actions/julia-buildpkg@v1
5151
- uses: julia-actions/julia-runtest@v1
5252
- uses: julia-actions/julia-processcoverage@v1
53+
with:
54+
directories: src,ext
5355
- uses: codecov/codecov-action@v4
5456
with:
5557
files: lcov.info
@@ -100,6 +102,8 @@ jobs:
100102
exit(0) # Exit immediately, as a success
101103
end
102104
- uses: julia-actions/julia-processcoverage@v1
105+
with:
106+
directories: src,ext
103107
- uses: codecov/codecov-action@v4
104108
with:
105109
files: lcov.info
@@ -129,6 +133,8 @@ jobs:
129133
RETESTITEMS_NWORKERS: 4
130134
RETESTITEMS_NWORKER_THREADS: 2
131135
- uses: julia-actions/julia-processcoverage@v1
136+
with:
137+
directories: src,ext
132138
- uses: codecov/codecov-action@v4
133139
with:
134140
files: lcov.info

Project.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "LuxCore"
22
uuid = "bb33d45b-7691-41d6-9220-0943567d0623"
33
authors = ["Avik Pal <avikpal@mit.edu> and contributors"]
4-
version = "0.1.19"
4+
version = "0.1.20"
55

66
[deps]
77
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
@@ -10,10 +10,20 @@ Functors = "d9f16b24-f501-4c13-a1f2-28368ffc5196"
1010
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1111
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
1212

13+
[weakdeps]
14+
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
15+
EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869"
16+
17+
[extensions]
18+
LuxCoreChainRulesCoreExt = "ChainRulesCore"
19+
LuxCoreEnzymeCoreExt = "EnzymeCore"
20+
1321
[compat]
1422
Aqua = "0.8.4"
23+
ChainRulesCore = "1.24"
1524
Compat = "4.15.0"
1625
DispatchDoctor = "0.4.10"
26+
EnzymeCore = "0.7.7"
1727
ExplicitImports = "1.9.0"
1828
Functors = "0.4.8"
1929
Optimisers = "0.3"

ext/LuxCoreChainRulesCoreExt.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module LuxCoreChainRulesCoreExt
2+
3+
using ChainRulesCore: @non_differentiable
4+
using LuxCore: LuxCore
5+
using Random: AbstractRNG
6+
7+
@non_differentiable LuxCore.replicate(::AbstractRNG)
8+
9+
end

ext/LuxCoreEnzymeCoreExt.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module LuxCoreEnzymeCoreExt
2+
3+
using EnzymeCore: EnzymeRules
4+
using LuxCore: LuxCore
5+
using Random: AbstractRNG
6+
7+
EnzymeRules.inactive(::typeof(LuxCore.replicate), ::AbstractRNG) = nothing
8+
9+
end

0 commit comments

Comments
 (0)