Skip to content
Closed
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 14-warp-specialization/warp_specialization_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def relative_error(target: torch.Tensor, ref: torch.Tensor, eps: float = 1e-8):
num_failed = 0


def compare_matrix(kernel_output: torch.Tensor, torch_output: torch.Tensor):
def compare_matrix(kernel_output: torch.Tensor, torch_output: torch.Tensor):
kernel_output = kernel_output.float()
torch_output = torch_output.float()

Expand Down
12 changes: 6 additions & 6 deletions 14-warp-specialization/warp_specialization_pipeline_api.cu
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,13 @@ __global__ __launch_bounds__(Spec::kThreadNum) void warp_specialization(__grid_c
Tensor tCsC_s2r = s2r_thr_copy_c.partition_S(sC); // (CPY, CPY_M, CPY_K)
Tensor tCrC_s2r = s2r_thr_copy_c.retile_D(tCrC_load); // (CPY, CPY_M, CPY_K)

if (consumer_tid == 0) {
initialize_barrier(tma_load_c_mbarrier, /* arrival thread count */ 1);
cutlass::arch::fence_view_async_shared();
if (consumer_tid == 0) {
initialize_barrier(tma_load_c_mbarrier, /* arrival thread count */ 1);
cutlass::arch::fence_view_async_shared();

copy(tma_C.with(tma_load_c_mbarrier), tCgC, tCsC);
set_barrier_transaction_bytes(tma_load_c_mbarrier, tma_transaction_load_c_bytes);
}
copy(tma_C.with(tma_load_c_mbarrier), tCgC, tCsC);
set_barrier_transaction_bytes(tma_load_c_mbarrier, tma_transaction_load_c_bytes);
}

warpgroup_sync(kNumMmaWarpGroups);
wait_barrier(tma_load_c_mbarrier, /* phase */ 0);
Expand Down
Loading