Skip to content
Open
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
1 change: 1 addition & 0 deletions mojo_opset/backends/ttx/kernels/npu/layernorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def _layernorm_fwd_kernel(
b_chunk = tl.load(B_ptr + cols_off, mask=cols_mask, other=0.0).to(tl.float32)

x_centered = x_chunk - mean[:, None]
x_centered = tl.where(block_mask, x_centered, 0.0) # Filter out invalid columns

var_acc += tl.sum(x_centered * x_centered, axis=1)

Expand Down