Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BTS-MTGNN
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhlj
BTS-MTGNN
Commits
7a5c91db
Commit
7a5c91db
authored
Dec 23, 2023
by
Wenjie Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add include dirs of ldg
parent
49998d4e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
CMakeLists.txt
+5
-4
csrc/partition/ldg.cpp
+4
-2
No files found.
CMakeLists.txt
View file @
7a5c91db
...
...
@@ -6,7 +6,7 @@ option(WITH_PYTHON "Link to Python when building" ON)
option
(
WITH_CUDA
"Link to CUDA when building"
ON
)
option
(
WITH_METIS
"Link to METIS when building"
ON
)
option
(
WITH_MTMETIS
"Link to multi-threaded METIS when building"
ON
)
option
(
WITH_LDG
"Link to (multi-threaded optionally) LDG when building"
O
FF
)
option
(
WITH_LDG
"Link to (multi-threaded optionally) LDG when building"
O
N
)
set
(
CMAKE_CXX_STANDARD 17
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
...
...
@@ -82,12 +82,13 @@ endif()
if
(
WITH_LDG
)
# Imports neighbor-clustering based (e.g. LDG algorithm) graph partitioning implementation
add_definitions
(
-DWITH_LDG
)
set
(
LDG_DIR
"csrc/partition/neighbor_clustering"
)
add_library
(
ldg_partition SHARED
"csrc/partition/
neighbor_clusterin
g.cpp"
)
add_library
(
ldg_partition SHARED
"csrc/partition/
ld
g.cpp"
)
target_link_libraries
(
ldg_partition PRIVATE
${
TORCH_LIBRARIES
}
)
add_subdirectory
(
"csrc/partition/neighbor_clustering"
)
target_include_directories
(
ldg_partition PRIVATE
ldg-vertex-partition
)
add_subdirectory
(
${
LDG_DIR
}
)
target_include_directories
(
ldg_partition PRIVATE
${
LDG_DIR
}
)
target_link_libraries
(
ldg_partition PRIVATE ldg-vertex-partition
)
endif
()
...
...
csrc/partition/
neighbor_clusterin
g.cpp
→
csrc/partition/
ld
g.cpp
View file @
7a5c91db
...
...
@@ -20,14 +20,16 @@ at::Tensor ldg_partition(at::Tensor edges,
auto
vertex_weights_clone
=
vertex_weights
->
clone
();
if
(
initial_partition
.
has_value
())
{
auto
initial_partition_clone
=
initial_partition
->
clone
();
return
vp
::
ldg_partition_v_init
(
edges_clone
,
vertex_weights_clone
,
initial_partition_clone
,
params
);
vp
::
ldg_partition_v_init
(
edges_clone
,
vertex_weights_clone
,
initial_partition_clone
,
params
);
return
initial_partition_clone
;
}
else
{
return
vp
::
ldg_partition_v
(
edges_clone
,
vertex_weights_clone
,
params
);
}
}
else
{
if
(
initial_partition
.
has_value
())
{
auto
initial_partition_clone
=
initial_partition
->
clone
();
return
vp
::
ldg_partition_init
(
edges_clone
,
initial_partition_clone
,
params
);
vp
::
ldg_partition_init
(
edges_clone
,
initial_partition_clone
,
params
);
return
initial_partition_clone
;
}
else
{
return
vp
::
ldg_partition
(
edges_clone
,
params
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment