Skip to content

Commit 0c67cfe

Browse files
committed
Fix CUDA tests
1 parent 3bfe624 commit 0c67cfe

File tree

4 files changed

+168
-168
lines changed

4 files changed

+168
-168
lines changed

test/cuda/sparse/bellman.jl

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ for N in [Float32, Float64, Rational{BigInt}]
1414

1515
#### Maximization
1616
@testset "maximization" begin
17-
ws = construct_workspace(prob)
18-
strategy_cache = construct_strategy_cache(prob, NoStrategyConfig())
17+
ws = IntervalMDP.construct_workspace(prob)
18+
strategy_cache = IntervalMDP.construct_strategy_cache(prob)
1919
Vres = zeros(N, 2)
2020
IntervalMDP._bellman_helper!(
2121
ws,
@@ -29,7 +29,7 @@ for N in [Float32, Float64, Rational{BigInt}]
2929
@test Vres N[27 // 10, 17 // 10] # [0.3 * 2 + 0.7 * 3, 0.5 * 1 + 0.3 * 2 + 0.2 * 3]
3030

3131
ws = IntervalMDP.DenseWorkspace(gap(prob), 1)
32-
strategy_cache = construct_strategy_cache(prob, NoStrategyConfig())
32+
strategy_cache = IntervalMDP.construct_strategy_cache(prob)
3333
Vres = similar(Vres)
3434
IntervalMDP._bellman_helper!(
3535
ws,
@@ -43,7 +43,7 @@ for N in [Float32, Float64, Rational{BigInt}]
4343
@test Vres N[27 // 10, 17 // 10]
4444

4545
ws = IntervalMDP.ThreadedDenseWorkspace(gap(prob), 1)
46-
strategy_cache = construct_strategy_cache(prob, NoStrategyConfig())
46+
strategy_cache = IntervalMDP.construct_strategy_cache(prob)
4747
Vres = similar(Vres)
4848
IntervalMDP._bellman_helper!(
4949
ws,
@@ -59,8 +59,8 @@ for N in [Float32, Float64, Rational{BigInt}]
5959

6060
#### Minimization
6161
@testset "minimization" begin
62-
ws = construct_workspace(prob)
63-
strategy_cache = construct_strategy_cache(prob, NoStrategyConfig())
62+
ws = IntervalMDP.construct_workspace(prob)
63+
strategy_cache = IntervalMDP.construct_strategy_cache(prob)
6464
Vres = zeros(N, 2)
6565
IntervalMDP._bellman_helper!(
6666
ws,
@@ -74,7 +74,7 @@ for N in [Float32, Float64, Rational{BigInt}]
7474
@test Vres N[17 // 10, 15 // 10] # [0.5 * 1 + 0.3 * 2 + 0.2 * 3, 0.6 * 1 + 0.3 * 2 + 0.1 * 3]
7575

7676
ws = IntervalMDP.DenseWorkspace(gap(prob), 1)
77-
strategy_cache = construct_strategy_cache(prob, NoStrategyConfig())
77+
strategy_cache = IntervalMDP.construct_strategy_cache(prob)
7878
Vres = similar(Vres)
7979
IntervalMDP._bellman_helper!(
8080
ws,
@@ -88,7 +88,7 @@ for N in [Float32, Float64, Rational{BigInt}]
8888
@test Vres N[17 // 10, 15 // 10]
8989

9090
ws = IntervalMDP.ThreadedDenseWorkspace(gap(prob), 1)
91-
strategy_cache = construct_strategy_cache(prob, NoStrategyConfig())
91+
strategy_cache = IntervalMDP.construct_strategy_cache(prob)
9292
Vres = similar(Vres)
9393
IntervalMDP._bellman_helper!(
9494
ws,
@@ -145,8 +145,8 @@ end
145145
prob, V, cuda_prob, cuda_V =
146146
sample_sparse_interval_probabilities(rng, n, m, nnz_per_column)
147147

148-
ws = construct_workspace(prob)
149-
strategy_cache = construct_strategy_cache(prob, NoStrategyConfig())
148+
ws = IntervalMDP.construct_workspace(prob)
149+
strategy_cache = IntervalMDP.construct_strategy_cache(prob)
150150
V_cpu = zeros(Float64, m)
151151
IntervalMDP._bellman_helper!(
152152
ws,
@@ -158,8 +158,8 @@ end
158158
upper_bound = false,
159159
)
160160

161-
ws = construct_workspace(cuda_prob)
162-
strategy_cache = construct_strategy_cache(cuda_prob, NoStrategyConfig())
161+
ws = IntervalMDP.construct_workspace(cuda_prob)
162+
strategy_cache = IntervalMDP.construct_strategy_cache(cuda_prob)
163163
V_gpu = CUDA.zeros(Float64, m)
164164
IntervalMDP._bellman_helper!(
165165
ws,
@@ -185,8 +185,8 @@ end
185185
prob, V, cuda_prob, cuda_V =
186186
sample_sparse_interval_probabilities(rng, n, m, nnz_per_column)
187187

188-
ws = construct_workspace(prob)
189-
strategy_cache = construct_strategy_cache(prob, NoStrategyConfig())
188+
ws = IntervalMDP.construct_workspace(prob)
189+
strategy_cache = IntervalMDP.construct_strategy_cache(prob)
190190
V_cpu = zeros(Float64, m)
191191
IntervalMDP._bellman_helper!(
192192
ws,
@@ -198,8 +198,8 @@ end
198198
upper_bound = false,
199199
)
200200

201-
ws = construct_workspace(cuda_prob)
202-
strategy_cache = construct_strategy_cache(cuda_prob, NoStrategyConfig())
201+
ws = IntervalMDP.construct_workspace(cuda_prob)
202+
strategy_cache = IntervalMDP.construct_strategy_cache(cuda_prob)
203203
V_gpu = CUDA.zeros(Float64, m)
204204
IntervalMDP._bellman_helper!(
205205
ws,
@@ -225,8 +225,8 @@ end
225225
prob, V, cuda_prob, cuda_V =
226226
sample_sparse_interval_probabilities(rng, n, m, nnz_per_column)
227227

228-
ws = construct_workspace(prob)
229-
strategy_cache = construct_strategy_cache(prob, NoStrategyConfig())
228+
ws = IntervalMDP.construct_workspace(prob)
229+
strategy_cache = IntervalMDP.construct_strategy_cache(prob)
230230
V_cpu = zeros(Float64, m)
231231
IntervalMDP._bellman_helper!(
232232
ws,
@@ -238,8 +238,8 @@ end
238238
upper_bound = false,
239239
)
240240

241-
ws = construct_workspace(cuda_prob)
242-
strategy_cache = construct_strategy_cache(cuda_prob, NoStrategyConfig())
241+
ws = IntervalMDP.construct_workspace(cuda_prob)
242+
strategy_cache = IntervalMDP.construct_strategy_cache(cuda_prob)
243243
V_gpu = CUDA.zeros(Float64, m)
244244
IntervalMDP._bellman_helper!(
245245
ws,
@@ -265,8 +265,8 @@ end
265265
prob, V, cuda_prob, cuda_V =
266266
sample_sparse_interval_probabilities(rng, n, m, nnz_per_column)
267267

268-
ws = construct_workspace(prob)
269-
strategy_cache = construct_strategy_cache(prob, NoStrategyConfig())
268+
ws = IntervalMDP.construct_workspace(prob)
269+
strategy_cache = IntervalMDP.construct_strategy_cache(prob)
270270
V_cpu = zeros(Float64, m)
271271
IntervalMDP._bellman_helper!(
272272
ws,
@@ -278,8 +278,8 @@ end
278278
upper_bound = false,
279279
)
280280

281-
ws = construct_workspace(cuda_prob)
282-
strategy_cache = construct_strategy_cache(cuda_prob, NoStrategyConfig())
281+
ws = IntervalMDP.construct_workspace(cuda_prob)
282+
strategy_cache = IntervalMDP.construct_strategy_cache(cuda_prob)
283283
V_gpu = CUDA.zeros(Float64, m)
284284
IntervalMDP._bellman_helper!(
285285
ws,
@@ -305,8 +305,8 @@ end
305305
prob, V, cuda_prob, cuda_V =
306306
sample_sparse_interval_probabilities(rng, n, m, nnz_per_column)
307307

308-
ws = construct_workspace(cuda_prob)
309-
strategy_cache = construct_strategy_cache(cuda_prob, NoStrategyConfig())
308+
ws = IntervalMDP.construct_workspace(cuda_prob)
309+
strategy_cache = IntervalMDP.construct_strategy_cache(cuda_prob)
310310
V_gpu = CUDA.zeros(Float64, m)
311311
@test_throws IntervalMDP.OutOfSharedMemory IntervalMDP._bellman_helper!(
312312
ws,

0 commit comments

Comments
 (0)