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 +37
-4
lines changed Expand file tree Collapse file tree 3 files changed +37
-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 @@ -27,7 +27,8 @@ if(CHECK_SYCL_ALL)
27
27
string (REPLACE "," "_" TARGET check-sycl-${TARGET_BE}-${TARGET_DEVICES} )
28
28
29
29
add_custom_target (${TARGET}
30
- COMMAND python3 ${TEST_SUITE_LIT} ${TEST_SUITE_LIT_FLAGS} --param sycl_be=${TARGET_BE} --param target_devices=${TARGET_DEVICES} .
30
+ # HACK: Only run test files in cgeist directory.
31
+ COMMAND python3 ${TEST_SUITE_LIT} ${TEST_SUITE_LIT_FLAGS} --filter=Basic/single_task.cpp --param sycl_be=${TARGET_BE} --param target_devices=${TARGET_DEVICES} .
31
32
COMMENT "Running the SYCL tests for ${TARGET} backend"
32
33
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
33
34
DEPENDS ${TEST_SUITE_TARGETS}
Original file line number Diff line number Diff line change 387
387
config .substitutions .append ( ('%ACC_CHECK_PLACEHOLDER' , acc_check_substitute ) )
388
388
389
389
if config .sycl_be == 'ext_oneapi_cuda' or (config .sycl_be == 'ext_oneapi_hip' and config .hip_platform == 'NVIDIA' ):
390
- config .substitutions .append ( ('%sycl_triple' , "nvptx64-nvidia-cuda" ) )
390
+ config .substitutions .append ( ('%sycl_triple' , "nvptx64-nvidia-cuda-syclmlir " ) )
391
391
elif config .sycl_be == 'ext_oneapi_hip' and config .hip_platform == 'AMD' :
392
- config .substitutions .append ( ('%sycl_triple' , "amdgcn-amd-amdhsa" ) )
392
+ config .substitutions .append ( ('%sycl_triple' , "amdgcn-amd-amdhsa-syclmlir " ) )
393
393
else :
394
- config .substitutions .append ( ('%sycl_triple' , "spir64" ) )
394
+ config .substitutions .append ( ('%sycl_triple' , "spir64-unknown-unknown-syclmlir " ) )
395
395
396
396
if find_executable ('sycl-ls' ):
397
397
config .available_features .add ('sycl-ls' )
You can’t perform that action at this time.
0 commit comments