diff --git a/.gitignore b/.gitignore index ca39f0a3a5f5..6b18c12e02a2 100644 --- a/.gitignore +++ b/.gitignore @@ -278,11 +278,5 @@ gallery/how_to/work_with_microtvm/micro_tvmc.py # GDB history file .gdb_history -*/reports/* -play.py *.ptx -*.ncu-rep -tl_verify/* -*/modified_code.cu -modified_code.cu -code_replace.py +*.ncu-rep \ No newline at end of file diff --git a/python/tvm/tl/language.py b/python/tvm/tl/language.py index d9e4a974ff05..6e3e78686cff 100644 --- a/python/tvm/tl/language.py +++ b/python/tvm/tl/language.py @@ -47,10 +47,10 @@ def Pipelined( start: tir.PrimExpr, stop: tir.PrimExpr = None, num_stages: int = 0, - order: List[int] = [], - stage: List[int] = [], - sync: List[List[int]] = [], - group: List[List[int]] = [] + order: List[int] = None, + stage: List[int] = None, + sync: List[List[int]] = None, + group: List[List[int]] = None ): """Tools to construct pipelined for loop. @@ -74,6 +74,14 @@ def Pipelined( start = IntImm(start.dtype, 0) else: start = 0 + if order is None: + order = [] + if stage is None: + stage = [] + if sync is None: + sync = [] + if group is None: + group = [] # type: ignore[attr-defined] # pylint: disable=no-member return _ffi_api.Pipelined(start, stop, num_stages, order, stage, sync, group) diff --git a/src/tir/transforms/thread_partial_sync.cc b/src/tir/transforms/thread_partial_sync.cc index a4c2fdb22a31..acc052b4c3fb 100644 --- a/src/tir/transforms/thread_partial_sync.cc +++ b/src/tir/transforms/thread_partial_sync.cc @@ -55,18 +55,18 @@ class ThreadPartialSyncPlanner : public StorageAccessVisitor { // Redirect all "shared.dyn" buffer access to the same buffer var // so that the accesses can be planned together. Var shared_dyn_buf; - // for (StmtEntry& entry : seq) { - // for (AccessEntry& access : entry.access) { - // if (access.scope.rank == StorageRank::kShared && access.scope.tag == ".dyn" && - // access.buffer.defined()) { - // if (!shared_dyn_buf.defined()) { - // shared_dyn_buf = access.buffer; - // } else { - // access.buffer = shared_dyn_buf; - // } - // } - // } - // } + for (StmtEntry& entry : seq) { + for (AccessEntry& access : entry.access) { + if (access.scope.rank == StorageRank::kShared && access.scope.tag == ".dyn" && + access.buffer.defined()) { + if (!shared_dyn_buf.defined()) { + shared_dyn_buf = access.buffer; + } else { + access.buffer = shared_dyn_buf; + } + } + } + } // Unsynced reads and writes std::vector reads;