Skip to content

Commit 186b3bd

Browse files
remove some v0.13 deprecations (#2493)
* remove v0.13 deprecations
1 parent aa035e9 commit 186b3bd

File tree

24 files changed

+89
-240
lines changed

24 files changed

+89
-240
lines changed

.buildkite/pipeline.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ steps:
4646
using Pkg
4747
Pkg.resolve()'
4848
commands: |
49-
printf "[MLDataDevices]\ngpu_backend = \"Metal\"\n" > LocalPreferences.toml
49+
printf "[Flux]\ngpu_backend = \"Metal\"\n" > LocalPreferences.toml
5050
5151
if: build.message !~ /\[skip tests\]/
5252
timeout_in_minutes: 60
@@ -63,7 +63,7 @@ steps:
6363
- label: "AMD GPU with Julia 1"
6464
plugins:
6565
- JuliaCI/julia#v1:
66-
version: "1.10"
66+
version: "1"
6767
- JuliaCI/julia-test#v1:
6868
- JuliaCI/julia-coverage#v1:
6969
dirs:
@@ -74,7 +74,7 @@ steps:
7474
rocm: "*"
7575
rocmgpu: "*"
7676
commands: |
77-
printf "[MLDataDevices]\ngpu_backend = \"AMDGPU\"\n" > LocalPreferences.toml
77+
printf "[Flux]\ngpu_backend = \"AMDGPU\"\n" > LocalPreferences.toml
7878
timeout_in_minutes: 60
7979
env:
8080
JULIA_AMDGPU_CORE_MUST_LOAD: "1"

.github/workflows/ci.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,23 @@ on:
99
- master
1010
tags: '*'
1111

12+
# needed for julia-actions/cache to delete old caches
13+
permissions:
14+
actions: write
15+
contents: read
16+
1217
jobs:
1318
test:
14-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
19+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
1520
runs-on: ${{ matrix.os }}
1621
strategy:
1722
fail-fast: false
1823
matrix:
1924
version:
20-
# - '1.9' # Uncomment when 1.10 is out. Replace this with the minimum Julia version that your package supports.
21-
- '1'
25+
- '1.10' # Replace this with the minimum Julia version that your package supports.
26+
- '1' # latest stable 1.x releas
27+
# - 'pre' # latest stable prerelease
28+
- 'nightly' # latest nightly release
2229
os: [ubuntu-latest]
2330
arch: [x64]
2431
include:
@@ -29,7 +36,7 @@ jobs:
2936
version: '1'
3037
arch: aarch64
3138
steps:
32-
- uses: actions/checkout@v4.2.1
39+
- uses: actions/checkout@v4
3340
- uses: julia-actions/setup-julia@v2
3441
with:
3542
version: ${{ matrix.version }}
@@ -47,17 +54,16 @@ jobs:
4754
- uses: julia-actions/julia-buildpkg@v1
4855
- name: "Run test without coverage report"
4956
uses: julia-actions/julia-runtest@v1
50-
if: ${{ !contains(fromJson('["1", "1.9"]'), matrix.version) || matrix.os != 'ubuntu-latest' }}
57+
if: matrix.version != '1' || matrix.os != 'ubuntu-latest'
5158
with:
5259
coverage: false
53-
5460
- name: "Run test with coverage report"
5561
uses: julia-actions/julia-runtest@v1
56-
if: contains(fromJson('["1", "1.9"]'), matrix.version) && matrix.os == 'ubuntu-latest'
62+
if: matrix.version == '1' && matrix.os == 'ubuntu-latest'
5763
- uses: julia-actions/julia-processcoverage@v1
58-
if: contains(fromJson('["1", "1.9"]'), matrix.version) && matrix.os == 'ubuntu-latest'
64+
if: matrix.version == '1' && matrix.os == 'ubuntu-latest'
5965
- uses: codecov/codecov-action@v4
60-
if: contains(fromJson('["1", "1.9"]'), matrix.version) && matrix.os == 'ubuntu-latest'
66+
if: matrix.version == '1' && matrix.os == 'ubuntu-latest'
6167
with:
6268
file: lcov.info
6369

.github/workflows/nightly-ci.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ SpecialFunctions = "2.1.2"
6767
Statistics = "1"
6868
Zygote = "0.6.67"
6969
cuDNN = "1"
70-
julia = "1.9"
70+
julia = "1.10"

ext/FluxAMDGPUExt/FluxAMDGPUExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Flux
66
import Flux: FluxCPUAdaptor, FluxAMDGPUAdaptor, _amd, adapt_storage, fmap
77
import Flux: DenseConvDims, Conv, ConvTranspose, conv, conv_reshape_bias
88
import NNlib
9-
9+
using MLDataDevices: MLDataDevices
1010
using AMDGPU
1111
using Adapt
1212
using Random

ext/FluxCUDAExt/FluxCUDAExt.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ using ChainRulesCore
1010
using Random
1111
using Adapt
1212
import Adapt: adapt_storage
13+
using MLDataDevices: MLDataDevices
1314

1415

1516
const USE_CUDA = Ref{Union{Nothing, Bool}}(nothing)

ext/FluxCUDAExt/functor.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ function _cuda(id::Union{Nothing, Int}, x)
5757
end
5858

5959
function Flux._get_device(::Val{:CUDA}, id::Int)
60-
return MLDataUtils.gpu_device(id+1, force=true)
60+
return MLDataDevices.gpu_device(id+1, force=true)
6161
end

ext/FluxEnzymeExt/FluxEnzymeExt.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ _applyloss(loss, model, d...) = loss(model, d...)
1616

1717
EnzymeRules.inactive(::typeof(Flux.Losses._check_sizes), args...) = true
1818

19-
using Flux: _old_to_new # from src/deprecations.jl
20-
train!(loss, model::Duplicated, data, opt::Optimise.AbstractOptimiser; cb=nothing) =
21-
train!(loss, model, data, _old_to_new(opt); cb)
22-
2319
function train!(loss, model::Duplicated, data, rule::Optimisers.AbstractRule; cb = nothing)
2420
train!(loss, model, data, _rule_to_state(model, rule); cb)
2521
end

ext/FluxMetalExt/FluxMetalExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Flux
44
import Flux: FluxCPUAdaptor, FluxMetalAdaptor, _metal, _isleaf, adapt_storage, fmap
55
import NNlib
66
using ChainRulesCore
7-
7+
using MLDataDevices: MLDataDevices
88
using Metal
99
using Adapt
1010
using Random

ext/FluxMetalExt/functor.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ end
3535

3636
function Flux._get_device(::Val{:Metal}, id::Int)
3737
@assert id == 0 "Metal backend only supports one device at the moment"
38-
return MLDataDevices.gpu_device()
38+
return MLDataDevices.gpu_device(force=true)
3939
end
4040

0 commit comments

Comments
 (0)