tools/amd_build/pyHIPIFY/hipify-python.py
def preprocess(all_files, show_detailed=False, show_progress=True, hipify_caffe2=False):
    """
    Call preprocessor on selected files.

    Arguments)
        show_detailed - Show a detailed summary of the transpilation process.
    """

    # Compute the total number of files to be traversed.
    total_count = len(all_files)
    finished_count = 0

    # Preprocessing statistics.
    stats = {"unsupported_calls": [], "kernel_launches": []}

    for filepath in all_files:
        preprocessor(filepath, stats, hipify_caffe2)
        # Update the progress
        if show_progress:
            print(filepath)
            update_progress_bar(total_count, finished_count)
            finished_count += 1

    print(bcolors.OKGREEN + "Successfully preprocessed all matching files." + bcolors.ENDC)

    # Show detailed summary
    if show_detailed:
        compute_stats(stats)

    Call preprocessor on selected files.

    Arguments)
        show_detailed - Show a detailed summary of the transpilation process.
    
Call preprocessor on selected files.
Arguments)
show_detailed - Show a detailed summary of the transpilation process.
Call preprocessor on selected files . Arguments ) show_detailed - Show a detailed summary of the transpilation process .
def preprocess(all_files, show_detailed=False, show_progress=True, hipify_caffe2=False):
    total_count = len(all_files)
    finished_count = 0
    stats = {"unsupported_calls": [], "kernel_launches": []}
    for filepath in all_files:
        preprocessor(filepath, stats, hipify_caffe2)
        if show_progress:
            print(filepath)
            update_progress_bar(total_count, finished_count)
            finished_count += 1
    print(bcolors.OKGREEN + "Successfully preprocessed all matching files." + bcolors.ENDC)
    if show_detailed:
        compute_stats(stats)
def preprocess ( all_files , show_detailed = False , show_progress = True , hipify_caffe2 = False ) : total_count = len ( all_files ) finished_count = 0 stats = { "unsupported_calls" : [ ] , "kernel_launches" : [ ] } for filepath in all_files : preprocessor ( filepath , stats , hipify_caffe2 ) if show_progress : print ( filepath ) update_progress_bar ( total_count , finished_count ) finished_count += 1 print ( bcolors . OKGREEN + "Successfully preprocessed all matching files." + bcolors . ENDC ) if show_detailed : compute_stats ( stats )
Call preprocessor on selected files.
Call preprocessor on selected files .
"""
    Call preprocessor on selected files.

    Arguments)
        show_detailed - Show a detailed summary of the transpilation process.
    """ # Compute the total number of files to be traversed. # Preprocessing statistics. # Update the progress # Show detailed summary
all_files
show_detailed
show_progress
hipify_caffe2