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

Commit 284c61b

Browse files
authored
[SYCL] Remove testing of handler::copy with atomic accessors (#126)
The handler::copy() method was enabled for dst/src accessors with atomic mode by mistake. The atomic mode is not allowed for explicity copy method of handler class. Signed-off-by: Vyacheslav N Klochkov <[email protected]>
1 parent 5d1327f commit 284c61b

File tree

1 file changed

+0
-60
lines changed

1 file changed

+0
-60
lines changed

SYCL/Basic/handler/handler_mem_op.cpp

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ template <typename T> void test_update_host();
4747
template <typename T> void test_2D_copy_acc_acc();
4848
template <typename T> void test_3D_copy_acc_acc();
4949
template <typename T> void test_0D1D_copy_acc_acc();
50-
template <typename T> void test_0D1D_copy_acc_acc_atomic();
5150
template <typename T> void test_1D2D_copy_acc_acc();
5251
template <typename T> void test_1D3D_copy_acc_acc();
5352
template <typename T> void test_2D1D_copy_acc_acc();
@@ -165,12 +164,6 @@ int main() {
165164
test_0D1D_copy_acc_acc<point<float>>();
166165
}
167166

168-
// handler.copy(acc, acc) 0D to/from 1D where one/both acc are atomic
169-
{
170-
test_0D1D_copy_acc_acc_atomic<int>();
171-
test_0D1D_copy_acc_acc_atomic<float>();
172-
}
173-
174167
// handler.copy(acc, acc) 1D to 2D
175168
{
176169
test_1D2D_copy_acc_acc<int>();
@@ -636,59 +629,6 @@ template <typename T> void test_0D1D_copy_acc_acc() {
636629
assert(Dst == 7);
637630
}
638631

639-
template <typename T> void test_0D1D_copy_acc_acc_atomic() {
640-
// Copy 1 element from 0-dim ATOMIC accessor to 1-dim accessor
641-
T Src = T(1);
642-
T Dst = T(0);
643-
{
644-
buffer<T, 1> BufferFrom(&Src, range<1>(1));
645-
buffer<T, 1> BufferTo(&Dst, range<1>(1));
646-
queue Queue;
647-
Queue.submit([&](handler &Cgh) {
648-
accessor<T, 0, access::mode::atomic, access::target::global_buffer>
649-
AccessorFrom(BufferFrom, Cgh);
650-
accessor<T, 1, access::mode::write, access::target::global_buffer>
651-
AccessorTo(BufferTo, Cgh);
652-
Cgh.copy(AccessorFrom, AccessorTo);
653-
});
654-
}
655-
assert(Dst == 1);
656-
657-
// Copy 1 element from 1-dim ATOMIC accessor to 0-dim accessor
658-
Src = T(3);
659-
Dst = T(0);
660-
{
661-
buffer<T, 1> BufferFrom(&Src, range<1>(1));
662-
buffer<T, 1> BufferTo(&Dst, range<1>(1));
663-
queue Queue;
664-
Queue.submit([&](handler &Cgh) {
665-
accessor<T, 1, access::mode::atomic, access::target::global_buffer>
666-
AccessorFrom(BufferFrom, Cgh);
667-
accessor<T, 0, access::mode::write, access::target::global_buffer>
668-
AccessorTo(BufferTo, Cgh);
669-
Cgh.copy(AccessorFrom, AccessorTo);
670-
});
671-
}
672-
assert(Dst == 3);
673-
674-
// Copy 1 element from 0-dim ATOMIC accessor to 0-dim ATOMIC accessor
675-
Src = T(7);
676-
Dst = T(0);
677-
{
678-
buffer<T, 1> BufferFrom(&Src, range<1>(1));
679-
buffer<T, 1> BufferTo(&Dst, range<1>(1));
680-
queue Queue;
681-
Queue.submit([&](handler &Cgh) {
682-
accessor<T, 0, access::mode::atomic, access::target::global_buffer>
683-
AccessorFrom(BufferFrom, Cgh);
684-
accessor<T, 0, access::mode::atomic, access::target::global_buffer>
685-
AccessorTo(BufferTo, Cgh);
686-
Cgh.copy(AccessorFrom, AccessorTo);
687-
});
688-
}
689-
assert(Dst == 7);
690-
}
691-
692632
template <typename T> void test_1D2D_copy_acc_acc() {
693633
const size_t Size = 20;
694634
std::vector<T> Data(Size);

0 commit comments

Comments
 (0)