-
Notifications
You must be signed in to change notification settings - Fork 116
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
[UR] Add adapter leak-checking tests #1029
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?
Done. |
e31605c
to
08fee15
Compare
Use the python match scripts in the future. |
I've looked into the |
e6b4224
to
f7c65e1
Compare
I've added the |
f7c65e1
to
8c51b46
Compare
8c51b46
to
c235b5c
Compare
c235b5c
to
8f2502d
Compare
|
||
if len(match_lines) != len(input_lines): | ||
sys.exit(f"Line count doesn't match (is: {len(input_lines)}, expected: {len(match_lines)})") | ||
def print_incorrect_match(match_line, present, expected): |
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.
brief?:P
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.
Done.
cmake/match.py
Outdated
match_idx = 0 | ||
tags_in_effect = [] | ||
status = Status.PROCESSING | ||
while status == Status.PROCESSING: |
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.
this doesn't seem necessary, this condition will never be false as far as I can tell. You can just do a while True: loop and check status at the end (and exit appropriately).
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've moved the status variable inside the loop and changed the loop condition.
If I were to move the status check at the end, then I would need to check if either input or match file are empty to avoid index error. Logger has such test where both input and match files are empty.
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.
Also, the match case statement (switch equivalent) is not available in our current supported python version.
|
||
match_line = match_lines[match_idx] | ||
if match_line.startswith(Tag.OPT.value): | ||
tags_in_effect.append(Tag.OPT) |
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.
doesn't seem like there can be more than one active tag?
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.
In the case below, there would be a point when ignore tag (active until the next match) is applied, then the optional tag (active until the next line) is applied next.
{{IGNORE}}
{{OPT}} optional line
I don't think we can merge this is as, it will lead to conflicts with the adapters branch. This patch needs to be rebased on adapters or wait until the branches are merged. |
8f2502d
to
338bca3
Compare
Alright, I can wait for the adapters branch to be merged with main. |
338bca3
to
96219d8
Compare
96219d8
to
2a4d4d6
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1029 +/- ##
==========================================
+ Coverage 15.73% 15.80% +0.06%
==========================================
Files 223 223
Lines 31478 31481 +3
Branches 3558 3558
==========================================
+ Hits 4954 4976 +22
+ Misses 26473 26454 -19
Partials 51 51 ☔ View full report in Codecov by Sentry. |
2a4d4d6
to
da0aab2
Compare
f63e9a3
to
c5d95af
Compare
this does not appear to be changing anything but tests? |
56790be
to
591db37
Compare
The adapter refcount fix was merged on the adapters branch (#1150) and is now present on the main. |
Sounds good @kswiecicki! I'm also working on resolving the issue I found in the test fixtures. |
Since 5dc6e46 CTS tests which execute kernels have been failing to create programs. This has been hidden due to the match files containing expected failures in combination with an bug in the match file script found while debugging oneapi-src#1029 check failures. This patch adds `uur::KernelsEnvironment::CreateProgram()` which automatically handles the differences between the HIP adapter and others. On the hip path `urProgramCreateWithIL` is not longer called because it is not supported by the adatper and `urProgramCreateWithBinary` is used instead. The non-HIP path continues to use `urProgramCreateWithIL`.
1011a06
to
b7f9af9
Compare
0a702ea
to
237c23b
Compare
237c23b
to
7eb95a3
Compare
f6871e1
to
5551790
Compare
88ecbf0
to
cc66c29
Compare
cc66c29
to
e734fbc
Compare
When tests are aborted or failed at the assertion, the match script receives "Aborted" or "Segmentation fault" as an input and compares it with the match file. Previous match script allowed those tests to pass despite not matching this input.
e734fbc
to
8c63208
Compare
No description provided.