Skip to content
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

Rm/2426 #2517

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Rm/2426 #2517

wants to merge 3 commits into from

Conversation

strRM
Copy link
Contributor

@strRM strRM commented Nov 13, 2024

Issue #2426 shows a problem (crash) when using the auto-scheduler on valid input. This MR is an attempt to circumvent the issue by not using the auto-scheduler if there is no good profile and falling back to a heuristic.

I realize that this is not ideal, but I would prefer using a heuristic to crashing. This fix also gives us some more time to address the underlying bug. If you think the underlying bug is easy to fix, I can take a stab at it, but since it's been open for 1 year, it's probably harder to fix.

There is code for a warning message when there is a problem with the auto-scheduler, but I could not figure out how to integrate that into the ctest suite. The problem is because the warning causes the two expected err outputs to be different between the two runs and the test isn't set up to support that.

There is a bug souffle-lang#2426, which causes an assertion in the
SelingerProfileSipsMetric::getReordering.

Rther than fixing the problem I decided to work-around it for
the time being, until we have a proper fix.

We can work around this problem in one of two ways:
1. don't assert and just don't reorder atoms (this should be fine)
2. don't create the metric in the first place, if there is no profile

I decided to use souffle-lang#2 as that seems to be the safer option.

I added code for a warning, but disabled it because it is incompatible
with the ctest suite.
We should print a warning about --auto-schedule not
being enabled. If we do that we also need to change
the unit test setups for scheduler tests.
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.11%. Comparing base (73edcf3) to head (d70d25c).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2517      +/-   ##
==========================================
- Coverage   81.12%   81.11%   -0.01%     
==========================================
  Files         492      492              
  Lines       33361    33362       +1     
==========================================
- Hits        27063    27062       -1     
- Misses       6298     6300       +2     
Files with missing lines Coverage Δ
src/ast2ram/utility/SipsMetric.cpp 55.62% <100.00%> (+0.13%) ⬆️

... and 5 files with indirect coverage changes

Comment on lines +316 to +321
// TODO: enable this, but if we do the scheduler tests won't run as they do now
#if 0
std::cerr << "WARNING: `--auto-schedule` cannot be used due to missing scheduler stats; falling back "
"to heuristic '"
<< heuristic << "'" << ::std::endl;
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this TODO be addressed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should print the warning, but I'm not too familiar with CMAKE to make the updates to the test scripts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind merging as is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants