liangsu9988 commited on
Commit
c3c332f
·
verified ·
1 Parent(s): e6feae2

Promote latest kernel artifacts to main

Browse files
build/torch213-cxx11-cu130-aarch64-linux/__init__.py CHANGED
@@ -78,6 +78,22 @@ def _residual_add_rms_norm_quant_fp8_static_bf16_fake(
78
  return None
79
 
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  def rms_norm_bf16(
82
  x: torch.Tensor,
83
  weight: torch.Tensor,
@@ -145,9 +161,24 @@ def residual_add_rms_norm_quant_fp8_static_bf16(
145
  return out
146
 
147
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  __all__ = [
149
  "layer_norm_bf16",
150
  "residual_add_rms_norm_quant_fp8_static_bf16",
 
151
  "rms_norm_bf16",
152
  "rms_norm_quant_fp8_static_bf16",
153
  ]
 
78
  return None
79
 
80
 
81
+ @torch.library.register_fake(add_op_namespace_prefix("residual_add_rms_norm_bf16"))
82
+ def _residual_add_rms_norm_bf16_fake(
83
+ residual: torch.Tensor,
84
+ x: torch.Tensor,
85
+ weight: torch.Tensor,
86
+ eps: float,
87
+ out: torch.Tensor,
88
+ ) -> None:
89
+ if residual.shape != x.shape:
90
+ raise RuntimeError("residual and x must have the same shape")
91
+ _check_rank2_same_shape(x, out, "out")
92
+ if weight.shape != (x.shape[1],):
93
+ raise RuntimeError("weight must have shape (x.shape[1],)")
94
+ return None
95
+
96
+
97
  def rms_norm_bf16(
98
  x: torch.Tensor,
99
  weight: torch.Tensor,
 
161
  return out
162
 
163
 
164
+ def residual_add_rms_norm_bf16(
165
+ residual: torch.Tensor,
166
+ x: torch.Tensor,
167
+ weight: torch.Tensor,
168
+ eps: float = 1e-6,
169
+ out: torch.Tensor | None = None,
170
+ ) -> torch.Tensor:
171
+ """In-place ``residual += x`` followed by weighted BF16 RMSNorm."""
172
+ if out is None:
173
+ out = torch.empty_like(x, dtype=torch.bfloat16)
174
+ ops.residual_add_rms_norm_bf16(residual, x, weight, float(eps), out)
175
+ return out
176
+
177
+
178
  __all__ = [
179
  "layer_norm_bf16",
180
  "residual_add_rms_norm_quant_fp8_static_bf16",
181
+ "residual_add_rms_norm_bf16",
182
  "rms_norm_bf16",
183
  "rms_norm_quant_fp8_static_bf16",
184
  ]
build/torch213-cxx11-cu130-aarch64-linux/flashrt_residual_norm_quant_test.abi3.so CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a306731c50597653c0186b9b06ef8320ae082e63e08f4e290771335e20fe7909
3
- size 244952
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad66e291da89c1970e21c01cb2418e1acb5ad7f43cb1aff1acebe31b3383e513
3
+ size 313920
build/torch213-cxx11-cu130-aarch64-linux/metadata.json CHANGED
@@ -13,15 +13,15 @@
13
  "digest": {
14
  "algorithm": "sha256",
15
  "files": {
16
- "__init__.py": "0B3KkKlFM1SOea9jQmtj6KBTfdXr8PlVQp8Ln76Piew=",
17
- "flashrt_residual_norm_quant_test.abi3.so": "owZzHFBZdlPAGGubBu+DIK4ILmPgj04pB3EzXiD+eQk=",
18
  "_ops.py": "xSBgrQ6hv1i0xHDSipU2AiSNXtEgSow+4Atua29Uq5s=",
19
  "flashrt_residual_norm_quant/__init__.py": "v6p5XMfQzddhi1fLSAw4HX9CyS0rQsidvu9VsT01xi4="
20
  }
21
  },
22
  "provenance": {
23
  "kernel": {
24
- "sha": "456d297",
25
  "dirty": false
26
  },
27
  "validation": {
 
13
  "digest": {
14
  "algorithm": "sha256",
15
  "files": {
16
+ "__init__.py": "snK1D78CVgyD7zmjN/6PuR+kxnjatRCR+69xTPG0E2k=",
17
+ "flashrt_residual_norm_quant_test.abi3.so": "rWbikdqJwZcOIcAcskGOGsta1/Q8sa/xrOvjGzOD5RM=",
18
  "_ops.py": "xSBgrQ6hv1i0xHDSipU2AiSNXtEgSow+4Atua29Uq5s=",
19
  "flashrt_residual_norm_quant/__init__.py": "v6p5XMfQzddhi1fLSAw4HX9CyS0rQsidvu9VsT01xi4="
20
  }
21
  },
22
  "provenance": {
23
  "kernel": {
24
+ "sha": "3a505c0",
25
  "dirty": false
26
  },
27
  "validation": {