Skip to content

compiler: Enhance IR to support more advanced parlang (CUDA/HIP/SYCL) features#2708

Closed
FabioLuporini wants to merge 10 commits intomainfrom
tma-on-queue-scatter-final
Closed

compiler: Enhance IR to support more advanced parlang (CUDA/HIP/SYCL) features#2708
FabioLuporini wants to merge 10 commits intomainfrom
tma-on-queue-scatter-final

Conversation

@FabioLuporini
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread tests/test_iet.py
}"""


def test_make_cuda_tensor_map():
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.

Note: this test is exciting many of the changes in this PR. More tests in the accompanying PRO PR

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 11, 2025

Codecov Report

❌ Patch coverage is 89.36170% with 10 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@cfc5a08). Learn more about missing BASE report.
⚠️ Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
devito/ir/cgen/printer.py 33.33% 4 Missing ⚠️
devito/passes/iet/definitions.py 72.72% 2 Missing and 1 partial ⚠️
devito/arch/archinfo.py 0.00% 2 Missing ⚠️
devito/symbolics/extended_sympy.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2708   +/-   ##
=======================================
  Coverage        ?   92.10%           
=======================================
  Files           ?      248           
  Lines           ?    49705           
  Branches        ?     4370           
=======================================
  Hits            ?    45781           
  Misses          ?     3215           
  Partials        ?      709           
Flag Coverage Δ
pytest-gpu-aomp-amdgpuX 71.06% <50.00%> (?)
pytest-gpu-nvc-nvidiaX 72.01% <50.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.

Comment thread devito/passes/clusters/derivatives.py
@@ -158,10 +172,10 @@ def _(expr, c, ispace, weights, reusables, mapper, **kwargs):
# NOTE: created before recurring so that we ultimately get a sound ordering
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.

"recurring" -> "recursing"?

Comment thread tests/test_iet.py

def test_make_cuda_tensor_map():

class CUTensorMap(FunctionMap):
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.

Is it worth obfuscating this somewhat by changing names of things etc? Probably makes the test less useful though

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.

not sure, tbf, if one goes at this length, understanding how this was done in Python is the least of all possible concerns

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.

Yeah, true. I almost didn't bother with this comment, but figured it was worth asking

w = weights[k]
except KeyError:
name = sregistry.make_name(prefix='w')
dtype = infer_dtype([w0.dtype, c.dtype]) # At least np.float32
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.

At least np.float32

Is this guaranteed somehow?

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.

yes, w0.dtype basically

Comment thread devito/types/basic.py
the compiler generates code for passing the parameter and how the
runtime accesses it.
"""
_C_tag = None
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.

this is something pro 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.

used by PRO yes

@FabioLuporini
Copy link
Copy Markdown
Contributor Author

Unfortunately I have to close this , and replace it with a somewhat bigger PR

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.

4 participants