Repository navigation
compiler: Fix performance profiling of busy-waits - #3055
Conversation
| if size == 1: | ||
| continue | ||
| if v.is_double_buffering: | ||
| # E.g., `f[time] = b[t0]` must become `b1[t0] = b[t0]` |
There was a problem hiding this comment.
actually this is a bug fix (tested both here and in PRO)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3055 +/- ##
==========================================
+ Coverage 84.15% 84.25% +0.10%
==========================================
Files 258 258
Lines 57267 57398 +131
Branches 4893 4911 +18
==========================================
+ Hits 48191 48361 +170
+ Misses 8249 8211 -38
+ Partials 827 826 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bd1fd36 to
ea8fc74
Compare
8d1a1fa to
d07489c
Compare
Select compute_100a/sm_100a in CudaCompiler for detected SM100 devices. Use explicit Blackwell as the SM100 fallback when device detection is unavailable, and preserve other detected targets. Explicit gencode avoids the generic compute_100 PTX fallback generated by -arch=sm_100a, which rejects architecture-specific instructions such as tcgen05. Target selection no longer needs a downstream pass override. Add hardware-independent coverage of native fallback, older GPUs, SM100, and other Blackwell targets.
Reuse the first buffer's slot indices when inserting further buffering levels, including initialization outside the time loop. Preserve physical irregular-buffer slots in copy-in masks and flatten transfers using their allocated stride independently of the transferred payload size. Add a subsampled multilevel buffering regression for degrees 1, 2 and 4.
The lock and flag an asynchronous task synchronises on are plain volatile ints. The fences added for them order nothing on their own: a release fence pairs with an acquire fence only through atomic accesses, so a weakly ordered CPU may e.g. see a lock released before the data it guards. Access every lock and flag with __atomic acquire loads and release stores, which are valid in C and C++ and need no declaration change, and drop the now redundant ThreadFence.
d07489c to
b494165
Compare
| iet, _ = super()._make_waitlock(iet, sync_ops, *args) | ||
| waitloop, *body = iet.body | ||
|
|
||
| # NVHPC 25.7 miscompiles tiled loops following an inline atomic wait |
There was a problem hiding this comment.
Is this documented anywhere? Perhaps a link to said documentation wouldn't go amiss?
There was a problem hiding this comment.
what documentation? it's an actual NVC compiler bug, like several we had to workaround in the past..
| flag = FieldFromComposite(sdata.symbolic_flag, sdata[d]) | ||
| condition = CondNe(atomic_load(flag), 1) |
There was a problem hiding this comment.
Hoist outside the if block?
| (BLACKWELL, 103, '-arch=sm_103'), | ||
| (BLACKWELL, 120, '-arch=sm_120') | ||
| ]) | ||
| def test_cuda_target(monkeypatch, platform, cc, target): |
There was a problem hiding this comment.
Is there a better approach than using monkeypatching?
There was a problem hiding this comment.
in general probably yes, in this specific case I'm not so sure tbf
No description provided.