danieldk HF Staff commited on
Commit
9920ab1
·
verified ·
1 Parent(s): 5b87173

Build uploaded using `kernels`.

Browse files
Files changed (27) hide show
  1. build/torch210-cxx11-cu126-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
  2. build/torch210-cxx11-cu126-x86_64-linux/_ops.py +3 -3
  3. build/torch210-cxx11-cu126-x86_64-linux/layers.py +22 -0
  4. build/torch210-cxx11-cu128-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
  5. build/torch210-cxx11-cu128-x86_64-linux/_ops.py +3 -3
  6. build/torch210-cxx11-cu128-x86_64-linux/layers.py +22 -0
  7. build/torch210-cxx11-cu130-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
  8. build/torch210-cxx11-cu130-x86_64-linux/_ops.py +3 -3
  9. build/torch210-cxx11-cu130-x86_64-linux/layers.py +22 -0
  10. build/torch28-cxx11-cu126-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
  11. build/torch28-cxx11-cu126-x86_64-linux/_ops.py +3 -3
  12. build/torch28-cxx11-cu126-x86_64-linux/layers.py +22 -0
  13. build/torch28-cxx11-cu128-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
  14. build/torch28-cxx11-cu128-x86_64-linux/_ops.py +3 -3
  15. build/torch28-cxx11-cu128-x86_64-linux/layers.py +22 -0
  16. build/torch28-cxx11-cu129-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
  17. build/torch28-cxx11-cu129-x86_64-linux/_ops.py +3 -3
  18. build/torch28-cxx11-cu129-x86_64-linux/layers.py +22 -0
  19. build/torch29-cxx11-cu126-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
  20. build/torch29-cxx11-cu126-x86_64-linux/_ops.py +3 -3
  21. build/torch29-cxx11-cu126-x86_64-linux/layers.py +22 -0
  22. build/torch29-cxx11-cu128-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
  23. build/torch29-cxx11-cu128-x86_64-linux/_ops.py +3 -3
  24. build/torch29-cxx11-cu128-x86_64-linux/layers.py +22 -0
  25. build/torch29-cxx11-cu130-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
  26. build/torch29-cxx11-cu130-x86_64-linux/_ops.py +3 -3
  27. build/torch29-cxx11-cu130-x86_64-linux/layers.py +22 -0
build/torch210-cxx11-cu126-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:bca4b5803d551c91f6d48bdc97f7f56cc5a75bf6a323a54a0c7af003a00c9b0a
3
  size 3126824
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31948dad6d1014c9f5a5511ef307df89065a3321242df8718fe4fc5edc5039eb
3
  size 3126824
build/torch210-cxx11-cu126-x86_64-linux/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _activation_6c7806a
3
- ops = torch.ops._activation_6c7806a
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_activation_6c7806a::{op_name}"
 
1
  import torch
2
+ from . import _activation_f8d6759
3
+ ops = torch.ops._activation_f8d6759
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_activation_f8d6759::{op_name}"
build/torch210-cxx11-cu126-x86_64-linux/layers.py CHANGED
@@ -17,6 +17,8 @@ class SiluAndMul(nn.Module):
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
 
 
20
  d = x.shape[-1] // 2
21
  output_shape = x.shape[:-1] + (d,)
22
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -36,6 +38,8 @@ class Silu(nn.Module):
36
  can_torch_compile: bool = True
37
 
38
  def forward(self, x: torch.Tensor):
 
 
39
  out = torch.empty_like(x)
40
  ops.silu(out, x)
41
  return out
@@ -53,6 +57,8 @@ class Gelu(nn.Module):
53
  can_torch_compile: bool = True
54
 
55
  def forward(self, x: torch.Tensor):
 
 
56
  out = torch.empty_like(x)
57
  ops.gelu(out, x)
58
  return out
@@ -70,6 +76,8 @@ class GeluTanh(nn.Module):
70
  can_torch_compile: bool = True
71
 
72
  def forward(self, x: torch.Tensor):
 
 
73
  out = torch.empty_like(x)
74
  ops.gelu_tanh(out, x)
75
  return out
@@ -88,6 +96,8 @@ class MulAndSilu(nn.Module):
88
  can_torch_compile: bool = True
89
 
90
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
91
  d = x.shape[-1] // 2
92
  output_shape = x.shape[:-1] + (d,)
93
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -108,6 +118,8 @@ class GeluAndMul(nn.Module):
108
  can_torch_compile: bool = True
109
 
110
  def forward(self, x: torch.Tensor):
 
 
111
  d = x.shape[-1] // 2
112
  output_shape = x.shape[:-1] + (d,)
113
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -119,6 +131,8 @@ class GeluTanhAndMul(nn.Module):
119
  can_torch_compile: bool = True
120
 
121
  def forward(self, x: torch.Tensor):
 
 
122
  d = x.shape[-1] // 2
123
  output_shape = x.shape[:-1] + (d,)
124
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -145,6 +159,8 @@ class FatreluAndMul(nn.Module):
145
  self.threshold = threshold
146
 
147
  def forward(self, x: torch.Tensor):
 
 
148
  d = x.shape[-1] // 2
149
  output_shape = x.shape[:-1] + (d,)
150
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -156,6 +172,8 @@ class FastGELU(nn.Module):
156
  can_torch_compile: bool = True
157
 
158
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
159
  out = torch.empty_like(x)
160
  ops.gelu_fast(out, x)
161
  return out
@@ -165,6 +183,8 @@ class NewGELU(nn.Module):
165
  can_torch_compile: bool = True
166
 
167
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
168
  out = torch.empty_like(x)
169
  ops.gelu_new(out, x)
170
  return out
@@ -174,6 +194,8 @@ class QuickGELU(nn.Module):
174
  can_torch_compile: bool = True
175
 
176
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
177
  out = torch.empty_like(x)
178
  ops.gelu_quick(out, x)
179
  return out
 
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
20
+ if not x.is_contiguous():
21
+ x = x.contiguous()
22
  d = x.shape[-1] // 2
23
  output_shape = x.shape[:-1] + (d,)
24
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
38
  can_torch_compile: bool = True
39
 
40
  def forward(self, x: torch.Tensor):
41
+ if not x.is_contiguous():
42
+ x = x.contiguous()
43
  out = torch.empty_like(x)
44
  ops.silu(out, x)
45
  return out
 
57
  can_torch_compile: bool = True
58
 
59
  def forward(self, x: torch.Tensor):
60
+ if not x.is_contiguous():
61
+ x = x.contiguous()
62
  out = torch.empty_like(x)
63
  ops.gelu(out, x)
64
  return out
 
76
  can_torch_compile: bool = True
77
 
78
  def forward(self, x: torch.Tensor):
79
+ if not x.is_contiguous():
80
+ x = x.contiguous()
81
  out = torch.empty_like(x)
82
  ops.gelu_tanh(out, x)
83
  return out
 
96
  can_torch_compile: bool = True
97
 
98
  def forward(self, x: torch.Tensor) -> torch.Tensor:
99
+ if not x.is_contiguous():
100
+ x = x.contiguous()
101
  d = x.shape[-1] // 2
102
  output_shape = x.shape[:-1] + (d,)
103
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
118
  can_torch_compile: bool = True
119
 
120
  def forward(self, x: torch.Tensor):
121
+ if not x.is_contiguous():
122
+ x = x.contiguous()
123
  d = x.shape[-1] // 2
124
  output_shape = x.shape[:-1] + (d,)
125
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
131
  can_torch_compile: bool = True
132
 
133
  def forward(self, x: torch.Tensor):
134
+ if not x.is_contiguous():
135
+ x = x.contiguous()
136
  d = x.shape[-1] // 2
137
  output_shape = x.shape[:-1] + (d,)
138
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
159
  self.threshold = threshold
160
 
161
  def forward(self, x: torch.Tensor):
