Skip to content

Commit 1666cc7

Browse files
committed
update
1 parent 0d463ce commit 1666cc7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ TupleTools = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6"
2323
Viznet = "52a3aca4-6234-47fd-b74a-806bdf78ede9"
2424

2525
[compat]
26-
CUDA = "3.3"
26+
CUDA = "3.5"
2727
Compose = "0.9"
2828
FFTW = "1.4"
2929
LightGraphs = "1.3"

src/graph_polynomials.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,12 @@ contractx(gp::GraphProblem, x; usecuda=false) = contractf(_->x, gp; usecuda=usec
9898
function contractf(f, gp::GraphProblem; usecuda=false)
9999
@debug "generating tensors ..."
100100
xs = generate_tensors(f, gp)
101+
@debug "contracting tensors ..."
101102
if usecuda
102-
xs = CuArray.(xs)
103+
gp.code([CuArray(x) for x in xs]...)
104+
else
105+
gp.code(xs...)
103106
end
104-
@debug "contracting tensors ..."
105-
gp.code(xs...)
106107
end
107108

108109
############### Problem specific implementations ################

0 commit comments

Comments
 (0)