@@ -208,7 +208,8 @@ def get_pre_commands(
208208 runtime_type : str ,
209209 codegen_type : str ,
210210 build_config : str ,
211- v8_version : str ):
211+ v8_version : str ,
212+ wasm_local_package_version : Optional [str ] = None ):
212213 helix_pre_commands : list [str ] = []
213214
214215 # Remember the previous PYTHONPATH that was set so it can be restored in the post commands
@@ -284,7 +285,14 @@ def get_pre_commands(
284285 ]
285286
286287 # Set up everything needed for WASM runs (both Mono and CoreCLR)
287- if runtime_type in ("wasm" , "wasm_coreclr" ):
288+ if runtime_type in ("wasm" , "wasm_coreclr" ):
289+ if runtime_type == "wasm_coreclr" :
290+ if not wasm_local_package_version :
291+ raise ValueError ("CoreCLR WASM requires a local WebAssembly toolchain package version" )
292+ install_prerequisites += [
293+ f"export PERFLAB_WASM_PACKAGE_VERSION={ wasm_local_package_version } "
294+ ]
295+
288296 if os_distro == "azurelinux" :
289297 # Azure Linux uses tdnf package manager
290298 install_prerequisites += [
@@ -644,6 +652,8 @@ def get_run_configurations(
644652
645653 if r2r_run_type == "nor2r" :
646654 configurations ["R2RType" ] = "nor2r"
655+ elif r2r_run_type == "r2r" :
656+ configurations ["R2RType" ] = "r2r"
647657
648658 if runtime_type == "coreclr_r2r_interpreter" :
649659 configurations ["R2RType" ] = "r2r_interpreter"
@@ -690,7 +700,17 @@ def get_run_configurations(
690700
691701 return configurations
692702
693- def get_work_item_command (os_group : str , target_csproj : str , architecture : str , perf_lab_framework : str , internal : bool , wasm : bool , bdn_artifacts_dir : str , wasm_coreclr : bool = False , only_sanity_check : bool = False ):
703+ def get_work_item_command (
704+ os_group : str ,
705+ target_csproj : str ,
706+ architecture : str ,
707+ perf_lab_framework : str ,
708+ internal : bool ,
709+ wasm : bool ,
710+ bdn_artifacts_dir : str ,
711+ wasm_coreclr : bool = False ,
712+ wasm_ready_to_run : bool = False ,
713+ only_sanity_check : bool = False ):
694714 if os_group == "windows" :
695715 work_item_command = [
696716 "python" ,
@@ -720,6 +740,8 @@ def get_work_item_command(os_group: str, target_csproj: str, architecture: str,
720740 work_item_command += ["--run-isolated" , "--wasm" , "--dotnet-path" , "$HELIX_CORRELATION_PAYLOAD/dotnet/" ]
721741 if wasm_coreclr :
722742 work_item_command += ["--wasm-runtime-flavor" , "CoreCLR" ]
743+ if wasm_ready_to_run :
744+ work_item_command += ["--wasm-ready-to-run" ]
723745
724746 work_item_command += ["--bdn-artifacts" , bdn_artifacts_dir ]
725747
@@ -940,13 +962,14 @@ def run_performance_job(args: RunPerformanceJobArgs):
940962 shutil .copytree (args .mono_dotnet_dir , mono_dotnet_path , dirs_exist_ok = True )
941963
942964 v8_version = ""
965+ wasm_local_package_version = None
943966 if wasm_coreclr :
944967 if args .libraries_download_dir is None :
945968 raise Exception ("Libraries not downloaded for wasm_coreclr runs" )
946969
947970 getLogger ().info ("Building wasm_coreclr payload directory" )
948971 browser_wasm_coreclr_dir = os .path .join (args .libraries_download_dir , "BrowserWasmCoreCLR" )
949- build_wasm_coreclr_payload (
972+ wasm_local_package_version = build_wasm_coreclr_payload (
950973 browser_wasm_coreclr_dir ,
951974 payload_dir ,
952975 )
@@ -1133,7 +1156,15 @@ def run_performance_job(args: RunPerformanceJobArgs):
11331156 else :
11341157 agent_python = "python3"
11351158
1136- helix_pre_commands = get_pre_commands (args .os_group , args .os_distro , args .internal , args .runtime_type , args .codegen_type , args .build_config , v8_version )
1159+ helix_pre_commands = get_pre_commands (
1160+ args .os_group ,
1161+ args .os_distro ,
1162+ args .internal ,
1163+ args .runtime_type ,
1164+ args .codegen_type ,
1165+ args .build_config ,
1166+ v8_version ,
1167+ wasm_local_package_version )
11371168 helix_post_commands = get_post_commands (args .os_group , args .internal , args .runtime_type )
11381169
11391170 # Point ML.NET at the SSWE model that was pre-downloaded into the correlation payload above, so it
@@ -1372,7 +1403,17 @@ def get_bdn_args_for_coreroot_dir(coreroot_dir: Optional[str]):
13721403
13731404 def get_work_item_command_for_artifact_dir (artifact_dir : str ):
13741405 assert args .target_csproj is not None
1375- return get_work_item_command (args .os_group , args .target_csproj , args .architecture , perf_lab_framework , args .internal , wasm , artifact_dir , wasm_coreclr , args .only_sanity_check )
1406+ return get_work_item_command (
1407+ args .os_group ,
1408+ args .target_csproj ,
1409+ args .architecture ,
1410+ perf_lab_framework ,
1411+ args .internal ,
1412+ wasm ,
1413+ artifact_dir ,
1414+ wasm_coreclr ,
1415+ wasm_coreclr and args .r2r_run_type == "r2r" ,
1416+ args .only_sanity_check )
13761417
13771418 work_item_command = get_work_item_command_for_artifact_dir (bdn_artifacts_directory )
13781419 baseline_work_item_command = get_work_item_command_for_artifact_dir (bdn_baseline_artifacts_dir )
0 commit comments