Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computing
cbmroot
Commits
6ab65c0c
Commit
6ab65c0c
authored
1 year ago
by
Felix Weiglhofer
Browse files
Options
Downloads
Patches
Plain Diff
online: Use dynamic scheduling for STS hit creation.
parent
4da2402d
No related branches found
No related tags found
1 merge request
!1793
online: Use dynamic scheduling for STS hit creation.
Pipeline
#29171
passed
1 year ago
Stage: package
Stage: verify
Stage: documentation
Stage: deploy
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
algo/detectors/sts/Hitfinder.h
+1
-0
1 addition, 0 deletions
algo/detectors/sts/Hitfinder.h
algo/detectors/sts/HitfinderChain.cxx
+14
-6
14 additions, 6 deletions
algo/detectors/sts/HitfinderChain.cxx
external/CMakeLists.txt
+1
-1
1 addition, 1 deletion
external/CMakeLists.txt
with
16 additions
and
7 deletions
algo/detectors/sts/Hitfinder.h
+
1
−
0
View file @
6ab65c0c
...
@@ -108,6 +108,7 @@ namespace cbm::algo::sts
...
@@ -108,6 +108,7 @@ namespace cbm::algo::sts
using
block_size
=
xpu
::
block_size
<
kFindHitsBlockSize
>
;
using
block_size
=
xpu
::
block_size
<
kFindHitsBlockSize
>
;
using
constants
=
xpu
::
cmem
<
TheHitfinder
,
Params
>
;
using
constants
=
xpu
::
cmem
<
TheHitfinder
,
Params
>
;
using
context
=
xpu
::
kernel_context
<
shared_memory
,
constants
>
;
using
context
=
xpu
::
kernel_context
<
shared_memory
,
constants
>
;
using
openmp
=
xpu
::
openmp_settings
<
xpu
::
schedule_dynamic
,
128
>
;
XPU_D
void
operator
()(
context
&
);
XPU_D
void
operator
()(
context
&
);
};
};
...
...
This diff is collapsed.
Click to expand it.
algo/detectors/sts/HitfinderChain.cxx
+
14
−
6
View file @
6ab65c0c
...
@@ -234,10 +234,13 @@ sts::HitfinderChain::Result sts::HitfinderChain::operator()(gsl::span<const CbmS
...
@@ -234,10 +234,13 @@ sts::HitfinderChain::Result sts::HitfinderChain::operator()(gsl::span<const CbmS
<<
" hits were discarded!"
;
<<
" hits were discarded!"
;
for
(
size_t
m
=
0
;
m
<
nModules
;
m
++
)
{
for
(
size_t
m
=
0
;
m
<
nModules
;
m
++
)
{
if
(
static_cast
<
size_t
>
(
nHits
[
m
])
>
hfc
.
maxHitsPerModule
)
{
const
size_t
nHitsModule
=
nHits
[
m
];
L_
(
error
)
<<
"STS Hitfinder Chain: Hit bucket overflow in module "
<<
m
<<
" with "
<<
*
nHits
[
m
]
<<
" (of "
const
size_t
nClustersModule
=
nClusters
[
m
];
<<
hfc
.
maxHitsPerModule
<<
" max)"
const
float
hitsPerCluster
=
nClustersModule
>
0
?
nHitsModule
/
float
(
nClustersModule
)
:
0
;
<<
" hits!"
;
if
(
nHitsModule
>
hfc
.
maxHitsPerModule
)
{
L_
(
error
)
<<
"STS Hitfinder Chain: Hit bucket overflow in module "
<<
m
<<
" with "
<<
nHitsModule
<<
" (of "
<<
hfc
.
maxHitsPerModule
<<
" max) hits! "
<<
"Module has "
<<
nClustersModule
<<
" clusters. "
<<
hitsPerCluster
<<
" hits per cluster."
;
nHits
[
m
]
=
hfc
.
maxHitsPerModule
;
nHits
[
m
]
=
hfc
.
maxHitsPerModule
;
}
}
}
}
...
@@ -249,8 +252,8 @@ sts::HitfinderChain::Result sts::HitfinderChain::operator()(gsl::span<const CbmS
...
@@ -249,8 +252,8 @@ sts::HitfinderChain::Result sts::HitfinderChain::operator()(gsl::span<const CbmS
size_t
nHitsTotal
=
std
::
accumulate
(
nHits
.
begin
(),
nHits
.
end
(),
0
);
size_t
nHitsTotal
=
std
::
accumulate
(
nHits
.
begin
(),
nHits
.
end
(),
0
);
L_
(
info
)
<<
"Timeslice contains "
<<
nHitsTotal
<<
" STS hits and "
<<
nClustersTotal
<<
" STS clusters"
;
L_
(
info
)
<<
"Timeslice contains "
<<
nHitsTotal
<<
" STS hits and "
<<
nClustersTotal
<<
" STS clusters"
;
result
.
hits
=
std
::
move
(
hits
);
result
.
hits
=
std
::
move
(
hits
);
result
.
clusters
=
std
::
move
(
clusters
);
result
.
clusters
=
std
::
move
(
clusters
);
result
.
monitor
.
nClusterTotal
=
nClustersTotal
;
result
.
monitor
.
nClusterTotal
=
nClustersTotal
;
result
.
monitor
.
nHitsTotal
=
result
.
hits
.
NElements
();
result
.
monitor
.
nHitsTotal
=
result
.
hits
.
NElements
();
result
.
monitor
.
SetDeviceMon
(
monitor
[
0
]);
result
.
monitor
.
SetDeviceMon
(
monitor
[
0
]);
...
@@ -336,6 +339,9 @@ void sts::HitfinderChain::AllocateDynamic(size_t maxNDigisPerModule, size_t nDig
...
@@ -336,6 +339,9 @@ void sts::HitfinderChain::AllocateDynamic(size_t maxNDigisPerModule, size_t nDig
// TODO: some of these buffers have a constant size and can be allocated statically.
// TODO: some of these buffers have a constant size and can be allocated statically.
// Just the data they contain is static.
// Just the data they contain is static.
fPars
->
memory
.
maxNDigisPerModule
=
maxNDigisPerModule
;
fPars
->
memory
.
maxNDigisPerTS
=
nDigisTotal
;
// Shorthands for common constants
// Shorthands for common constants
const
int
nChannels
=
fPars
->
setup
.
nChannels
/
2
;
// Only count channels on one side of the module
const
int
nChannels
=
fPars
->
setup
.
nChannels
/
2
;
// Only count channels on one side of the module
const
int
nModules
=
fPars
->
setup
.
modules
.
size
();
const
int
nModules
=
fPars
->
setup
.
modules
.
size
();
...
@@ -418,6 +424,8 @@ sts::HitfinderChain::DigiMap sts::HitfinderChain::CountDigisPerModules(gsl::span
...
@@ -418,6 +424,8 @@ sts::HitfinderChain::DigiMap sts::HitfinderChain::CountDigisPerModules(gsl::span
u16
moduleIndex
=
digiMap
.
ModuleIndex
(
digi
);
u16
moduleIndex
=
digiMap
.
ModuleIndex
(
digi
);
if
(
moduleIndex
==
InvalidModule
)
continue
;
if
(
moduleIndex
==
InvalidModule
)
continue
;
// if (moduleIndex == InvalidModule || digi.GetAddress() == 0x10000002) continue;
bool
isFront
=
digi
.
GetChannel
()
<
nChannelsPerSide
;
bool
isFront
=
digi
.
GetChannel
()
<
nChannelsPerSide
;
nDigis
[
moduleIndex
+
(
isFront
?
0
:
nModules
)]
++
;
nDigis
[
moduleIndex
+
(
isFront
?
0
:
nModules
)]
++
;
...
...
This diff is collapsed.
Click to expand it.
external/CMakeLists.txt
+
1
−
1
View file @
6ab65c0c
...
@@ -53,7 +53,7 @@ if(DOWNLOAD_EXTERNALS)
...
@@ -53,7 +53,7 @@ if(DOWNLOAD_EXTERNALS)
if
(
NOT
${
CBM_XPU_DEV
}
)
if
(
NOT
${
CBM_XPU_DEV
}
)
download_project_if_needed
(
PROJECT xpu
download_project_if_needed
(
PROJECT xpu
GIT_REPOSITORY
"https://github.com/fweig/xpu.git"
GIT_REPOSITORY
"https://github.com/fweig/xpu.git"
GIT_TAG
"
5d00ebf33a33334bf6631aef6b545a2759f46816
"
# 2024-0
2
-0
5
GIT_TAG
"
f444797545b010923688dcb364003b3e4e1e2275
"
# 2024-0
5
-0
2
SOURCE_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/xpu
SOURCE_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/xpu
CONFIGURE_COMMAND
""
CONFIGURE_COMMAND
""
BUILD_COMMAND
""
BUILD_COMMAND
""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment