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

Dequalify names when constructing RVars in rfactor #8560

Merged
merged 3 commits into from
Jan 29, 2025

Conversation

alexreinking
Copy link
Member

This PR fixes a very frustrating bug that arises from treating a Dim name as a valid RVar name. In this particular case, everything appears to work until we serialize the schedule in an autoscheduler. Managing renaming mars some of the elegance of the new rfactor implementation, which I find sad. I think a "perfect" solution would lift naming restrictions rather than lean into them.

Adding Rename splits is not a solution for the reasons documented in #8557.

Includes two drive-by fixes for compiler warnings I noticed while building.

Fixes #8557

alexreinking and others added 3 commits January 27, 2025 23:03
GCC complains about certain warning flags being passed to C sources.
This will break -Werror builds. The flags in question are:

  * -Woverloaded-virtual
  * -Wsuggest-override
  * -Wno-old-style-cast
In pybind/pybind11#4772, the py::exception<>::operator() functions were
deprecated because the static destructor could run after interpreter
finalization and lead to undefined behavior.

The old code has been modified to use PyErr_SetString directly, which
also avoids lifetime issues.
@alexreinking alexreinking requested a review from abadams January 28, 2025 04:11
for (const auto &[var, min, extent] : intermediate_rdom.domain()) {
for (size_t i = 0; i < intermediate_rdom.domain().size(); i++) {
const auto &var = intermediate_rdims[i].var;
const auto &[_, min, extent] = intermediate_rdom.domain()[i];
Copy link
Member

Choose a reason for hiding this comment

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

The underscore here... Is that not the var name? Could this just be:

            const auto &[var, min, extent] = intermediate_rdom.domain()[i];

Or is the name not dequalified yet or something

Copy link
Member Author

Choose a reason for hiding this comment

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

The rdims list contains the old name while the rdom has the new (dequalified) names. The expressions in the predicates will refer to the old names.

@alexreinking alexreinking merged commit 9500c05 into main Jan 29, 2025
17 checks passed
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.

rfactored split rvars have qualified names
2 participants