SYCL: support 0-dim acc in handler::copy(accessor, accessor)#1551
SYCL: support 0-dim acc in handler::copy(accessor, accessor)#1551bader merged 1 commit intointel:syclfrom
Conversation
|
@v-klochkov Please apply clang-format to the patch. You can find usefule artifacts in deails of clang-format-check job details. |
c69dac4 to
8b33aaa
Compare
|
@s-kanaev I gave some honor to clang-format and added few additional/recommended changes. |
|
@romanovvlad Thank you for the quick initial review. |
8b33aaa to
8bfe7eb
Compare
sycl/include/CL/sycl/handler.hpp
Outdated
There was a problem hiding this comment.
Should we check here if DimSrc == DimDst?
There was a problem hiding this comment.
I don't know if it is correct to copy from 1D accessor to 3D. It is probably correct. So, that check is not needed.
In my patch I do not change any constraints.
My patch only separates the existing code to this routine to make it possible to copy to/from 0-dim accessor.
sycl/include/CL/sycl/handler.hpp
Outdated
There was a problem hiding this comment.
Could this conversion be converted to this?
| auto AtomicSrc = (atomic<T, access::address_space::global_space>)Src; | |
| atomic<T, access::address_space::global_space> AtomicSrc = Src; |
There was a problem hiding this comment.
Ok, I changed it that way.
sycl/include/CL/sycl/handler.hpp
Outdated
I believe you have to massage the code to make clang-format happy. |
8bfe7eb to
f82691c
Compare
I already applied clang-format per your request, and ignored format's recommendation in only 4 places in sake of better code readability. Did you read my reasoning above? |
romanovvlad
left a comment
There was a problem hiding this comment.
LGTM, but I would like @s-kanaev to approve as well.
I understand readability as a pretty good reason. The justification for my argument is that I'm not really sure that "Merge" button will be available with clang-format job failed. |
sycl/include/CL/sycl/handler.hpp
Outdated
There was a problem hiding this comment.
Shouldn't it be a reference to atomic?
There was a problem hiding this comment.
The accessor operator[] and operator() return a value, not a reference.
93 /* Available only when: accessMode == access::mode::atomic && dimensions ==
94 0 /
95 operator atomic<dataT, access::address_space::global_space> () const;
96
97 / Available only when: accessMode == access::mode::atomic && dimensions >
98 0 */
99 atomic<dataT, access::address_space::global_space> operator[](
100 id index) const;
Please clarify if I understood your comment incorrectly.
Did you think about adding & sign right before AtomicDst?
atomic<T, access::address_space::global_space> &AtomicDst = Dst;
If so it would be incorrect code, I think.
clang-format-check is not required so we should be able to merge even if it fails |
The reason to make this change is to make consistent formatting across the project, not to make "merge button available". @v-klochkov, if you think that our project should not accept changes proposed by clang-format, please suggest clang-format configuration file changes. It's much better approach than just break the guidelines followed by the community. |
I understand it pretty much. I have only translated mechanics or sequence of actions into plain English. |
f82691c to
6faf521
Compare
Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
6faf521 to
bc90862
Compare
Teaching clang-format to recognize the existing laconic/1-line style/format already used in file, 'clang-format' check did not have "Required" status, thus I thought there was some flexibility here. |
s-kanaev
left a comment
There was a problem hiding this comment.
The changes LGTM.
Might need some changes in config of clang-format, though.
…versioning * origin/sycl: [XPTI][Framework] Reference implementation of the Xpti framework to be used with instrumentation in SYCL (intel#1557) [SYCL] Initial ABI checks implementation (intel#1528) [SYCL] Support connection with multiple plugins (intel#1490) [SYCL] Add a new header file with the reduction class definition (intel#1558) [SYCL] Add test for SYCL kernels with accessor and spec constant (intel#1536) [SYCL][CUDA] Move interop tests (intel#1570) [Driver][SYCL] Remove COFF object format designator for Windows device compiles (intel#1574) [SYCL] Fix conflicting visibility attributes (intel#1571) [SYCL][DOC] Update the SYCL Runtime Interface document with design details (intel#680) [SYCL] Improve image accessors support on a host device (intel#1502) [SYCL] Make queue's non-USM event ownership temporary (intel#1561) [SYCL] Added support of rounding modes for non-host devices (intel#1463) [SYCL] SemaSYCL significant refactoring (intel#1517) [SYCL] Support 0-dim accessor in handler::copy(accessor, accessor) (intel#1551)
Accessors with atomic access mode were supported in handler::copy() by mistake in the patch (intel#1551). Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
Accessors with atomic access mode were supported in handler::copy() by mistake in the patch (#1551). Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
Signed-off-by: Vyacheslav N Klochkov vyacheslav.n.klochkov@intel.com