parameters: (input_file)
return_statement: return ops
docstring: Gets the ops and kernels needed from the ops list file.
docstring_summary: Gets the ops and kernels needed from the ops list file.
docstring_tokens: Gets the ops and kernels needed from the ops list file .
function: def _get_ops_from_ops_list(input_file):
    """Gets the ops and kernels needed from the ops list file."""
    ops = set()
    ops_list_str = gfile.GFile(input_file, 'r').read()
    if not ops_list_str:
      raise Exception('Input file should not be empty')
    ops_list = json.loads(ops_list_str)
    for op, kernel in ops_list:
      op_and_kernel = (op, kernel if kernel else None)
      ops.add(op_and_kernel)
    return ops
function_tokens: def _get_ops_from_ops_list ( input_file ) : ops = set ( ) ops_list_str = gfile . GFile ( input_file , 'r' ) . read ( ) if not ops_list_str : raise Exception ( 'Input file should not be empty' ) ops_list = json . loads ( ops_list_str ) for op , kernel in ops_list : op_and_kernel = ( op , kernel if kernel else None ) ops . add ( op_and_kernel ) return ops