Skip to content

Commit 3e85eb9

Browse files
author
Yihan Wang
authored
[SYCLomatic] Use icx-cl/icpx -fsycl as new compiler driver in test script (#127)
Signed-off-by: Wang, Yihan <[email protected]>
1 parent 1e8b7fe commit 3e85eb9

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

behavior_tests/src/bt-custom-helper-file-name2/do_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ def migrate_test():
3838
if (platform.system() == 'Windows'):
3939
os.environ["INCLUDE"] = header_path
4040
print(os.environ["INCLUDE"])
41-
ret_val = call_subprocess("dpcpp /EHsc out/test.dp.cpp -o out/run")
41+
ret_val = call_subprocess("icx-cl -fsycl /EHsc out/test.dp.cpp -o out/run")
4242
os.environ["INCLUDE"] = path_env
4343
else:
4444
os.environ["CPATH"] = header_path
4545
call_subprocess("env | grep CPATH")
46-
ret_val = call_subprocess("dpcpp out/test.dp.cpp -o out/run")
46+
ret_val = call_subprocess("icpx -fsycl out/test.dp.cpp -o out/run")
4747
os.environ["CPATH"] = path_env
4848
return ret_val
4949

help_function/test_help.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ def build_test():
6363
if test_config.current_test == "test_default_queue_2":
6464
srcs.append("test_default_queue_1.cpp")
6565
if test_config.current_test == "kernel_function_lin":
66-
ret = call_subprocess("dpcpp -shared -fPIC -o module.so kernel_module_lin.cpp")
66+
ret = call_subprocess("icpx -fsycl -shared -fPIC -o module.so kernel_module_lin.cpp")
6767
if not ret:
6868
print("kernel_function_lin created the shared lib failed.")
6969
return False
7070
if test_config.current_test == "kernel_function_win":
71-
ret = call_subprocess("dpcpp /EHsc -shared -o module.dll kernel_module_win.cpp")
71+
ret = call_subprocess("icx-cl -fsycl /EHsc /LD kernel_module_win.cpp /link /OUT:module.dll")
7272
if not ret:
7373
print("kernel_function_win created the shared lib failed.")
7474
return False

test_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ def change_dir(dir):
5656

5757
def set_default_compiler():
5858
if (platform.system() == 'Windows'):
59-
test_config.DPCXX_COM = "dpcpp-cl"
59+
test_config.DPCXX_COM = "icx-cl -fsycl"
6060
else:
61-
test_config.DPCXX_COM = "dpcpp"
61+
test_config.DPCXX_COM = "icpx -fsycl"
6262

6363
def print_debug_log(desc, *args):
6464
if (test_config.VERBOSE_LEVEL != 0):
@@ -94,7 +94,7 @@ def compile_and_link(srcs, cmpopts = [], objects = [], linkopt = []):
9494
if new_obj not in obj_files:
9595
obj_files.append(new_obj)
9696
cmd = test_config.DPCXX_COM + ' ' + ' '.join(obj_files) + ' ' + \
97-
' '.join(linkopt) + ' ' + ' '.join(objects) + ' -o ' + test_config.current_test + '.run \n'
97+
' '.join(linkopt) + ' ' + ' '.join(objects) + ' -o ' + test_config.current_test + '.run'
9898
return call_subprocess(cmd)
9999

100100

user_guide_samples/src/vector_add/vector_add.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535

3636
# check run result
3737
if platform.system() == "Windows":
38-
compiler = "dpcpp-cl "
38+
compiler = "icx-cl -fsycl "
3939
out_exe = ".\\\\vector_add.dp.exe"
4040
options = "/EHsc"
4141
else:
42-
compiler = "dpcpp "
42+
compiler = "icpx -fsycl "
4343
out_exe = "./a.out"
4444
options = ""
4545

0 commit comments

Comments
 (0)