Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.

[SYCL][Graph] Fix clang build#242

Merged
EwanC merged 1 commit intosycl-graph-developfrom
ewan/fix_clang_build
Jun 27, 2023
Merged

[SYCL][Graph] Fix clang build#242
EwanC merged 1 commit intosycl-graph-developfrom
ewan/fix_clang_build

Conversation

@EwanC
Copy link
Collaborator

@EwanC EwanC commented Jun 27, 2023

Fix some build errors I've seen with clang-17 after #238 was merged.

  1. Arithmetic 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(),
      |
	  ~~~~~~ ^
  1. Fix-up use of numEventsInWaitList which 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.

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);
```
@EwanC EwanC added the Graph Implementation Related to DPC++ implementation and testing label Jun 27, 2023
@EwanC EwanC requested a review from mfrancepillois June 27, 2023 14:35
Copy link
Collaborator

@mfrancepillois mfrancepillois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@EwanC
Copy link
Collaborator Author

EwanC commented Jun 27, 2023

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.

@EwanC EwanC merged commit 66c696c into sycl-graph-develop Jun 27, 2023
EwanC pushed a commit that referenced this pull request Jun 29, 2023
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);
```
@Bensuo Bensuo deleted the ewan/fix_clang_build branch August 7, 2023 16:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Graph Implementation Related to DPC++ implementation and testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants