# 传统方式：多个独立算子
def traditional_approach(x, weight, bias):
    # 算子1：线性变换
    linear_output = torch.matmul(x, weight.t()) + bias
    
    # 算子2：ReLU激活
    relu_output = torch.relu(linear_output)
    
    # 算子3：LayerNorm
    normalized_output = torch.layer_norm(relu_output, relu_output.shape[-1])
    
    return normalized_output

# 融合方式：单个融合算子
def fused_approach(x, weight, bias):
    # 所有操作在一个CUDA kernel中完成
    return fused_linear_relu_layernorm(x, weight, bias)
