Skip to content

Commit

Permalink
Merge pull request oneapi-src#1997 from igchor/cts_kernel_test
Browse files Browse the repository at this point in the history
[CTS] Add test that submits kernelLaunch and USMMemcpy interchangeably
  • Loading branch information
pbalcer authored Sep 9, 2024
2 parents cded5d9 + e4de74f commit 76ef4d5
Show file tree
Hide file tree
Showing 7 changed files with 1,356 additions and 860 deletions.
1 change: 1 addition & 0 deletions test/conformance/device_code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ add_device_binary(${CMAKE_CURRENT_SOURCE_DIR}/fill_usm.cpp)
add_device_binary(${CMAKE_CURRENT_SOURCE_DIR}/foo.cpp)
add_device_binary(${CMAKE_CURRENT_SOURCE_DIR}/image_copy.cpp)
add_device_binary(${CMAKE_CURRENT_SOURCE_DIR}/inc.cpp)
add_device_binary(${CMAKE_CURRENT_SOURCE_DIR}/increment.cpp)
add_device_binary(${CMAKE_CURRENT_SOURCE_DIR}/mean.cpp)
add_device_binary(${CMAKE_CURRENT_SOURCE_DIR}/cpy_and_mult.cpp)
add_device_binary(${CMAKE_CURRENT_SOURCE_DIR}/cpy_and_mult_usm.cpp)
Expand Down
20 changes: 20 additions & 0 deletions test/conformance/device_code/increment.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (C) 2024 Intel Corporation
// Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
// See LICENSE.TXT
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <sycl/sycl.hpp>

int main() {

const size_t inputSize = 1;
sycl::queue sycl_queue;
uint32_t *inputArray = sycl::malloc_shared<uint32_t>(inputSize, sycl_queue);

sycl_queue.submit([&](sycl::handler &cgh) {
cgh.parallel_for<class IncrementBy1>(
sycl::range<1>(inputSize),
[=](sycl::id<1> itemID) { inputArray[itemID] += 1; });
});
return 0;
}
1 change: 1 addition & 0 deletions test/conformance/enqueue/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ add_conformance_test_with_kernels_environment(enqueue
urEnqueueEventsWait.cpp
urEnqueueEventsWaitWithBarrier.cpp
urEnqueueKernelLaunch.cpp
urEnqueueKernelLaunchAndMemcpyInOrder.cpp
urEnqueueMemBufferCopyRect.cpp
urEnqueueMemBufferCopy.cpp
urEnqueueMemBufferFill.cpp
Expand Down
1,717 changes: 859 additions & 858 deletions test/conformance/enqueue/enqueue_adapter_level_zero_v2.match

Large diffs are not rendered by default.

Loading

0 comments on commit 76ef4d5

Please sign in to comment.