-
Notifications
You must be signed in to change notification settings - Fork 64
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
Bugfix for auto transforms #604
Bugfix for auto transforms #604
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test for this, please? Similar to the one I added for prebuild?
scripts/suite_objects.py
Outdated
# Are there any varaible transforms for this scheme? | ||
# If so, change Var's local_name need to local dummy array containing | ||
# transformed argument, var_trans_local. | ||
if (sub_lname_list is not None) and len(sub_lname_list) > 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is sub_lname_list
a somewhat ordinary list in Python? If so, then
if sub_lname_list:
is equivalent to line 165
@climbfuji Thanks for the review. I will expand the var_compatibility_test to stress more of the edge cases that @peverwhee brought up. |
@@ -2477,6 +2556,14 @@ def write(self, outfile, host_arglist, indent, const_mod, | |||
self._phase_check_stmts.write(outfile, indent, | |||
{'errcode' : errcode, 'errmsg' : errmsg, | |||
'funcname' : self.name}) | |||
# Write any loop match calculations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was a bug. This needed to be need to BEFORE the allocation.
… feature/bugfix_for_autoconv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for tackling this @dustinswales - this seems like it was a whole rabbit hole! 🐰
a couple small things and a testing question
@peverwhee It turns out that the real problem was in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @dustinswales !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved
@gold2718 Would you like to review this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just typos, otherwise approved!
Personally, I think it's more informative if Scheme, Group, Host, Var , etc..., which are (case sensitive) python classes, be referenced in their native form when commenting on them. Happy to change if others disagree, but "Group" is distinct from "group" in this context. |
Ok, that's fine with me. The way I read the comments they looked like generic labels (a scheme, a group, ...) to me. Then let's just fix the type for compatibility please. |
Co-authored-by: Dom Heinzeller <dom.heinzeller@icloud.com>
@dustinswales The other two PRs have been merged, let me know when this one is updated with the latest changes. |
… feature/bugfix_for_autoconv
@mkavulich Updated. |
Sorry, been out of commission. Trying to catch up. |
Description
Modifications made to handle local variables needed for variables transforms at the Scheme level. Previously the Group would manage the local variable
Fixes #594
In response to the scenarios in #594:
Scenario 1
If a variable is used in two different schemes and:
The Error was replicated and fixed by removing a bugfix at line 941 in var_props.py.
Scenario 2
On the flip side, if:
Output
Generated code for scenario number 2 (where the correct units are used):
Testing
All Capgen tests pass.