parameters: (filename: str, registration_processor: RegistrationProcessor)
docstring: Process a kernel registration file using registration_processor.
      :param filename: Path to file containing kernel registrations.
      :param registration_processor: Processor to be used.
      :return True if processing was successful.
docstring_summary: Process a kernel registration file using registration_processor.
      :param filename: Path to file containing kernel registrations.
      :param registration_processor: Processor to be used.
      :return True if processing was successful.
docstring_tokens: Process a kernel registration file using registration_processor . : param filename : Path to file containing kernel registrations . : param registration_processor : Processor to be used . : return True if processing was successful .
function: def process_kernel_registration_file(filename: str, registration_processor: RegistrationProcessor):
      '''
      Process a kernel registration file using registration_processor.
      :param filename: Path to file containing kernel registrations.
      :param registration_processor: Processor to be used.
      :return True if processing was successful.
      '''
  
      if not os.path.isfile(filename):
          log.error('File not found: {}'.format(filename))
          return False
  
      lines = []
      with open(filename, 'r') as file_to_read:
          lines = file_to_read.readlines()
  
      offset = 0
      while offset < len(lines):
  
          line = lines[offset]
          stripped = line.strip()
  
          if stripped.startswith('BuildKernelCreateInfo<ONNX'):
              offset = _process_lines(lines, offset, registration_processor)
          else:
              registration_processor.process_other_line(line)
              offset += 1
function_tokens: def process_kernel_registration_file ( filename : str , registration_processor : RegistrationProcessor ) : if not os . path . isfile ( filename ) : log . error ( 'File not found: {}' . format ( filename ) ) return False lines = [ ] with open ( filename , 'r' ) as file_to_read : lines = file_to_read . readlines ( ) offset = 0 while offset < len ( lines ) : line = lines [ offset ] stripped = line . strip ( ) if stripped . startswith ( 'BuildKernelCreateInfo<ONNX' ) : offset = _process_lines ( lines , offset , registration_processor ) else : registration_processor . process_other_line ( line ) offset += 1