Skip to content

Commit

Permalink
fix(explorer)[reduction,doall]: minor fix regarding considered metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasrothenberger committed Aug 28, 2024
1 parent 43b33dc commit e84d9b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion discopop_explorer/pattern_detectors/do_all_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ def __check_loop_dependencies(
)
cond_2 = len([cf for cf in called_functions_lineids if cf in dep.metadata_inter_call_dep]) > 0
cond_3 = len([t for t in parent_loops if t in dep.metadata_inter_iteration_dep]) > 0
if cond_1 or cond_2 or cond_3:
cond_4 = root_loop.start_position() in dep.metadata_inter_iteration_dep
# if cond_1 or cond_2 or cond_3:
if cond_2 or cond_4:
return True
# if it is an intra iteration dependency, it is problematic if it belongs to a parent loop
else:
Expand Down
4 changes: 3 additions & 1 deletion discopop_explorer/pattern_detectors/reduction_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ def __check_loop_dependencies(
)
cond_2 = len([cf for cf in called_functions_lineids if cf in dep.metadata_inter_call_dep]) > 0
cond_3 = len([t for t in parent_loops if t in dep.metadata_inter_iteration_dep]) > 0
if cond_1 or cond_2 or cond_3:
cond_4 = root_loop.start_position() in dep.metadata_inter_iteration_dep
# if cond_1 or cond_2 or cond_3:
if cond_2 or cond_4:
return True
elif dep.dtype == DepType.WAR:
# check WAR dependencies
Expand Down

0 comments on commit e84d9b5

Please sign in to comment.