compiler: Enhance IR to support more advanced parlang (CUDA/HIP/SYCL) features#2708
compiler: Enhance IR to support more advanced parlang (CUDA/HIP/SYCL) features#2708FabioLuporini wants to merge 10 commits intomainfrom
Conversation
| }""" | ||
|
|
||
|
|
||
| def test_make_cuda_tensor_map(): |
There was a problem hiding this comment.
Note: this test is exciting many of the changes in this PR. More tests in the accompanying PRO PR
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2708 +/- ##
=======================================
Coverage ? 92.10%
=======================================
Files ? 248
Lines ? 49705
Branches ? 4370
=======================================
Hits ? 45781
Misses ? 3215
Partials ? 709
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| @@ -158,10 +172,10 @@ def _(expr, c, ispace, weights, reusables, mapper, **kwargs): | |||
| # NOTE: created before recurring so that we ultimately get a sound ordering | |||
There was a problem hiding this comment.
"recurring" -> "recursing"?
|
|
||
| def test_make_cuda_tensor_map(): | ||
|
|
||
| class CUTensorMap(FunctionMap): |
There was a problem hiding this comment.
Is it worth obfuscating this somewhat by changing names of things etc? Probably makes the test less useful though
There was a problem hiding this comment.
not sure, tbf, if one goes at this length, understanding how this was done in Python is the least of all possible concerns
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
At least np.float32
Is this guaranteed somehow?
There was a problem hiding this comment.
yes, w0.dtype basically
| the compiler generates code for passing the parameter and how the | ||
| runtime accesses it. | ||
| """ | ||
| _C_tag = None |
There was a problem hiding this comment.
this is something pro specific?
There was a problem hiding this comment.
used by PRO yes
|
Unfortunately I have to close this , and replace it with a somewhat bigger PR |
No description provided.