Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL][Graph] Fix clang build #242

Merged
merged 1 commit into from
Jun 27, 2023
Merged

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
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
1 check passed
EwanC added 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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Graph Implementation Related to DPC++ implementation and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants