KULeuven-MICAS/stream

Layer fusion analysis running into errors

ssatyendras opened this issue · 2 comments

Hi,
There seems to be some new issues after the recent updates to stream.
Trying to map resnet18 onnx model with hint_loops other than 1 seems to result in errors.

Error messages:

"Tensor Tensor(13, 13, 'O') was not found in any of the instances."
"Tensor Tensor(6, 2, 'O') was not found in any of the instances."
"There are no candidates to schedule."

Test scenario:


############################## Provide inputs ######################################
accelerator = "stream.inputs.examples.hardware.TPU_like_quad_core"
workload_path = "/stream/inputs/examples/workload/resnet18.onnx"
mapping_path = "stream.inputs.examples.mapping.tpu_like_quad_core"

############################## Define variables for run ############################
CN_define_mode = 1  # manually define outer-CN loops
hint_loops = [("OY", 2)] # [("OY", 'all')]  [("OY", 1)]  [("OY", 2)]  [("OY", 3)]
nb_ga_individuals = 100  # number of individuals in each generation
nb_ga_generations = 10  # number of genetic algorithm generations

OBJECTIVE = "latency"  ## latency   memory
mainstage = MainStage(
    [  # Initializes the MainStage as entry point
        AcceleratorParserStage,  # Parses the accelerator
        StreamONNXModelParserStage,  # Parses the ONNX Model into the workload
        # UserDefinedModelParserStage,  # Parses the user-defined Model into the workload
        GenerateCNWorkloadHybridStage,
        IntraCoreMappingStage,
        InterCoreMappingStage,
    ],
    accelerator=accelerator,  # required by AcceleratorParserStage
    workload_path=workload_path,  # required by ModelParserStage
    mapping_path=mapping_path,  # required by ModelParserStage
    loma_lpf_limit=6,  # required by LomaStage
    nb_ga_individuals=nb_ga_individuals,  # number of individuals in each genetic algorithm generation
    nb_ga_generations=nb_ga_generations,  # number of genetic algorithm generations
    node_hw_performances_path=node_hw_performances_path,  # saved node_hw_performances to skip re-computation
    plot_hof=True,  # Save schedule and memory usage plot of each individual in the Genetic Algorithm hall of fame
    plot_file_name=plot_file_name,
    plot_full_schedule=plot_full_schedule,
    plot_data_transfer=plot_data_transfer,
    cn_define_mode=CN_define_mode,
    hint_loops=hint_loops,
    scheduler_candidate_selection=OBJECTIVE,
    operands_to_prefetch=[],
)

Kindly take a look.

Thanks & regards,
Siva

Andful commented

I suspect the error is related to #7. The pull request is still not merged. You could try using the branch of that pull request.

Hi @ssatyendras,

Has this issue been resolved? The PR has been merged in since.