Skip to content

Commit abd9bbd

Browse files
authored
Merge pull request intel#899 from myler/shliclel306-mainline-topic
CMPLRTOOLS-26492: enable ESIMD_EMULATOR for optset opt_use_esimd_emu
2 parents c0a8473 + 3bafa35 commit abd9bbd

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

llvm_test_suite_sycl.pl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,12 @@ sub init_test
282282
rmtree($path);
283283
}
284284
log_command("##Removed tests that are not in $current_suite\n");
285+
} else {
286+
# lit.cfg.py set test_exec_root and test_source_root to SYCL/ESIMD, "-t" mode is not supported.
287+
if ($current_optset =~ m/opt_use_esimd_emu/) {
288+
`sed -i "s/config\\.test_source_root += \\\"\\/ESIMD\\\"/config\\.test_source_root += \\\"\\\"/g" "$optset_work_dir/SYCL/lit.cfg.py"`;
289+
`sed -i "s/config\\.test_exec_root += \\\"\\/ESIMD\\\"/config\\.test_exec_root += \\\"\\\"/g" "$optset_work_dir/SYCL/lit.cfg.py"`;
290+
}
285291
}
286292

287293
if ($current_suite =~ /valgrind/) {
@@ -708,6 +714,10 @@ sub get_info
708714
$short_test_name = $test_file;
709715
$short_test_name =~ s/^$subdir\///;
710716

717+
if ($current_optset =~ m/opt_use_esimd_emu/) {
718+
$short_test_name =~ s/^ESIMD\///;
719+
}
720+
711721
my $short_name = basename($test_file);
712722
my $path = dirname($test_file);
713723
my $r = { dir => $path, short_name => $short_name, fullpath => $test_file};
@@ -719,6 +729,9 @@ sub generate_run_result
719729
{
720730
my $output = shift;
721731
my $result = "";
732+
733+
return $SKIP if ($current_optset =~ m/opt_use_esimd_emu/ and $current_test !~ m/^esimd_/);
734+
722735
for my $line (split /^/, $output){
723736
if ($line =~ m/^(.*): SYCL :: \Q$short_test_name\E \(.*\)/) {
724737
$result = $1;
@@ -879,6 +892,8 @@ sub run_cmake
879892
$sycl_backend = "PI_CUDA";
880893
} elsif ( $current_optset =~ m/gpu/ ) {
881894
$sycl_backend = "PI_LEVEL_ZERO";
895+
} elsif ( $current_optset =~ m/opt_use_esimd_emu/ ) {
896+
$sycl_backend = "ext_intel_esimd_emulator";
882897
} else {
883898
$sycl_backend = "PI_OPENCL";
884899
}
@@ -902,6 +917,8 @@ sub run_cmake
902917
$device = "acc";
903918
}elsif ( $current_optset =~ m/opt_use_nv_gpu/ ){
904919
$device = "gpu";
920+
}elsif ( $current_optset =~ m/opt_use_esimd_emu/ ){
921+
$device = "gpu";
905922
}else{
906923
$device = "host";
907924
}

0 commit comments

Comments
 (0)