-
Notifications
You must be signed in to change notification settings - Fork 798
[SYCL] Change uint to uint32_t to avoid build error on Windows #131
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
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.
sycl/include/CL/sycl/types.hpp also contains uint:
sycl/include/CL/sycl/types.hpp:1881:DECLARE_SYCL_VEC(uint)
and sycl/test/basic_tests/types.cpp also have:
sycl/test/basic_tests/types.cpp:48: CHECK_TYPE(uint);
and sycl/test/sub_group/sg.cl:
sycl/test/sub_group/sg.cl:10: uint local_id;
sycl/test/sub_group/sg.cl:11: uint local_range;
sycl/test/sub_group/sg.cl:12: uint max_local_range;
sycl/test/sub_group/sg.cl:13: uint group_id;
sycl/test/sub_group/sg.cl:14: uint group_range;
sycl/test/sub_group/sg.cl:15: uint uniform_group_range;
sycl/test/sub_group/sg.cl:18: uint id = get_global_id(0);
and sycl/test/struct_param/struct_kernel_param.cpp:
sycl/test/struct_param/struct_kernel_param.cpp:87: uint ice2 = 888;
sycl/test/struct_param/struct_kernel_param.cpp:88: uint result[4] = {0};
I guess we will have failures for compilation on windows as well
Vladimir, those other places where uint is used do not cause any errors on Windows. |
Could you explain why we have warning in one place and do not have in the other for the similar code? |
Errors, not warnings. It is rather the matter of taste here (cl::sycl::uint vs uint32_t). |
Thank you for clarification. LGTM. |
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 fixed only forward declarations, but not definitions.
Are they use something different from uint
?
@@ -92,7 +92,7 @@ void ExecuteKernelCommand< | |||
} | |||
|
|||
if (m_KernelArgs != nullptr) { | |||
unsigned ArgumentID = 0; | |||
uint32_t ArgumentID = 0; |
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.
This change seems to be unrelated to the fix.
Suggest reverting.
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.
This change IS related to the fix.
The fix changed the 1st argument of passGlobalAccessorAsArg() and passLocalAccessorAsArg from uint to uint32_t and ArgumentID is passed to there.
BTW, your comment helped me to find couple places where I did not move the patch properly from WIndows (where it was complete) to Linux (where I also tested the patch and from where uploaded fix for review). Those 2 places are fixed now (changed uint to uint32_t there).
dc59a07
to
69f75f0
Compare
@@ -408,11 +408,11 @@ template <int DimSrc, int DimDest> class CopyCommand : public Command { | |||
// accessor in lambda function. 'ClKernel' is the kernel. 'HostKernel' | |||
// is the pointer to the lambda function. | |||
template <int AccessDimensions, typename KernelType> | |||
uint passGlobalAccessorAsArg(uint I, int LambdaOffset, cl_kernel ClKernel, | |||
const KernelType &HostKernel); | |||
uint32_t passGlobalAccessorAsArg(uint I, int LambdaOffset, cl_kernel ClKernel, |
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.
Are you going to replace uint I
?
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.
Yes, thank you. Sorry, I did 'git commit' without doing 'git add', that is why uint -> uint32_t for this parameter 'I' was not updated here 20 minutes ago. It is fixed now.
Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
69f75f0
to
77a8a52
Compare
CONFLICT (content): Merge conflict in clang/lib/CodeGen/CGLoopInfo.cpp
Signed-off-by: Vyacheslav N Klochkov vyacheslav.n.klochkov@intel.com