-
Notifications
You must be signed in to change notification settings - Fork 10
/
gnn_op.cc
58 lines (55 loc) · 1.92 KB
/
gnn_op.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* Copyright 2019 Stanford
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "gnn.h"
GnnFwdTask::GnnFwdTask(const Graph& graph,
const GnnOp& gnnOp,
const IndexSpaceT<1> &domain,
const ArgumentMap &arg_map)
: IndexLauncher(GNN_FWD_TASK_ID, domain,
TaskArgument(&gnnOp, sizeof(GnnOp)), arg_map)
{
// regions[0]: row_ptrs
{
RegionRequirement rr(graph.rowPtrLP, 0/*identity*/,
READ_ONLY, EXCLUSIVE, graph.rowPtrLR,
MAP_TO_FB_MEMORY);
rr.add_field(FID_DATA);
add_region_requirement(rr);
}
// regions[1]: col_idxs
{
RegionRequirement rr(graph.colIdxLP, 0/*identity*/,
READ_ONLY, EXCLUSIVE, graph.colIdxLR,
MAP_TO_FB_MEMORY);
rr.add_field(FID_DATA);
add_region_requirement(rr);
}
// regions[2]: input
{
RegionRequirement rr(gnnOp.input.nodeFwdLR, 0/*identity*/,
READ_ONLY, EXCLUSIVE, gnnOp.input.nodeFwdLR,
MAP_TO_ZC_MEMORY);
rr.add_field(FID_DATA);
add_region_requirement(rr);
}
// regions[3]: output
{
RegionRequirement rr(gnnOp.output.nodeFwdLP, 0/*identity*/,
WRITE_ONLY, EXCLUSIVE, gnnOp.output.nodeFwdLR,
MAP_TO_ZC_MEMORY);
rr.add_field(FID_DATA);
add_region_requirement(rr);
}
}