[SYCL][Graph] Fix clang build#242
Conversation
Fix some build errors I've seen with clang-17 after #238 was merged. 1) Arithmitic on void pointer, fixed by passing a `char*` rather than `void*` when an offset is needed ``` /home/ewan/Development/dpcpp/sycl/source/detail/memory_manager.cpp:1316:44: error: arithmetic on a pointer to void 1316 | SrcAccessRangeWidthBytes, DstMem + DstXOffBytes, Deps.size(), | ~~~~~~ ^ /home/ewan/Development/dpcpp/sycl/source/detail/memory_manager.cpp:1372:44: error: arithmetic on a pointer to void 1372 | DstAccessRangeWidthBytes, SrcMem + SrcXOffBytes, Deps.size(), | ~~~~~~ ^ 2) Fixup use of `numEventsInWaitList` when should be `numSyncPointsInWaitList` /home/ewan/Development/dpcpp/sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_command_buffer.cpp:611:13: error: use of undeclared identifier 'numEventsInWaitList' 611 | size, numEventsInWaitList, pSyncPointWaitList, pSyncPoint); ```
mfrancepillois
left a comment
There was a problem hiding this comment.
LGTM.
Sorry for ur_level_zero_command_buffer.cpp. I don't understand how I missed this. I was pretty sure I compiled the project before doing my commit...
As for void*, that compiles (with a warning) in my environment.
No worries, I just happened to have a clang build handy as an DPC++ reviewer asked me to try compiling one of our upstream patches with it. I would normally use GCC, and i'm suspicious that our e2e tests don't actually run using clang, but that's a separate issue to be investigated. |
Fix some build errors I've seen with clang-17 after #238 was merged. 1) Arithmitic on void pointer, fixed by passing a `char*` rather than `void*` when an offset is needed ``` /home/ewan/Development/dpcpp/sycl/source/detail/memory_manager.cpp:1316:44: error: arithmetic on a pointer to void 1316 | SrcAccessRangeWidthBytes, DstMem + DstXOffBytes, Deps.size(), | ~~~~~~ ^ /home/ewan/Development/dpcpp/sycl/source/detail/memory_manager.cpp:1372:44: error: arithmetic on a pointer to void 1372 | DstAccessRangeWidthBytes, SrcMem + SrcXOffBytes, Deps.size(), | ~~~~~~ ^ 2) Fixup use of `numEventsInWaitList` when should be `numSyncPointsInWaitList` /home/ewan/Development/dpcpp/sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_command_buffer.cpp:611:13: error: use of undeclared identifier 'numEventsInWaitList' 611 | size, numEventsInWaitList, pSyncPointWaitList, pSyncPoint); ```
Fix some build errors I've seen with clang-17 after #238 was merged.
char*rather thanvoid*when an offset is needednumEventsInWaitListwhich should benumSyncPointsInWaitList