Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
dacd4250
Commit
dacd4250
authored
Oct 05, 2017
by
Sebastian Woelke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
for testing
parent
fa5f795c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
benchmarks
benchmarks
+1
-1
libcaf_core/caf/policy/locality_guided_scheduling.hpp
libcaf_core/caf/policy/locality_guided_scheduling.hpp
+14
-12
No files found.
benchmarks
@
9f02100b
Subproject commit
c2cdbbb3824f405eb06ff9413416cacac66f7534
Subproject commit
9f02100b879d429b6abe84a159098184bca864ef
libcaf_core/caf/policy/locality_guided_scheduling.hpp
View file @
dacd4250
...
@@ -174,11 +174,11 @@ public:
...
@@ -174,11 +174,11 @@ public:
while
(
current_cache_obj
while
(
current_cache_obj
&&
current_cache_obj
->
type
==
hwloc_obj_type_t
::
HWLOC_OBJ_CACHE
)
{
&&
current_cache_obj
->
type
==
hwloc_obj_type_t
::
HWLOC_OBJ_CACHE
)
{
auto
result_pus
=
hwloc_bitmap_make_wrapper
();
auto
result_pus
=
hwloc_bitmap_make_wrapper
();
traverse_hwloc_obj
(
result_pus
.
get
(),
topo
,
current_cache_obj
,
current_pu_id
,
traverse_hwloc_obj
(
result_pus
.
get
(),
topo
,
current_cache_obj
,
last_cache_obj
);
current_pu_id
,
last_cache_obj
);
if
(
!
hwloc_bitmap_iszero
(
result_pus
.
get
()))
{
if
(
!
hwloc_bitmap_iszero
(
result_pus
.
get
()))
{
result_map
.
insert
(
make_pair
(
current_cache_lvl
/
distance_divider
,
result_map
.
insert
(
make_pair
(
current_cache_lvl
/
distance_divider
,
move
(
result_pus
)));
std
::
move
(
result_pus
)));
}
}
++
current_cache_lvl
;
++
current_cache_lvl
;
last_cache_obj
=
current_cache_obj
;
last_cache_obj
=
current_cache_obj
;
...
@@ -217,7 +217,7 @@ public:
...
@@ -217,7 +217,7 @@ public:
auto
result_map_it
=
result_map
.
find
(
dist_ptr
[
x
]);
auto
result_map_it
=
result_map
.
find
(
dist_ptr
[
x
]);
if
(
result_map_it
==
result_map
.
end
())
{
if
(
result_map_it
==
result_map
.
end
())
{
// create a new distane group
// create a new distane group
result_map
.
insert
(
make_pair
(
dist_ptr
[
x
],
move
(
tmp_pus
)));
result_map
.
insert
(
make_pair
(
dist_ptr
[
x
],
std
::
move
(
tmp_pus
)));
}
else
{
}
else
{
// add PUs to an available distance group
// add PUs to an available distance group
hwloc_bitmap_or
(
result_map_it
->
second
.
get
(),
hwloc_bitmap_or
(
result_map_it
->
second
.
get
(),
...
@@ -249,14 +249,14 @@ public:
...
@@ -249,14 +249,14 @@ public:
}
}
cache_dists
.
insert
(
make_move_iterator
(
begin
(
node_dists
)),
cache_dists
.
insert
(
make_move_iterator
(
begin
(
node_dists
)),
make_move_iterator
(
end
(
node_dists
)));
make_move_iterator
(
end
(
node_dists
)));
return
move
(
cache_dists
);
return
std
::
move
(
cache_dists
);
}
else
if
(
!
cache_dists
.
empty
()
&&
node_dists
.
empty
())
{
}
else
if
(
!
cache_dists
.
empty
()
&&
node_dists
.
empty
())
{
// caf cannot it collected all pus because because it CPU could have two
// caf cannot it collected all pus because because it CPU could have two
// L3-caches and only of them is represented by cahces_dists.
// L3-caches and only of them is represented by cahces_dists.
CAF_CRITICAL
(
"caf could not reliable collect all PUs"
);
CAF_CRITICAL
(
"caf could not reliable collect all PUs"
);
}
else
if
(
cache_dists
.
empty
()
&&
!
node_dists
.
empty
())
{
}
else
if
(
cache_dists
.
empty
()
&&
!
node_dists
.
empty
())
{
wp_matrix_first_node_idx
=
0
;
wp_matrix_first_node_idx
=
0
;
return
move
(
node_dists
);
return
std
::
move
(
node_dists
);
}
else
{
}
else
{
// both maps are empty, which happens on a single core machine
// both maps are empty, which happens on a single core machine
wp_matrix_first_node_idx
=
-
1
;
wp_matrix_first_node_idx
=
-
1
;
...
@@ -293,14 +293,16 @@ public:
...
@@ -293,14 +293,16 @@ public:
}
}
pu_distance_map_t
tmp_node_dists
;
pu_distance_map_t
tmp_node_dists
;
tmp_node_dists
.
insert
(
tmp_node_dists
.
insert
(
make_pair
(
normalized_numa_node_dist
,
move
(
all_pus
)));
make_pair
(
normalized_numa_node_dist
,
std
::
move
(
all_pus
)));
pu_dists
=
merge_dist_maps
(
move
(
cache_dists
),
move
(
tmp_node_dists
),
pu_dists
=
merge_dist_maps
(
std
::
move
(
cache_dists
),
std
::
move
(
tmp_node_dists
),
wp_matrix_first_node_idx
);
wp_matrix_first_node_idx
);
}
else
{
}
else
{
auto
cache_dists
=
traverse_caches
(
topo
,
current_pu
);
auto
cache_dists
=
traverse_caches
(
topo
,
current_pu
);
auto
node_dists
=
traverse_nodes
(
topo
,
node_dist_matrix
,
current_pu
,
auto
node_dists
=
traverse_nodes
(
topo
,
node_dist_matrix
,
current_pu
,
current_node
.
get
());
current_node
.
get
());
pu_dists
=
merge_dist_maps
(
move
(
cache_dists
),
move
(
node_dists
),
pu_dists
=
merge_dist_maps
(
std
::
move
(
cache_dists
),
std
::
move
(
node_dists
),
wp_matrix_first_node_idx
);
wp_matrix_first_node_idx
);
}
}
xxx
(
current_pu
,
pu_dists
);
xxx
(
current_pu
,
pu_dists
);
...
@@ -319,7 +321,7 @@ public:
...
@@ -319,7 +321,7 @@ public:
}
}
// current_worker_group can be empty if pus of this level are deactivated
// current_worker_group can be empty if pus of this level are deactivated
if
(
!
current_worker_group
.
empty
())
{
if
(
!
current_worker_group
.
empty
())
{
result_wp_matrix
.
emplace_back
(
move
(
current_worker_group
));
result_wp_matrix
.
emplace_back
(
std
::
move
(
current_worker_group
));
}
}
}
}
//accumulate steal_groups - each group contains all lower level groups
//accumulate steal_groups - each group contains all lower level groups
...
...
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