Skip to content

Commit 2e2a7cd

Browse files
authored
Merge pull request #30 from HolyLab/dwk/dev
Version 0.2.3
2 parents 6e5dbf7 + 26864a6 commit 2e2a7cd

File tree

3 files changed

+23
-21
lines changed

3 files changed

+23
-21
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
version:
16-
- '1.1'
16+
- '1.10'
1717
- '1'
1818
# - 'nightly'
1919
os:
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
version: ${{ matrix.version }}
2828
arch: ${{ matrix.arch }}
29-
- uses: actions/cache@v1
29+
- uses: actions/cache@v4
3030
env:
3131
cache-name: cache-artifacts
3232
with:

Project.toml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
name = "RegisterWorkerAperturesMismatch"
22
uuid = "30e56b64-2659-11e9-2fbf-0524297743d8"
33
authors = ["Tim Holy <[email protected]>"]
4-
version = "0.2.2"
4+
version = "0.2.3"
55

66
[deps]
7-
CUDAdrv = "c5f51814-7f29-56b8-a69c-e4d8f6be1fde"
8-
CUDAnative = "be33ccc6-a3ff-5ff2-a52e-74243cff1e17"
97
CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298"
10-
CuArrays = "3a865a2d-5b23-5a0f-bc46-62713ec82fae"
8+
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
119
ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534"
1210
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
1311
RegisterCore = "67712758-55e7-5c3c-8e85-dda1d7758434"
@@ -24,24 +22,22 @@ SharedArrays = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
2422
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
2523

2624
[compat]
27-
CUDAdrv = "5, 6"
28-
CUDAnative = "2"
29-
CoordinateTransformations = "0.5"
30-
CuArrays = "1"
31-
ImageCore = "0.8.1"
32-
Interpolations = "0.12"
25+
CoordinateTransformations = "0.5, 0.6"
26+
CUDA = "3, 4, 5"
27+
ImageCore = "0.8.1, 0.9, 0.10"
28+
Interpolations = "0.12, 0.13, 0.14, 0.15"
3329
RegisterCore = "0.2.2"
34-
RegisterDeformation = "0.3"
30+
RegisterDeformation = "0.3, 0.4"
3531
RegisterDriver = "0.2.1"
36-
RegisterFit = "0.1"
37-
RegisterMismatch = "0.3"
32+
RegisterFit = "0.1, 0.2"
33+
RegisterMismatch = "0.3, 0.4"
3834
RegisterMismatchCommon = "0.2"
3935
RegisterMismatchCuda = "0.3"
4036
RegisterOptimize = "0.3"
41-
RegisterPenalty = "0.2"
37+
RegisterPenalty = "0.2, 0.3"
4238
RegisterWorkerShell = "0.2"
43-
StaticArrays = "0.12"
44-
julia = "1.0"
39+
StaticArrays = "0.12, 1"
40+
julia = "1.10"
4541

4642
[extras]
4743
AxisArrays = "39de3d68-74b9-583c-8d2d-e117c070f3a9"

src/RegisterWorkerAperturesMismatch.jl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ end
2929

3030
function load_mm_package(dev)
3131
if dev >= 0
32-
eval(:(using CUDAdrv, CUDAnative, CuArrays, RegisterMismatchCuda))
32+
eval(:(using CUDA, RegisterMismatchCuda))
3333
else
3434
eval(:(using RegisterMismatch))
3535
end
@@ -45,8 +45,14 @@ end
4545

4646
function cuda_init!(algorithm)
4747
dev = CuDevice(algorithm.dev)
48-
global old_active_context = CuCurrentContext()
49-
if old_active_context == nothing || device(old_active_context) != dev
48+
global old_active_context
49+
try
50+
old_active_context = current_context()
51+
if old_active_context == nothing || device(old_active_context) != dev
52+
device!(dev)
53+
end
54+
catch e
55+
old_active_context = nothing
5056
device!(dev)
5157
end
5258
fixed = algorithm.fixed

0 commit comments

Comments
 (0)