File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -475,6 +475,29 @@ def compile_class_kernels(
475475 extra_classes = (),
476476 extra_compile_args = (),
477477 ):
478+
479+ if context .allow_prebuilt_kernels :
480+ _print_state = Print .suppress
481+ Print .suppress = True
482+ try :
483+ from xsuite import (
484+ get_suitable_kernel ,
485+ XSK_PREBUILT_KERNELS_LOCATION ,
486+ )
487+ kernel_info = get_suitable_kernel ({}, ())
488+ except ImportError :
489+ kernel_info = None
490+
491+ Print .suppress = _print_state
492+ if kernel_info :
493+ module_name , _ = kernel_info
494+ kernels = context .kernels_from_file (
495+ module_name = module_name ,
496+ containing_dir = XSK_PREBUILT_KERNELS_LOCATION ,
497+ kernel_descriptions = cls ._kernels ,
498+ )
499+ context .kernels .update (kernels )
500+
478501 if only_if_needed :
479502 all_found = True
480503 for kk , kernel_description in cls ._kernels .items ():
You can’t perform that action at this time.
0 commit comments