FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

compiler: Enhance detect_accesses and patch symbolic padding by FabioLuporini · Pull Request #2886 · devitocodes/devito · GitHub

compiler: Enhance detect_accesses and patch symbolic padding - #2886

Merged
FabioLuporini merged 2 commits into
mainfrom
tma-write
Apr 16, 2026
Merged

compiler: Enhance detect_accesses and patch symbolic padding#2886
FabioLuporini merged 2 commits into
mainfrom
tma-write

Conversation

Copy link
Copy Markdown
Contributor

Test in PRO in the PR/branch with same name as this one

codecov Bot commented Apr 15, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.57895% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.47%. Comparing base (bd39274) to head (fc4c548).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
devito/types/parallel.py 66.66% 7 Missing ⚠️
devito/symbolics/extended_sympy.py 95.83% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2886      +/-   ##
==========================================
+ Coverage   83.43%   83.47%   +0.03%     
==========================================
  Files         248      248              
  Lines       51381    51471      +90     
  Branches     4431     4433       +2     
==========================================
+ Hits        42871    42964      +93     
+ Misses       7757     7756       -1     
+ Partials      753      751       -2     
Flag Coverage Δ
pytest-gpu-aomp-amdgpuX 68.80% <69.35%> (-0.01%) ⬇️
pytest-gpu-gcc- 78.08% <91.57%> (+0.03%) ⬆️
pytest-gpu-icx- 77.69% <91.57%> (+0.02%) ⬆️
pytest-gpu-nvc-nvidiaX 69.32% <69.35%> (-0.01%) ⬇️

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.

# Search among the Indexeds (Most accesses typically stem from Indexeds)
plain_indexeds = retrieve_indexed(exprs, deep=True)

# Search among higher order objects, which still represent meaningful accesses

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This look very specific and seems like that's something retrieve_index should catch

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

the idea is that other objects can end up there, in the future, maybe...

as for retrieve_indexed catching it: disagree, it's not an implicit Indexed, it's rarther a logical representation of the base address of the TensorMove -- as an Indexed, for homogeneity

FabioLuporini changed the title compiler: Enhance detect_accesses compiler: Enhance detect_accesses and patch padding Apr 16, 2026
FabioLuporini changed the title compiler: Enhance detect_accesses and patch padding compiler: Enhance detect_accesses and patch symbolic padding Apr 16, 2026
Comment thread devito/symbolics/extended_sympy.py Outdated
value = sympify(value)
step = sympify(step)

if step == 0:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Would if step < 1 be safer? Prevents a negative number being supplied

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

fair, yes, I will add that. Will also ensure it's an integer

Comment thread devito/types/basic.py
# Already a multiple of `mmts`, no need to pad
return nopadding
else:
from devito.symbolics import RoundUp # noqa

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Maybe implies that extended_sympy should be moved somewhere else?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

yes, it's a long standing issue, documented somewhere

Comment thread tests/test_symbolics.py
u = Function(name='u', grid=grid)
a = dSymbol('a', dtype=np.int32)

expr = RoundUp(a, 16)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Can the round up factor also be symbolic?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

not sure, I cooked up something simple for my needs after days of frustration

FabioLuporini Apr 16, 2026
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

see comment above -- now ensuring it's an integer number

Comment thread tests/test_symbolics.py
a = dSymbol('a', dtype=np.int32)

expr = RoundUp(a, 16)
with switchconfig(platform='bdw', language='openmp'):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

'bdw' is oddly specific

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

stupid AI, will patch in the next PR


if step < 1:
raise ValueError("Cannot round up with negative `step`")
if not is_integer(step):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I would check it's an integer before checking it's greater than zero, but whatever

FabioLuporini merged commit cc4fe0d into main Apr 16, 2026
42 checks passed
FabioLuporini deleted the tma-write branch April 16, 2026 15:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL