Skip to content

compiler: Fix ComponentAccess.dtype#2935

Merged
FabioLuporini merged 2 commits into
mainfrom
wdr-restart
May 20, 2026
Merged

compiler: Fix ComponentAccess.dtype#2935
FabioLuporini merged 2 commits into
mainfrom
wdr-restart

Conversation

@FabioLuporini
Copy link
Copy Markdown
Contributor

... also a minor addition to archinfo.Device

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.32%. Comparing base (e7890ce) to head (166f4e1).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
devito/types/array.py 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2935      +/-   ##
==========================================
+ Coverage   83.30%   83.32%   +0.01%     
==========================================
  Files         248      248              
  Lines       51769    51782      +13     
  Branches     4465     4466       +1     
==========================================
+ Hits        43127    43148      +21     
+ Misses       7890     7882       -8     
  Partials      752      752              
Flag Coverage Δ
pytest-gpu-aomp-amdgpuX 68.67% <40.00%> (-0.03%) ⬇️
pytest-gpu-gcc- 78.03% <86.66%> (+0.02%) ⬆️
pytest-gpu-icx- 77.93% <86.66%> (+<0.01%) ⬆️
pytest-gpu-nvc-nvidiaX 69.22% <40.00%> (-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.

Copy link
Copy Markdown
Contributor

@EdCaunt EdCaunt left a comment

Choose a reason for hiding this comment

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

Seems reasonable? What exact issue was this addressing?

Comment thread tests/test_symbolics.py
acc = dSymbol(name='acc', dtype=dtypes_vector_mapper[(np.float32, 4)])
expr = ComponentAccess(acc, 0)

assert ccode(sympy.Float('1.25')*expr, dtype=expr.dtype) == '1.250F*acc.x'
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.

Using sympy.Float is a bit odd here, would expect a numpy number (np.float32(1.25)) to reflect the likely practical case

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.

just 1.25 suffices, I'll fix this in an upcoming PR

Copy link
Copy Markdown
Contributor

@mloubout mloubout left a comment

Choose a reason for hiding this comment

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

Minor comment on the test, gtg

@FabioLuporini
Copy link
Copy Markdown
Contributor Author

@EdCaunt

Seems reasonable? What exact issue was this addressing?

dtype of scalar float4 variables

@FabioLuporini FabioLuporini merged commit 68e2f74 into main May 20, 2026
42 checks passed
@FabioLuporini FabioLuporini deleted the wdr-restart branch May 20, 2026 08:02
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