-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fixing index & type errors in prime_offload_tester.py (Bugfix) #1588
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1588 +/- ##
=======================================
Coverage 48.00% 48.00%
=======================================
Files 371 371
Lines 39833 39837 +4
Branches 6730 6730
=======================================
+ Hits 19121 19125 +4
Misses 19994 19994
Partials 718 718
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
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.
LGTM
…ical#1588) * fix: make annotations compatible with py 3.5 * fix: non-null assertions, comments * fix: root check * fix: only the letter 'g' was used in offloading to specific gpu test * style: less brackets * fix: update unit tests to reflect the changes
Description
This PR fixes the issue in the Resolved Issues section and replaced some type annotations with ones supported in python 3.5
Resolved issues
If
prime_offload_tester.py
was run with arguments likepython3 prime_offload_tester.py -d i915 -p 0000:00:02.0
and the command to check isglxgears
, the test always passes because it was checking if"glxgears"[0]
is one of the clients of this GPU. Since"glxgears"[0] == 'g'
, it always matches the g in "tgid" in/sys/kernel/debug/dri/<card_pci_id>/clients
.Now it will check if the entire string "glxgears" appears in the file
Documentation
Tests
Unit tests
Ran the script on 202408-34290 with
-d i915 -p 0000:00:02.0
(Intel + NVIDIA desktop, expected to fail) and it correctly reports that prime offload didn't work