@@ -282,6 +282,12 @@ sub init_test
282
282
rmtree($path );
283
283
}
284
284
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
+ }
285
291
}
286
292
287
293
if ($current_suite =~ / valgrind/ ) {
@@ -708,6 +714,10 @@ sub get_info
708
714
$short_test_name = $test_file ;
709
715
$short_test_name =~ s / ^$subdir\/ // ;
710
716
717
+ if ($current_optset =~ m / opt_use_esimd_emu/ ) {
718
+ $short_test_name =~ s / ^ESIMD\/ // ;
719
+ }
720
+
711
721
my $short_name = basename($test_file );
712
722
my $path = dirname($test_file );
713
723
my $r = { dir => $path , short_name => $short_name , fullpath => $test_file };
@@ -719,6 +729,9 @@ sub generate_run_result
719
729
{
720
730
my $output = shift ;
721
731
my $result = " " ;
732
+
733
+ return $SKIP if ($current_optset =~ m / opt_use_esimd_emu/ and $current_test !~ m / ^esimd_/ );
734
+
722
735
for my $line (split /^/, $output ){
723
736
if ($line =~ m / ^(.*): SYCL :: \Q $short_test_name \E \( .*\) / ) {
724
737
$result = $1 ;
@@ -879,6 +892,8 @@ sub run_cmake
879
892
$sycl_backend = " PI_CUDA" ;
880
893
} elsif ( $current_optset =~ m / gpu/ ) {
881
894
$sycl_backend = " PI_LEVEL_ZERO" ;
895
+ } elsif ( $current_optset =~ m / opt_use_esimd_emu/ ) {
896
+ $sycl_backend = " ext_intel_esimd_emulator" ;
882
897
} else {
883
898
$sycl_backend = " PI_OPENCL" ;
884
899
}
@@ -902,6 +917,8 @@ sub run_cmake
902
917
$device = " acc" ;
903
918
}elsif ( $current_optset =~ m / opt_use_nv_gpu/ ){
904
919
$device = " gpu" ;
920
+ }elsif ( $current_optset =~ m / opt_use_esimd_emu/ ){
921
+ $device = " gpu" ;
905
922
}else {
906
923
$device = " host" ;
907
924
}
0 commit comments