Skip to content

Commit 32f957c

Browse files
author
Hugh Delaney
committed
Update test
Add a comment describing what test4 does and change assert(0) to exit(1) in check helper and also fix clang-format
1 parent 2a05505 commit 32f957c

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

sycl/source/detail/buffer_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ buffer_impl::getNativeVector(backend BackendName) const {
8484
}
8585

8686
pi_native_handle Handle;
87-
Plugin->call<PiApiKind::piextMemGetNativeHandle>(NativeMem, /*Dev*/nullptr,
87+
Plugin->call<PiApiKind::piextMemGetNativeHandle>(NativeMem, /*Dev*/ nullptr,
8888
&Handle);
8989
Handles.push_back(Handle);
9090
}

sycl/source/detail/memory_manager.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ void memBufferCreateHelper(const PluginPtr &Plugin, pi_context Ctx,
144144
// Always use call_nocheck here, because call may throw an exception,
145145
// and this lambda will be called from destructor, which in combination
146146
// rewards us with UB.
147-
Plugin->call_nocheck<PiApiKind::piextMemGetNativeHandle>(*RetMem, /*Dev*/nullptr,
148-
&Ptr);
147+
Plugin->call_nocheck<PiApiKind::piextMemGetNativeHandle>(
148+
*RetMem, /*Dev*/ nullptr, &Ptr);
149149
emitMemAllocEndTrace(MemObjID, (uintptr_t)(Ptr), Size, 0 /* guard zone */,
150150
CorrID);
151151
}};
@@ -168,7 +168,8 @@ void memReleaseHelper(const PluginPtr &Plugin, pi_mem Mem) {
168168
// Do not make unnecessary PI calls without instrumentation enabled
169169
if (xptiTraceEnabled()) {
170170
pi_native_handle PtrHandle = 0;
171-
Plugin->call<PiApiKind::piextMemGetNativeHandle>(Mem, /*Dev*/nullptr, &PtrHandle);
171+
Plugin->call<PiApiKind::piextMemGetNativeHandle>(Mem, /*Dev*/ nullptr,
172+
&PtrHandle);
172173
Ptr = (uintptr_t)(PtrHandle);
173174
}
174175
#endif

sycl/test-e2e/HostInteropTask/interop-task-hip.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ void checkBufferValues(BufferT Buffer, ValueT Value) {
2626
for (size_t Idx = 0; Idx < Acc.get_count(); ++Idx) {
2727
if (Acc[Idx] != Value) {
2828
std::cerr << "buffer[" << Idx << "] = " << Acc[Idx]
29-
<< ", expected val = " << Value << '\n';
30-
assert(0 && "Invalid data in the buffer");
29+
<< ", expected val = " << Value << std::endl;
30+
exit(1);
3131
}
3232
}
3333
}
@@ -138,6 +138,8 @@ void test3(queue &Q) {
138138
});
139139
}
140140

141+
// Test that SYCL RT models dependencies correctly when composing host tasks
142+
// with a parallel_for
141143
void test4(queue &Q) {
142144
buffer<int, 1> Buffer1{BUFFER_SIZE};
143145
buffer<int, 1> Buffer2{BUFFER_SIZE};

0 commit comments

Comments
 (0)