Skip to content

Conversation

@FabioLuporini
Copy link
Contributor

We need to use the runtime overrides

@codecov
Copy link

codecov bot commented Jul 2, 2025

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 92.01%. Comparing base (cd9058b) to head (7b217d2).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
devito/operator/operator.py 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2654       +/-   ##
===========================================
+ Coverage   78.59%   92.01%   +13.41%     
===========================================
  Files         245      245               
  Lines       49089    49093        +4     
  Branches     4322     4322               
===========================================
+ Hits        38582    45173     +6591     
+ Misses       9714     3217     -6497     
+ Partials      793      703       -90     
Flag Coverage Δ
pytest-gpu-aomp-amdgpuX 72.51% <0.00%> (?)
pytest-gpu-nvc-nvidiaX 73.57% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@EdCaunt EdCaunt force-pushed the hotfix-nbytes-avail-map branch from 98a14a4 to 792fbd8 Compare July 22, 2025 10:06
@ggorman ggorman requested a review from Copilot July 24, 2025 09:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the nbytes_avail_mapper method to properly use runtime overrides when calculating memory usage for memory-mapped objects. The change ensures that the actual runtime object's nbytes value is used instead of the default value when available.

  • Updates memory calculation logic to check for runtime object properties first
  • Adds fallback handling when runtime object doesn't have nbytes attribute
Comments suppressed due to low confidence (1)

devito/operator/operator.py:1308

  • The variable name 'v' is not descriptive. Consider using a more meaningful name like 'nbytes_value' or 'actual_nbytes' to improve code readability.
                            v = self[i.name]._obj.nbytes

@EdCaunt EdCaunt force-pushed the hotfix-nbytes-avail-map branch from 792fbd8 to 7b217d2 Compare July 24, 2025 15:40
@mloubout mloubout merged commit 217a3af into main Jul 24, 2025
36 checks passed
@mloubout mloubout deleted the hotfix-nbytes-avail-map branch July 24, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants