Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3rdparty/tvm
Submodule tvm updated from 001022 to e47e76
15 changes: 4 additions & 11 deletions src/transform/lower_pdl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,10 @@ class MarkCudaSyncCalls : public StmtExprMutator {
}

PrimExpr VisitExpr_(const tir::CallNode *op) final {
if (op && op->op.same_as(builtin::call_extern())) {
if (!op->args.empty()) {
if (const auto *str_node = op->args[0].as<tvm::tir::StringImmNode>()) {
std::string func_name = str_node->value;
if (func_name == "cudaTriggerProgrammaticLaunchCompletion") {
has_trigger_launch_ = true;
} else if (func_name == "cudaGridDependencySynchronize") {
has_grid_sync_ = true;
}
}
}
if (op->op.same_as(tl::pdl_trigger())) {
has_trigger_launch_ = true;
} else if (op->op.same_as(tl::pdl_sync())) {
has_grid_sync_ = true;
}
return StmtExprMutator::VisitExpr_(op);
}
Expand Down
13 changes: 2 additions & 11 deletions src/transform/warp_specialized_rewriter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,8 @@ class WarpSpecializedRoleMarker : public StmtVisitor {
if (call->op.same_as(loop_break())) {
role = Role::kBoth;
}
if (call->op.same_as(builtin::call_extern())) {
if (!call->args.empty()) {
if (const auto *str_node =
call->args[0].as<tvm::tir::StringImmNode>()) {
std::string func_name = str_node->value;
if (func_name == "cudaGridDependencySynchronize" ||
func_name == "cudaTriggerProgrammaticLaunchCompletion") {
role = Role::kBoth;
}
}
}
if (call->op.same_as(pdl_sync()) || call->op.same_as(pdl_trigger())) {
role = Role::kBoth;
}
}
SetRole(op, role);
Expand Down
2 changes: 1 addition & 1 deletion testing/python/language/test_tilelang_language_pdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ def test_pdl_trigger():
def test_pdl_sync():
N = 64
program = kernels_with_pdl_sync(N)

pdl_kernel = tilelang.compile(program, target="cuda -arch=sm_90")
code = pdl_kernel.get_kernel_source()
assert "cudaGridDependencySynchronize" in code
assert "__restrict__" not in code


if __name__ == "__main__":
Expand Down
Loading