diff options
-rw-r--r-- | ethosu/vela/supported_operators.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ethosu/vela/supported_operators.py b/ethosu/vela/supported_operators.py index b0afa2c9..63eb01b5 100644 --- a/ethosu/vela/supported_operators.py +++ b/ethosu/vela/supported_operators.py @@ -215,6 +215,11 @@ class SupportedOperators: if dilated_weight_w > 64 or dilated_weight_h > 64: return False + # check non const weights + if weight_tensor.values is None: + print("Warning:", op.type, "has non-const weights, placing on CPU") + return False + # check weight sums over [HWI] zero_point = weight_tensor.quantization.zero_point quant_weights = weight_tensor.quant_values.astype(np.int64) @@ -228,11 +233,6 @@ class SupportedOperators: if ifm_tensor.shape[0] != 1: return False - # check non const weights - if weight_tensor.values is None: - print("Warning:", op.type, "has non-const weights, placing on CPU") - return False - return True def check_depthwise_convolution_restrictions(self, op): |