This repository was archived by the owner on Mar 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +36
-4
lines changed Expand file tree Collapse file tree 3 files changed +36
-4
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2
+ // RUN: %CPU_RUN_PLACEHOLDER %t.out
3
+ // RUN: %GPU_RUN_PLACEHOLDER %t.out
4
+ // RUN: %ACC_RUN_PLACEHOLDER %t.out
5
+ // REQUIRES: linux
6
+
7
+ #include < sycl/sycl.hpp>
8
+ using namespace sycl ;
9
+
10
+ void host_single_task (std::array<int , 1 > &A) {
11
+ auto q = queue{};
12
+ device d = q.get_device ();
13
+ std::cout << " Using " << d.get_info <info::device::name>() << " \n " ;
14
+
15
+ {
16
+ auto buf = buffer<int , 1 >{A.data (), 1 };
17
+ q.submit ([&](handler &cgh) {
18
+ auto A = buf.get_access <access::mode::write>(cgh);
19
+ cgh.single_task <class kernel_single_task >([=]() {
20
+ A[0 ] = 1 ;
21
+ });
22
+ });
23
+ }
24
+ }
25
+
26
+ int main () {
27
+ std::array<int , 1 > A = {0 };
28
+ A[0 ] = 0 ;
29
+ host_single_task (A);
30
+ assert (A[0 ] == 1 );
31
+ std::cout << " Test passed" << std::endl;
32
+ }
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ if(CHECK_SYCL_ALL)
33
33
endif ()
34
34
35
35
add_custom_target (${TARGET}
36
- COMMAND ${SYCL_PYTHON} ${TEST_SUITE_LIT} ${TEST_SUITE_LIT_FLAGS} --param sycl_be=${TARGET_BE} --param target_devices=${TARGET_DEVICES} .
36
+ COMMAND ${SYCL_PYTHON} ${TEST_SUITE_LIT} ${TEST_SUITE_LIT_FLAGS} --filter=Basic/single_task.cpp -- param sycl_be=${TARGET_BE} --param target_devices=${TARGET_DEVICES} .
37
37
COMMENT "Running the SYCL tests for ${TARGET} backend"
38
38
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
39
39
DEPENDS ${TEST_SUITE_TARGETS}
Original file line number Diff line number Diff line change 388
388
config .recursiveExpansionLimit = 10
389
389
390
390
if config .sycl_be == 'ext_oneapi_cuda' or (config .sycl_be == 'ext_oneapi_hip' and config .hip_platform == 'NVIDIA' ):
391
- config .substitutions .append ( ('%sycl_triple' , "nvptx64-nvidia-cuda" ) )
391
+ config .substitutions .append ( ('%sycl_triple' , "nvptx64-nvidia-cuda-syclmlir " ) )
392
392
elif config .sycl_be == 'ext_oneapi_hip' and config .hip_platform == 'AMD' :
393
- config .substitutions .append ( ('%sycl_triple' , "amdgcn-amd-amdhsa" ) )
393
+ config .substitutions .append ( ('%sycl_triple' , "amdgcn-amd-amdhsa-syclmlir " ) )
394
394
else :
395
- config .substitutions .append ( ('%sycl_triple' , "spir64" ) )
395
+ config .substitutions .append ( ('%sycl_triple' , "spir64-unknown-unknown-syclmlir " ) )
396
396
397
397
if find_executable ('sycl-ls' ):
398
398
config .available_features .add ('sycl-ls' )
You can’t perform that action at this time.
0 commit comments