Validate native D3D12 HIP interop and isolate Windows mapped-view leak
This commit is contained in:
1 parent
e95e061e81
commit
239a644270
11 files changed
+561
-18
No files matched your search
@@ -7,3 +7,15 @@ extern "C" __attribute__((global)) void d4r_probe_pattern(
|
||||
if (i < count)
|
||||
output[i] = (i * 1664525u + seed) ^ 0xa5a55a5au;
|
||||
}
|
||||
|
||||
extern "C" __attribute__((global)) void d4r_probe_interop(
|
||||
unsigned int* shared, unsigned int count, unsigned int seed, unsigned int* errors)
|
||||
{
|
||||
const unsigned int i = __builtin_amdgcn_workgroup_id_x() * 128u +
|
||||
__builtin_amdgcn_workitem_id_x();
|
||||
if (i < count) {
|
||||
const unsigned int expected = (i * 1664525u + seed) ^ 0xa5a55a5au;
|
||||
if (shared[i] != expected) __atomic_fetch_add(errors, 1u, __ATOMIC_RELAXED);
|
||||
shared[i] ^= 0x3579bdf1u;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user