entry_point
stringlengths
1
65
original_triton_python_code
stringlengths
208
619k
optimised_triton_code
stringlengths
1.15k
275k
repo_name
stringlengths
7
115
module_name
stringlengths
1
65
synthetic
bool
1 class
uuid
int64
0
18.5k
licenses
listlengths
1
6
stars
int64
0
19.8k
sha
stringlengths
40
40
repo_link
stringlengths
72
180
TLU
import torch import torch.nn as nn from torch.nn.parameter import Parameter class TLU(nn.Module): def __init__(self, num_features): super(TLU, self).__init__() self.num_features = num_features self.tau = Parameter(torch.Tensor(1, num_features, 1, 1), requires_grad=True) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from torch.nn.parameter import Parameter assert_size_stride = torch...
COATZ/ShapeConv
TLU
false
13,440
[ "Apache-2.0" ]
57
f34f4e95ee2b69ac645fd5ba608e3c11cfadfded
https://github.com/COATZ/ShapeConv/tree/f34f4e95ee2b69ac645fd5ba608e3c11cfadfded
LinearProximal
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import nn assert_size_stride = torch._C._dynamo.guards.as...
belbahrim/twin-causal-net
LinearProximal
false
3,203
[ "MIT" ]
0
f45d5a61ed9039ae7d0cd615d95212f11a5a2086
https://github.com/belbahrim/twin-causal-net/tree/f45d5a61ed9039ae7d0cd615d95212f11a5a2086
LinearBottleneckLayer
import torch import torch.nn as nn class LinearBottleneckLayer(nn.Module): """ Bottleneck Layer """ def __init__(self, d_features, d_hid, d_out=None, dropout=0.1): super().__init__() if d_out is None: d_out = d_features self.encode = nn.Linear(d_features, d_hid) se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Jincheng-Sun/Kylearn-pytorch
LinearBottleneckLayer
false
660
[ "MIT" ]
0
e72f2ab45a3f4724e843a27bec37664d3612fdca
https://github.com/Jincheng-Sun/Kylearn-pytorch/tree/e72f2ab45a3f4724e843a27bec37664d3612fdca
NeuralNetMultiplePositionalArgumentsMultiOutputsWithDependency
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RyanUnderhill/onnxruntime
NeuralNetMultiplePositionalArgumentsMultiOutputsWithDependency
false
11,829
[ "MIT" ]
0
6df4e293ffbb47d739d2dedfbb87fa6234b8c37c
https://github.com/RyanUnderhill/onnxruntime/tree/6df4e293ffbb47d739d2dedfbb87fa6234b8c37c
SpatialAttention
import torch import torch.nn as nn class SpatialAttention(nn.Module): def __init__(self, kernel_size=3, multi_branch=False): super(SpatialAttention, self).__init__() assert kernel_size in (3, 7), 'kernel size must be 3 or 7' self.conv1 = nn.Conv2d(2, 1, 3, padding=1, bias=False) s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
SamitHuang/CELNet
SpatialAttention
false
5,798
[ "MIT" ]
1
51e067fdb16e723a45a0a60399d568b58cdc011d
https://github.com/SamitHuang/CELNet/tree/51e067fdb16e723a45a0a60399d568b58cdc011d
LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn import torch.utils.data assert_size_stride = torch._C._dyn...
AndreHe02/glow-tts
LayerNorm
false
1,948
[ "MIT" ]
0
683f68f17790f2f46c23e9d3eadbcac352d82e2b
https://github.com/AndreHe02/glow-tts/tree/683f68f17790f2f46c23e9d3eadbcac352d82e2b
Generator
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
AbeJLazaro/TraductorEspanolOtomi
Generator
false
1,911
[ "MIT" ]
0
75e1558d3b1a7efe9beb3c7d992c3bf1d3d88d0b
https://github.com/AbeJLazaro/TraductorEspanolOtomi/tree/75e1558d3b1a7efe9beb3c7d992c3bf1d3d88d0b
Conv2dWS
import torch import torch.nn.functional as F from torch import nn class Conv2dWS(nn.Conv2d): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True): super(Conv2dWS, self).__init__(in_channels, out_channels, kernel_size, stride,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
cooked-sashimi/Yet-Another-YOLOv4-Pytorch
Conv2dWS
false
15,083
[ "MIT" ]
133
c884ef8849987a75b0e17eba1b739c22d3782e90
https://github.com/cooked-sashimi/Yet-Another-YOLOv4-Pytorch/tree/c884ef8849987a75b0e17eba1b739c22d3782e90
_TestNetStrided
import torch import torch.nn.functional as F import torch.nn import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 class _TestNetStrided(torch.nn.Module): def __init__(self): super(_TestNetStrided, self).__init__() self.conv1 = torch.nn.Conv2d(1, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Rohan-Chaudhury/aimet
_TestNetStrided
false
17,959
[ "BSD-3-Clause" ]
3
1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
https://github.com/Rohan-Chaudhury/aimet/tree/1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
ActNorm
import torch import torch.nn as nn import torch.utils.data from torch.nn import Parameter class ActNorm(nn.Module): def __init__(self, num_channels, eps=1e-05): super(ActNorm, self).__init__() self.eps = eps self.num_channels = num_channels self._log_scale = Parameter(torch.Tensor...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn import torch.utils.data from torch.nn import Parame...
XinZhang525/fGAIL
ActNorm
false
18,128
[ "MIT" ]
4
682d70286685612558e072d9a1668779b8ae325b
https://github.com/XinZhang525/fGAIL/tree/682d70286685612558e072d9a1668779b8ae325b
idct_8x8
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import itertools import numpy as np import torch.nn as nn assert_size_stride = t...
mlomnitz/DifferentiableJPEG
idct_8x8
false
16,112
[ "MIT" ]
86
a5767feba955a1bcb78600135a09c36a806f6249
https://github.com/mlomnitz/DifferentiableJPEG/tree/a5767feba955a1bcb78600135a09c36a806f6249
OZELoss
import torch import torch.utils.data import torch.nn as nn import torch.nn.parallel class OZELoss(nn.Module): """Custom loss for TRNSys metamodel. Compute, for temperature and consumptions, the intergral of the squared differences over time. Sum the log with a coeficient ``alpha``. .. math:: ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils.data import torch.nn as nn import torch.nn.parallel as...
YanLu-nyu/transferlearning
OZELoss
false
14,627
[ "MIT" ]
9,657
037806c6eb8b0c12aefbfbf3e35cbf893093cff9
https://github.com/YanLu-nyu/transferlearning/tree/037806c6eb8b0c12aefbfbf3e35cbf893093cff9
DenseResidualBlock
import torch import torch.nn as nn class DenseResidualBlock(nn.Module): """ Wrapping a number of residual layers for residual block. Will be used as building block in FiLM hyper-networks. :param in_size: (int) Number of features for input representation. :param out_size: (int) Number of features for o...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
DaikiSannoXC/simple-cnaps
DenseResidualBlock
false
13,546
[ "MIT" ]
62
be35c4522b180eaae8278633b1c6ca7e5bb56ebb
https://github.com/DaikiSannoXC/simple-cnaps/tree/be35c4522b180eaae8278633b1c6ca7e5bb56ebb
MessageNormalizer
import torch import torch.nn as nn class MessageNormalizer(nn.Module): def __init__(self, in_features, init_mean=1.0, init_stddev=0.01): super(MessageNormalizer, self).__init__() self.in_features = in_features self.out_features = in_features self.weight = torch.nn.Parameter(torch....
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
ShinyaFUKUMOTO/LeMPA
MessageNormalizer
false
1,061
[ "BSD-2-Clause" ]
0
23b8c9f60fc13cf28d4485757d2ae0b3465b3e92
https://github.com/ShinyaFUKUMOTO/LeMPA/tree/23b8c9f60fc13cf28d4485757d2ae0b3465b3e92
SoftGeneratorAttention
import torch import torch.nn.functional as F import torch.nn as nn class SoftGeneratorAttention(nn.Module): def __init__(self): nn.Module.__init__(self) def apply_bn(self, x): bn_module = nn.BatchNorm1d(x.size()[1]) return bn_module(x) def forward(self, key, x): attn = t...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
LinChen-65/pygcn
SoftGeneratorAttention
false
2,519
[ "MIT" ]
0
0a77f56fd6d5cb3edc7affc2ba3455733d7da6eb
https://github.com/LinChen-65/pygcn/tree/0a77f56fd6d5cb3edc7affc2ba3455733d7da6eb
OpenPoseLoss
import torch import torch.nn as nn import torch.nn.functional as F class OpenPoseLoss(nn.Module): def __init__(self): super(OpenPoseLoss, self).__init__() def forward(self, saved_for_loss, heatmap_target, heat_mask, paf_target, paf_mask): """ tính loss Parameters ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
makotovnjp/Talent5OpenPose
OpenPoseLoss
false
3,973
[ "Apache-2.0" ]
0
1ebbbd4f226b6839d7d1627d6c33edd416c137fc
https://github.com/makotovnjp/Talent5OpenPose/tree/1ebbbd4f226b6839d7d1627d6c33edd416c137fc
MinibatchStdLayer
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
DannyDannyDanny/DeepPrivacy
MinibatchStdLayer
false
2,123
[ "MIT" ]
0
749e260bdcc28a0c12d526f24e4f5315d1b447ad
https://github.com/DannyDannyDanny/DeepPrivacy/tree/749e260bdcc28a0c12d526f24e4f5315d1b447ad
BertAttention
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn class BertSelfAttention(nn.Module): def __init__(self, config): super(BertSelfAttention, self).__init__() if config.hidden_size % config.num_attention_heads != 0: raise ValueError( ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Worm4047/TVR
BertAttention
false
14,596
[ "MIT" ]
106
2a8ce2edbdc0966aef3b84c28872267039f01700
https://github.com/Worm4047/TVR/tree/2a8ce2edbdc0966aef3b84c28872267039f01700
Attention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math fr...
heyitsmine/FewRel
Attention
false
10,269
[ "MIT" ]
0
2a2b8ae471298d9eb3557796a085c23b21982fb2
https://github.com/heyitsmine/FewRel/tree/2a2b8ae471298d9eb3557796a085c23b21982fb2
VQVAEQuantize
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import t...
crizCraig/deep-vector-quantization
VQVAEQuantize
false
15,103
[ "MIT" ]
326
c3c026a1ccea369bc892ad6dde5e6d6cd5a508a4
https://github.com/crizCraig/deep-vector-quantization/tree/c3c026a1ccea369bc892ad6dde5e6d6cd5a508a4
LayerNormalization
import torch import torch.nn as nn class LayerNormalization(nn.Module): def __init__(self, d_hid, eps=1e-06): super(LayerNormalization, self).__init__() self.gamma = nn.Parameter(torch.ones(d_hid)) self.beta = nn.Parameter(torch.zeros(d_hid)) self.eps = eps def forward(self, ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
alisure-fork/CONTA
LayerNormalization
false
1,415
[ "MIT" ]
0
dde3e5083f45598d859dde889de3ae85c7a416e9
https://github.com/alisure-fork/CONTA/tree/dde3e5083f45598d859dde889de3ae85c7a416e9
LinearExcitability
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import nn from torch.nn.parameter import Parameter assert...
JosephKJ/continual-learning
LinearExcitability
false
9,165
[ "MIT" ]
0
2e526cc58ab35d76cddc1df46ee421baea89a727
https://github.com/JosephKJ/continual-learning/tree/2e526cc58ab35d76cddc1df46ee421baea89a727
MINCNet
import torch import torch.utils.data from torch.utils import data as data import torch.nn as nn from torch.nn import init as init from torchvision.models import vgg as vgg from torch import autograd as autograd class MINCNet(nn.Module): def __init__(self): super(MINCNet, self).__init__() self.ReL...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data from ...
achrefjarray/ESRGANplus-master
MINCNet
false
1,403
[ "Apache-2.0" ]
0
ba470ec5c565a6dc8b48575b1e185ef6b796aec6
https://github.com/achrefjarray/ESRGANplus-master/tree/ba470ec5c565a6dc8b48575b1e185ef6b796aec6
ScaledDotProductAttention
import torch from typing import Optional import torch.nn as nn import torch.nn.functional as F import torch.utils.data class ScaledDotProductAttention(nn.Module): """ Overview: Implementation of dot product attentionn with scaling. """ def __init__(self, d_k: 'int', dropout: 'float'=0.0) ->No...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Hcnaeg/DI-engine
ScaledDotProductAttention
false
2,392
[ "Apache-2.0" ]
0
aba0c629f87649854091e9e59d948f83962e3e1e
https://github.com/Hcnaeg/DI-engine/tree/aba0c629f87649854091e9e59d948f83962e3e1e
GlobalAvgPool2d
import torch from torch import nn import torch.nn.functional as F class GlobalAvgPool2d(nn.Module): def __init__(self): super(GlobalAvgPool2d, self).__init__() def forward(self, x): return F.avg_pool2d(x, kernel_size=x.size()[2:]) def get_inputs(): return [torch.rand([4, 4, 4, 4])] d...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
Halo1236/Dive-into-DL-PyTorch
GlobalAvgPool2d
false
532
[ "Apache-2.0" ]
0
586b4e9ca77b2121ce5f5bec8b0a893b33f1b574
https://github.com/Halo1236/Dive-into-DL-PyTorch/tree/586b4e9ca77b2121ce5f5bec8b0a893b33f1b574
Sparsemax
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch import device import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.multiprocessing import torch.nn as nn assert_size_s...
ai4ce/DiscoNet
Sparsemax
false
14,763
[ "MIT" ]
80
44b57faac3c5be289d33cbbab12b300e3ac767b0
https://github.com/ai4ce/DiscoNet/tree/44b57faac3c5be289d33cbbab12b300e3ac767b0
Fp32LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.data import torch.onnx.operators impor...
AbhilashMathews/adahessian
Fp32LayerNorm
false
4,819
[ "MIT" ]
1
bacccecc7a078c3e9e72aa55b17d8e46d21dc9c9
https://github.com/AbhilashMathews/adahessian/tree/bacccecc7a078c3e9e72aa55b17d8e46d21dc9c9
GroupNormAct
import torch import torch.utils.data import torchvision.transforms.functional as F import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel from torch import optim as optim def swish(x, inplace: 'bool'=False): """Swish - Described in: https://arxiv.org/abs/1710.05941 """ return x.mul...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.utils.data impo...
dumpmemory/NonDeepNetworks
GroupNormAct
false
15,262
[ "BSD-3-Clause" ]
307
5513bf588f4e64c99583440507232675c2e21e34
https://github.com/dumpmemory/NonDeepNetworks/tree/5513bf588f4e64c99583440507232675c2e21e34
BertAttention
from _paritybench_helpers import _mock_config import math import torch from torch import nn import torch.utils.data class BertLayerNorm(nn.Module): def __init__(self, hidden_size, eps=1e-05): """Construct a layernorm module in the TF style (epsilon inside the square root).""" super(BertLayerNorm,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Stephen0808/WebQA
BertAttention
false
11,941
[ "Apache-2.0" ]
0
b9758932a9d0d75167ec837bb6ee8bc571c64681
https://github.com/Stephen0808/WebQA/tree/b9758932a9d0d75167ec837bb6ee8bc571c64681
LRN
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
melster1010/VIAME
LRN
false
10,469
[ "BSD-3-Clause" ]
0
0062265088aae65effbfcd130bfb874c343c785f
https://github.com/melster1010/VIAME/tree/0062265088aae65effbfcd130bfb874c343c785f
VGG16
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
Jiannan-Liu/nCoVSegNet
VGG16
false
17,611
[ "MIT" ]
5
7543e68edff011a7f7b694c97cf0f185d441fd6b
https://github.com/Jiannan-Liu/nCoVSegNet/tree/7543e68edff011a7f7b694c97cf0f185d441fd6b
MaxPoolBlock
import torch import torch.nn as nn class Block(nn.Module): def __init__(self): """Initialisation for a lower-level DeepLPF conv block :returns: N/A :rtype: N/A """ super(Block, self).__init__() def conv3x3(self, in_channels, out_channels, stride=1): """Repre...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
DevilMayNotCry/My_curl
MaxPoolBlock
false
9,122
[ "BSD-3-Clause" ]
0
a8f65a3e58cbdeefb4679aa2f0c3d9d800b67381
https://github.com/DevilMayNotCry/My_curl/tree/a8f65a3e58cbdeefb4679aa2f0c3d9d800b67381
DiceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
NceBoy/mmocr
DiceLoss
false
11,744
[ "Apache-2.0" ]
0
3fb7a18d7eb44799e75c1991e5da2044b458d411
https://github.com/NceBoy/mmocr/tree/3fb7a18d7eb44799e75c1991e5da2044b458d411
BoxOffsetIntersection
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
google-research/smore
BoxOffsetIntersection
false
15,460
[ "Apache-2.0" ]
78
e4ba95a7466ef7d018987bce7688b77bf2ea7e4f
https://github.com/google-research/smore/tree/e4ba95a7466ef7d018987bce7688b77bf2ea7e4f
CosineActivation
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch im...
jaredfeng-ca/Time2Vec-PyTorch
CosineActivation
false
3,704
[ "MIT" ]
0
b42205f6721f5a6faf16134e604af28476490d0a
https://github.com/jaredfeng-ca/Time2Vec-PyTorch/tree/b42205f6721f5a6faf16134e604af28476490d0a
Prototypes
import torch import torch.nn as nn from torch.nn import functional as F class Prototypes(nn.Module): def __init__(self, fdim, num_classes, temp=0.05): super().__init__() self.prototypes = nn.Linear(fdim, num_classes, bias=False) self.temp = temp def forward(self, x): x = F.no...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
DMIRLAB-Group/Dassl.pytorch
Prototypes
false
5,035
[ "MIT" ]
1
79052448cc0b0622f14e9768dbd6e6c0598fe6d1
https://github.com/DMIRLAB-Group/Dassl.pytorch/tree/79052448cc0b0622f14e9768dbd6e6c0598fe6d1
FFN
import torch import torch.nn as nn import torch as t class Conv(nn.Module): """ Convolution Module """ def __init__(self, in_channels, out_channels, kernel_size=1, stride=1, padding=0, dilation=1, bias=True, w_init='linear'): """ :param in_channels: dimension of input ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
yhgon/Transformer-TTS
FFN
false
13,138
[ "MIT" ]
0
5f34945cb5500d484275700c4e393ed125d5e753
https://github.com/yhgon/Transformer-TTS/tree/5f34945cb5500d484275700c4e393ed125d5e753
Net1
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data import torch.utils.data.distributed import torch.nn.parallel import torch.optim class Net1(nn.Module): def __init__(self): super(Net1, self).__init__() self.conv1 = nn.Conv2d(1, 32, 3, 1) self.conv2...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
ringier-data/deep-learning-containers
Net1
false
7,547
[ "Apache-2.0" ]
1
e939ceee48a426f9ae4e0b50317dc2fa8845a312
https://github.com/ringier-data/deep-learning-containers/tree/e939ceee48a426f9ae4e0b50317dc2fa8845a312
LogisticLoss
import torch class LogisticLoss(torch.nn.Module): def __init__(self): super(LogisticLoss, self).__init__() def forward(self, logits, targets, multi_label=False): y = targets.float() n_plus = torch.sum(y, dim=0) n_minus = torch.sum(1.0 - y, dim=0) n_plus_rate = (n_plus...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = t...
brainsqueeze/Kaggle-competitions
LogisticLoss
false
3,244
[ "MIT" ]
0
e734ca71303619fd2c9a6f10aaf98b2c0a800758
https://github.com/brainsqueeze/Kaggle-competitions/tree/e734ca71303619fd2c9a6f10aaf98b2c0a800758
CharbonnierLoss
import functools import torch from torch import nn as nn from torch.nn import functional as F from torch.nn import init as init from torchvision.models import vgg as vgg import torch.utils.data from torch.utils import data as data from torch import autograd as autograd def reduce_loss(loss, reduction): """Reduce ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import functools from torch ...
Lotayou/BasicSR
CharbonnierLoss
false
2,576
[ "Apache-2.0", "MIT" ]
0
6cf9a706dd680d54f7dc26e87318ff79f76c0dbf
https://github.com/Lotayou/BasicSR/tree/6cf9a706dd680d54f7dc26e87318ff79f76c0dbf
BertSelfAttention
from _paritybench_helpers import _mock_config import math import torch from torch import nn class BertSelfAttention(nn.Module): def __init__(self, config): super(BertSelfAttention, self).__init__() if config.hidden_size % config.num_attention_heads != 0: raise ValueError( ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Ahren09/FinerFact
BertSelfAttention
false
18,052
[ "MIT" ]
9
68df3799fbfadd56fa69b019ca6fba0c482f21d3
https://github.com/Ahren09/FinerFact/tree/68df3799fbfadd56fa69b019ca6fba0c482f21d3
RepulsionLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
RRemixx/DMRDenoise
RepulsionLoss
false
14,267
[ "MIT" ]
79
026d25f9eaf98fdfd85a67caeb9b49cab71148e9
https://github.com/RRemixx/DMRDenoise/tree/026d25f9eaf98fdfd85a67caeb9b49cab71148e9
AverageAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.cuda import torch.distributed assert_size_str...
Zer0-dev115/OpenNMT-py
AverageAttention
false
12,084
[ "MIT" ]
0
028c76b34779223ee6b3eb224b99617552987100
https://github.com/Zer0-dev115/OpenNMT-py/tree/028c76b34779223ee6b3eb224b99617552987100
GEGLU
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn import torch.utils.checkpoint assert_size_stride = torch._...
ClashLuke/gpt-neox
GEGLU
false
428
[ "MIT" ]
0
3291d0e6c867d9d328b96e8377f5b77c6f66c323
https://github.com/ClashLuke/gpt-neox/tree/3291d0e6c867d9d328b96e8377f5b77c6f66c323
Actor
import torch from torch import nn import torch.nn.functional as F class Actor(nn.Module): """Actor model Parameters: args (object): Parameter class """ def __init__(self, state_dim, action_dim, wwid): super(Actor, self).__init__() self.wwid = torch.Tensor([wwid]) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
zhan0903/cerl
Actor
false
4,657
[ "Apache-2.0" ]
0
6fb8aca9cb78b72947237edf2b9ed8362bd43829
https://github.com/zhan0903/cerl/tree/6fb8aca9cb78b72947237edf2b9ed8362bd43829
Net
import torch import torch.nn as nn class FcCat(nn.Module): def __init__(self, nIn, nOut): super(FcCat, self).__init__() self.fc = nn.Linear(nIn, nOut, bias=False) def forward(self, x): out = torch.cat((x, self.fc(x)), 1) return out class Net(nn.Module): def __init__(se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
huangzsdy/pytorch_basic_learning
Net
false
3,686
[ "Apache-2.0" ]
0
7880bc3fcee1d38623d93fa2a36482ccde0e335a
https://github.com/huangzsdy/pytorch_basic_learning/tree/7880bc3fcee1d38623d93fa2a36482ccde0e335a
MultiheadAttention
import torch from torch import nn import torch.utils from torch.nn.parameter import Parameter import torch.nn.functional as F from torch.nn import Parameter class MultiheadAttention(nn.Module): """Multi-headed attention. See "Attention Is All You Need" for more details. """ def __init__(self, embed_d...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
muqiaoy/dl_signal
MultiheadAttention
false
16,135
[ "MIT" ]
54
3a30d14982016644bfc96a7d1ca0109b441f17fd
https://github.com/muqiaoy/dl_signal/tree/3a30d14982016644bfc96a7d1ca0109b441f17fd
GAT
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
caojiangxia/BiGI
GAT
false
15,007
[ "MIT" ]
57
ed54c20523a5b3f295b90a9c08f7c54e8258d04a
https://github.com/caojiangxia/BiGI/tree/ed54c20523a5b3f295b90a9c08f7c54e8258d04a
PointWiseFeedForward
import torch class PointWiseFeedForward(torch.nn.Module): def __init__(self, hidden_units, dropout_rate): super(PointWiseFeedForward, self).__init__() self.conv1 = torch.nn.Conv1d(hidden_units, hidden_units, kernel_size=1) self.dropout1 = torch.nn.Dropout(p=dropout_rate) self.relu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C...
RenqinSS/RecSys
PointWiseFeedForward
false
11,812
[ "MIT" ]
0
932d54e47af79576b67e28364ae6e97d99ededf4
https://github.com/RenqinSS/RecSys/tree/932d54e47af79576b67e28364ae6e97d99ededf4
MedianPool2d
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn from torch.nn.modules.utils import _pair from torch...
vztu/DebandingNet
MedianPool2d
false
4,517
[ "MIT" ]
0
4af8e83ffbfc70dc220dd6fea2827fb75796f10c
https://github.com/vztu/DebandingNet/tree/4af8e83ffbfc70dc220dd6fea2827fb75796f10c
SoftTargetCrossEntropy
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
javierrodenas/clearml_javi
SoftTargetCrossEntropy
false
10,360
[ "Apache-2.0" ]
0
b6326104fe6a6f522223c2ac3d87468990a9e6f2
https://github.com/javierrodenas/clearml_javi/tree/b6326104fe6a6f522223c2ac3d87468990a9e6f2
Discriminator_D1
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
e96031413/tfvaegan
Discriminator_D1
false
10,110
[ "MIT" ]
0
4d0512c6ce98155b9e8ba37fbcf90d43cd5bbe90
https://github.com/e96031413/tfvaegan/tree/4d0512c6ce98155b9e8ba37fbcf90d43cd5bbe90
NeuralNetwork
import torch import torch.nn as nn class NeuralNetwork(nn.Module): def __init__(self, in_dim, out_dim, hidden_dim=None): """ Simple two-layer neural network. """ super(NeuralNetwork, self).__init__() if hidden_dim is None: hidden_dim = in_dim * 2 self.l1 = nn.L...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
adewynter/Lightboard
NeuralNetwork
false
12,059
[ "Apache-2.0" ]
0
f02eae64f11a989030b52314aa66709477274eb3
https://github.com/adewynter/Lightboard/tree/f02eae64f11a989030b52314aa66709477274eb3
BatchNorm
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import numpy as np from torch import tensor import torch.nn as...
dlvp/madminer
BatchNorm
false
1,848
[ "MIT" ]
0
4ae7d9b73452848a6c9d1b81b50ef316ff7a054f
https://github.com/dlvp/madminer/tree/4ae7d9b73452848a6c9d1b81b50ef316ff7a054f
_TextureConvGroup
import torch from torch import nn from torch.nn import functional as F def reflect_padding(x, f, s, half=False): if half: denom = 2 else: denom = 1 _, _, h, w = x.shape pad_w = w * (s / denom - 1) + f - s pad_h = h * (s / denom - 1) + f - s if pad_w % 2 == 1: pad_l = in...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math fr...
RicCu/NeuralStyle
_TextureConvGroup
false
5,777
[ "MIT" ]
1
97dc6aec6b2072a9a187276e047aea885566e1be
https://github.com/RicCu/NeuralStyle/tree/97dc6aec6b2072a9a187276e047aea885566e1be
Model
import torch class Model(torch.nn.Module): def __init__(self): super().__init__() def forward(self, x: 'torch.Tensor', y: 'torch.Tensor'): return x * y def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
Archermmt/tvm
Model
false
11,192
[ "Apache-2.0" ]
0
8b900cec1a9c3cb453e159db4d497ebeb26ed289
https://github.com/Archermmt/tvm/tree/8b900cec1a9c3cb453e159db4d497ebeb26ed289
TransferNet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ThomasRanvier/cnn_style_transfer
TransferNet
false
1,222
[ "MIT" ]
0
90b6c76c20263c22f4e45184d572284726ecbd7b
https://github.com/ThomasRanvier/cnn_style_transfer/tree/90b6c76c20263c22f4e45184d572284726ecbd7b
SimpleShortCut
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
RaoefTaki/MNTDP-forked
SimpleShortCut
false
8,680
[ "MIT" ]
15
d9ea59a6638f6cdc93eca180ab02672f5bf5d2a1
https://github.com/RaoefTaki/MNTDP-forked/tree/d9ea59a6638f6cdc93eca180ab02672f5bf5d2a1
SimpleLinearModule
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._C...
andreas-hommel/glow
SimpleLinearModule
false
3,391
[ "Apache-2.0" ]
0
2bbbf8188a2a941e85677c83f2146bbd076a262e
https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e
Crop
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.autograd assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dy...
pystiche/papers
Crop
false
7,496
[ "BSD-3-Clause" ]
1
0d8179dc51f6eda0b27fa525dc0b86b866bc88e1
https://github.com/pystiche/papers/tree/0d8179dc51f6eda0b27fa525dc0b86b866bc88e1
TripletLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch.nn.modules.distan...
tbmoon/facenet
TripletLoss
false
16,536
[ "MIT" ]
231
b3aec1a930f22a5a9597efa7072373c0ff93663f
https://github.com/tbmoon/facenet/tree/b3aec1a930f22a5a9597efa7072373c0ff93663f
UnfoldTemporalWindows
import torch import torch.nn as nn class UnfoldTemporalWindows(nn.Module): def __init__(self, window_size, window_stride, window_dilation=1): super().__init__() self.window_size = window_size self.window_stride = window_stride self.window_dilation = window_dilation self.pa...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
Rgtemze/PersonalityRecognition
UnfoldTemporalWindows
false
5,758
[ "MIT" ]
1
90ddd9c02e595d685b8c395ae94d50090288d1f0
https://github.com/Rgtemze/PersonalityRecognition/tree/90ddd9c02e595d685b8c395ae94d50090288d1f0
Spatial_Attention_layer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
msalvato/pytorch_geometric_temporal
Spatial_Attention_layer
false
10,594
[ "MIT" ]
0
149bd46d3b2bddfc3570e31a91a3f53e8873d50e
https://github.com/msalvato/pytorch_geometric_temporal/tree/149bd46d3b2bddfc3570e31a91a3f53e8873d50e
Conv2d_GN_ReLUx2
import torch import torch.nn as nn class Conv2d_GN_ReLU(nn.Module): """ Implements a module that performs conv2d + groupnorm + ReLU + Assumes kernel size is odd """ def __init__(self, in_channels, out_channels, num_groups, ksize=3, stride=1 ): super(Conv2d_GN_ReLU, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
FANG-Xiaolin/uois
Conv2d_GN_ReLUx2
false
2,246
[ "MIT" ]
0
7489e69d1513faf2f3f030a441abdd33ca22304c
https://github.com/FANG-Xiaolin/uois/tree/7489e69d1513faf2f3f030a441abdd33ca22304c
Skew
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.quantization import torch.onnx import torch.nn.parallel import torch.utils.data import torch.fx import to...
Ismail-Mustapha/tutorials
Skew
false
13,851
[ "BSD-3-Clause" ]
6,424
0ccfbf0047db855e93e2aadb43c89c92e89f52b8
https://github.com/Ismail-Mustapha/tutorials/tree/0ccfbf0047db855e93e2aadb43c89c92e89f52b8
MultiHeadAttention
import torch import numpy as np import torch.nn as nn def dot_product_attention(queries, keys, values, normalise=True): """ :param queries:[batch_size, N_target, key_size] :param keys:[batch_size, N_context, key_size] :param values: [] :param normalise: :return: """ key_size = keys.sha...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
JuliusSchwartz/FlowMO
MultiHeadAttention
false
13,967
[ "MIT" ]
53
e221d989914f906501e1ad19cd3629d88eac1785
https://github.com/JuliusSchwartz/FlowMO/tree/e221d989914f906501e1ad19cd3629d88eac1785
FastSigmoid
import torch import torch.utils.data import torch import torch.nn as nn class FastSigmoid(nn.Module): def __init__(self): super(FastSigmoid, self).__init__() def forward(self, x): abs = torch.abs(x) + 1 return torch.div(x, abs) def get_inputs(): return [torch.rand([4, 4, 4, 4])...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils.data import torch import torch.nn as nn assert_size_st...
zhuxyme/zxySRFBN_CVPR2019
FastSigmoid
false
13,172
[ "MIT" ]
0
c1afe776e7759bc05f2235b6db708e337cf2ae0e
https://github.com/zhuxyme/zxySRFBN_CVPR2019/tree/c1afe776e7759bc05f2235b6db708e337cf2ae0e
ncm_output
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
raphael-baena/clean-train
ncm_output
false
12,933
[ "MIT" ]
0
f65fcecc11203b12f27d14964944db6941b513cc
https://github.com/raphael-baena/clean-train/tree/f65fcecc11203b12f27d14964944db6941b513cc
GlobalAvgPool2d
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
Exdenta/torchsat
GlobalAvgPool2d
false
13,647
[ "MIT" ]
316
70ea3db758757104fb3ba618ddf7997f0f3a75b4
https://github.com/Exdenta/torchsat/tree/70ea3db758757104fb3ba618ddf7997f0f3a75b4
Triaffine
import torch import torch.nn as nn class Triaffine(nn.Module): """ Triaffine layer for second-order scoring. This function has a tensor of weights :math:`W` and bias terms if needed. The score :math:`s(x, y, z)` of the vector triple :math:`(x, y, z)` is computed as :math:`x^T z^T W y`. Usually, :...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
ashim95/parser
Triaffine
false
6,255
[ "MIT" ]
1
61e9cd6bf16dcf1aa2b9d51b3a6c04ed048b3199
https://github.com/ashim95/parser/tree/61e9cd6bf16dcf1aa2b9d51b3a6c04ed048b3199
BilinearRanking
import torch from torch import Tensor import torch.nn as nn import torch.nn.functional as F class BilinearRanking(nn.Module): def __init__(self, n_classes: 'int'=2, emb_size: 'int'=768, block_size: 'int'=8): super().__init__() self.n_classes = n_classes self.emb_size = emb_size ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
IgnatovFedor/DeepPavlov
BilinearRanking
false
9,177
[ "Apache-2.0" ]
0
02ba9c4b2919384c142c170c7f89c65cf05dd426
https://github.com/IgnatovFedor/DeepPavlov/tree/02ba9c4b2919384c142c170c7f89c65cf05dd426
LSID
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import math import torch.nn a...
cydonia999/Learning_to_See_in_the_Dark_PyTorch
LSID
false
15,162
[ "MIT" ]
77
470a6a8e9c6367d8fa88ee6d1dea211dd9fb1f81
https://github.com/cydonia999/Learning_to_See_in_the_Dark_PyTorch/tree/470a6a8e9c6367d8fa88ee6d1dea211dd9fb1f81
ClassicalConv6
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
mit-han-lab/pytorch-quantum
ClassicalConv6
false
16,114
[ "MIT" ]
98
05cf000d689307f6b1fe02d12744ad455685935b
https://github.com/mit-han-lab/pytorch-quantum/tree/05cf000d689307f6b1fe02d12744ad455685935b
FloorDivAssign
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride @triton.jit d...
PogChamper/torch2trt
FloorDivAssign
false
14,186
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
HardSwish
import torch from torch import nn import torch.nn.functional as F def hard_swish(x: 'torch.Tensor', inplace: 'bool'=False) ->torch.Tensor: inner = F.relu6(x + 3.0).div_(6.0) return x.mul_(inner) if inplace else x.mul(inner) class HardSwish(nn.Module): """ HardSwish activiation layer. Applies th...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import torch.nn.functional as F assert_size_stride = torch._C._dynam...
L-Net-1992/towhee
HardSwish
false
13,977
[ "Apache-2.0" ]
365
471de97bf9c5443efaf3b62fd440b3ebdb6d5903
https://github.com/L-Net-1992/towhee/tree/471de97bf9c5443efaf3b62fd440b3ebdb6d5903
Tanh
import torch import torch.utils.data import torch.nn as nn import torch._utils from torch import optim as optim import torch.nn.parallel class Tanh(nn.Module): def __init__(self, inplace=False): super(Tanh, self).__init__() self.inplace = inplace def forward(self, x): return x.tanh_(...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.utils.data import torch.nn as nn import torch._utils from torch im...
lovelinability/pytorch_image_models
Tanh
false
7,146
[ "Apache-2.0" ]
1
7c54200f3de7611ab1222a37088eb7f66ae2858f
https://github.com/lovelinability/pytorch_image_models/tree/7c54200f3de7611ab1222a37088eb7f66ae2858f
WassersteinLoss
import torch def torch_cdf_loss(tensor_a, tensor_b, p=1): tensor_a = tensor_a / (torch.sum(tensor_a, dim=-1, keepdim=True) + 1e-14) tensor_b = tensor_b / (torch.sum(tensor_b, dim=-1, keepdim=True) + 1e-14) cdf_tensor_a = torch.cumsum(tensor_a, dim=-1) cdf_tensor_b = torch.cumsum(tensor_b, dim=-1) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
nikitadhawan/SimCLR
WassersteinLoss
false
7,347
[ "MIT" ]
1
7d87b384b1edb68e7ba86601b26f76e6da214718
https://github.com/nikitadhawan/SimCLR/tree/7d87b384b1edb68e7ba86601b26f76e6da214718
ResnetBlockInplaceNormShallowConv1d
import torch import torch.nn as nn class ResnetBlockInplaceNormShallowConv1d(nn.Module): """ Fully connected ResNet Block imeplemented with group convolutions and weight/spectral normalizations. Args: size_in (int): input dimension groups (int): number of groups for group convolutions ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
taconite/MetaAvatar-release
ResnetBlockInplaceNormShallowConv1d
false
16,525
[ "MIT" ]
60
c9403a478ee82232633d25f65f108befd21d04e9
https://github.com/taconite/MetaAvatar-release/tree/c9403a478ee82232633d25f65f108befd21d04e9
ConvBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
wwjfsfs/wwjyyds
ConvBlock
false
13,124
[ "MIT" ]
0
80cd6267fde7cd98838078a0d5178a557ceb7414
https://github.com/wwjfsfs/wwjyyds/tree/80cd6267fde7cd98838078a0d5178a557ceb7414
CuboidPoseHead
import torch import torch.nn as nn from torchvision.transforms import functional as F import torch.nn.functional as F class CuboidPoseHead(nn.Module): def __init__(self, beta): """Get results from the 3D human pose heatmap. Instead of obtaining maximums on the heatmap, this module regresses the c...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
chenxinfeng4/mmpose
CuboidPoseHead
false
12,252
[ "Apache-2.0" ]
0
b0aac4178c1f3d679d2a007e1d9c6c567fc2607d
https://github.com/chenxinfeng4/mmpose/tree/b0aac4178c1f3d679d2a007e1d9c6c567fc2607d
MVloss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.distribut...
muzammilbehzad/MultiviewTransformer
MVloss
false
10,562
[ "MIT" ]
0
c6c7c34c8d156e187a986e35268e1fc4a5d0175d
https://github.com/muzammilbehzad/MultiviewTransformer/tree/c6c7c34c8d156e187a986e35268e1fc4a5d0175d
SpatialGate2d
import torch import torch.nn as nn class SpatialGate2d(nn.Module): def __init__(self, in_channels): super(SpatialGate2d, self).__init__() self.conv1 = nn.Conv2d(in_channels, 1, kernel_size=1, stride=1) self.sigmoid = nn.Sigmoid() def forward(self, x): cal = self.conv1(x) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
evilidol/kaggle-Steel-Defect-Detection
SpatialGate2d
false
6,668
[ "MIT" ]
1
41e3e360f49d706c8c79bcd442342c529648a736
https://github.com/evilidol/kaggle-Steel-Defect-Detection/tree/41e3e360f49d706c8c79bcd442342c529648a736
RLFeatPreprocessNet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
KaihuaTang/VCTree-Visual-Question-Answering
RLFeatPreprocessNet
false
8,380
[ "MIT" ]
31
b6b0a8bdb01d45d36de3bded91db42544ad6a593
https://github.com/KaihuaTang/VCTree-Visual-Question-Answering/tree/b6b0a8bdb01d45d36de3bded91db42544ad6a593
LayerNorm
import torch import torch.nn as nn import torch.utils.data class LayerNorm(nn.Module): """ Simple 1D LayerNorm. """ def __init__(self, features, center=True, scale=False, eps=1e-06): super().__init__() self.center = center self.scale = scale self.eps = eps if s...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dy...
AndrewPaulChester/sage-code
LayerNorm
false
32
[ "MIT" ]
0
9fe676bfbcbc6f642eca29b30a1027fba2a426a0
https://github.com/AndrewPaulChester/sage-code/tree/9fe676bfbcbc6f642eca29b30a1027fba2a426a0
MlpWithAttention
import torch import torch.nn as nn class Self_Attn1D(nn.Module): """ Self attention Layer """ def __init__(self, in_dim, activation, k=8): super(Self_Attn1D, self).__init__() self.chanel_in = in_dim self.activation = activation self.query_conv = nn.Conv1d(in_channels=in_dim, o...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
Malta-Lab/IUPE
MlpWithAttention
false
8,600
[ "MIT" ]
10
44ddf119917538f02bb69509fec7a8314eed419f
https://github.com/Malta-Lab/IUPE/tree/44ddf119917538f02bb69509fec7a8314eed419f
ScalarFilter
import torch import torch as th import torch.nn as nn class ScalarFilter(nn.Module): def __init__(self): super(ScalarFilter, self).__init__() def forward(self, p_x, g_x): """ input should be scalar: bsz x l1, bsz x l2 return bsz x l2 """ matrix = g_x.unsqueeze...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
HKUST-KnowComp/DualMessagePassing
ScalarFilter
false
8,180
[ "MIT" ]
12
d29d627be2a8c8f24b52e3db2c383e33a059aaa7
https://github.com/HKUST-KnowComp/DualMessagePassing/tree/d29d627be2a8c8f24b52e3db2c383e33a059aaa7
RKDLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RylanSchaeffer/RepDistiller
RKDLoss
false
5,789
[ "BSD-2-Clause" ]
1
3612d9d8f6f913527c7aaec7e5ea557e72ed7c5e
https://github.com/RylanSchaeffer/RepDistiller/tree/3612d9d8f6f913527c7aaec7e5ea557e72ed7c5e
EncoderBlock
import torch import torch.nn as nn from collections import OrderedDict class EncoderBlock(nn.Module): def __init__(self, n_in, n_out, n_layers): super().__init__() self.n_in = n_in self.n_out = n_out self.n_hid = self.n_out self.n_layers = n_layers self.post_gain =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from co...
stankevich-mipt/pixiv-tags-to-image
EncoderBlock
false
4,384
[ "MIT" ]
0
220a157956296c8a5b183ffe219e7c1929342c39
https://github.com/stankevich-mipt/pixiv-tags-to-image/tree/220a157956296c8a5b183ffe219e7c1929342c39
TverskyLoss
import torch import torch.nn as nn class TverskyLoss(nn.Module): """Tversky Loss. .. seealso:: Salehi, Seyed Sadegh Mohseni, Deniz Erdogmus, and Ali Gholipour. "Tversky loss function for image segmentation using 3D fully convolutional deep networks." International Workshop on Machine Learning...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
ivadomed-profile-analysis-project/ivadomed
TverskyLoss
false
15,652
[ "MIT" ]
87
3b53e2cb2b210511943da439401e2471fd387876
https://github.com/ivadomed-profile-analysis-project/ivadomed/tree/3b53e2cb2b210511943da439401e2471fd387876
GatedLinear
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
cuiyuhao1996/mmnas
GatedLinear
false
9,957
[ "Apache-2.0" ]
0
d62e0b3ddc6d15e8f01d0d66367e05fc9691cd3b
https://github.com/cuiyuhao1996/mmnas/tree/d62e0b3ddc6d15e8f01d0d66367e05fc9691cd3b
SimpleSinModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleSinModule(torch.nn.Module): def __init__(self): super(SimpleSinModule, self).__init__() def forward(self, a): return torch.sin(a + a) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs():...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.jit import torch.onnx import torch.nn assert_size_stride = t...
opti-mix/glow
SimpleSinModule
false
7,418
[ "Apache-2.0" ]
1
4ba074df5da9822986a23a6679ab592c22660f6d
https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d
tofp16
import torch import torch.nn as nn import torch.nn.functional import torch.nn.parallel import torch.utils.data import torch.optim import torch.utils.data.distributed class tofp16(nn.Module): """ Utility module that implements:: def forward(self, input): return input.half() """ de...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.functional import torch.nn.parallel import torch.utils.data import torch.optim import torch.utils.data...
DeanChan/apex
tofp16
false
9,016
[ "BSD-3-Clause" ]
0
a03267e5e1209f559a6671da56c479a216f418d1
https://github.com/DeanChan/apex/tree/a03267e5e1209f559a6671da56c479a216f418d1
MDN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
poctaviano/Handwriting-Model
MDN
false
4,136
[ "MIT" ]
0
30311ea0f4cb6e7bc0114cf0b2a96dc915dd9795
https://github.com/poctaviano/Handwriting-Model/tree/30311ea0f4cb6e7bc0114cf0b2a96dc915dd9795
LandmarkHead
import torch import torch.nn as nn import torch._utils from itertools import product as product import torch.utils.data.distributed class LandmarkHead(nn.Module): def __init__(self, inchannels=512, num_anchors=3): super(LandmarkHead, self).__init__() self.conv1x1 = nn.Conv2d(inchannels, num_ancho...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch._utils from itertools import product as produ...
Capetian/FaceX-Zoo
LandmarkHead
false
5,026
[ "Apache-2.0" ]
1
029786c40d8aba15d891d33973de25fcd7e5399a
https://github.com/Capetian/FaceX-Zoo/tree/029786c40d8aba15d891d33973de25fcd7e5399a
down_right_shifted_conv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
elahekhodaie/PixelCnnPP
down_right_shifted_conv2d
false
10,084
[ "MIT" ]
0
ab1e245ed8c24009364b1f891288eb1a526b0121
https://github.com/elahekhodaie/PixelCnnPP/tree/ab1e245ed8c24009364b1f891288eb1a526b0121
BertGELU
import math import torch from torch import nn class BertGELU(nn.Module): """Bert uses GELU as the activation function for the position-wise network. """ def forward(self, x): return x * 0.5 * (1.0 + torch.erf(x / math.sqrt(2.0))) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Codle/texar-pytorch
BertGELU
false
11,298
[ "Apache-2.0" ]
0
d63556e7a8f48076c396467314a771d56552d595
https://github.com/Codle/texar-pytorch/tree/d63556e7a8f48076c396467314a771d56552d595
SoftDiceLossV2
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.cuda.amp as amp assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
imvladikon/pytorch-loss
SoftDiceLossV2
false
6,879
[ "MIT" ]
1
6cfaabe1be898e1ff000b3dffb46d0ef09096f6b
https://github.com/imvladikon/pytorch-loss/tree/6cfaabe1be898e1ff000b3dffb46d0ef09096f6b
SmallVDSR_16x
import torch import torch.nn as nn def load_param(model1_path, model2): dict_param1 = torch.load(model1_path) dict_param2 = dict(model2.named_parameters()) for name2 in dict_param2: if name2 in dict_param1: dict_param2[name2].data.copy_(dict_param1[name2].data) model2.load_state_di...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
MingSun-Tse/pytorch-vdsr
SmallVDSR_16x
false
5,601
[ "MIT" ]
1
597bacb4ec7385c8cc6cdf91e26e64ef2e6808b7
https://github.com/MingSun-Tse/pytorch-vdsr/tree/597bacb4ec7385c8cc6cdf91e26e64ef2e6808b7
RepresentationSubspaceDistance
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
neka-nat/Transfer-Learning-Library
RepresentationSubspaceDistance
false
16,161
[ "MIT" ]
1,474
a3b27b0d7562fa90a02e914140b37ab438469e6c
https://github.com/neka-nat/Transfer-Learning-Library/tree/a3b27b0d7562fa90a02e914140b37ab438469e6c
MemoryUpdater
from _paritybench_helpers import _mock_config import math import torch from torch import nn class BertSelfAttention(nn.Module): def __init__(self, config): super(BertSelfAttention, self).__init__() if config.hidden_size % config.num_attention_heads != 0: raise ValueError( ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Sy-Zhang/recurrent-transformer
MemoryUpdater
false
11,127
[ "MIT" ]
0
f66ba49a2c9ec42759d3d00d497b49ffe39e18de
https://github.com/Sy-Zhang/recurrent-transformer/tree/f66ba49a2c9ec42759d3d00d497b49ffe39e18de