162
+ if not x.is_contiguous():
163
+ x = x.contiguous()
164
  d = x.shape[-1] // 2
165
  output_shape = x.shape[:-1] + (d,)
166
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
172
  can_torch_compile: bool = True
173
 
174
  def forward(self, x: torch.Tensor) -> torch.Tensor:
175
+ if not x.is_contiguous():
176
+ x = x.contiguous()
177
  out = torch.empty_like(x)
178
  ops.gelu_fast(out, x)
179
  return out
 
183
  can_torch_compile: bool = True
184
 
185
  def forward(self, x: torch.Tensor) -> torch.Tensor:
186
+ if not x.is_contiguous():
187
+ x = x.contiguous()
188
  out = torch.empty_like(x)
189
  ops.gelu_new(out, x)
190
  return out
 
194
  can_torch_compile: bool = True
195
 
196
  def forward(self, x: torch.Tensor) -> torch.Tensor:
197
+ if not x.is_contiguous():
198
+ x = x.contiguous()
199
  out = torch.empty_like(x)
200
  ops.gelu_quick(out, x)
201
  return out
build/torch210-cxx11-cu128-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:02f7a8647cda7bd3279b61320922cb003d937da922430d8c7f304d39b70c7036
3
  size 4406608
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d6fcf0761a3a7f576a86a1c5cd8110c5b5e6bc14754d7f8ebc4f6929e98f8131
3
  size 4406608
build/torch210-cxx11-cu128-x86_64-linux/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _activation_6c7806a
3
- ops = torch.ops._activation_6c7806a
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_activation_6c7806a::{op_name}"
 
1
  import torch
2
+ from . import _activation_f8d6759
3
+ ops = torch.ops._activation_f8d6759
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_activation_f8d6759::{op_name}"
build/torch210-cxx11-cu128-x86_64-linux/layers.py CHANGED
@@ -17,6 +17,8 @@ class SiluAndMul(nn.Module):
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
 
 
20
  d = x.shape[-1] // 2
21
  output_shape = x.shape[:-1] + (d,)
22
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -36,6 +38,8 @@ class Silu(nn.Module):
36
  can_torch_compile: bool = True
37
 
38
  def forward(self, x: torch.Tensor):
 
 
39
  out = torch.empty_like(x)
40
  ops.silu(out, x)
41
  return out
@@ -53,6 +57,8 @@ class Gelu(nn.Module):
53
  can_torch_compile: bool = True
54
 
55
  def forward(self, x: torch.Tensor):
 
 
56
  out = torch.empty_like(x)
57
  ops.gelu(out, x)
58
  return out
@@ -70,6 +76,8 @@ class GeluTanh(nn.Module):
70
  can_torch_compile: bool = True
71
 
72
  def forward(self, x: torch.Tensor):
 
 
73
  out = torch.empty_like(x)
74
  ops.gelu_tanh(out, x)
75
  return out
@@ -88,6 +96,8 @@ class MulAndSilu(nn.Module):
88
  can_torch_compile: bool = True
89
 
90
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
91
  d = x.shape[-1] // 2
92
  output_shape = x.shape[:-1] + (d,)
93
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -108,6 +118,8 @@ class GeluAndMul(nn.Module):
108
  can_torch_compile: bool = True
109
 
110
  def forward(self, x: torch.Tensor):
 
 
111
  d = x.shape[-1] // 2
112
  output_shape = x.shape[:-1] + (d,)
113
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -119,6 +131,8 @@ class GeluTanhAndMul(nn.Module):
119
  can_torch_compile: bool = True
120
 
121
  def forward(self, x: torch.Tensor):
 
 
122
  d = x.shape[-1] // 2
123
  output_shape = x.shape[:-1] + (d,)
124
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -145,6 +159,8 @@ class FatreluAndMul(nn.Module):
145
  self.threshold = threshold
146
 
147
  def forward(self, x: torch.Tensor):
 
 
148
  d = x.shape[-1] // 2
149
  output_shape = x.shape[:-1] + (d,)
150
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -156,6 +172,8 @@ class FastGELU(nn.Module):
156
  can_torch_compile: bool = True
157
 
158
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
159
  out = torch.empty_like(x)
160
  ops.gelu_fast(out, x)
161
  return out
@@ -165,6 +183,8 @@ class NewGELU(nn.Module):
165
  can_torch_compile: bool = True
166
 
167
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
168
  out = torch.empty_like(x)
169
  ops.gelu_new(out, x)
170
  return out
@@ -174,6 +194,8 @@ class QuickGELU(nn.Module):
174
  can_torch_compile: bool = True
175
 
176
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
177
  out = torch.empty_like(x)
178
  ops.gelu_quick(out, x)
179
  return out
 
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
20
+ if not x.is_contiguous():
21
+ x = x.contiguous()
22
  d = x.shape[-1] // 2
23
  output_shape = x.shape[:-1] + (d,)
24
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
38
  can_torch_compile: bool = True
39
 
40
  def forward(self, x: torch.Tensor):
41
+ if not x.is_contiguous():
42
+ x = x.contiguous()
43
  out = torch.empty_like(x)
44
  ops.silu(out, x)
45
  return out
 
57
  can_torch_compile: bool = True
58
 
59
  def forward(self, x: torch.Tensor):
60
+ if not x.is_contiguous():
61
+ x = x.contiguous()
62
  out = torch.empty_like(x)
63
  ops.gelu(out, x)
64
  return out
 
76
  can_torch_compile: bool = True
77
 
78
  def forward(self, x: torch.Tensor):
79
+ if not x.is_contiguous():
80
+ x = x.contiguous()
81
  out = torch.empty_like(x)
82
  ops.gelu_tanh(out, x)
83
  return out
 
96
  can_torch_compile: bool = True
97
 
98
  def forward(self, x: torch.Tensor) -> torch.Tensor:
99
+ if not x.is_contiguous():
100
+ x = x.contiguous()
101
  d = x.shape[-1] // 2
102
  output_shape = x.shape[:-1] + (d,)
103
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
118
  can_torch_compile: bool = True
119
 
120
  def forward(self, x: torch.Tensor):
121
+ if not x.is_contiguous():
122
+ x = x.contiguous()
123
  d = x.shape[-1] // 2
124
  output_shape = x.shape[:-1] + (d,)
125
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
131
  can_torch_compile: bool = True
132
 
133
  def forward(self, x: torch.Tensor):
134
+ if not x.is_contiguous():
135
+ x = x.contiguous()
136
  d = x.shape[-1] // 2
137
  output_shape = x.shape[:-1] + (d,)
138
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
159
  self.threshold = threshold
160
 
161
  def forward(self, x: torch.Tensor):
162
+ if not x.is_contiguous():
163
+ x = x.contiguous()
164
  d = x.shape[-1] // 2
165
  output_shape = x.shape[:-1] + (d,)
166
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
172
  can_torch_compile: bool = True
173
 
174
  def forward(self, x: torch.Tensor) -> torch.Tensor:
175
+ if not x.is_contiguous():
176
+ x = x.contiguous()
177
  out = torch.empty_like(x)
178
  ops.gelu_fast(out, x)
179
  return out
 
183
  can_torch_compile: bool = True
184
 
185
  def forward(self, x: torch.Tensor) -> torch.Tensor:
186
+ if not x.is_contiguous():
187
+ x = x.contiguous()
188
  out = torch.empty_like(x)
189
  ops.gelu_new(out, x)
190
  return out
 
194
  can_torch_compile: bool = True
195
 
196
  def forward(self, x: torch.Tensor) -> torch.Tensor:
197
+ if not x.is_contiguous():
198
+ x = x.contiguous()
199
  out = torch.empty_like(x)
200
  ops.gelu_quick(out, x)
201
  return out
build/torch210-cxx11-cu130-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:41d12d8c5fd39c2f22571660c046329a8730ed0f9e524b7cb086e3e37498e65c
3
  size 4190152
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:113e34d7c94e83607c00b48554553a8708798ce743b3d5a2e039843502f5b76c
3
  size 4190152
build/torch210-cxx11-cu130-x86_64-linux/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _activation_6c7806a
3
- ops = torch.ops._activation_6c7806a
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_activation_6c7806a::{op_name}"
 
1
  import torch
2
+ from . import _activation_f8d6759
3
+ ops = torch.ops._activation_f8d6759
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_activation_f8d6759::{op_name}"
build/torch210-cxx11-cu130-x86_64-linux/layers.py CHANGED
@@ -17,6 +17,8 @@ class SiluAndMul(nn.Module):
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
 
 
20
  d = x.shape[-1] // 2
21
  output_shape = x.shape[:-1] + (d,)
22
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -36,6 +38,8 @@ class Silu(nn.Module):
36
  can_torch_compile: bool = True
37
 
38
  def forward(self, x: torch.Tensor):
 
 
39
  out = torch.empty_like(x)
40
  ops.silu(out, x)
41
  return out
@@ -53,6 +57,8 @@ class Gelu(nn.Module):
53
  can_torch_compile: bool = True
54
 
55
  def forward(self, x: torch.Tensor):
 
 
56
  out = torch.empty_like(x)
57
  ops.gelu(out, x)
58
  return out
@@ -70,6 +76,8 @@ class GeluTanh(nn.Module):
70
  can_torch_compile: bool = True
71
 
72
  def forward(self, x: torch.Tensor):
 
 
73
  out = torch.empty_like(x)
74
  ops.gelu_tanh(out, x)
75
  return out
@@ -88,6 +96,8 @@ class MulAndSilu(nn.Module):
88
  can_torch_compile: bool = True
89
 
90
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
91
  d = x.shape[-1] // 2
92
  output_shape = x.shape[:-1] + (d,)
93
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -108,6 +118,8 @@ class GeluAndMul(nn.Module):
108
  can_torch_compile: bool = True
109
 
110
  def forward(self, x: torch.Tensor):
 
 
111
  d = x.shape[-1] // 2
112
  output_shape = x.shape[:-1] + (d,)
113
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -119,6 +131,8 @@ class GeluTanhAndMul(nn.Module):
119
  can_torch_compile: bool = True
120
 
121
  def forward(self, x: torch.Tensor):
 
 
122
  d = x.shape[-1] // 2
123
  output_shape = x.shape[:-1] + (d,)
124
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -145,6 +159,8 @@ class FatreluAndMul(nn.Module):
145
  self.threshold = threshold
146
 
147
  def forward(self, x: torch.Tensor):
 
 
148
  d = x.shape[-1] // 2
149
  output_shape = x.shape[:-1] + (d,)
150
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -156,6 +172,8 @@ class FastGELU(nn.Module):
156
  can_torch_compile: bool = True
157
 
158
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
159
  out = torch.empty_like(x)
160
  ops.gelu_fast(out, x)
161
  return out
@@ -165,6 +183,8 @@ class NewGELU(nn.Module):
165
  can_torch_compile: bool = True
166
 
167
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
168
  out = torch.empty_like(x)
169
  ops.gelu_new(out, x)
170
  return out
@@ -174,6 +194,8 @@ class QuickGELU(nn.Module):
174
  can_torch_compile: bool = True
175
 
176
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
177
  out = torch.empty_like(x)
178
  ops.gelu_quick(out, x)
179
  return out
 
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
20
+ if not x.is_contiguous():
21
+ x = x.contiguous()
22
  d = x.shape[-1] // 2
23
  output_shape = x.shape[:-1] + (d,)
24
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
38
  can_torch_compile: bool = True
39
 
40
  def forward(self, x: torch.Tensor):
41
+ if not x.is_contiguous():
42
+ x = x.contiguous()
43
  out = torch.empty_like(x)
44
  ops.silu(out, x)
45
  return out
 
57
  can_torch_compile: bool = True
58
 
59
  def forward(self, x: torch.Tensor):
60
+ if not x.is_contiguous():
61
+ x = x.contiguous()
62
  out = torch.empty_like(x)
63
  ops.gelu(out, x)
64
  return out
 
76
  can_torch_compile: bool = True
77
 
78
  def forward(self, x: torch.Tensor):
79
+ if not x.is_contiguous():
80
+ x = x.contiguous()
81
  out = torch.empty_like(x)
82
  ops.gelu_tanh(out, x)
83
  return out
 
96
  can_torch_compile: bool = True
97
 
98
  def forward(self, x: torch.Tensor) -> torch.Tensor:
99
+ if not x.is_contiguous():
100
+ x = x.contiguous()
101
  d = x.shape[-1] // 2
102
  output_shape = x.shape[:-1] + (d,)
103
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
118
  can_torch_compile: bool = True
119
 
120
  def forward(self, x: torch.Tensor):
121
+ if not x.is_contiguous():
122
+ x = x.contiguous()
123
  d = x.shape[-1] // 2
124
  output_shape = x.shape[:-1] + (d,)
125
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
131
  can_torch_compile: bool = True
132
 
133
  def forward(self, x: torch.Tensor):
134
+ if not x.is_contiguous():
135
+ x = x.contiguous()
136
  d = x.shape[-1] // 2
137
  output_shape = x.shape[:-1] + (d,)
138
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
159
  self.threshold = threshold
160
 
161
  def forward(self, x: torch.Tensor):
162
+ if not x.is_contiguous():
163
+ x = x.contiguous()
164
  d = x.shape[-1] // 2
165
  output_shape = x.shape[:-1] + (d,)
166
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
172
  can_torch_compile: bool = True
173
 
174
  def forward(self, x: torch.Tensor) -> torch.Tensor:
175
+ if not x.is_contiguous():
176
+ x = x.contiguous()
177
  out = torch.empty_like(x)
178
  ops.gelu_fast(out, x)
179
  return out
 
183
  can_torch_compile: bool = True
184
 
185
  def forward(self, x: torch.Tensor) -> torch.Tensor:
186
+ if not x.is_contiguous():
187
+ x = x.contiguous()
188
  out = torch.empty_like(x)
189
  ops.gelu_new(out, x)
190
  return out
 
194
  can_torch_compile: bool = True
195
 
196
  def forward(self, x: torch.Tensor) -> torch.Tensor:
197
+ if not x.is_contiguous():
198
+ x = x.contiguous()
199
  out = torch.empty_like(x)
200
  ops.gelu_quick(out, x)
201
  return out
build/torch28-cxx11-cu126-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:441a5a0b87ff6c2234a7ba471c5f9c7a8cdbf711c2b259df25e9a9510eb8009d
3
  size 3121056
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf76431ff46ef5bc002ce8813eeed3ae9618a15094d98ef4b164f7a10a54f0bc
3
  size 3121056
build/torch28-cxx11-cu126-x86_64-linux/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _activation_6c7806a
3
- ops = torch.ops._activation_6c7806a
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_activation_6c7806a::{op_name}"
 
1
  import torch
2
+ from . import _activation_f8d6759
3
+ ops = torch.ops._activation_f8d6759
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_activation_f8d6759::{op_name}"
build/torch28-cxx11-cu126-x86_64-linux/layers.py CHANGED
@@ -17,6 +17,8 @@ class SiluAndMul(nn.Module):
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
 
 
20
  d = x.shape[-1] // 2
21
  output_shape = x.shape[:-1] + (d,)
22
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -36,6 +38,8 @@ class Silu(nn.Module):
36
  can_torch_compile: bool = True
37
 
38
  def forward(self, x: torch.Tensor):
 
 
39
  out = torch.empty_like(x)
40
  ops.silu(out, x)
41
  return out
