Skip to content

Commit

Permalink
Merge branch 'main' into feature/add-tensorrt-support-gnn
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminhuth authored Jan 15, 2025
2 parents 6d2b0a6 + c0e65bc commit f5a819a
Show file tree
Hide file tree
Showing 362 changed files with 3,827 additions and 3,777 deletions.
45 changes: 15 additions & 30 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ variables:

DEPENDENCY_TAG: v5

.ccache_base:
cache:
- key: ccache-${CI_JOB_NAME}-${CCACHE_KEY_SUFFIX}-${CLONE_URL}_${HEAD_REF}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CCACHE_KEY_SUFFIX}-https://github.com/acts-project/acts.git-main
when: always
paths:
- ${CCACHE_DIR}


clang_tidy:
stage: build
image: ghcr.io/acts-project/ubuntu2404:63
Expand Down Expand Up @@ -68,12 +78,7 @@ build_exatrkx_cpu:
- large

cache:
key: ccache-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CCACHE_KEY_SUFFIX}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}-${CCACHE_KEY_SUFFIX}
when: always
paths:
- ${CCACHE_DIR}
- !reference [.ccache_base, cache]

script:
- export PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
Expand Down Expand Up @@ -106,12 +111,7 @@ build_exatrkx:
- large

cache:
key: ccache-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CCACHE_KEY_SUFFIX}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}-${CCACHE_KEY_SUFFIX}
when: always
paths:
- ${CCACHE_DIR}
- !reference [.ccache_base, cache]

artifacts:
paths:
Expand Down Expand Up @@ -227,12 +227,7 @@ build_linux_ubuntu:
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-24.04/deps.$DEPENDENCY_TAG.tar.zst

cache:
key: ccache-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CCACHE_KEY_SUFFIX}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}-${CCACHE_KEY_SUFFIX}
when: always
paths:
- ${CCACHE_DIR}
- !reference [.ccache_base, cache]

artifacts:
paths:
Expand Down Expand Up @@ -337,12 +332,7 @@ linux_physmon:
stage: build

cache:
key: ccache-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CCACHE_KEY_SUFFIX}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}-${CCACHE_KEY_SUFFIX}
when: always
paths:
- ${CCACHE_DIR}
- !reference [.ccache_base, cache]

script:
- git clone $CLONE_URL src
Expand Down Expand Up @@ -418,12 +408,7 @@ linux_ubuntu_2204_clang:
SETUP:

cache:
key: ccache-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CCACHE_KEY_SUFFIX}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}-${CCACHE_KEY_SUFFIX}
when: always
paths:
- ${CCACHE_DIR}
- !reference [.ccache_base, cache]

before_script:
- 'echo "LCG_VERSION: ${LCG_VERSION}"'
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ repos:
- id: end-of-file-fixer
exclude: \.(diff|patch)$
- id: check-yaml
exclude: \.gitlab-ci.yml$
- id: check-added-large-files


Expand Down
Binary file not shown.
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
8 changes: 4 additions & 4 deletions Core/include/Acts/Detector/Blueprint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "Acts/Detector/ProtoBinning.hpp"
#include "Acts/Geometry/Extent.hpp"
#include "Acts/Geometry/VolumeBounds.hpp"
#include "Acts/Utilities/BinningData.hpp"
#include "Acts/Utilities/AxisDefinitions.hpp"
#include "Acts/Utilities/StringHelpers.hpp"

#include <map>
Expand Down Expand Up @@ -47,11 +47,11 @@ struct Node final {
/// @param t the transform
/// @param bt the boundary type
/// @param bv the boundary values
/// @param bss the binning values
/// @param bss the axis directions for the binning
/// @param cs the children of the node
/// @param e the estimated extent of the node (optional)
Node(const std::string& n, const Transform3& t, VolumeBounds::BoundsType bt,
const std::vector<double>& bv, const std::vector<BinningValue>& bss,
const std::vector<double>& bv, const std::vector<AxisDirection>& bss,
std::vector<std::unique_ptr<Node>> cs = {}, const Extent& e = Extent())
: name(n),
transform(t),
Expand Down Expand Up @@ -96,7 +96,7 @@ struct Node final {
/// Branch definitions: children
std::vector<std::unique_ptr<Node>> children = {};
/// Branch definition binning
std::vector<BinningValue> binning = {};
std::vector<AxisDirection> binning = {};

/// Portal proto material binning
std::map<unsigned int, BinningDescription> portalMaterialBinning = {};
Expand Down
10 changes: 5 additions & 5 deletions Core/include/Acts/Detector/CuboidalContainerBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "Acts/Detector/DetectorComponents.hpp"
#include "Acts/Detector/interface/IDetectorComponentBuilder.hpp"
#include "Acts/Geometry/GeometryContext.hpp"
#include "Acts/Utilities/BinningType.hpp"
#include "Acts/Utilities/AxisDefinitions.hpp"
#include "Acts/Utilities/Logger.hpp"

#include <memory>
Expand All @@ -36,8 +36,8 @@ class IGeometryIdGenerator;
/// @note the builder expects a fully consistent set of sub volume builders
/// that will be executed in a chain
///
/// @note allowed BinningValue(s) for the cuboid container builder are
/// {binX}, {binY}, {binZ}.
/// @note allowed AxisDirection(s) for the cuboid container builder are
/// {AxisX}, {AxisY}, {AxisZ}.
///
/// @note Connecting containers isn't functional yet due to the underlying
/// issues in the CuboidDetectorHelper
Expand All @@ -48,8 +48,8 @@ class CuboidalContainerBuilder : public IDetectorComponentBuilder {
struct Config {
/// The configured volume builders
std::vector<std::shared_ptr<const IDetectorComponentBuilder>> builders = {};
/// Binning prescription of attachment
BinningValue binning{};
/// Axis direction for the binning
AxisDirection binning{};
/// The root volume finder
std::shared_ptr<const IRootVolumeFinderBuilder> rootVolumeFinderBuilder =
nullptr;
Expand Down
12 changes: 6 additions & 6 deletions Core/include/Acts/Detector/CylindricalContainerBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "Acts/Detector/ProtoBinning.hpp"
#include "Acts/Detector/interface/IDetectorComponentBuilder.hpp"
#include "Acts/Geometry/GeometryContext.hpp"
#include "Acts/Utilities/BinningType.hpp"
#include "Acts/Utilities/AxisDefinitions.hpp"
#include "Acts/Utilities/Logger.hpp"

#include <map>
Expand All @@ -39,17 +39,17 @@ class IGeometryIdGenerator;
/// @note the builder expects a fully consistent set of sub volume builders
/// that will be executed in a chain
///
/// @note allowed BinningValue(s) for the cylindrical container builder are
/// {binZ}, {binR}, {binPhi}, {binZ, binR}, whereas the last option indicates
/// a wrapping setup.
/// @note allowed AxisDirection(s) for the cylindrical container builder are
/// {AxisZ}, {AxisR}, {AxisPhi}, {AxisZ, AxisR}, whereas the last option
/// indicates a wrapping setup.
class CylindricalContainerBuilder : public IDetectorComponentBuilder {
public:
/// Nested configuration object
struct Config {
/// The configured volume builders
std::vector<std::shared_ptr<const IDetectorComponentBuilder>> builders = {};
/// Binning prescription of attachment
std::vector<BinningValue> binning = {};
/// The axis direction for the binning
std::vector<AxisDirection> binning = {};
/// The root volume finder
std::shared_ptr<const IRootVolumeFinderBuilder> rootVolumeFinderBuilder =
nullptr;
Expand Down
6 changes: 3 additions & 3 deletions Core/include/Acts/Detector/IndexedRootVolumeFinderBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "Acts/Detector/interface/IRootVolumeFinderBuilder.hpp"
#include "Acts/Geometry/GeometryContext.hpp"
#include "Acts/Navigation/PortalNavigation.hpp"
#include "Acts/Utilities/BinningData.hpp"
#include "Acts/Utilities/AxisDefinitions.hpp"

#include <memory>
#include <vector>
Expand All @@ -26,7 +26,7 @@ class IndexedRootVolumeFinderBuilder final : public IRootVolumeFinderBuilder {
public:
/// @brief Constructor with binning casts
/// @param binning the cast values for the grid binning
IndexedRootVolumeFinderBuilder(std::vector<Acts::BinningValue> binning);
IndexedRootVolumeFinderBuilder(std::vector<Acts::AxisDirection> binning);

/// The virtual interface definition for root volume finder builders
///
Expand All @@ -40,7 +40,7 @@ class IndexedRootVolumeFinderBuilder final : public IRootVolumeFinderBuilder {
const final;

private:
std::vector<Acts::BinningValue> m_casts;
std::vector<Acts::AxisDirection> m_casts;
};

} // namespace Acts::Experimental
6 changes: 3 additions & 3 deletions Core/include/Acts/Detector/KdtSurfacesProvider.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "Acts/Detector/detail/ReferenceGenerators.hpp"
#include "Acts/Detector/interface/ISurfacesProvider.hpp"
#include "Acts/Surfaces/Surface.hpp"
#include "Acts/Utilities/BinningData.hpp"
#include "Acts/Utilities/AxisDefinitions.hpp"
#include "Acts/Utilities/KDTree.hpp"

#include <array>
Expand Down Expand Up @@ -50,7 +50,7 @@ class KdtSurfaces {
/// @param rgen the reference point generator
KdtSurfaces(const GeometryContext& gctx,
const std::vector<std::shared_ptr<Surface>>& surfaces,
const std::array<BinningValue, kDIM>& casts,
const std::array<AxisDirection, kDIM>& casts,
const reference_generator& rgen =
detail::PolyhedronReferenceGenerator<1u, false>{})
: m_kdt(nullptr), m_casts(casts), m_rGenerator(rgen) {
Expand Down Expand Up @@ -113,7 +113,7 @@ class KdtSurfaces {
std::unique_ptr<KDTS> m_kdt = nullptr;

/// Cast values that turn a global position to lookup position
std::array<BinningValue, kDIM> m_casts = {};
std::array<AxisDirection, kDIM> m_casts = {};

/// Helper to generate reference points for filling
reference_generator m_rGenerator;
Expand Down
35 changes: 17 additions & 18 deletions Core/include/Acts/Detector/ProtoBinning.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@

#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Definitions/Common.hpp"
#include "Acts/Utilities/AxisFwd.hpp"
#include "Acts/Utilities/AxisDefinitions.hpp"
#include "Acts/Utilities/BinUtility.hpp"
#include "Acts/Utilities/BinningType.hpp"

#include <sstream>
#include <stdexcept>
Expand All @@ -27,8 +26,8 @@ namespace Acts::Experimental {
/// only for convenience that the binning can be defined and then
/// translated into concrete axis types
struct ProtoBinning {
/// The binning value of this
BinningValue binValue;
/// The axis direction
AxisDirection axisDir;
/// The axis type: equidistant or variable
Acts::AxisType axisType = Acts::AxisType::Equidistant;
/// The axis boundary type: Open, Bound or Closed
Expand All @@ -42,13 +41,13 @@ struct ProtoBinning {

/// Convenience constructors - for variable binning
///
/// @param bValue the value/cast in which this is binned
/// @param aDir the value/cast in which this is binned
/// @param bType the axis boundary type
/// @param e the bin edges (variable binning)
/// @param exp the expansion (in bins)
ProtoBinning(BinningValue bValue, Acts::AxisBoundaryType bType,
ProtoBinning(AxisDirection aDir, Acts::AxisBoundaryType bType,
const std::vector<double>& e, std::size_t exp = 0u)
: binValue(bValue),
: axisDir(aDir),
axisType(Acts::AxisType::Variable),
boundaryType(bType),
edges(e),
Expand All @@ -61,18 +60,18 @@ struct ProtoBinning {

/// Convenience constructors - for equidistant binning
///
/// @param bValue the value/cast in which this is binned
/// @param aDir the value/cast in which this is binned
/// @param bType the axis boundary type
/// @param minE the lowest edge of the binning
/// @param maxE the highest edge of the binning
/// @param nbins the number of bins
/// @param exp the expansion (in bins)
ProtoBinning(BinningValue bValue, Acts::AxisBoundaryType bType, double minE,
ProtoBinning(AxisDirection aDir, Acts::AxisBoundaryType bType, double minE,
double maxE, std::size_t nbins, std::size_t exp = 0u)
: binValue(bValue), boundaryType(bType), expansion(exp) {
: axisDir(aDir), boundaryType(bType), expansion(exp) {
if (minE >= maxE) {
std::string msg = "ProtoBinning: Invalid binning for value '";
msg += binningValueName(bValue);
std::string msg = "ProtoBinning: Invalid axis range for direction '";
msg += axisDirectionName(axisDir);
msg += "', min edge (" + std::to_string(minE) + ") ";
msg += " needs to be smaller than max edge (";
msg += std::to_string(maxE) + ").";
Expand All @@ -96,13 +95,13 @@ struct ProtoBinning {
/// when the actual extent is not yet evaluated, only works
/// for equidistant binning obviously
///
/// @param bValue the value/cast in which this is binned
/// @param aDir the value/cast in which this is binned
/// @param bType the axis boundary type
/// @param nbins the number of bins
/// @param exp the expansion (in bins)
ProtoBinning(BinningValue bValue, Acts::AxisBoundaryType bType,
ProtoBinning(AxisDirection aDir, Acts::AxisBoundaryType bType,
std::size_t nbins, std::size_t exp = 0u)
: binValue(bValue),
: axisDir(aDir),
boundaryType(bType),
edges(nbins + 1, 0.),
expansion(exp),
Expand All @@ -115,7 +114,7 @@ struct ProtoBinning {
std::string toString() const {
std::stringstream ss;
ss << "ProtoBinning: " << bins() << " bins in "
<< binningValueName(binValue);
<< axisDirectionName(axisDir);
ss << (axisType == Acts::AxisType::Variable ? ", variable "
: ", equidistant ");
if (!autorange) {
Expand Down Expand Up @@ -165,12 +164,12 @@ struct BinningDescription {
: Acts::closed;
if (b.axisType == Acts::AxisType::Equidistant) {
binUtility += BinUtility(b.bins(), b.edges.front(), b.edges.back(),
bOption, b.binValue);
bOption, b.axisDir);
} else {
std::vector<float> edges;
std::for_each(b.edges.begin(), b.edges.end(),
[&](double edge) { edges.push_back(edge); });
binUtility += BinUtility(edges, bOption, b.binValue);
binUtility += BinUtility(edges, bOption, b.axisDir);
}
}
return binUtility;
Expand Down
8 changes: 4 additions & 4 deletions Core/include/Acts/Detector/ProtoDetector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ struct ProtoVolume {
void extendUp(ProtoVolume& ptVolume);

/// Extend the tracking volume with its own constituents
/// @param bValue the binning value that is propagated
void propagateMinDown(BinningValue bValue);
/// @param aDir the axis direction that is propagated
void propagateMinDown(AxisDirection aDir);

/// Extend the tracking volume with its own constituents
/// @param bValue the binning value that is propagated
void propagateMaxDown(BinningValue bValue);
/// @param aDir the axis direction that is propagated
void propagateMaxDown(AxisDirection aDir);

/// Constrain the daughter volumes with this volume
///
Expand Down
Loading

0 comments on commit f5a819a

Please sign in to comment.