diff options
author | Michael McGeagh <michael.mcgeagh@arm.com> | 2020-07-30 14:36:40 +0100 |
---|---|---|
committer | tim.hall <tim.hall@arm.com> | 2020-08-04 11:20:09 +0000 |
commit | b4249745057a0f71f2710013e7f263e46a496f53 (patch) | |
tree | 43d6aa3d1f7d4c2c85785746454ef639ad6a579b /ethosu/vela/register_command_stream_generator.py | |
parent | 775e396e2939b55f5f1ea5261260533cf168d12c (diff) | |
download | ethos-u-vela-b4249745057a0f71f2710013e7f263e46a496f53.tar.gz |
vela: Protect against divide by zero
If the total cycle count is zero (for whatever reason), then a divide by
zero can occur when calculating the midpoint_fps.
This change protects against that by detecting when that is the case and
instead setting the midpoint_fps to nan.
Further calculations using that variable is safe and results in nan
throughout.
Change-Id: I2d29545d331a6eb5b27b6d9c931587c15f877e74
Signed-off-by: Michael McGeagh <michael.mcgeagh@arm.com>
Diffstat (limited to 'ethosu/vela/register_command_stream_generator.py')
0 files changed, 0 insertions, 0 deletions