From 26322b4a4a7ec0928ae8972e6cef19681bd7d6bc Mon Sep 17 00:00:00 2001 From: Elen Kalda Date: Wed, 16 Feb 2022 11:54:38 +0000 Subject: [PATCH] Linting... --- python/tvm/relay/backend/contrib/ethosu/tir/passes.py | 4 +++- tests/python/contrib/test_ethosu/test_codegen.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/python/tvm/relay/backend/contrib/ethosu/tir/passes.py b/python/tvm/relay/backend/contrib/ethosu/tir/passes.py index a4a4ec648cb8..14221f92c8e3 100644 --- a/python/tvm/relay/backend/contrib/ethosu/tir/passes.py +++ b/python/tvm/relay/backend/contrib/ethosu/tir/passes.py @@ -343,7 +343,9 @@ def _new_buffer(old_buffer, new_value): def _encode_weights_or_bias(ptr1, ptr2, stmt, encode_func): """Encode the weights or align the bias either for one or two cores, depending on the variant.""" - assert ptr1 in pointer_to_buffer, "Weights or bias pointer is not associated with any buffer." + assert ( + ptr1 in pointer_to_buffer + ), "Weights or bias pointer is not associated with any buffer." buffer = pointer_to_buffer[ptr1] constant = buffer_to_const[buffer] diff --git a/tests/python/contrib/test_ethosu/test_codegen.py b/tests/python/contrib/test_ethosu/test_codegen.py index be7080e464db..0231ba3e630e 100644 --- a/tests/python/contrib/test_ethosu/test_codegen.py +++ b/tests/python/contrib/test_ethosu/test_codegen.py @@ -81,7 +81,9 @@ def tf_function(self, x): op = tf.nn.conv2d( x, filters=tf.constant( - np.random.uniform(size=[kernel_shape[0], kernel_shape[1], ifm_shape[3], out_channels]), + np.random.uniform( + size=[kernel_shape[0], kernel_shape[1], ifm_shape[3], out_channels] + ), dtype=tf.float32, ), strides=tf_strides,