-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL][NFC] Code cleanup revealed by self-build. #3230
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
Conversation
2534628
to
15496e2
Compare
I'm not sure about llvm/* changes. These are source code, which we use as-is from the llvm/llvm-project, so I think it would be better to fix these issue there to avoid merge conflicts. I'd like to hear from Andy about the right way to handle issues like this. |
@bader You mean they should be put into llorg? |
15496e2
to
a7f001b
Compare
I think so. |
Can you provide more information on what the LLVM changes are fixing? I thought the llvm.org code was kept warning clean. I agree that it would be much better to make the changes in llvm.org, but without know the error they're addressing I'm not sure these changes are correct. There's another symbol, LLVM_ENABLE_DUMP, that is independent of NDEBUG. A common guard is "#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)", but I don't understand why exclusion is needed at all in these cases. |
@andykaylor All the errors happened during release build with "unused variable/reference". |
|
a7f001b
to
97361af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -4797,6 +4797,8 @@ enqueueMemImageCommandHelper(pi_command_type CommandType, pi_queue Queue, | |||
|
|||
// TODO: Level Zero does not support row_pitch/slice_pitch for images yet. | |||
// Check that SYCL RT did not want pitch larger than default. | |||
(void)RowPitch; | |||
(void)SlicePitch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you do not use these variables, why not... removing them? :-)
Such as having in the function definition just:
size_t /* RowPitch */, size_t /* SlicePitch */,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are used below inside the ASSERT, inside the DEBUG flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. So probably your change is adequate.
I guess it will be ugly to add the name in the function definition according to the value of NDEBUG
... :-)
@@ -112,6 +112,9 @@ void *MemoryManager::allocateInteropMemObject( | |||
ContextImplPtr TargetContext, void *UserPtr, | |||
const EventImplPtr &InteropEvent, const ContextImplPtr &InteropContext, | |||
const sycl::property_list &, RT::PiEvent &OutEventToWait) { | |||
(void)TargetContext; | |||
(void)UserPtr; | |||
(void)InteropContext; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You were right about UserPtr. Thanks.
97361af
to
6e4ec79
Compare
Review please! Thanks. |
No description provided.