Skip to content

Commit 393c207

Browse files
Update wcls-decode-to-sig-twofaced-dnnroi.jsonnet
1 parent 8ce554f commit 393c207

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

icaruscode/TPC/ICARUSWireCell/icarus/wcls-decode-to-sig-twofaced-dnnroi.jsonnet

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// -V signal_output_form=sparse \\
2020
// -J cfg cfg/pgrapher/experiment/uboone/wcls-nf-sp.jsonnet
2121

22+
local wc_device = std.extVar('wc_device');
2223

2324
local epoch = std.extVar('epoch'); // eg "dynamic", "after", "before", "perfect"
2425
local reality = std.extVar('reality');
@@ -87,7 +88,10 @@ local params = base {
8788

8889
// local tools_maker = import 'pgrapher/common/tools.jsonnet';
8990
local tools_maker = import 'pgrapher/experiment/icarus/icarus_tools.jsonnet';
90-
local tools = tools_maker(params);
91+
// local tools = tools_maker(params);
92+
local default_tools = tools_maker(params);
93+
local tools = if wc_device == 'gpu' then std.mergePatch(default_tools,
94+
{dft: {type: "TorchDFT", data: {device: wc_device}}}) else default_tools;
9195

9296

9397
local wcls_maker = import 'pgrapher/ui/wcls/nodes.jsonnet';
@@ -271,7 +275,7 @@ local ts_u = {
271275
name: "dnnroi_u",
272276
data: {
273277
model: "NNs/plane0.ts",
274-
device: "cpu",
278+
device: wc_device,
275279
concurrency: 1,
276280
},
277281
};
@@ -281,7 +285,7 @@ local ts_v = {
281285
name: "dnnroi_v",
282286
data: {
283287
model: "NNs/plane1.ts",
284-
device: "cpu",
288+
device: wc_device,
285289
concurrency: 1,
286290
},
287291
};

0 commit comments

Comments
 (0)