@@ -53,6 +57,8 @@ class Gelu(nn.Module):
53
  can_torch_compile: bool = True
54
 
55
  def forward(self, x: torch.Tensor):
 
 
56
  out = torch.empty_like(x)
57
  ops.gelu(out, x)
58
  return out
@@ -70,6 +76,8 @@ class GeluTanh(nn.Module):
70
  can_torch_compile: bool = True
71
 
72
  def forward(self, x: torch.Tensor):
 
 
73
  out = torch.empty_like(x)
74
  ops.gelu_tanh(out, x)
75
  return out
@@ -88,6 +96,8 @@ class MulAndSilu(nn.Module):
88
  can_torch_compile: bool = True
89
 
90
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
91
  d = x.shape[-1] // 2
92
  output_shape = x.shape[:-1] + (d,)
93
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -108,6 +118,8 @@ class GeluAndMul(nn.Module):
108
  can_torch_compile: bool = True
109
 
110
  def forward(self, x: torch.Tensor):
 
 
111
  d = x.shape[-1] // 2
112
  output_shape = x.shape[:-1] + (d,)
113
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -119,6 +131,8 @@ class GeluTanhAndMul(nn.Module):
119
  can_torch_compile: bool = True
120
 
121
  def forward(self, x: torch.Tensor):
 
 
122
  d = x.shape[-1] // 2
123
  output_shape = x.shape[:-1] + (d,)
124
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -145,6 +159,8 @@ class FatreluAndMul(nn.Module):
145
  self.threshold = threshold
146
 
147
  def forward(self, x: torch.Tensor):
 
 
148
  d = x.shape[-1] // 2
149
  output_shape = x.shape[:-1] + (d,)
150
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -156,6 +172,8 @@ class FastGELU(nn.Module):
156
  can_torch_compile: bool = True
157
 
158
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
159
  out = torch.empty_like(x)
160
  ops.gelu_fast(out, x)
161
  return out
@@ -165,6 +183,8 @@ class NewGELU(nn.Module):
165
  can_torch_compile: bool = True
166
 
167
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
168
  out = torch.empty_like(x)
169
  ops.gelu_new(out, x)
170
  return out
@@ -174,6 +194,8 @@ class QuickGELU(nn.Module):
174
  can_torch_compile: bool = True
175
 
176
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
177
  out = torch.empty_like(x)
178
  ops.gelu_quick(out, x)
179
  return out
 
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
20
+ if not x.is_contiguous():
21
+ x = x.contiguous()
22
  d = x.shape[-1] // 2
23
  output_shape = x.shape[:-1] + (d,)
24
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
38
  can_torch_compile: bool = True
39
 
40
  def forward(self, x: torch.Tensor):
41
+ if not x.is_contiguous():
42
+ x = x.contiguous()
43
  out = torch.empty_like(x)
44
  ops.silu(out, x)
45
  return out
 
57
  can_torch_compile: bool = True
58
 
59
  def forward(self, x: torch.Tensor):
60
+ if not x.is_contiguous():
61
+ x = x.contiguous()
62
  out = torch.empty_like(x)
63
  ops.gelu(out, x)
64
  return out
 
76
  can_torch_compile: bool = True
77
 
78
  def forward(self, x: torch.Tensor):
79
+ if not x.is_contiguous():
80
+ x = x.contiguous()
81
  out = torch.empty_like(x)
82
  ops.gelu_tanh(out, x)
83
  return out
 
96
  can_torch_compile: bool = True
97
 
98
  def forward(self, x: torch.Tensor) -> torch.Tensor:
99
+ if not x.is_contiguous():
100
+ x = x.contiguous()
101
  d = x.shape[-1] // 2
102
  output_shape = x.shape[:-1] + (d,)
103
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
118
  can_torch_compile: bool = True
119
 
120
  def forward(self, x: torch.Tensor):
121
+ if not x.is_contiguous():
122
+ x = x.contiguous()
123
  d = x.shape[-1] // 2
124
  output_shape = x.shape[:-1] + (d,)
125
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
131
  can_torch_compile: bool = True
132
 
133
  def forward(self, x: torch.Tensor):
134
+ if not x.is_contiguous():
135
+ x = x.contiguous()
136
  d = x.shape[-1] // 2
137
  output_shape = x.shape[:-1] + (d,)
138
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
159
  self.threshold = threshold
160
 
161
  def forward(self, x: torch.Tensor):
162
+ if not x.is_contiguous():
163
+ x = x.contiguous()
164
  d = x.shape[-1] // 2
165
  output_shape = x.shape[:-1] + (d,)
166
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
172
  can_torch_compile: bool = True
173
 
174
  def forward(self, x: torch.Tensor) -> torch.Tensor:
175
+ if not x.is_contiguous():
176
+ x = x.contiguous()
177
  out = torch.empty_like(x)
178
  ops.gelu_fast(out, x)
179
  return out
 
183
  can_torch_compile: bool = True
184
 
185
  def forward(self, x: torch.Tensor) -> torch.Tensor:
186
+ if not x.is_contiguous():
187
+ x = x.contiguous()
188
  out = torch.empty_like(x)
189
  ops.gelu_new(out, x)
190
  return out
 
194
  can_torch_compile: bool = True
195
 
196
  def forward(self, x: torch.Tensor) -> torch.Tensor:
197
+ if not x.is_contiguous():
198
+ x = x.contiguous()
199
  out = torch.empty_like(x)
200
  ops.gelu_quick(out, x)
201
  return out
build/torch28-cxx11-cu128-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9dce7cd4ca88c490ba31463be48229c009506f957aea1415bba7523e9fc9b33d
3
  size 4400792
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2dc0a42d5ebcae09615265a3635bb90d33c76d9179fcfcec17fb2fc5cb16b7f5
3
  size 4400792
build/torch28-cxx11-cu128-x86_64-linux/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _activation_6c7806a
3
- ops = torch.ops._activation_6c7806a
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_activation_6c7806a::{op_name}"
 
1
  import torch
2
+ from . import _activation_f8d6759
3
+ ops = torch.ops._activation_f8d6759
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_activation_f8d6759::{op_name}"
build/torch28-cxx11-cu128-x86_64-linux/layers.py CHANGED
@@ -17,6 +17,8 @@ class SiluAndMul(nn.Module):
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
 
 
20
  d = x.shape[-1] // 2
21
  output_shape = x.shape[:-1] + (d,)
22
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -36,6 +38,8 @@ class Silu(nn.Module):
36
  can_torch_compile: bool = True
37
 
38
  def forward(self, x: torch.Tensor):
 
 
39
  out = torch.empty_like(x)
40
  ops.silu(out, x)
41
  return out
@@ -53,6 +57,8 @@ class Gelu(nn.Module):
53
  can_torch_compile: bool = True
54
 
55
  def forward(self, x: torch.Tensor):
 
 
56
  out = torch.empty_like(x)
57
  ops.gelu(out, x)
58
  return out
@@ -70,6 +76,8 @@ class GeluTanh(nn.Module):
70
  can_torch_compile: bool = True
71
 
72
  def forward(self, x: torch.Tensor):
 
 
73
  out = torch.empty_like(x)
74
  ops.gelu_tanh(out, x)
75
  return out
@@ -88,6 +96,8 @@ class MulAndSilu(nn.Module):
88
  can_torch_compile: bool = True
89
 
90
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
91
  d = x.shape[-1] // 2
92
  output_shape = x.shape[:-1] + (d,)
93
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -108,6 +118,8 @@ class GeluAndMul(nn.Module):
108
  can_torch_compile: bool = True
109
 
110
  def forward(self, x: torch.Tensor):
 
 
111
  d = x.shape[-1] // 2
112
  output_shape = x.shape[:-1] + (d,)
113
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -119,6 +131,8 @@ class GeluTanhAndMul(nn.Module):
119
  can_torch_compile: bool = True
120
 
121
  def forward(self, x: torch.Tensor):
 
 
122
  d = x.shape[-1] // 2
123
  output_shape = x.shape[:-1] + (d,)
124
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -145,6 +159,8 @@ class FatreluAndMul(nn.Module):
145
  self.threshold = threshold
146
 
147
  def forward(self, x: torch.Tensor):
 
 
148
  d = x.shape[-1] // 2
149
  output_shape = x.shape[:-1] + (d,)
150
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -156,6 +172,8 @@ class FastGELU(nn.Module):
156
  can_torch_compile: bool = True
157
 
158
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
159
  out = torch.empty_like(x)
160
  ops.gelu_fast(out, x)
161
  return out
@@ -165,6 +183,8 @@ class NewGELU(nn.Module):
165
  can_torch_compile: bool = True
166
 
167
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
168
  out = torch.empty_like(x)
169
  ops.gelu_new(out, x)
170
  return out
@@ -174,6 +194,8 @@ class QuickGELU(nn.Module):
174
  can_torch_compile: bool = True
175
 
176
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
177
  out = torch.empty_like(x)
178
  ops.gelu_quick(out, x)
179
  return out
 
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
20
+ if not x.is_contiguous():
21
+ x = x.contiguous()
22
  d = x.shape[-1] // 2
23
  output_shape = x.shape[:-1] + (d,)
24
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
38
  can_torch_compile: bool = True
39
 
40
  def forward(self, x: torch.Tensor):
41
+ if not x.is_contiguous():
42
+ x = x.contiguous()
43
  out = torch.empty_like(x)
44
  ops.silu(out, x)
45
  return out
 
57
  can_torch_compile: bool = True
58
 
59
  def forward(self, x: torch.Tensor):
60
+ if not x.is_contiguous():
61
+ x = x.contiguous()
62
  out = torch.empty_like(x)
63
  ops.gelu(out, x)
64
  return out
 
76
  can_torch_compile: bool = True
77
 
78
  def forward(self, x: torch.Tensor):
79
+ if not x.is_contiguous():
80
+ x = x.contiguous()
81
  out = torch.empty_like(x)
82
  ops.gelu_tanh(out, x)
83
  return out
 
96
  can_torch_compile: bool = True
97
 
98
  def forward(self, x: torch.Tensor) -> torch.Tensor:
99
+ if not x.is_contiguous():
100
+ x = x.contiguous()
101
  d = x.shape[-1] // 2
102
  output_shape = x.shape[:-1] + (d,)
103
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
118
  can_torch_compile: bool = True
119
 
120
  def forward(self, x: torch.Tensor):
121
+ if not x.is_contiguous():
122
+ x = x.contiguous()
123
  d = x.shape[-1] // 2
124
  output_shape = x.shape[:-1] + (d,)
125
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
131
  can_torch_compile: bool = True
132
 
133
  def forward(self, x: torch.Tensor):
134
+ if not x.is_contiguous():
135
+ x = x.contiguous()
136
  d = x.shape[-1] // 2
137
  output_shape = x.shape[:-1] + (d,)
138
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
159
  self.threshold = threshold
160
 
161
  def forward(self, x: torch.Tensor):
162
+ if not x.is_contiguous():
163
+ x = x.contiguous()
164
  d = x.shape[-1] // 2
165
  output_shape = x.shape[:-1] + (d,)
166
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
172
  can_torch_compile: bool = True
173
 
174
  def forward(self, x: torch.Tensor) -> torch.Tensor:
175
+ if not x.is_contiguous():
176
+ x = x.contiguous()
177
  out = torch.empty_like(x)
178
  ops.gelu_fast(out, x)
179
  return out
 
183
  can_torch_compile: bool = True
184
 
185
  def forward(self, x: torch.Tensor) -> torch.Tensor:
186
+ if not x.is_contiguous():
187
+ x = x.contiguous()
188
  out = torch.empty_like(x)
189
  ops.gelu_new(out, x)
190
  return out
 
194
  can_torch_compile: bool = True
195
 
196
  def forward(self, x: torch.Tensor) -> torch.Tensor:
197
+ if not x.is_contiguous():
198
+ x = x.contiguous()
199
  out = torch.empty_like(x)
200
  ops.gelu_quick(out, x)
201
  return out
build/torch28-cxx11-cu129-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e7810304e3d175ad1e212b1854ab7f200c013e5332bfb1dfcf2f0f0fa5dc7b15
3
  size 4438672
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48d0f9b82abd2e6d7154889814140b789e2d4452aac1296d921c9a2d4ab19e91
3
  size 4438672
build/torch28-cxx11-cu129-x86_64-linux/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _activation_6c7806a
3
- ops = torch.ops._activation_6c7806a
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_activation_6c7806a::{op_name}"
 
1
  import torch
2
+ from . import _activation_f8d6759
3
+ ops = torch.ops._activation_f8d6759
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_activation_f8d6759::{op_name}"
build/torch28-cxx11-cu129-x86_64-linux/layers.py CHANGED
@@ -17,6 +17,8 @@ class SiluAndMul(nn.Module):
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
 
 
20
  d = x.shape[-1] // 2
21
  output_shape = x.shape[:-1] + (d,)
22
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -36,6 +38,8 @@ class Silu(nn.Module):
36
  can_torch_compile: bool = True
37
 
38
  def forward(self, x: torch.Tensor):
 
 
39
  out = torch.empty_like(x)
40
  ops.silu(out, x)
41
  return out
@@ -53,6 +57,8 @@ class Gelu(nn.Module):
53
  can_torch_compile: bool = True
54
 
55
  def forward(self, x: torch.Tensor):
 
 
56
  out = torch.empty_like(x)
57
  ops.gelu(out, x)
58
  return out
@@ -70,6 +76,8 @@ class GeluTanh(nn.Module):
70
  can_torch_compile: bool = True
71
 
72
  def forward(self, x: torch.Tensor):
 
 
73
  out = torch.empty_like(x)
74
  ops.gelu_tanh(out, x)
75
  return out
@@ -88,6 +96,8 @@ class MulAndSilu(nn.Module):
88
  can_torch_compile: bool = True
89
 
90
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
91
  d = x.shape[-1] // 2
92
  output_shape = x.shape[:-1] + (d,)
93
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -108,6 +118,8 @@ class GeluAndMul(nn.Module):
108
  can_torch_compile: bool = True
109
 
110
  def forward(self, x: torch.Tensor):
 
 
111
  d = x.shape[-1] // 2
112
  output_shape = x.shape[:-1] + (d,)
113
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -119,6 +131,8 @@ class GeluTanhAndMul(nn.Module):
119
  can_torch_compile: bool = True
120
 
121
  def forward(self, x: torch.Tensor):
 
 
122
  d = x.shape[-1] // 2
123
  output_shape = x.shape[:-1] + (d,)
124
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -145,6 +159,8 @@ class FatreluAndMul(nn.Module):
145
  self.threshold = threshold
146
 
147
  def forward(self, x: torch.Tensor):
 
 
148
  d = x.shape[-1] // 2
149
  output_shape = x.shape[:-1] + (d,)
150
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -156,6 +172,8 @@ class FastGELU(nn.Module):
156
  can_torch_compile: bool = True
157
 
158
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
159
  out = torch.empty_like(x)
160
  ops.gelu_fast(out, x)
161
  return out
@@ -165,6 +183,8 @@ class NewGELU(nn.Module):
165
  can_torch_compile: bool = True
166
 
167
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
168
  out = torch.empty_like(x)
169
  ops.gelu_new(out, x)
170
  return out
@@ -174,6 +194,8 @@ class QuickGELU(nn.Module):
174
  can_torch_compile: bool = True
175
 
176
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
177
  out = torch.empty_like(x)
178
  ops.gelu_quick(out, x)
