@@ -329,8 +329,14 @@ def get_bundle_path_for_benchmark_standalone(self, benchmark) -> str:
329
329
return self ._application_nibs [benchmark ]
330
330
331
331
def get_bundle_path_for_benchmark_layer (self , benchmark , layer_info ) -> str :
332
- standalone_nib = Path (self .get_bundle_path_for_benchmark_standalone (benchmark ))
333
- return (standalone_nib .parent / f"layer{ layer_info .index } -{ standalone_nib .name } " ).absolute ()
332
+ app_dir = self .baristaApplicationDirectoryPath (benchmark )
333
+ nib_candidates = list (app_dir .glob (f"**/layer{ layer_info .index } -*.nib" ))
334
+ if len (nib_candidates ) == 0 :
335
+ mx .abort (f"Expected to find exactly one 'layer{ layer_info .index } -*.nib' file somewhere in the '{ app_dir } ' directory subtree, instead found none!" )
336
+ if len (nib_candidates ) > 1 :
337
+ mx .abort (f"Expected to find exactly one 'layer{ layer_info .index } -*.nib' file somewhere in the '{ app_dir } ' directory subtree, instead found "
338
+ + "multiple: [" + ", " .join (str (path ) for path in nib_candidates ) + "]" )
339
+ return str (nib_candidates [0 ])
334
340
335
341
def get_latest_layer (self ) -> Optional [Layer ]:
336
342
latest_image_stage = self .execution_context .virtual_machine .stages_info .get_latest_image_stage ()
@@ -369,6 +375,12 @@ def extra_run_arg(self, benchmark, args, image_run_args):
369
375
# Added by BaristaNativeImageCommand
370
376
return []
371
377
378
+ def build_assertions (self , benchmark : str , is_gate : bool ) -> List [str ]:
379
+ # We cannot enable assertions along with emitting a build report for layered images, due to GR-65751
380
+ if self .stages_info .current_stage .is_layered :
381
+ return []
382
+ return super ().build_assertions (benchmark , is_gate )
383
+
372
384
def run (self , benchmarks , bmSuiteArgs ) -> mx_benchmark .DataPoints :
373
385
return self .intercept_run (super (), benchmarks , bmSuiteArgs )
374
386
0 commit comments