Commit 4767554c by Hua Committed by Thierry Moreau

[BugFix][VTA] Fix vta_conv2d crash issue after change vta_config.json configuration. (#3213)

Issue:
Once change LOG_BLOCK_IN or LOG_BLOCK_OUT into > 4 value, when run vta
“Simple Matrix Multiply” or load vta, vta would crash at vta_conv2d.py.

Analysis:
This issue caused by resnet18 logic of vta_conv2d.py which have
in_filter minmum size that is 16. > 4 value would cause such in_filter
check failed then make xfer_size be empty and find_schedules function
return a empty list finally cause crash.

Solution:
add the empty list check.
parent 953ca1f6
......@@ -165,7 +165,7 @@ def find_schedules(layer, vt_only=False, best_only=False):
fil_sched.append(schedule)
xfer_size.append(_get_data_movement_byte(schedule, layer))
if best_only:
if best_only and xfer_size:
return [fil_sched[xfer_size.index(min(xfer_size))]]
return fil_sched
......@@ -501,5 +501,10 @@ RESNET = {
}
for idx in RESNET:
scheds = find_schedules(RESNET[idx], vt_only=True, best_only=True)[0]
f_schedules = find_schedules(RESNET[idx], vt_only=True, best_only=True)
if f_schedules:
scheds = f_schedules[0]
_WL2PLAN[RESNET[idx]] = scheds
else:
logging.warning("No valid schedule was found for the workload on current vta configuration")
break
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment