Build uploaded using `kernels`.
Browse files- build/torch210-cxx11-cu126-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
- build/torch210-cxx11-cu126-x86_64-linux/_ops.py +3 -3
- build/torch210-cxx11-cu126-x86_64-linux/layers.py +22 -0
- build/torch210-cxx11-cu128-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
- build/torch210-cxx11-cu128-x86_64-linux/_ops.py +3 -3
- build/torch210-cxx11-cu128-x86_64-linux/layers.py +22 -0
- build/torch210-cxx11-cu130-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
- build/torch210-cxx11-cu130-x86_64-linux/_ops.py +3 -3
- build/torch210-cxx11-cu130-x86_64-linux/layers.py +22 -0
- build/torch28-cxx11-cu126-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
- build/torch28-cxx11-cu126-x86_64-linux/_ops.py +3 -3
- build/torch28-cxx11-cu126-x86_64-linux/layers.py +22 -0
- build/torch28-cxx11-cu128-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
- build/torch28-cxx11-cu128-x86_64-linux/_ops.py +3 -3
- build/torch28-cxx11-cu128-x86_64-linux/layers.py +22 -0
- build/torch28-cxx11-cu129-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
- build/torch28-cxx11-cu129-x86_64-linux/_ops.py +3 -3
- build/torch28-cxx11-cu129-x86_64-linux/layers.py +22 -0
- build/torch29-cxx11-cu126-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
- build/torch29-cxx11-cu126-x86_64-linux/_ops.py +3 -3
- build/torch29-cxx11-cu126-x86_64-linux/layers.py +22 -0
- build/torch29-cxx11-cu128-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
- build/torch29-cxx11-cu128-x86_64-linux/_ops.py +3 -3
- build/torch29-cxx11-cu128-x86_64-linux/layers.py +22 -0
- build/torch29-cxx11-cu130-x86_64-linux/{_activation_6c7806a.abi3.so → _activation_f8d6759.abi3.so} +1 -1
- build/torch29-cxx11-cu130-x86_64-linux/_ops.py +3 -3
- 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:
|
| 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
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 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:
|
| 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
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 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:
|
| 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
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 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:
|
| 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
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 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:
|
| 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
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 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:
|
| 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
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 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:
|
| 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
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 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:
|
| 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
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 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:
|
| 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
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 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
|