Skip to content

Commit

Permalink
Linting...
Browse files Browse the repository at this point in the history
  • Loading branch information
ekalda committed Feb 16, 2022
1 parent 84777c4 commit 26322b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion python/tvm/relay/backend/contrib/ethosu/tir/passes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
4 changes: 3 additions & 1 deletion tests/python/contrib/test_ethosu/test_codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 26322b4

Please sign in to comment.