Skip to content

Commit 01acad7

Browse files
authored
Merge pull request #827 from SBNSoftware/dnnroi_gpu
DNNROI GPU Config
2 parents 2aaa6cc + e135f73 commit 01acad7

4 files changed

Lines changed: 26 additions & 4 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include "stage0_run2_wc_icarus.fcl"
2+
3+
#include "enable_dnn_sp.fcl"
4+
5+
physics.producers.decon2droiEE.wcls_main.params.wc_device: "gpu"
6+
physics.producers.decon2droiEW.wcls_main.params.wc_device: "gpu"
7+
physics.producers.decon2droiWE.wcls_main.params.wc_device: "gpu"
8+
physics.producers.decon2droiWW.wcls_main.params.wc_device: "gpu"
9+
10+
physics.producers.decon2droiEE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEE.wcls_main.plugins, "WireCellCuda"]
11+
physics.producers.decon2droiEW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiEW.wcls_main.plugins, "WireCellCuda"]
12+
physics.producers.decon2droiWE.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWE.wcls_main.plugins, "WireCellCuda"]
13+
physics.producers.decon2droiWW.wcls_main.plugins: [@sequence::icarus_stage0_producers.decon2droiWW.wcls_main.plugins, "WireCellCuda"]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
#include "stage0_run2_wc_icarus_mc.fcl"
22

33
#include "enable_dnn_sp.fcl"
4+
5+
physics.producers.decon2droiEE.wcls_main.params.wc_device: "cpu"
6+
physics.producers.decon2droiEW.wcls_main.params.wc_device: "cpu"
7+
physics.producers.decon2droiWE.wcls_main.params.wc_device: "cpu"
8+
physics.producers.decon2droiWW.wcls_main.params.wc_device: "cpu"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#include "stage0_run2_wcdnn_icarus_mc.fcl"
2-
#
2+
33
#include "enable_overlay_sp.fcl"

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)