179
  return out
 
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
20
+ if not x.is_contiguous():
21
+ x = x.contiguous()
22
  d = x.shape[-1] // 2
23
  output_shape = x.shape[:-1] + (d,)
24
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
38
  can_torch_compile: bool = True
39
 
40
  def forward(self, x: torch.Tensor):
41
+ if not x.is_contiguous():
42
+ x = x.contiguous()
43
  out = torch.empty_like(x)
44
  ops.silu(out, x)
45
  return out
 
57
  can_torch_compile: bool = True
58
 
59
  def forward(self, x: torch.Tensor):
60
+ if not x.is_contiguous():
61
+ x = x.contiguous()
62
  out = torch.empty_like(x)
63
  ops.gelu(out, x)
64
  return out
 
76
  can_torch_compile: bool = True
77
 
78
  def forward(self, x: torch.Tensor):
79
+ if not x.is_contiguous():
80
+ x = x.contiguous()
81
  out = torch.empty_like(x)
82
  ops.gelu_tanh(out, x)
83
  return out
 
96
  can_torch_compile: bool = True
97
 
98
  def forward(self, x: torch.Tensor) -> torch.Tensor:
99
+ if not x.is_contiguous():
100
+ x = x.contiguous()
101
  d = x.shape[-1] // 2
102
  output_shape = x.shape[:-1] + (d,)
103
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
118
  can_torch_compile: bool = True
119
 
120
  def forward(self, x: torch.Tensor):
121
+ if not x.is_contiguous():
122
+ x = x.contiguous()
123
  d = x.shape[-1] // 2
124
  output_shape = x.shape[:-1] + (d,)
125
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
131
  can_torch_compile: bool = True
132
 
133
  def forward(self, x: torch.Tensor):
134
+ if not x.is_contiguous():
135
+ x = x.contiguous()
136
  d = x.shape[-1] // 2
137
  output_shape = x.shape[:-1] + (d,)
138
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
159
  self.threshold = threshold
160
 
161
  def forward(self, x: torch.Tensor):
162
+ if not x.is_contiguous():
163
+ x = x.contiguous()
164
  d = x.shape[-1] // 2
165
  output_shape = x.shape[:-1] + (d,)
166
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
172
  can_torch_compile: bool = True
173
 
174
  def forward(self, x: torch.Tensor) -> torch.Tensor:
175
+ if not x.is_contiguous():
176
+ x = x.contiguous()
177
  out = torch.empty_like(x)
178
  ops.gelu_fast(out, x)
179
  return out
 
183
  can_torch_compile: bool = True
184
 
185
  def forward(self, x: torch.Tensor) -> torch.Tensor:
186
+ if not x.is_contiguous():
187
+ x = x.contiguous()
188
  out = torch.empty_like(x)
189
  ops.gelu_new(out, x)
190
  return out
 
194
  can_torch_compile: bool = True
195
 
196
  def forward(self, x: torch.Tensor) -> torch.Tensor:
197
+ if not x.is_contiguous():
198
+ x = x.contiguous()
199
  out = torch.empty_like(x)
200
  ops.gelu_quick(out, x)
201
  return out
build/torch29-cxx11-cu126-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d076a4578705c8f1cf1517dbf53b77a632518815c622a560449240ed9be8d19f
3
  size 3121128
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60586d27917a5b4b9f3419c6ff5fc58071ba1d6e5bf9ccad4efb2df50544117f
3
  size 3121128
build/torch29-cxx11-cu126-x86_64-linux/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _activation_6c7806a
3
- ops = torch.ops._activation_6c7806a
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_activation_6c7806a::{op_name}"
 
1
  import torch
2
+ from . import _activation_f8d6759
3
+ ops = torch.ops._activation_f8d6759
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_activation_f8d6759::{op_name}"
build/torch29-cxx11-cu126-x86_64-linux/layers.py CHANGED
@@ -17,6 +17,8 @@ class SiluAndMul(nn.Module):
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
 
 
20
  d = x.shape[-1] // 2
21
  output_shape = x.shape[:-1] + (d,)
22
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -36,6 +38,8 @@ class Silu(nn.Module):
36
  can_torch_compile: bool = True
37
 
38
  def forward(self, x: torch.Tensor):
 
 
39
  out = torch.empty_like(x)
40
  ops.silu(out, x)
41
  return out
@@ -53,6 +57,8 @@ class Gelu(nn.Module):
53
  can_torch_compile: bool = True
54
 
55
  def forward(self, x: torch.Tensor):
 
 
56
  out = torch.empty_like(x)
57
  ops.gelu(out, x)
58
  return out
@@ -70,6 +76,8 @@ class GeluTanh(nn.Module):
70
  can_torch_compile: bool = True
71
 
72
  def forward(self, x: torch.Tensor):
 
 
73
  out = torch.empty_like(x)
74
  ops.gelu_tanh(out, x)
75
  return out
@@ -88,6 +96,8 @@ class MulAndSilu(nn.Module):
88
  can_torch_compile: bool = True
89
 
90
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
91
  d = x.shape[-1] // 2
92
  output_shape = x.shape[:-1] + (d,)
93
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -108,6 +118,8 @@ class GeluAndMul(nn.Module):
108
  can_torch_compile: bool = True
109
 
110
  def forward(self, x: torch.Tensor):
 
 
111
  d = x.shape[-1] // 2
112
  output_shape = x.shape[:-1] + (d,)
113
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -119,6 +131,8 @@ class GeluTanhAndMul(nn.Module):
119
  can_torch_compile: bool = True
120
 
121
  def forward(self, x: torch.Tensor):
 
 
122
  d = x.shape[-1] // 2
123
  output_shape = x.shape[:-1] + (d,)
124
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -145,6 +159,8 @@ class FatreluAndMul(nn.Module):
145
  self.threshold = threshold
146
 
147
  def forward(self, x: torch.Tensor):
 
 
148
  d = x.shape[-1] // 2
149
  output_shape = x.shape[:-1] + (d,)
150
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -156,6 +172,8 @@ class FastGELU(nn.Module):
156
  can_torch_compile: bool = True
157
 
158
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
159
  out = torch.empty_like(x)
160
  ops.gelu_fast(out, x)
161
  return out
@@ -165,6 +183,8 @@ class NewGELU(nn.Module):
165
  can_torch_compile: bool = True
166
 
167
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
168
  out = torch.empty_like(x)
169
  ops.gelu_new(out, x)
170
  return out
@@ -174,6 +194,8 @@ class QuickGELU(nn.Module):
174
  can_torch_compile: bool = True
175
 
176
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
177
  out = torch.empty_like(x)
178
  ops.gelu_quick(out, x)
179
  return out
 
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
20
+ if not x.is_contiguous():
21
+ x = x.contiguous()
22
  d = x.shape[-1] // 2
23
  output_shape = x.shape[:-1] + (d,)
24
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
38
  can_torch_compile: bool = True
39
 
40
  def forward(self, x: torch.Tensor):
41
+ if not x.is_contiguous():
42
+ x = x.contiguous()
43
  out = torch.empty_like(x)
44
  ops.silu(out, x)
45
  return out
 
57
  can_torch_compile: bool = True
58
 
59
  def forward(self, x: torch.Tensor):
60
+ if not x.is_contiguous():
61
+ x = x.contiguous()
62
  out = torch.empty_like(x)
63
  ops.gelu(out, x)
64
  return out
 
76
  can_torch_compile: bool = True
77
 
78
  def forward(self, x: torch.Tensor):
79
+ if not x.is_contiguous():
80
+ x = x.contiguous()
81
  out = torch.empty_like(x)
82
  ops.gelu_tanh(out, x)
83
  return out
 
96
  can_torch_compile: bool = True
97
 
98
  def forward(self, x: torch.Tensor) -> torch.Tensor:
