Skip to content

Commit

Permalink
Fixed linting
Browse files Browse the repository at this point in the history
Change-Id: I060a2f95fb31beedb9e6ac8c8b45d51d6ec7ebce
  • Loading branch information
mbaret committed Apr 28, 2021
1 parent c320064 commit 0898c7e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions python/tvm/driver/build_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ def lower(sch, args, name="main", binds=None, simple_mode=False):
pass_list += [
tvm.tir.transform.VectorizeLoop(not disable_vectorize),
tvm.tir.transform.InjectVirtualThread(),
tvm.tir.transform.InjectRollingBuffer(),
tvm.tir.transform.InjectDoubleBuffer(),
tvm.tir.transform.StorageRewrite(),
tvm.tir.transform.UnrollLoop(),
Expand Down
8 changes: 5 additions & 3 deletions python/tvm/tir/transform/inject_rolling_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
"""Inject rolling buffers through a TIR transformation."""
# pylint: disable=invalid-name,unused-argument,inconsistent-return-statements
from collections import defaultdict

import tvm
from tvm import arith

from collections import defaultdict


def InjectRollingBuffer():
"""Inject rolling buffer statements.
Expand Down Expand Up @@ -48,7 +50,7 @@ def _pre_visit(stmt):

elif isinstance(stmt, tvm.tir.AttrStmt):
if isinstance(stmt.node, tvm.tir.Buffer):
if stmt.attr_key == "rolling_buffer" and stmt.value.value == True:
if stmt.attr_key == "rolling_buffer" and stmt.value.value:
# If the attribute is indicating that a buffer should be a rolling
# buffer, then update the rolling_buffers set to include the bufffer
rolling_buffers.add(stmt.node)
Expand Down
2 changes: 1 addition & 1 deletion python/tvm/tir/transform/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
"""Wrapping existing transformations."""
# pylint: disable=invalid-name
# pylint: disable=invalid-name,unused-import
from . import _ffi_api
from . import function_pass as _fpass
from .inject_rolling_buffer import InjectRollingBuffer
Expand Down

0 comments on commit 0898c7e

Please sign in to comment.