medmekk HF Staff commited on
Commit
5d4178a
·
1 Parent(s): f622ea1

Add Builds

Browse files
Files changed (25) hide show
  1. build.toml +5 -1
  2. build/torch27-cxx11-cu118-x86_64-linux/layer_norm/{_layer_norm_4e9c226_dirty.abi3.so → _layer_norm_f622ea1_dirty.abi3.so} +2 -2
  3. build/torch27-cxx11-cu118-x86_64-linux/layer_norm/_ops.py +3 -3
  4. build/torch27-cxx11-cu118-x86_64-linux/layer_norm/layers.py +7 -5
  5. build/torch27-cxx11-cu126-x86_64-linux/layer_norm/{_layer_norm_4e9c226_dirty.abi3.so → _layer_norm_f622ea1_dirty.abi3.so} +2 -2
  6. build/torch27-cxx11-cu126-x86_64-linux/layer_norm/_ops.py +3 -3
  7. build/torch27-cxx11-cu126-x86_64-linux/layer_norm/layers.py +7 -5
  8. build/{torch28-cxx11-cu126-x86_64-linux/layer_norm/_layer_norm_4e9c226_dirty.abi3.so → torch27-cxx11-cu128-x86_64-linux/layer_norm/_layer_norm_f622ea1_dirty.abi3.so} +2 -2
  9. build/torch27-cxx11-cu128-x86_64-linux/layer_norm/_ops.py +3 -3
  10. build/torch27-cxx11-cu128-x86_64-linux/layer_norm/layers.py +7 -5
  11. build/{torch27-cxx11-cu128-x86_64-linux/layer_norm/_layer_norm_4e9c226_dirty.abi3.so → torch28-cxx11-cu126-x86_64-linux/layer_norm/_layer_norm_f622ea1_dirty.abi3.so} +2 -2
  12. build/torch28-cxx11-cu126-x86_64-linux/layer_norm/_ops.py +3 -3
  13. build/torch28-cxx11-cu126-x86_64-linux/layer_norm/layers.py +7 -5
  14. build/torch28-cxx11-cu128-x86_64-linux/layer_norm/_layer_norm_4e9c226_dirty.abi3.so +0 -3
  15. build/torch28-cxx11-cu128-x86_64-linux/layer_norm/_layer_norm_f622ea1_dirty.abi3.so +3 -0
  16. build/torch28-cxx11-cu128-x86_64-linux/layer_norm/_ops.py +3 -3
  17. build/torch28-cxx11-cu128-x86_64-linux/layer_norm/layers.py +7 -5
  18. build/torch28-cxx11-cu129-x86_64-linux/layer_norm/_layer_norm_4e9c226_dirty.abi3.so +0 -3
  19. build/torch28-cxx11-cu129-x86_64-linux/layer_norm/_layer_norm_f622ea1_dirty.abi3.so +3 -0
  20. build/torch28-cxx11-cu129-x86_64-linux/layer_norm/_ops.py +3 -3
  21. build/torch28-cxx11-cu129-x86_64-linux/layer_norm/layers.py +7 -5
  22. torch-ext/layer_norm/_layer_norm_711aa42_dirty.abi3.so +0 -3
  23. torch-ext/layer_norm/_ops.py +0 -9
  24. torch-ext/layer_norm/layers.py +7 -5
  25. torch-ext/registration.h +0 -30
build.toml CHANGED
@@ -12,7 +12,11 @@ src = [
12
  depends = ["torch"]
13
  backend = "cuda"
14
  cuda-capabilities = [
15
- "9.0"
 
 
 
 
16
  ]
17
  include = ["."]
18
  src = [
 
12
  depends = ["torch"]
13
  backend = "cuda"
14
  cuda-capabilities = [
15
+ "8.0",
16
+ "8.9",
17
+ "9.0",
18
+ "10.0",
19
+ "12.0",
20
  ]
21
  include = ["."]
22
  src = [
build/torch27-cxx11-cu118-x86_64-linux/layer_norm/{_layer_norm_4e9c226_dirty.abi3.so → _layer_norm_f622ea1_dirty.abi3.so} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:34e4a57b8d721c4dafb541a81e161435d25198632e3e4c8e2bc66c17eccc236f
3
- size 248321384
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe0515daaf1bbfd1246d18bd5c1a5cd6f366059090a8b6e402955d06caaa6392
3
+ size 716945976
build/torch27-cxx11-cu118-x86_64-linux/layer_norm/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _layer_norm_4e9c226_dirty
3
- ops = torch.ops._layer_norm_4e9c226_dirty
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_layer_norm_4e9c226_dirty::{op_name}"
 
1
  import torch
2
+ from . import _layer_norm_f622ea1_dirty
3
+ ops = torch.ops._layer_norm_f622ea1_dirty
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_layer_norm_f622ea1_dirty::{op_name}"
build/torch27-cxx11-cu118-x86_64-linux/layer_norm/layers.py CHANGED
@@ -9,8 +9,8 @@ class LayerNorm(nn.Module):
9
  variance_epsilon: float
10
 
11
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
12
- return ops.dropout_add_ln_fwd(
13
- hidden_states,
14
  gamma = self.weight,
15
  beta = None,
16
  rowscale = None,
@@ -25,14 +25,15 @@ class LayerNorm(nn.Module):
25
  residual_in_fp32 = False,
26
  is_rms_norm = False,
27
  )
 
28
 
29
  class LlamaRMSNorm(nn.Module):
30
  weight: torch.Tensor
31
  variance_epsilon: float
32
 
33
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
34
- return ops.dropout_add_ln_fwd(
35
- hidden_states,
36
  gamma = self.weight,
37
  beta = None,
38
  rowscale = None,
@@ -46,4 +47,5 @@ class LlamaRMSNorm(nn.Module):
46
  gen = None,
47
  residual_in_fp32 = False,
48
  is_rms_norm = True,
49
- )
 
 
9
  variance_epsilon: float
10
 
11
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
12
+ output = ops.dropout_add_ln_fwd(
13
+ hidden_states.view(hidden_states.shape[0], -1),
14
  gamma = self.weight,
15
  beta = None,
16
  rowscale = None,
 
25
  residual_in_fp32 = False,
26
  is_rms_norm = False,
27
  )
28
+ return output[0].view(hidden_states.shape)
29
 
30
  class LlamaRMSNorm(nn.Module):
31
  weight: torch.Tensor
32
  variance_epsilon: float
33
 
34
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
35
+ output = ops.dropout_add_ln_fwd(
36
+ hidden_states.view(hidden_states.shape[0], -1),
37
  gamma = self.weight,
38
  beta = None,
39
  rowscale = None,
 
47
  gen = None,
48
  residual_in_fp32 = False,
49
  is_rms_norm = True,
50
+ )
51
+ return output[0].view(hidden_states.shape)
build/torch27-cxx11-cu126-x86_64-linux/layer_norm/{_layer_norm_4e9c226_dirty.abi3.so → _layer_norm_f622ea1_dirty.abi3.so} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f541911e5471865e47faf1641da36bcee3b206aa4993949a3cac966c3b936d27
3
- size 247115320
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:04095de2e4bf9cd03f9ec481084d0c9e9e0baa0bab17a0ec9715f22f69bdfd33
3
+ size 712024848
build/torch27-cxx11-cu126-x86_64-linux/layer_norm/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _layer_norm_4e9c226_dirty
3
- ops = torch.ops._layer_norm_4e9c226_dirty
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_layer_norm_4e9c226_dirty::{op_name}"
 
1
  import torch
2
+ from . import _layer_norm_f622ea1_dirty
3
+ ops = torch.ops._layer_norm_f622ea1_dirty
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_layer_norm_f622ea1_dirty::{op_name}"
build/torch27-cxx11-cu126-x86_64-linux/layer_norm/layers.py CHANGED
@@ -9,8 +9,8 @@ class LayerNorm(nn.Module):
9
  variance_epsilon: float
10
 
11
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
12
- return ops.dropout_add_ln_fwd(
13
- hidden_states,
14
  gamma = self.weight,
15
  beta = None,
16
  rowscale = None,
@@ -25,14 +25,15 @@ class LayerNorm(nn.Module):
25
  residual_in_fp32 = False,
26
  is_rms_norm = False,
27
  )
 
28
 
29
  class LlamaRMSNorm(nn.Module):
30
  weight: torch.Tensor
31
  variance_epsilon: float
32
 
33
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
34
- return ops.dropout_add_ln_fwd(
35
- hidden_states,
36
  gamma = self.weight,
37
  beta = None,
38
  rowscale = None,
@@ -46,4 +47,5 @@ class LlamaRMSNorm(nn.Module):
46
  gen = None,
47
  residual_in_fp32 = False,
48
  is_rms_norm = True,
49
- )
 
 
9
  variance_epsilon: float
10
 
11
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
12
+ output = ops.dropout_add_ln_fwd(
13
+ hidden_states.view(hidden_states.shape[0], -1),
14
  gamma = self.weight,
15
  beta = None,
16
  rowscale = None,
 
25
  residual_in_fp32 = False,
26
  is_rms_norm = False,
27
  )
28
+ return output[0].view(hidden_states.shape)
29
 
30
  class LlamaRMSNorm(nn.Module):
31
  weight: torch.Tensor
32
  variance_epsilon: float
33
 
34
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
35
+ output = ops.dropout_add_ln_fwd(
36
+ hidden_states.view(hidden_states.shape[0], -1),
37
  gamma = self.weight,
38
  beta = None,
39
  rowscale = None,
 
47
  gen = None,
48
  residual_in_fp32 = False,
49
  is_rms_norm = True,
50
+ )
51
+ return output[0].view(hidden_states.shape)
build/{torch28-cxx11-cu126-x86_64-linux/layer_norm/_layer_norm_4e9c226_dirty.abi3.so → torch27-cxx11-cu128-x86_64-linux/layer_norm/_layer_norm_f622ea1_dirty.abi3.so} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5b28a4d7885c08614b479490306561990c4cf6e5958dedd5ce59c2ee10bd0f0a
3
- size 247115408
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ae0d54be8ee4e3ae33f47f0b27243c9cbd5668ff7756b1dfb5dcd9e2430f5a35
3
+ size 1231333392
build/torch27-cxx11-cu128-x86_64-linux/layer_norm/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _layer_norm_4e9c226_dirty
3
- ops = torch.ops._layer_norm_4e9c226_dirty
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_layer_norm_4e9c226_dirty::{op_name}"
 
1
  import torch
2
+ from . import _layer_norm_f622ea1_dirty
3
+ ops = torch.ops._layer_norm_f622ea1_dirty
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_layer_norm_f622ea1_dirty::{op_name}"
build/torch27-cxx11-cu128-x86_64-linux/layer_norm/layers.py CHANGED
@@ -9,8 +9,8 @@ class LayerNorm(nn.Module):
9
  variance_epsilon: float
10
 
11
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
12
- return ops.dropout_add_ln_fwd(
13
- hidden_states,
14
  gamma = self.weight,
15
  beta = None,
16
  rowscale = None,
@@ -25,14 +25,15 @@ class LayerNorm(nn.Module):
25
  residual_in_fp32 = False,
26
  is_rms_norm = False,
27
  )
 
28
 
29
  class LlamaRMSNorm(nn.Module):
30
  weight: torch.Tensor
31
  variance_epsilon: float
32
 
33
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
34
- return ops.dropout_add_ln_fwd(
35
- hidden_states,
36
  gamma = self.weight,
37
  beta = None,
38
  rowscale = None,
@@ -46,4 +47,5 @@ class LlamaRMSNorm(nn.Module):
46
  gen = None,
47
  residual_in_fp32 = False,
48
  is_rms_norm = True,
49
- )
 
 
9
  variance_epsilon: float
10
 
11
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
12
+ output = ops.dropout_add_ln_fwd(
13
+ hidden_states.view(hidden_states.shape[0], -1),
14
  gamma = self.weight,
15
  beta = None,
16
  rowscale = None,
 
25
  residual_in_fp32 = False,
26
  is_rms_norm = False,
27
  )
28
+ return output[0].view(hidden_states.shape)
29
 
30
  class LlamaRMSNorm(nn.Module):
31
  weight: torch.Tensor
32
  variance_epsilon: float
33
 
34
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
35
+ output = ops.dropout_add_ln_fwd(
36
+ hidden_states.view(hidden_states.shape[0], -1),
37
  gamma = self.weight,
38
  beta = None,
39
  rowscale = None,
 
47
  gen = None,
48
  residual_in_fp32 = False,
49
  is_rms_norm = True,
50
+ )
51
+ return output[0].view(hidden_states.shape)
build/{torch27-cxx11-cu128-x86_64-linux/layer_norm/_layer_norm_4e9c226_dirty.abi3.so → torch28-cxx11-cu126-x86_64-linux/layer_norm/_layer_norm_f622ea1_dirty.abi3.so} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7db683e74d55a1a71dc520a504521af3f08fb07724675d2097ce3d4ab3481e3d
3
- size 246751936
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:12b6de6cef24c5ee7a390d91ee2ea7069533e66440cf78ae5df7ae3beff5c1ca
3
+ size 712024936
build/torch28-cxx11-cu126-x86_64-linux/layer_norm/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _layer_norm_4e9c226_dirty
3
- ops = torch.ops._layer_norm_4e9c226_dirty
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_layer_norm_4e9c226_dirty::{op_name}"
 
1
  import torch
2
+ from . import _layer_norm_f622ea1_dirty
3
+ ops = torch.ops._layer_norm_f622ea1_dirty
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_layer_norm_f622ea1_dirty::{op_name}"
build/torch28-cxx11-cu126-x86_64-linux/layer_norm/layers.py CHANGED
@@ -9,8 +9,8 @@ class LayerNorm(nn.Module):
9
  variance_epsilon: float
10
 
11
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
12
- return ops.dropout_add_ln_fwd(
13
- hidden_states,
14
  gamma = self.weight,
15
  beta = None,
16
  rowscale = None,
@@ -25,14 +25,15 @@ class LayerNorm(nn.Module):
25
  residual_in_fp32 = False,
26
  is_rms_norm = False,
27
  )
 
28
 
29
  class LlamaRMSNorm(nn.Module):
30
  weight: torch.Tensor
31
  variance_epsilon: float
32
 
33
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
34
- return ops.dropout_add_ln_fwd(
35
- hidden_states,
36
  gamma = self.weight,
37
  beta = None,
38
  rowscale = None,
@@ -46,4 +47,5 @@ class LlamaRMSNorm(nn.Module):
46
  gen = None,
47
  residual_in_fp32 = False,
48
  is_rms_norm = True,
49
- )
 
 
9
  variance_epsilon: float
10
 
11
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
12
+ output = ops.dropout_add_ln_fwd(
13
+ hidden_states.view(hidden_states.shape[0], -1),
14
  gamma = self.weight,
15
  beta = None,
16
  rowscale = None,
 
25
  residual_in_fp32 = False,
26
  is_rms_norm = False,
27
  )
28
+ return output[0].view(hidden_states.shape)
29
 
30
  class LlamaRMSNorm(nn.Module):
31
  weight: torch.Tensor
32
  variance_epsilon: float
33
 
34
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
35
+ output = ops.dropout_add_ln_fwd(
36
+ hidden_states.view(hidden_states.shape[0], -1),
37
  gamma = self.weight,
38
  beta = None,
39
  rowscale = None,
 
47
  gen = None,
48
  residual_in_fp32 = False,
49
  is_rms_norm = True,
50
+ )
51
+ return output[0].view(hidden_states.shape)
build/torch28-cxx11-cu128-x86_64-linux/layer_norm/_layer_norm_4e9c226_dirty.abi3.so DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:69c897ea7e96a6988909ac3878f74baa2b598b0301a2ee3227f9f1c9804fb64d
3
- size 246756512
 
 
 
 
build/torch28-cxx11-cu128-x86_64-linux/layer_norm/_layer_norm_f622ea1_dirty.abi3.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d51ec6b6da7095cf5fc18493eb4b0b1c20485f01dff4b38370979ea3d0a9dd60
3
+ size 1231337968
build/torch28-cxx11-cu128-x86_64-linux/layer_norm/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _layer_norm_4e9c226_dirty
3
- ops = torch.ops._layer_norm_4e9c226_dirty
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_layer_norm_4e9c226_dirty::{op_name}"
 
1
  import torch
2
+ from . import _layer_norm_f622ea1_dirty
3
+ ops = torch.ops._layer_norm_f622ea1_dirty
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_layer_norm_f622ea1_dirty::{op_name}"
build/torch28-cxx11-cu128-x86_64-linux/layer_norm/layers.py CHANGED
@@ -9,8 +9,8 @@ class LayerNorm(nn.Module):
9
  variance_epsilon: float
10
 
11
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
12
- return ops.dropout_add_ln_fwd(
13
- hidden_states,
14
  gamma = self.weight,
15
  beta = None,
16
  rowscale = None,
@@ -25,14 +25,15 @@ class LayerNorm(nn.Module):
25
  residual_in_fp32 = False,
26
  is_rms_norm = False,
27
  )
 
28
 
29
  class LlamaRMSNorm(nn.Module):
30
  weight: torch.Tensor
31
  variance_epsilon: float
32
 
33
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
34
- return ops.dropout_add_ln_fwd(
35
- hidden_states,
36
  gamma = self.weight,
37
  beta = None,
38
  rowscale = None,
@@ -46,4 +47,5 @@ class LlamaRMSNorm(nn.Module):
46
  gen = None,
47
  residual_in_fp32 = False,
48
  is_rms_norm = True,
49
- )
 
 
9
  variance_epsilon: float
10
 
11
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
12
+ output = ops.dropout_add_ln_fwd(
13
+ hidden_states.view(hidden_states.shape[0], -1),
14
  gamma = self.weight,
15
  beta = None,
16
  rowscale = None,
 
25
  residual_in_fp32 = False,
26
  is_rms_norm = False,
27
  )
28
+ return output[0].view(hidden_states.shape)
29
 
30
  class LlamaRMSNorm(nn.Module):
31
  weight: torch.Tensor
32
  variance_epsilon: float
33
 
34
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
35
+ output = ops.dropout_add_ln_fwd(
36
+ hidden_states.view(hidden_states.shape[0], -1),
37
  gamma = self.weight,
38
  beta = None,
39
  rowscale = None,
 
47
  gen = None,
48
  residual_in_fp32 = False,
49
  is_rms_norm = True,
50
+ )
51
+ return output[0].view(hidden_states.shape)
build/torch28-cxx11-cu129-x86_64-linux/layer_norm/_layer_norm_4e9c226_dirty.abi3.so DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:594fd2ab65b273a4fee370bab7e03cb79cbc9c320eb37364466940a60ef154fa
3
- size 248443760
 
 
 
 
build/torch28-cxx11-cu129-x86_64-linux/layer_norm/_layer_norm_f622ea1_dirty.abi3.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9080934ece3b5e09db6178b1baa15b8baf9f6873e234a951a2122071e1190fba
3
+ size 1283037376
build/torch28-cxx11-cu129-x86_64-linux/layer_norm/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _layer_norm_4e9c226_dirty
3
- ops = torch.ops._layer_norm_4e9c226_dirty
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_layer_norm_4e9c226_dirty::{op_name}"
 
1
  import torch
2
+ from . import _layer_norm_f622ea1_dirty
3
+ ops = torch.ops._layer_norm_f622ea1_dirty
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_layer_norm_f622ea1_dirty::{op_name}"
build/torch28-cxx11-cu129-x86_64-linux/layer_norm/layers.py CHANGED
@@ -9,8 +9,8 @@ class LayerNorm(nn.Module):
9
  variance_epsilon: float
10
 
11
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
12
- return ops.dropout_add_ln_fwd(
13
- hidden_states,
14
  gamma = self.weight,
15
  beta = None,
16
  rowscale = None,
@@ -25,14 +25,15 @@ class LayerNorm(nn.Module):
25
  residual_in_fp32 = False,
26
  is_rms_norm = False,
27
  )
 
28
 
29
  class LlamaRMSNorm(nn.Module):
30
  weight: torch.Tensor
31
  variance_epsilon: float
32
 
33
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
34
- return ops.dropout_add_ln_fwd(
35
- hidden_states,
36
  gamma = self.weight,
37
  beta = None,
38
  rowscale = None,
@@ -46,4 +47,5 @@ class LlamaRMSNorm(nn.Module):
46
  gen = None,
47
  residual_in_fp32 = False,
48
  is_rms_norm = True,
49
- )
 
 
9
  variance_epsilon: float
10
 
11
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
12
+ output = ops.dropout_add_ln_fwd(
13
+ hidden_states.view(hidden_states.shape[0], -1),
14
  gamma = self.weight,
15
  beta = None,
16
  rowscale = None,
 
25
  residual_in_fp32 = False,
26
  is_rms_norm = False,
27
  )
28
+ return output[0].view(hidden_states.shape)
29
 
30
  class LlamaRMSNorm(nn.Module):
31
  weight: torch.Tensor
32
  variance_epsilon: float
33
 
34
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
35
+ output = ops.dropout_add_ln_fwd(
36
+ hidden_states.view(hidden_states.shape[0], -1),
37
  gamma = self.weight,
38
  beta = None,
39
  rowscale = None,
 
47
  gen = None,
48
  residual_in_fp32 = False,
49
  is_rms_norm = True,
50
+ )
51
+ return output[0].view(hidden_states.shape)
torch-ext/layer_norm/_layer_norm_711aa42_dirty.abi3.so DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c824a0d2b400f4a89ccf293975ccfedc32733174dad4386a402149c440946674
3
- size 247782208
 
 
 
 
torch-ext/layer_norm/_ops.py DELETED
@@ -1,9 +0,0 @@
1
- import torch
2
- from . import _layer_norm_711aa42_dirty
3
- ops = torch.ops._layer_norm_711aa42_dirty
4
-
5
- def add_op_namespace_prefix(op_name: str):
6
- """
7
- Prefix op by namespace.
8
- """
9
- return f"_layer_norm_711aa42_dirty::{op_name}"
 
 
 
 
 
 
 
 
 
 
torch-ext/layer_norm/layers.py CHANGED
@@ -9,8 +9,8 @@ class LayerNorm(nn.Module):
9
  variance_epsilon: float
10
 
11
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
12
- return ops.dropout_add_ln_fwd(
13
- hidden_states,
14
  gamma = self.weight,
15
  beta = None,
16
  rowscale = None,
@@ -25,14 +25,15 @@ class LayerNorm(nn.Module):
25
  residual_in_fp32 = False,
26
  is_rms_norm = False,
27
  )
 
28
 
29
  class LlamaRMSNorm(nn.Module):
30
  weight: torch.Tensor
31
  variance_epsilon: float
32
 
33
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
34
- return ops.dropout_add_ln_fwd(
35
- hidden_states,
36
  gamma = self.weight,
37
  beta = None,
38
  rowscale = None,
@@ -46,4 +47,5 @@ class LlamaRMSNorm(nn.Module):
46
  gen = None,
47
  residual_in_fp32 = False,
48
  is_rms_norm = True,
49
- )
 
 
9
  variance_epsilon: float
10
 
11
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
12
+ output = ops.dropout_add_ln_fwd(
13
+ hidden_states.view(hidden_states.shape[0], -1),
14
  gamma = self.weight,
15
  beta = None,
16
  rowscale = None,
 
25
  residual_in_fp32 = False,
26
  is_rms_norm = False,
27
  )
28
+ return output[0].view(hidden_states.shape)
29
 
30
  class LlamaRMSNorm(nn.Module):
31
  weight: torch.Tensor
32
  variance_epsilon: float
33
 
34
  def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
35
+ output = ops.dropout_add_ln_fwd(
36
+ hidden_states.view(hidden_states.shape[0], -1),
37
  gamma = self.weight,
38
  beta = None,
39
  rowscale = None,
 
47
  gen = None,
48
  residual_in_fp32 = False,
49
  is_rms_norm = True,
50
+ )
51
+ return output[0].view(hidden_states.shape)
torch-ext/registration.h DELETED
@@ -1,30 +0,0 @@
1
- // Registration macros from vLLM:
2
- // https://github.com/vllm-project/vllm/blob/main/csrc/core/registration.h
3
-
4
- #pragma once
5
-
6
- #include <Python.h>
7
-
8
- #define _CONCAT(A, B) A##B
9
- #define CONCAT(A, B) _CONCAT(A, B)
10
-
11
- #define _STRINGIFY(A) #A
12
- #define STRINGIFY(A) _STRINGIFY(A)
13
-
14
- // A version of the TORCH_LIBRARY macro that expands the NAME, i.e. so NAME
15
- // could be a macro instead of a literal token.
16
- #define TORCH_LIBRARY_EXPAND(NAME, MODULE) TORCH_LIBRARY(NAME, MODULE)
17
-
18
- // A version of the TORCH_LIBRARY_IMPL macro that expands the NAME, i.e. so NAME
19
- // could be a macro instead of a literal token.
20
- #define TORCH_LIBRARY_IMPL_EXPAND(NAME, DEVICE, MODULE) \
21
- TORCH_LIBRARY_IMPL(NAME, DEVICE, MODULE)
22
-
23
- // REGISTER_EXTENSION allows the shared library to be loaded and initialized
24
- // via python's import statement.
25
- #define REGISTER_EXTENSION(NAME) \
26
- PyMODINIT_FUNC CONCAT(PyInit_, NAME)() { \
27
- static struct PyModuleDef module = {PyModuleDef_HEAD_INIT, \
28
- STRINGIFY(NAME), nullptr, 0, nullptr}; \
29
- return PyModule_Create(&module); \
30
- }