99
+ if not x.is_contiguous():
100
+ x = x.contiguous()
101
  d = x.shape[-1] // 2
102
  output_shape = x.shape[:-1] + (d,)
103
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
118
  can_torch_compile: bool = True
119
 
120
  def forward(self, x: torch.Tensor):
121
+ if not x.is_contiguous():
122
+ x = x.contiguous()
123
  d = x.shape[-1] // 2
124
  output_shape = x.shape[:-1] + (d,)
125
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
131
  can_torch_compile: bool = True
132
 
133
  def forward(self, x: torch.Tensor):
134
+ if not x.is_contiguous():
135
+ x = x.contiguous()
136
  d = x.shape[-1] // 2
137
  output_shape = x.shape[:-1] + (d,)
138
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
159
  self.threshold = threshold
160
 
161
  def forward(self, x: torch.Tensor):
162
+ if not x.is_contiguous():
163
+ x = x.contiguous()
164
  d = x.shape[-1] // 2
165
  output_shape = x.shape[:-1] + (d,)
166
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
172
  can_torch_compile: bool = True
173
 
174
  def forward(self, x: torch.Tensor) -> torch.Tensor:
175
+ if not x.is_contiguous():
176
+ x = x.contiguous()
177
  out = torch.empty_like(x)
178
  ops.gelu_fast(out, x)
179
  return out
 
183
  can_torch_compile: bool = True
184
 
185
  def forward(self, x: torch.Tensor) -> torch.Tensor:
186
+ if not x.is_contiguous():
187
+ x = x.contiguous()
188
  out = torch.empty_like(x)
189
  ops.gelu_new(out, x)
190
  return out
 
194
  can_torch_compile: bool = True
195
 
196
  def forward(self, x: torch.Tensor) -> torch.Tensor:
197
+ if not x.is_contiguous():
198
+ x = x.contiguous()
199
  out = torch.empty_like(x)
200
  ops.gelu_quick(out, x)
201
  return out
build/torch29-cxx11-cu128-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ab4a221397c4a493ee7bfaf3fa1cf59d0d10ad3dcbd8f77c848fd0b0933086b0
3
  size 4400864
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c1c418be7b4c9fd3125522015c7c25416fdfa0d147713ba6a696ea613cd43d84
3
  size 4400864
build/torch29-cxx11-cu128-x86_64-linux/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _activation_6c7806a
3
- ops = torch.ops._activation_6c7806a
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_activation_6c7806a::{op_name}"
 
1
  import torch
2
+ from . import _activation_f8d6759
3
+ ops = torch.ops._activation_f8d6759
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_activation_f8d6759::{op_name}"
build/torch29-cxx11-cu128-x86_64-linux/layers.py CHANGED
@@ -17,6 +17,8 @@ class SiluAndMul(nn.Module):
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
 
 
20
  d = x.shape[-1] // 2
21
  output_shape = x.shape[:-1] + (d,)
22
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -36,6 +38,8 @@ class Silu(nn.Module):
36
  can_torch_compile: bool = True
37
 
38
  def forward(self, x: torch.Tensor):
 
 
39
  out = torch.empty_like(x)
40
  ops.silu(out, x)
41
  return out
@@ -53,6 +57,8 @@ class Gelu(nn.Module):
53
  can_torch_compile: bool = True
54
 
55
  def forward(self, x: torch.Tensor):
 
 
56
  out = torch.empty_like(x)
57
  ops.gelu(out, x)
58
  return out
@@ -70,6 +76,8 @@ class GeluTanh(nn.Module):
70
  can_torch_compile: bool = True
71
 
72
  def forward(self, x: torch.Tensor):
 
 
73
  out = torch.empty_like(x)
74
  ops.gelu_tanh(out, x)
75
  return out
@@ -88,6 +96,8 @@ class MulAndSilu(nn.Module):
88
  can_torch_compile: bool = True
89
 
90
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
91
  d = x.shape[-1] // 2
92
  output_shape = x.shape[:-1] + (d,)
93
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -108,6 +118,8 @@ class GeluAndMul(nn.Module):
108
  can_torch_compile: bool = True
109
 
110
  def forward(self, x: torch.Tensor):
 
 
111
  d = x.shape[-1] // 2
112
  output_shape = x.shape[:-1] + (d,)
113
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -119,6 +131,8 @@ class GeluTanhAndMul(nn.Module):
119
  can_torch_compile: bool = True
120
 
121
  def forward(self, x: torch.Tensor):
 
 
122
  d = x.shape[-1] // 2
123
  output_shape = x.shape[:-1] + (d,)
124
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -145,6 +159,8 @@ class FatreluAndMul(nn.Module):
145
  self.threshold = threshold
146
 
147
  def forward(self, x: torch.Tensor):
 
 
148
  d = x.shape[-1] // 2
149
  output_shape = x.shape[:-1] + (d,)
150
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -156,6 +172,8 @@ class FastGELU(nn.Module):
156
  can_torch_compile: bool = True
157
 
158
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
159
  out = torch.empty_like(x)
160
  ops.gelu_fast(out, x)
161
  return out
@@ -165,6 +183,8 @@ class NewGELU(nn.Module):
165
  can_torch_compile: bool = True
166
 
167
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
168
  out = torch.empty_like(x)
169
  ops.gelu_new(out, x)
170
  return out
@@ -174,6 +194,8 @@ class QuickGELU(nn.Module):
174
  can_torch_compile: bool = True
175
 
176
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
177
  out = torch.empty_like(x)
178
  ops.gelu_quick(out, x)
179
  return out
 
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
20
+ if not x.is_contiguous():
21
+ x = x.contiguous()
22
  d = x.shape[-1] // 2
23
  output_shape = x.shape[:-1] + (d,)
24
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
38
  can_torch_compile: bool = True
39
 
40
  def forward(self, x: torch.Tensor):
41
+ if not x.is_contiguous():
42
+ x = x.contiguous()
43
  out = torch.empty_like(x)
44
  ops.silu(out, x)
45
  return out
 
57
  can_torch_compile: bool = True
58
 
59
  def forward(self, x: torch.Tensor):
60
+ if not x.is_contiguous():
61
+ x = x.contiguous()
62
  out = torch.empty_like(x)
63
  ops.gelu(out, x)
64
  return out
 
76
  can_torch_compile: bool = True
77
 
78
  def forward(self, x: torch.Tensor):
79
+ if not x.is_contiguous():
80
+ x = x.contiguous()
81
  out = torch.empty_like(x)
82
  ops.gelu_tanh(out, x)
83
  return out
 
96
  can_torch_compile: bool = True
97
 
98
  def forward(self, x: torch.Tensor) -> torch.Tensor:
99
+ if not x.is_contiguous():
100
+ x = x.contiguous()
101
  d = x.shape[-1] // 2
102
  output_shape = x.shape[:-1] + (d,)
103
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
118
  can_torch_compile: bool = True
119
 
120
  def forward(self, x: torch.Tensor):
121
+ if not x.is_contiguous():
122
+ x = x.contiguous()
123
  d = x.shape[-1] // 2
124
  output_shape = x.shape[:-1] + (d,)
125
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
131
  can_torch_compile: bool = True
132
 
133
  def forward(self, x: torch.Tensor):
134
+ if not x.is_contiguous():
135
+ x = x.contiguous()
136
  d = x.shape[-1] // 2
137
  output_shape = x.shape[:-1] + (d,)
138
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
159
  self.threshold = threshold
160
 
161
  def forward(self, x: torch.Tensor):
162
+ if not x.is_contiguous():
163
+ x = x.contiguous()
164
  d = x.shape[-1] // 2
165
  output_shape = x.shape[:-1] + (d,)
166
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
172
  can_torch_compile: bool = True
173
 
174
  def forward(self, x: torch.Tensor) -> torch.Tensor:
175
+ if not x.is_contiguous():
176
+ x = x.contiguous()
177
  out = torch.empty_like(x)
178
  ops.gelu_fast(out, x)
179
  return out
 
183
  can_torch_compile: bool = True
184
 
185
  def forward(self, x: torch.Tensor) -> torch.Tensor:
186
+ if not x.is_contiguous():
187
+ x = x.contiguous()
188
  out = torch.empty_like(x)
189
  ops.gelu_new(out, x)
190
  return out
 
194
  can_torch_compile: bool = True
195
 
196
  def forward(self, x: torch.Tensor) -> torch.Tensor:
197
+ if not x.is_contiguous():
198
+ x = x.contiguous()
199
  out = torch.empty_like(x)
200
  ops.gelu_quick(out, x)
201
  return out
build/torch29-cxx11-cu130-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7f9b26ad78932c4caa8a1d50a49f0a4b36ac29a613b9705d5358f0e52e3723a1
3
  size 4180240
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:543cf677c4df441c47f57edda57e890b85df8ae919931f89f40743629929b3b6
3
  size 4180240
build/torch29-cxx11-cu130-x86_64-linux/_ops.py CHANGED
@@ -1,9 +1,9 @@
1
  import torch
2
- from . import _activation_6c7806a
3
- ops = torch.ops._activation_6c7806a
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
- return f"_activation_6c7806a::{op_name}"
 
1
  import torch
2
+ from . import _activation_f8d6759
3
+ ops = torch.ops._activation_f8d6759
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
  """
7
  Prefix op by namespace.
8
  """
9
+ return f"_activation_f8d6759::{op_name}"
build/torch29-cxx11-cu130-x86_64-linux/layers.py CHANGED
@@ -17,6 +17,8 @@ class SiluAndMul(nn.Module):
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
 
 
20
  d = x.shape[-1] // 2
21
  output_shape = x.shape[:-1] + (d,)
22
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -36,6 +38,8 @@ class Silu(nn.Module):
36
  can_torch_compile: bool = True
37
 
38
  def forward(self, x: torch.Tensor):
 
 
39
  out = torch.empty_like(x)
40
  ops.silu(out, x)
41
  return out
@@ -53,6 +57,8 @@ class Gelu(nn.Module):
53
  can_torch_compile: bool = True
54
 
55
  def forward(self, x: torch.Tensor):
 
 
56
  out = torch.empty_like(x)
57
  ops.gelu(out, x)
58
  return out
@@ -70,6 +76,8 @@ class GeluTanh(nn.Module):
70
  can_torch_compile: bool = True
71
 
72
  def forward(self, x: torch.Tensor):
 
 
73
  out = torch.empty_like(x)
74
  ops.gelu_tanh(out, x)
75
  return out
@@ -88,6 +96,8 @@ class MulAndSilu(nn.Module):
88
  can_torch_compile: bool = True
89
 
90
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
91
  d = x.shape[-1] // 2
92
  output_shape = x.shape[:-1] + (d,)
93
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -108,6 +118,8 @@ class GeluAndMul(nn.Module):
108
  can_torch_compile: bool = True
109
 
110
  def forward(self, x: torch.Tensor):
 
 
111
  d = x.shape[-1] // 2
112
  output_shape = x.shape[:-1] + (d,)
113
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -119,6 +131,8 @@ class GeluTanhAndMul(nn.Module):
119
  can_torch_compile: bool = True
120
 
121
  def forward(self, x: torch.Tensor):
 
 
122
  d = x.shape[-1] // 2
123
  output_shape = x.shape[:-1] + (d,)
124
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -145,6 +159,8 @@ class FatreluAndMul(nn.Module):
145
  self.threshold = threshold
146
 
147
  def forward(self, x: torch.Tensor):
 
 
148
  d = x.shape[-1] // 2
149
  output_shape = x.shape[:-1] + (d,)
150
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
@@ -156,6 +172,8 @@ class FastGELU(nn.Module):
156
  can_torch_compile: bool = True
157
 
158
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
159
  out = torch.empty_like(x)
160
  ops.gelu_fast(out, x)
161
  return out
@@ -165,6 +183,8 @@ class NewGELU(nn.Module):
165
  can_torch_compile: bool = True
166
 
167
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
168
  out = torch.empty_like(x)
169
  ops.gelu_new(out, x)
170
  return out
@@ -174,6 +194,8 @@ class QuickGELU(nn.Module):
174
  can_torch_compile: bool = True
175
 
176
  def forward(self, x: torch.Tensor) -> torch.Tensor:
 
 
177
  out = torch.empty_like(x)
178
  ops.gelu_quick(out, x)
179
  return out
 
17
  can_torch_compile: bool = True
18
 
19
  def forward(self, x: torch.Tensor):
20
+ if not x.is_contiguous():
21
+ x = x.contiguous()
22
  d = x.shape[-1] // 2
23
  output_shape = x.shape[:-1] + (d,)
24
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
38
  can_torch_compile: bool = True
39
 
40
  def forward(self, x: torch.Tensor):
41
+ if not x.is_contiguous():
42
+ x = x.contiguous()
43
  out = torch.empty_like(x)
44
  ops.silu(out, x)
45
  return out
 
57
  can_torch_compile: bool = True
58
 
59
  def forward(self, x: torch.Tensor):
60
+ if not x.is_contiguous():
61
+ x = x.contiguous()
62
  out = torch.empty_like(x)
63
  ops.gelu(out, x)
64
  return out
 
76
  can_torch_compile: bool = True
77
 
78
  def forward(self, x: torch.Tensor):
79
+ if not x.is_contiguous():
80
+ x = x.contiguous()
81
  out = torch.empty_like(x)
82
  ops.gelu_tanh(out, x)
83
  return out
 
96
  can_torch_compile: bool = True
97
 
98
  def forward(self, x: torch.Tensor) -> torch.Tensor:
99
+ if not x.is_contiguous():
100
+ x = x.contiguous()
101
  d = x.shape[-1] // 2
102
  output_shape = x.shape[:-1] + (d,)
103
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
118
  can_torch_compile: bool = True
119
 
120
  def forward(self, x: torch.Tensor):
121
+ if not x.is_contiguous():
122
+ x = x.contiguous()
123
  d = x.shape[-1] // 2
124
  output_shape = x.shape[:-1] + (d,)
125
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
131
  can_torch_compile: bool = True
132
 
133
  def forward(self, x: torch.Tensor):
134
+ if not x.is_contiguous():
135
+ x = x.contiguous()
136
  d = x.shape[-1] // 2
137
  output_shape = x.shape[:-1] + (d,)
138
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
159
  self.threshold = threshold
160
 
161
  def forward(self, x: torch.Tensor):
162
+ if not x.is_contiguous():
163
+ x = x.contiguous()
164
  d = x.shape[-1] // 2
165
  output_shape = x.shape[:-1] + (d,)
166
  out = torch.empty(output_shape, dtype=x.dtype, device=x.device)
 
172
  can_torch_compile: bool = True
173
 
174
  def forward(self, x: torch.Tensor) -> torch.Tensor:
175
+ if not x.is_contiguous():
176
+ x = x.contiguous()
177
  out = torch.empty_like(x)
178
  ops.gelu_fast(out, x)
179
  return out
 
183
  can_torch_compile: bool = True
184
 
185
  def forward(self, x: torch.Tensor) -> torch.Tensor:
186
+ if not x.is_contiguous():
187
+ x = x.contiguous()
188
  out = torch.empty_like(x)
189
  ops.gelu_new(out, x)
190
  return out
 
194
  can_torch_compile: bool = True
195
 
196
  def forward(self, x: torch.Tensor) -> torch.Tensor:
197
+ if not x.is_contiguous():
198
+ x = x.contiguous()
199
  out = torch.empty_like(x)
200
  ops.gelu_quick(out, x)
201
  return out