Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Remove cugraph, refactor GNN plugin cmake #4014

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,6 @@ if(ACTS_BUILD_PLUGIN_EXATRKX)
and ACTS_EXATRKX_ENABLE_TORCHSCRIPT must be enabled."
)
endif()
if(ACTS_EXATRKX_ENABLE_ONNX)
find_package(cugraph REQUIRED)
endif()
if(ACTS_EXATRKX_ENABLE_TORCH)
find_package(TorchScatter REQUIRED)
endif()
Expand Down
2 changes: 1 addition & 1 deletion Examples/Python/python/acts/examples/reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,7 @@ def addExaTrkX(
acts.examples.OnnxEdgeClassifier(**filterConfig),
acts.examples.OnnxEdgeClassifier(**gnnConfig),
]
trackBuilder = acts.examples.CugraphTrackBuilding(customLogLevel())
trackBuilder = acts.examples.BoostTrackBuilding(customLogLevel())

findingAlg = acts.examples.TrackFindingAlgorithmExaTrkX(
level=customLogLevel(),
Expand Down
12 changes: 0 additions & 12 deletions Examples/Python/src/ExaTrkXTrackFinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

#include "Acts/Plugins/ExaTrkX/BoostTrackBuilding.hpp"
#include "Acts/Plugins/ExaTrkX/CugraphTrackBuilding.hpp"
#include "Acts/Plugins/ExaTrkX/ExaTrkXPipeline.hpp"
#include "Acts/Plugins/ExaTrkX/OnnxEdgeClassifier.hpp"
#include "Acts/Plugins/ExaTrkX/OnnxMetricLearning.hpp"
Expand Down Expand Up @@ -157,17 +156,6 @@ void addExaTrkXTrackFinding(Context &ctx) {
ACTS_PYTHON_MEMBER(cut);
ACTS_PYTHON_STRUCT_END();
}
{
using Alg = Acts::CugraphTrackBuilding;

auto alg = py::class_<Alg, Acts::TrackBuildingBase, std::shared_ptr<Alg>>(
mex, "CugraphTrackBuilding")
.def(py::init([](Logging::Level lvl) {
return std::make_shared<Alg>(
getDefaultLogger("EdgeClassifier", lvl));
}),
py::arg("level"));
}
#endif

ACTS_PYTHON_DECLARE_ALGORITHM(
Expand Down
48 changes: 25 additions & 23 deletions Plugins/ExaTrkX/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
set(SOURCES src/buildEdges.cpp src/ExaTrkXPipeline.cpp)
add_library(ActsPluginExaTrkX SHARED src/buildEdges.cpp src/ExaTrkXPipeline.cpp)

benjaminhuth marked this conversation as resolved.
Show resolved Hide resolved
if(ACTS_EXATRKX_ENABLE_CUDA)
target_compile_definitions(ActsPluginExaTrkX PUBLIC ACTS_EXATRKX_WITH_CUDA)
endif()

if(ACTS_EXATRKX_ENABLE_ONNX)
list(
APPEND
SOURCES
src/OnnxEdgeClassifier.cpp
src/OnnxMetricLearning.cpp
src/CugraphTrackBuilding.cpp
target_sources(
ActsPluginExaTrkX
PRIVATE src/OnnxEdgeClassifier.cpp src/OnnxMetricLearning.cpp
)
endif()

if(ACTS_EXATRKX_ENABLE_TORCH)
list(
APPEND
SOURCES
src/TorchEdgeClassifier.cpp
src/TorchMetricLearning.cpp
src/BoostTrackBuilding.cpp
src/TorchTruthGraphMetricsHook.cpp
src/TorchGraphStoreHook.cpp
target_sources(
ActsPluginExaTrkX
PRIVATE
src/TorchEdgeClassifier.cpp
src/TorchMetricLearning.cpp
src/BoostTrackBuilding.cpp
src/TorchTruthGraphMetricsHook.cpp
src/TorchGraphStoreHook.cpp
)
endif()

add_library(ActsPluginExaTrkX SHARED ${SOURCES})

target_include_directories(
ActsPluginExaTrkX
PUBLIC
Expand All @@ -45,15 +44,21 @@ if(ACTS_EXATRKX_ENABLE_CUDA)
set_target_properties(
ActsPluginExaTrkX
PROPERTIES
CUDA_STANDARD 17
CUDA_STANDARD 20
CUDA_STANDARD_REQUIRED ON
CUDA_SEPARABLE_COMPILATION ON
)
target_compile_options(
ActsPluginExaTrkX
PRIVATE
$<$<COMPILE_LANGUAGE:CUDA>:-g
--generate-line-info
--extended-lambda>
)
target_compile_definitions(
ActsPluginExaTrkX
PUBLIC CUDA_API_PER_THREAD_DEFAULT_STREAM
)
target_compile_definitions(ActsPluginExaTrkX PUBLIC NO_CUGRAPH_OPS)
else()
target_compile_definitions(ActsPluginExaTrkX PUBLIC ACTS_EXATRKX_CPUONLY)
endif()
Expand All @@ -64,10 +69,7 @@ if(ACTS_EXATRKX_ENABLE_ONNX)
PUBLIC ACTS_EXATRKX_ONNX_BACKEND
)

target_link_libraries(
ActsPluginExaTrkX
PRIVATE OnnxRuntime cugraph::cugraph
)
target_link_libraries(ActsPluginExaTrkX PRIVATE OnnxRuntime)
endif()

if(ACTS_EXATRKX_ENABLE_TORCH)
Expand Down
1 change: 0 additions & 1 deletion Plugins/ExaTrkX/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ This plugin is known to build without errors with (as of September 2022)
- [libtorch](https://pytorch.org/) v1.10.2 for CUDA version 10.2 and cxx-11-abi ([download](https://download.pytorch.org/libtorch/cu102/libtorch-cxx11-abi-shared-with-deps-1.10.2%2Bcu102.zip))

*For the ONNX backend:*
- [cugraph](https://github.com/rapidsai/cugraph) v22.02.00
- [ONNX](https://github.com/microsoft/onnxruntime) v1.10.0 with CUDA support enabled

*For the Torch backend*
Expand Down

This file was deleted.

84 changes: 0 additions & 84 deletions Plugins/ExaTrkX/src/CugraphTrackBuilding.cpp

This file was deleted.

108 changes: 0 additions & 108 deletions Plugins/ExaTrkX/src/weaklyConnectedComponentsCugraph.hpp

This file was deleted.

1 change: 0 additions & 1 deletion docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ components:
- [Pythia8](https://pythia.org) for some examples
- [ROOT](https://root.cern.ch) >= 6.20 for the TGeo plugin and the examples
- [Sphinx](https://www.sphinx-doc.org) >= 2.0 with [Breathe](https://breathe.readthedocs.io/en/latest/), [Exhale](https://exhale.readthedocs.io/en/latest/), and [recommonmark](https://recommonmark.readthedocs.io/en/latest/index.html) extensions for the documentation
- [cugraph](https://github.com/rapidsai/cugraph) for the Exa.TrkX plugin
- [libtorch](https://pytorch.org/cppdocs/installing.html) for the Exa.TrkX plugin
- [Pybind11](https://github.com/pybind/pybind11) for the Python bindings of the examples

Expand Down
Loading