-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Assertion failure on auto-tuning #2346
Comments
This simpler test case also trigger the bug:
And can not remove any part of the program. |
I performed a |
fangyi-zhou
added a commit
to fangyi-zhou/souffle
that referenced
this issue
Jun 30, 2023
When using the auto-scheduler on certain inputs, the auto-scheduler may throw an error stating: "Error: profile used for auto-scheduling doesn't match the provided program." This was reported in Issue souffle-lang#2346 by another user, providing a small example to test on. Running a `git bisect` using the example reveals that the commit 43a4ce3 (Working refactor of SIP Graph, 2022-06-23) was the first to introduce the error. Inspecting the profiler output for that commit and the parent commit, I noted that some new indices appear the join columns and they should probably not be there. After deep inspection of the refactor, I've noticed the following diff potentially changes the program behaviour: src/ast/analysis/JoinSize.cpp in 43a4ce3 (Working refactor of SIP Graph, 2022-06-23) ```diff - auto& dependentVars = varToOtherVars.at(var->getName()); - if (!dependentVars.empty() && - std::includes(providedVars.begin(), providedVars.end(), - dependentVars.begin(), dependentVars.end())) { - joinColumns.push_back(argIdx); - ++numBound; - continue; ``` src/ast/utility/SipGraph.cpp in 55c3500 (Working SIPGraph for SelingerSIPS, 2022-06-23) ``` + if (std::includes(groundedVars.begin(), groundedVars.end(), dependentVars.begin(), + dependentVars.end())) { + boundColumns.insert(argIdx); + } ``` This commit adds the empty check, and this change makes the error disappear. While I am not certain about whether this is the correct fix, the use of `std::includes` on an empty range could be a potential cause of bugs. I tested the join column output against the parent commit of the 43a4ce3 (Working refactor of SIP Graph, 2022-06-23), and can confirm that the join columns in the profile output are the same. Closes souffle-lang#2346
fangyi-zhou
added a commit
to fangyi-zhou/souffle
that referenced
this issue
Jun 30, 2023
When using the auto-scheduler on certain inputs, the auto-scheduler may throw an error stating: "Error: profile used for auto-scheduling doesn't match the provided program." This was reported in Issue souffle-lang#2346 by another user, providing a small example to test on. Running a `git bisect` using the example reveals that the commit 43a4ce3 (Working refactor of SIP Graph, 2022-06-23) was the first to introduce the error. Inspecting the profiler output for that commit and the parent commit, I noted that some new indices appear the join columns and they should probably not be there. After deep inspection of the refactor, I've noticed the following diff potentially changes the program behaviour: src/ast/analysis/JoinSize.cpp in 43a4ce3 (Working refactor of SIP Graph, 2022-06-23) ```diff - auto& dependentVars = varToOtherVars.at(var->getName()); - if (!dependentVars.empty() && - std::includes(providedVars.begin(), providedVars.end(), - dependentVars.begin(), dependentVars.end())) { - joinColumns.push_back(argIdx); - ++numBound; - continue; ``` src/ast/utility/SipGraph.cpp in 55c3500 (Working SIPGraph for SelingerSIPS, 2022-06-23) ```diff + if (std::includes(groundedVars.begin(), groundedVars.end(), dependentVars.begin(), + dependentVars.end())) { + boundColumns.insert(argIdx); + } ``` This commit adds the empty check, and this change makes the error disappear. While I am not certain about whether this is the correct fix, the use of `std::includes` on an empty range could be a potential cause of bugs. I tested the join column output against the parent commit of the 43a4ce3 (Working refactor of SIP Graph, 2022-06-23), and can confirm that the join columns in the profile output are the same. Closes souffle-lang#2346
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Hi,
I run the following program with auto-tuning and meets an assertion failure:
The command is
souffle -w example.dl -p profile.txt --emit-statistics && souffle -w example.dl --auto-schedule=profile.txt -o binary2
. The output message is:The version of Souffle is
29c5921
.The text was updated successfully, but these errors were encountered: