-
Notifications
You must be signed in to change notification settings - Fork 493
ALICE3: start global tracking directory with TRK tracking (CPU+GPU and ROF staggering) #15351
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
Open
mpuccio
wants to merge
9
commits into
AliceO2Group:dev
Choose a base branch
from
mpuccio:gpu_staggering
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2d8d4c8
ALICE3: move tracking to GlobalReconstruction
mpuccio 4656487
ALICE3: add cluster and GPU tracking paths
mpuccio 2e3ef61
ALICE3: derive ROF timing for TRK inputs
mpuccio 4e9e2b9
ALICE3: write track ROFs and IR frames
mpuccio f3fa6a9
ALICE3: assign cluster MC labels in TimeFrame loading
mpuccio 806f5d6
ALICE3: share TimeFrame code between CPU and GPU
mpuccio 3cda4e9
ALICE3: validate configuration before running
mpuccio d10bb4b
ALICE3: clang-format
mpuccio 17e8932
Guard 11 layers implementations with ENABLE_UPGRADES
mpuccio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
Detectors/Upgrades/ALICE3/GlobalReconstruction/CMakeLists.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Copyright 2019-2020 CERN and copyright holders of ALICE O2. | ||
| # See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
| # All rights not expressly granted are reserved. | ||
| # | ||
| # This software is distributed under the terms of the GNU General Public | ||
| # License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
| # | ||
| # In applying this license CERN does not waive the privileges and immunities | ||
| # granted to it by virtue of its status as an Intergovernmental Organization | ||
| # or submit itself to any jurisdiction. | ||
|
|
||
| add_subdirectory(reconstruction) | ||
| add_subdirectory(workflow) |
74 changes: 74 additions & 0 deletions
74
Detectors/Upgrades/ALICE3/GlobalReconstruction/reconstruction/CMakeLists.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # Copyright 2019-2020 CERN and copyright holders of ALICE O2. | ||
| # See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
| # All rights not expressly granted are reserved. | ||
| # | ||
| # This software is distributed under the terms of the GNU General Public | ||
| # License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
| # | ||
| # In applying this license CERN does not waive the privileges and immunities | ||
| # granted to it by virtue of its status as an Intergovernmental Organization | ||
| # or submit itself to any jurisdiction. | ||
|
|
||
| if(Acts_FOUND) | ||
| set(actsTarget Acts::Core) | ||
| endif() | ||
|
|
||
| set(alice3GlobalRecoGpuSources "") | ||
| set(alice3GlobalRecoGpuTargets "") | ||
| set(alice3GlobalRecoGpuPrivateTargets "") | ||
| if(CUDA_ENABLED) | ||
| find_package(CUDAToolkit REQUIRED) | ||
| list(APPEND alice3GlobalRecoGpuSources src/TimeFrameGPU.cxx src/GPUExternalAllocator.cxx) | ||
| list(APPEND alice3GlobalRecoGpuTargets O2::ITStrackingCUDA) | ||
| list(APPEND alice3GlobalRecoGpuPrivateTargets CUDA::cudart) | ||
| elseif(HIP_ENABLED) | ||
| list(APPEND alice3GlobalRecoGpuSources src/TimeFrameGPU.cxx src/GPUExternalAllocator.cxx) | ||
| list(APPEND alice3GlobalRecoGpuTargets O2::ITStrackingHIP) | ||
| list(APPEND alice3GlobalRecoGpuPrivateTargets hip::host) | ||
| endif() | ||
|
|
||
| o2_add_library(ALICE3GlobalReconstruction | ||
| TARGETVARNAME targetName | ||
| SOURCES src/TimeFrame.cxx | ||
| ${alice3GlobalRecoGpuSources} | ||
| $<$<BOOL:${Acts_FOUND}>:src/TrackerACTS.cxx> | ||
| PUBLIC_LINK_LIBRARIES | ||
| O2::ITStracking | ||
| O2::GPUCommon | ||
| Microsoft.GSL::GSL | ||
| O2::CommonConstants | ||
| O2::DataFormatsITSMFT | ||
| O2::DataFormatsTRK | ||
| O2::SimulationDataFormat | ||
| O2::ITSBase | ||
| O2::ITSReconstruction | ||
| O2::ITSMFTReconstruction | ||
| O2::DataFormatsITS | ||
| O2::TRKBase | ||
| O2::TRKReconstruction | ||
| O2::TRKSimulation | ||
| nlohmann_json::nlohmann_json | ||
| ${alice3GlobalRecoGpuTargets} | ||
| ${actsTarget} | ||
| PRIVATE_LINK_LIBRARIES | ||
| O2::Steer | ||
| TBB::tbb | ||
| ${alice3GlobalRecoGpuPrivateTargets}) | ||
|
|
||
| if(alice3GlobalRecoGpuTargets) | ||
| target_compile_definitions(${targetName} PUBLIC TRK_HAS_GPU_TRACKING) | ||
| endif() | ||
|
|
||
| if(CUDA_ENABLED) | ||
| target_include_directories(${targetName} PRIVATE ${CUDAToolkit_INCLUDE_DIRS}) | ||
| endif() | ||
|
|
||
| if(CUDA_ENABLED) | ||
| target_compile_definitions(${targetName} PUBLIC TRK_HAS_CUDA_TRACKING) | ||
| elseif(HIP_ENABLED) | ||
| target_compile_definitions(${targetName} PUBLIC TRK_HAS_HIP_TRACKING) | ||
| endif() | ||
|
|
||
| if(Acts_FOUND) | ||
| target_compile_definitions(${targetName} PUBLIC O2_WITH_ACTS) | ||
| endif() |
65 changes: 65 additions & 0 deletions
65
...alReconstruction/reconstruction/include/ALICE3GlobalReconstruction/GPUExternalAllocator.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| // Copyright 2019-2020 CERN and copyright holders of ALICE O2. | ||
| // See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
| // All rights not expressly granted are reserved. | ||
| // | ||
| // This software is distributed under the terms of the GNU General Public | ||
| // License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
| // | ||
| // In applying this license CERN does not waive the privileges and immunities | ||
| // granted to it by virtue of its status as an Intergovernmental Organization | ||
| // or submit itself to any jurisdiction. | ||
|
|
||
| #ifndef ALICEO2_ALICE3GLOBALRECONSTRUCTION_GPUEXTERNALALLOCATOR_H | ||
| #define ALICEO2_ALICE3GLOBALRECONSTRUCTION_GPUEXTERNALALLOCATOR_H | ||
|
|
||
| #include "ITStracking/ExternalAllocator.h" | ||
|
|
||
| #include <cstddef> | ||
| #include <cstdint> | ||
| #include <mutex> | ||
| #include <type_traits> | ||
| #include <unordered_map> | ||
| #include <vector> | ||
|
|
||
| namespace o2::trk | ||
| { | ||
|
|
||
| class GPUExternalAllocator final : public o2::its::ExternalAllocator | ||
| { | ||
| public: | ||
| GPUExternalAllocator() = default; | ||
| ~GPUExternalAllocator(); | ||
|
|
||
| void* allocate(size_t size) override; | ||
| void deallocate(char* ptr, size_t size) override; | ||
| void pushTagOnStack(uint64_t tag) override; | ||
| void popTagOffStack(uint64_t tag) override; | ||
|
|
||
| void releaseAll(); | ||
|
|
||
| private: | ||
| enum class AllocationSpace { Host, | ||
| Device }; | ||
|
|
||
| struct AllocationMeta { | ||
| AllocationSpace space; | ||
| uint64_t tag; | ||
| bool stacked; | ||
| }; | ||
|
|
||
| using MemoryType = std::underlying_type_t<o2::gpu::GPUMemoryResource::MemoryType>; | ||
|
|
||
| void* allocateHost(size_t size); | ||
| void* allocateDevice(size_t size); | ||
| void freeAllocation(void* ptr, AllocationSpace space); | ||
| void removeFromTagLocked(uint64_t tag, void* ptr); | ||
|
|
||
| std::mutex mMutex; | ||
| std::vector<uint64_t> mTagStack; | ||
| std::unordered_map<uint64_t, std::vector<void*>> mTaggedAllocations; | ||
| std::unordered_map<void*, AllocationMeta> mAllocations; | ||
| }; | ||
|
|
||
| } // namespace o2::trk | ||
|
|
||
| #endif |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.