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
GroupedChannelNorm
import torch import torch.utils.data import torch import torch.nn as nn class GroupedChannelNorm(nn.Module): def __init__(self, num_groups): super().__init__() self.num_groups = num_groups def forward(self, x): shape = list(x.shape) new_shape = [shape[0], self.num_groups, sha...
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 import torch.nn as nn assert_size_stride =...
a11isonliu/contrastive-unpaired-translation
GroupedChannelNorm
false
9,840
[ "BSD-3-Clause" ]
0
67651ed9877cae121d9398f46094ce8dbc678802
https://github.com/a11isonliu/contrastive-unpaired-translation/tree/67651ed9877cae121d9398f46094ce8dbc678802
RelativeAttention
# 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....
Aalanli/MusicGeneration
RelativeAttention
false
53
[ "MIT" ]
0
7d268322d692013d8ac6e70be31741cea519fa28
https://github.com/Aalanli/MusicGeneration/tree/7d268322d692013d8ac6e70be31741cea519fa28
DecoderLayer
import math import torch import torch.nn as nn class LayerNorm(nn.Module): def __init__(self, d_model, eps=1e-12): super(LayerNorm, self).__init__() self.gamma = nn.Parameter(torch.ones(d_model)) self.beta = nn.Parameter(torch.zeros(d_model)) self.eps = eps def forward(self, ...
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....
jkimbf/transformer-1
DecoderLayer
false
15,733
[ "Apache-2.0" ]
233
6cd29731197822d6db641cdbfad3b045b8a294e4
https://github.com/jkimbf/transformer-1/tree/6cd29731197822d6db641cdbfad3b045b8a294e4
Pow
import torch class Pow(torch.nn.Module): def __init__(self): super(Pow, self).__init__() def forward(self, x, y): 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 from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
Akababa/torch2trt
Pow
false
18,422
[ "MIT" ]
2
03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
TokenEmbedding
# 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...
Linan2018/Informer2020
TokenEmbedding
false
2,512
[ "Apache-2.0" ]
0
30e63a7d3ed9310b917b05c4d60b340d2dd0517a
https://github.com/Linan2018/Informer2020/tree/30e63a7d3ed9310b917b05c4d60b340d2dd0517a
DiscrimNet
# 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 ...
KtechB/machina
DiscrimNet
false
2,469
[ "MIT" ]
0
24eca9cc9b89a0e0b9e026282f17c7b9fe2869ab
https://github.com/KtechB/machina/tree/24eca9cc9b89a0e0b9e026282f17c7b9fe2869ab
ActivationLoss
# 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.utils.dat...
nviable/ClassNSeg
ActivationLoss
false
16,204
[ "BSD-3-Clause" ]
68
87e506fddb9f36ef14f9bd1f6496f86d7faef0fd
https://github.com/nviable/ClassNSeg/tree/87e506fddb9f36ef14f9bd1f6496f86d7faef0fd
AttentionPooling
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn import torch.distributed import torch.distributions def compute_attention(q, k, v, dropout=None, mask=None): """ :param q: Query [B, NH, NQ, EL] or [NH, 1, EL] (in this case NQ=1) :param k: Key [B, NH, NK, EL] :param...
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....
Zed-Wu/ManiSkill-Learn
AttentionPooling
false
3,095
[ "Apache-2.0" ]
0
8056fe327752cd0863f8730672fe62bd85a0ec12
https://github.com/Zed-Wu/ManiSkill-Learn/tree/8056fe327752cd0863f8730672fe62bd85a0ec12
RelPartialLearnableMultiHeadAttn
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim class RelMultiHeadAttn(nn.Module): def __init__(self, n_head, d_model, d_head, dropout, dropatt=0, tgt_len =None, ext_len=None, mem_len=None, pre_lnorm=False): super(RelMultiHeadAttn, self).__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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Blickwinkel1107/NJUNMT-pytorch
RelPartialLearnableMultiHeadAttn
false
17,055
[ "MIT" ]
9
82f684fe768b137ca0649b7b79a1820077917385
https://github.com/Blickwinkel1107/NJUNMT-pytorch/tree/82f684fe768b137ca0649b7b79a1820077917385
GAT
from torch.nn import Module import torch from torch.nn.modules.module import Module import torch.nn as nn import torch.nn.functional as F class EdgeGCN(Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907 """ def __init__(self, in_features, out_features, include_adj=True, bias=T...
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....
hou-yz/pygcn
GAT
false
3,638
[ "MIT" ]
0
26195954035c5eaae2d6e086cfec24cad2642f2e
https://github.com/hou-yz/pygcn/tree/26195954035c5eaae2d6e086cfec24cad2642f2e
HardtanhBoundToPOTNet
# 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.nn import Conv2d f...
elad-c/model_optimization
HardtanhBoundToPOTNet
false
10,658
[ "Apache-2.0" ]
0
b0ecf41c3f9434008d57d7fe724ff8585e19d4cc
https://github.com/elad-c/model_optimization/tree/b0ecf41c3f9434008d57d7fe724ff8585e19d4cc
SelfAttention
import torch import torch.nn as nn import torch.utils.checkpoint class SelfAttention(nn.Module): def __init__(self, *args, **kwargs): super().__init__() self.fn = nn.MultiheadAttention(*args, **kwargs) def forward(self, x): x = torch.unsqueeze(x, -2) y, _ = self.fn(x, x, x, n...
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....
Antipurity/sensor-network
SelfAttention
false
241
[ "MIT" ]
0
c5cc67dee408da831c3ab60a03374da3c4789bd2
https://github.com/Antipurity/sensor-network/tree/c5cc67dee408da831c3ab60a03374da3c4789bd2
HighwayLayer
# 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....
Jeffyrao/translate
HighwayLayer
false
2,417
[ "BSD-3-Clause" ]
0
ab928e0b692f476c0a43ee7f9d0fbd3ecbada2b4
https://github.com/Jeffyrao/translate/tree/ab928e0b692f476c0a43ee7f9d0fbd3ecbada2b4
ContractingBlock
# 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....
diegushko/CycleGAN
ContractingBlock
false
12,264
[ "MIT" ]
0
630d1cd00cef3f09f036d3c734d31c772cc0a786
https://github.com/diegushko/CycleGAN/tree/630d1cd00cef3f09f036d3c734d31c772cc0a786
EntropyLoss
import torch from torch import nn class EntropyLoss(nn.Module): def __init__(self, eps=1e-12): super(EntropyLoss, self).__init__() self.eps = eps def forward(self, x): b = x * torch.log(x + self.eps) b = -1.0 * b.sum(dim=1) b = b.mean() return b def get_inpu...
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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_...
vartikagpt10/memae-anomaly-detection
EntropyLoss
false
16,666
[ "MIT" ]
297
ceece7714fb241e82ef3f3785d3d1ed86c28113e
https://github.com/vartikagpt10/memae-anomaly-detection/tree/ceece7714fb241e82ef3f3785d3d1ed86c28113e
CnnNet
import torch import torch.nn as nn import torch.nn.functional as F class CnnNet(nn.Module): def __init__(self): super(CnnNet, self).__init__() self.conv1 = nn.Conv2d(1, 32, 3) self.pool1 = nn.MaxPool2d(2, 2) self.conv2 = nn.Conv2d(32, 64, 2) self.pool2 = nn.MaxPool2d(2, 2)...
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_...
RoyHirsch/DeepLearningCourse
CnnNet
false
1,045
[ "MIT" ]
0
9036c0fdbb08b610524d7be991f8e4b490a82c6c
https://github.com/RoyHirsch/DeepLearningCourse/tree/9036c0fdbb08b610524d7be991f8e4b490a82c6c
Conv1D
import torch import torch.nn.parallel import torch.nn as nn import torch.utils.data import torch.backends.cudnn class Conv1D(nn.Module): def __init__(self, in_dim, out_dim, kernel_size=1, stride=1, padding=0, bias=True): super(Conv1D, self).__init__() self.conv1d = nn.Conv1d(in_channels=i...
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.parallel import torch.nn as nn import torch.utils.data import to...
MicroTensor-ai/episodic-memory
Conv1D
false
11,701
[ "MIT" ]
0
295a3752ab94c7a6f45355aa2c54bffbf84b574f
https://github.com/MicroTensor-ai/episodic-memory/tree/295a3752ab94c7a6f45355aa2c54bffbf84b574f
LeastSquaresGenerativeAdversarialLoss
import torch import torch.nn as nn import torch.utils.data class LeastSquaresGenerativeAdversarialLoss(nn.Module): """ Loss for `Least Squares Generative Adversarial Network (LSGAN) <https://arxiv.org/abs/1611.04076>`_ Args: reduction (str, optional): Specifies the reduction to apply to the outpu...
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 import torch.utils.data assert_size_stride = torch._C._dynamo.guard...
XianyuanLiu/Transfer-Learning-Library
LeastSquaresGenerativeAdversarialLoss
false
10,143
[ "MIT" ]
0
25f83f32437032df88ca6101ecd1f63ec7a0aa2c
https://github.com/XianyuanLiu/Transfer-Learning-Library/tree/25f83f32437032df88ca6101ecd1f63ec7a0aa2c
BinaryFocalLossWithLogits
# 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 assert_size_stride = torch._C._dynamo.guards.assert...
Danish-VSL/deep-person-reid
BinaryFocalLossWithLogits
false
13,557
[ "MIT" ]
244
2e3a4b6706b84c77203f9905683b917ab0871b93
https://github.com/Danish-VSL/deep-person-reid/tree/2e3a4b6706b84c77203f9905683b917ab0871b93
Net
# 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_...
aoreskovic/TimeSeriesWithXNOR-Net
Net
false
9,730
[ "Apache-2.0" ]
0
5124b6c4ec19e657b49c370936efbd8adff4e60f
https://github.com/aoreskovic/TimeSeriesWithXNOR-Net/tree/5124b6c4ec19e657b49c370936efbd8adff4e60f
Coords
import torch import torch.nn as nn import torch.utils.data import torch.random class Coords(nn.Module): def __init__(self): super().__init__() def forward(self, x): """ adds 2 channels that carry co-ordinate information """ b, h, w = x.size(0), x.size(2), x.size(3) hm = 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 import torch.utils.data import torch.random assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_stri...
DuaneNielsen/keypoints
Coords
false
8,037
[ "MIT" ]
42
302fa02966d4372ac9b5aaa3d8dc24684be0b252
https://github.com/DuaneNielsen/keypoints/tree/302fa02966d4372ac9b5aaa3d8dc24684be0b252
ClassificationModel
import torch import torch.nn as nn class ClassificationModel(nn.Module): def __init__(self, num_features_in, num_anchors=9, num_classes=80, prior=0.01, feature_size=256): super(ClassificationModel, self).__init__() self.num_classes = num_classes self.num_anchors = num_anchors ...
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_...
LLYXC/OXNet
ClassificationModel
false
8,430
[ "Apache-2.0" ]
13
4fb67a8c42b9158a8e563c4b68a157e4dedd9c66
https://github.com/LLYXC/OXNet/tree/4fb67a8c42b9158a8e563c4b68a157e4dedd9c66
FiLM
import torch import torch.nn as nn import torch.nn.functional class FiLM(nn.Module): def __init__(self, output_size, gating_size): super().__init__() self.scale = nn.Linear(gating_size, output_size[0]) self.shift = nn.Linear(gating_size, output_size[0]) def forward(self, x, gating): ...
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.nn.functional assert_size_stride = torch._C._...
MichalOp/StarTrain
FiLM
false
17,717
[ "MIT" ]
7
e8dddf879f103e18239ad37b373c9b51fbbe093b
https://github.com/MichalOp/StarTrain/tree/e8dddf879f103e18239ad37b373c9b51fbbe093b
InvConv2d
# 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 import nn from torch.nn import functional as F assert_size_stride = t...
AvivNavon/glow-pytorch
InvConv2d
false
8,877
[ "MIT" ]
0
de0fb2c1d8a4000337b2fbd1215df68530070431
https://github.com/AvivNavon/glow-pytorch/tree/de0fb2c1d8a4000337b2fbd1215df68530070431
ResidualAttentionBlock
import torch from collections import OrderedDict from torch import nn class LayerNorm(nn.LayerNorm): """Subclass torch's LayerNorm to handle fp16.""" def forward(self, x: 'torch.Tensor'): orig_type = x.dtype ret = super().forward(x.type(torch.float32)) return ret.type(orig_type) cla...
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....
Jack000/glid-3
ResidualAttentionBlock
false
8,310
[ "MIT" ]
31
4a18efc2785339ebc743e149a7955e34fff436fb
https://github.com/Jack000/glid-3/tree/4a18efc2785339ebc743e149a7955e34fff436fb
SumCombination
import torch from torch import nn class SumCombination(nn.Module): def __init__(self, dim_in, normalize=True): super(SumCombination, self).__init__() self.conv = nn.Conv1d(dim_in, 1, 1) self.normalize = normalize def forward(self, x, qlen): scores = self.conv(x.permute(0, 2, ...
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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
Georgetown-IR-Lab/OpenNIR
SumCombination
false
13,720
[ "MIT" ]
140
7d93e8643fe311e3e9c7a0678efe9775fd80485e
https://github.com/Georgetown-IR-Lab/OpenNIR/tree/7d93e8643fe311e3e9c7a0678efe9775fd80485e
TorchDiceLoss
import torch from torch import nn def soft_dice_loss(outputs, targets, per_image=False): batch_size = outputs.size()[0] eps = 1e-05 if not per_image: batch_size = 1 dice_target = targets.contiguous().view(batch_size, -1).float() dice_output = outputs.contiguous().view(batch_size, -1) i...
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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
dannyjeck-matroid/solaris
TorchDiceLoss
false
1,782
[ "Apache-2.0" ]
0
463d220c1fe14f811cbbbf528a7353022538006e
https://github.com/dannyjeck-matroid/solaris/tree/463d220c1fe14f811cbbbf528a7353022538006e
InputInjection
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed from torch.cuda.amp import autocast as autocast import torch._C import torch.serialization class InputInjection(nn.Module): """Downsampling module for CGNet.""" def __ini...
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.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed from torch.cud...
BostonCrayfish/mmsegmentation
InputInjection
false
167
[ "Apache-2.0" ]
0
e8b87242b877bfe0c32ea2630c2fd08977d7dd4b
https://github.com/BostonCrayfish/mmsegmentation/tree/e8b87242b877bfe0c32ea2630c2fd08977d7dd4b
LogLog
import torch import torch.nn as nn class LogLog(nn.Module): def forward(self, x): return 1.0 - torch.exp(-torch.exp(x)) def get_inputs(): return [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 from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
awlange/pysurvival
LogLog
false
14,927
[ "Apache-2.0" ]
242
841b9bc6ce700ba8898d2a1488aa9cd25ee7a8e6
https://github.com/awlange/pysurvival/tree/841b9bc6ce700ba8898d2a1488aa9cd25ee7a8e6
FC
import torch import torch.nn as nn import torch.nn.functional as F class FC(nn.Module): def __init__(self, in_channels, out_channels, use_bias=False, activation='LR', gain=2 ** 0.5): super(FC, self).__init__() self.he_std = in_channels * -0.5 * gain self.weight = torch.nn.Paramete...
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...
TOMeoww/STGAN
FC
false
1,124
[ "MIT" ]
0
090a4024999e68f017140312ecfdd0d4dc3dc425
https://github.com/TOMeoww/STGAN/tree/090a4024999e68f017140312ecfdd0d4dc3dc425
group
import torch import torch.nn as nn class mfm(nn.Module): def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, padding=1, type=1): super(mfm, self).__init__() self.out_channels = out_channels if type == 1: self.filter = nn.Conv2d(in_channels, 2 * out_c...
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_...
JunhongH/CP-GAN
group
false
17,523
[ "Apache-2.0" ]
9
5ac129da8cf6d010dc0da03bb4637d20c822d50b
https://github.com/JunhongH/CP-GAN/tree/5ac129da8cf6d010dc0da03bb4637d20c822d50b
TorchFocalLoss
import torch import torch.nn.functional as F from torch import nn class TorchFocalLoss(nn.Module): """Implementation of Focal Loss[1]_ modified from Catalyst [2]_ . Arguments --------- gamma : :class:`int` or :class:`float` Focusing parameter. See [1]_ . alpha : :class:`int` or :class:`fl...
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, math as tl_math from torch ...
dannyjeck-matroid/solaris
TorchFocalLoss
false
1,794
[ "Apache-2.0" ]
0
463d220c1fe14f811cbbbf528a7353022538006e
https://github.com/dannyjeck-matroid/solaris/tree/463d220c1fe14f811cbbbf528a7353022538006e
NeuralNetPartialNoGradModel
import torch import torch.nn import torch.onnx import torch.utils.checkpoint class NeuralNetPartialNoGradModel(torch.nn.Module): def __init__(self, input_size, hidden_size, num_classes): super(NeuralNetPartialNoGradModel, self).__init__() self.fc1 = torch.nn.Linear(input_size, hidden_size).requir...
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 import torch....
almiliMSFT/onnxruntime
NeuralNetPartialNoGradModel
false
14,807
[ "MIT" ]
6,036
c002dc86a364852859ca9642698fcfc5edf22c9d
https://github.com/almiliMSFT/onnxruntime/tree/c002dc86a364852859ca9642698fcfc5edf22c9d
MultiHeadAttention
# 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....
depengchen123/ctrl
MultiHeadAttention
false
15,184
[ "BSD-3-Clause" ]
1,559
8673e9ec1bf6441ad8d793a626cdfd8c1fd9c4e4
https://github.com/depengchen123/ctrl/tree/8673e9ec1bf6441ad8d793a626cdfd8c1fd9c4e4
MseCriterion
import torch import torch.nn.functional as F from torch.nn.modules.loss import _Loss from torch.optim.lr_scheduler import * class Criterion(_Loss): def __init__(self, alpha=1.0, name='criterion'): super().__init__() """Alpha is used to weight each loss term """ self.alpha = alpha ...
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.nn.modules.loss import _Loss from torch.optim.lr_scheduler import * assert_siz...
kiminh/mt-dnn
MseCriterion
false
7,027
[ "MIT" ]
1
133884b380244dbe74acc4d7507e551b2c5035b3
https://github.com/kiminh/mt-dnn/tree/133884b380244dbe74acc4d7507e551b2c5035b3
TripletLoss
import torch import torch.nn as nn import torch.nn.functional as F class TripletLoss(nn.Module): """ Triplet loss Takes embeddings of an anchor sample, a positive sample and a negative sample """ def __init__(self, margin): super(TripletLoss, self).__init__() self.margin = margin ...
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...
Leo-xxx/lighttrack
TripletLoss
false
5,498
[ "MIT" ]
1
bc12f53c621c42038066a1af7499838b571b0c76
https://github.com/Leo-xxx/lighttrack/tree/bc12f53c621c42038066a1af7499838b571b0c76
FrameAvgPool
# 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.parallel impo...
MicroTensor-ai/episodic-memory
FrameAvgPool
false
11,763
[ "MIT" ]
0
295a3752ab94c7a6f45355aa2c54bffbf84b574f
https://github.com/MicroTensor-ai/episodic-memory/tree/295a3752ab94c7a6f45355aa2c54bffbf84b574f
Conv_Q
# 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....
hotaekjoo/SQV
Conv_Q
false
12,526
[ "MIT" ]
0
d725342e7fd8548ee5fa018e5ccac4542969deed
https://github.com/hotaekjoo/SQV/tree/d725342e7fd8548ee5fa018e5ccac4542969deed
ComplexLinear
from torch.nn import Module import torch from torch.nn import Linear class ComplexLinear(Module): def __init__(self, in_features, out_features): super(ComplexLinear, self).__init__() self.fc_r = Linear(in_features, out_features) self.fc_i = Linear(in_features, out_features) def forwa...
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.nn import Module from torch.nn import Linear assert_size_stride = tor...
drydenwiebe/complexPyTorch
ComplexLinear
false
12,321
[ "MIT" ]
0
cea88ba7ee5692dfa1b40f0ba609ef14160d5073
https://github.com/drydenwiebe/complexPyTorch/tree/cea88ba7ee5692dfa1b40f0ba609ef14160d5073
BaselineActor
import torch import torch.nn as nn import torch.nn.functional as F from torch.functional import F from torch.nn import functional as F import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import torch.distributions class BaselineActor(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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
greenstar1151/pytorch-benchmark
BaselineActor
false
10,440
[ "BSD-3-Clause" ]
0
8b7808d3be6b7ca1d57f1812e35fd2df5e470f8b
https://github.com/greenstar1151/pytorch-benchmark/tree/8b7808d3be6b7ca1d57f1812e35fd2df5e470f8b
FeedForward
import torch import torch.nn as nn class FeedForward(nn.Module): def __init__(self, d_model, d_ff): super(FeedForward, self).__init__() self.linear1 = nn.Linear(in_features=d_model, out_features=d_ff) self.linear2 = nn.Linear(in_features=d_ff, out_features=d_model) self.layer_norm...
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....
caixunshiren/transformer-from-scratch
FeedForward
false
9,831
[ "MIT" ]
0
dbbacab4752f9fc5e33f583c0b1b5258572fb646
https://github.com/caixunshiren/transformer-from-scratch/tree/dbbacab4752f9fc5e33f583c0b1b5258572fb646
DecoderLayer
import math import torch from torch import nn class LayerNorm(nn.Module): def __init__(self, d_model, eps=1e-12): super(LayerNorm, self).__init__() self.gamma = nn.Parameter(torch.ones(d_model)) self.beta = nn.Parameter(torch.zeros(d_model)) self.eps = eps def forward(self, 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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
hyunwoongko/transformer
DecoderLayer
false
15,609
[ "Apache-2.0" ]
233
8f7aaa19d37b088c156db0512868127ba9bf1a0f
https://github.com/hyunwoongko/transformer/tree/8f7aaa19d37b088c156db0512868127ba9bf1a0f
RecursiveNet
# 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...
EarthLab-Luxembourg/torch-summary
RecursiveNet
false
418
[ "MIT" ]
0
8ef25aea5e9fb075df27e1e0c77bad56a7254397
https://github.com/EarthLab-Luxembourg/torch-summary/tree/8ef25aea5e9fb075df27e1e0c77bad56a7254397
L2Norm
import torch from math import sqrt as sqrt from itertools import product as product import torch.nn as nn import torch.nn.init as init class L2Norm(nn.Module): def __init__(self, n_channels, scale): super(L2Norm, self).__init__() self.n_channels = n_channels self.gamma = scale or None ...
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 math import sqrt as sqrt from itertools import product as product import t...
tomgause/pytorch-ssd
L2Norm
false
4,446
[ "MIT" ]
0
e458d4319deb21c8970bcce13382e7ada70ea1a2
https://github.com/tomgause/pytorch-ssd/tree/e458d4319deb21c8970bcce13382e7ada70ea1a2
ModuleFallbackMain
import torch import torch.nn as nn import torch.fx class ModuleFallbackSub(nn.Module): def __init__(self): super(ModuleFallbackSub, self).__init__() self.conv = nn.Conv2d(1, 3, 3) self.relu = nn.ReLU() def forward(self, x): return self.relu(self.conv(x)) class ModuleFallbac...
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 ...
NVIDIA/Torch-TensorRT
ModuleFallbackMain
false
14,092
[ "BSD-3-Clause" ]
430
1a22204fecec690bc3c2a318dab4f57b98c57f05
https://github.com/NVIDIA/Torch-TensorRT/tree/1a22204fecec690bc3c2a318dab4f57b98c57f05
Tan
import torch import torch.onnx import torch.nn as nn class Tan(nn.Module): def forward(self, x): return torch.tan(x) def get_inputs(): return [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 from torch._inductor.runtime.triton_helpers import libdevice import torch.onnx import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
mil-tokyo/webdnn
Tan
false
16,089
[ "MIT" ]
1,967
38a60fd3e1a4e72bc01108189a3aa51e0752aecd
https://github.com/mil-tokyo/webdnn/tree/38a60fd3e1a4e72bc01108189a3aa51e0752aecd
SReLU
# 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 import torch.nn as nn from torch.nn.parameter import Parameter assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided...
VITA-Group/SViTE
SReLU
false
14,534
[ "MIT" ]
50
b0c62fd153c8b0b99917ab935ee76925c9de1149
https://github.com/VITA-Group/SViTE/tree/b0c62fd153c8b0b99917ab935ee76925c9de1149
KLLoss
# 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, math as tl_math from torch ...
jiazheng-xing/Swin_Multimodal
KLLoss
false
10,320
[ "MIT" ]
0
7bc41977fe7d8d4f0091852c63a6a32a0fada0fb
https://github.com/jiazheng-xing/Swin_Multimodal/tree/7bc41977fe7d8d4f0091852c63a6a32a0fada0fb
BasicBlock
# 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....
cuijiaxing/DatasetCondensation
BasicBlock
false
10,000
[ "MIT" ]
0
aec1f7bf08d10d0f9e5d2fd5c2e4193d9687fefd
https://github.com/cuijiaxing/DatasetCondensation/tree/aec1f7bf08d10d0f9e5d2fd5c2e4193d9687fefd
PreactDoubleLayer
import copy import math import torch import torch.nn as nn def normalInit(dims): """ Essentially, PyTorch's init.xavier_normal_ but clamped :param K: tensor to be initialized/overwritten :return: initialized tensor on the device in the nn.Parameter wrapper """ K = torch.zeros(dims) fan_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 import triton_helpers import copy import math impor...
EmoryMLIP/DynamicBlocks
PreactDoubleLayer
false
17,262
[ "MIT" ]
9
52acc9fbc1a2640c6ac8922fa18105279ccaea97
https://github.com/EmoryMLIP/DynamicBlocks/tree/52acc9fbc1a2640c6ac8922fa18105279ccaea97
Copy
# 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 from torch import n...
gusalsdmlwlq/DAMD
Copy
false
12,470
[ "Apache-2.0" ]
0
e98feaf5d9f251132e655bbc5fdb2c080cbed90e
https://github.com/gusalsdmlwlq/DAMD/tree/e98feaf5d9f251132e655bbc5fdb2c080cbed90e
PSNR
# 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 import torch as th import to...
sutkarsh/ttools
PSNR
false
10,933
[ "MIT" ]
0
a2e5fbf308566c0c54ab9d6ad1d9f8bc63f8fe99
https://github.com/sutkarsh/ttools/tree/a2e5fbf308566c0c54ab9d6ad1d9f8bc63f8fe99
DummyDenseWithRelu
# 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 import ...
Emily0219/distiller
DummyDenseWithRelu
false
5,128
[ "Apache-2.0" ]
1
445ed35b671fb54586acc280b53d951f18bf97ae
https://github.com/Emily0219/distiller/tree/445ed35b671fb54586acc280b53d951f18bf97ae
L2Norm
# 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 itertools import product as product import torch.nn as nn import torch.nn....
AlanSavio25/AVSR-Dataset-Pipeline
L2Norm
false
18,407
[ "MIT" ]
2
6e6d44eca6133c2e0223e9be8d011be0b68c73d1
https://github.com/AlanSavio25/AVSR-Dataset-Pipeline/tree/6e6d44eca6133c2e0223e9be8d011be0b68c73d1
DiceLoss_pt
import torch import torch.nn as nn import torch.nn.functional as F class DiceLoss_pt(nn.Module): def __init__(self, weight=None, size_average=True): super(DiceLoss_pt, self).__init__() def forward(self, y_pred, y_true): smooth = 1.0 y_pred_sig = F.sigmoid(y_pred) num = y_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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
SCCH-KVS/training-engine
DiceLoss_pt
false
8,728
[ "Apache-2.0" ]
17
dc52b7a06884f967c7c1aabfba39802dd2983162
https://github.com/SCCH-KVS/training-engine/tree/dc52b7a06884f967c7c1aabfba39802dd2983162
RWKV_ChannelMix
from _paritybench_helpers import _mock_config import torch import torch.nn as nn from torch.nn import functional as F class RWKV_ChannelMix(nn.Module): def __init__(self, config, layer_id): super().__init__() self.layer_id = layer_id self.time_shift = nn.ZeroPad2d((0, 0, 1, -1)) h...
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...
YUASDS/AI-Writer
RWKV_ChannelMix
false
6,017
[ "BSD-3-Clause" ]
1
6ec1e9548802ed5b5a2f1fd297595a52cb605266
https://github.com/YUASDS/AI-Writer/tree/6ec1e9548802ed5b5a2f1fd297595a52cb605266
SDR
import torch class SDR(torch.nn.Module): def __init__(self) ->None: super().__init__() self.expr = 'bi,bi->b' def _batch_dot(self, x, y): return torch.einsum(self.expr, x, y) def forward(self, outputs, labels): if outputs.dtype != labels.dtype: outputs = outp...
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....
Marc-Demoustier/demixr
SDR
false
17,662
[ "MIT" ]
4
cb3bb1606670d2e705b36f09e9a4a4394f8303da
https://github.com/Marc-Demoustier/demixr/tree/cb3bb1606670d2e705b36f09e9a4a4394f8303da
SmallMotionEncoder
# 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_...
NeelayS/ezflow
SmallMotionEncoder
false
14,139
[ "MIT" ]
94
b93a48c4adf5021f7eacbfc43220c7efa5ae55cd
https://github.com/NeelayS/ezflow/tree/b93a48c4adf5021f7eacbfc43220c7efa5ae55cd
SegmentationLosses
# 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 ...
MarcosPampuch/TDNet_CARLA
SegmentationLosses
false
803
[ "MIT" ]
0
efc1c872966f1cef49b82723170586a6abcfb524
https://github.com/MarcosPampuch/TDNet_CARLA/tree/efc1c872966f1cef49b82723170586a6abcfb524
SumAggregator
import torch import torch.nn as nn class SumAggregator(nn.Module): def __init__(self): super(SumAggregator, self).__init__() def forward(self, neighbor): return torch.sum(neighbor, dim=1) def get_inputs(): return [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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
GraphNAS/GraphNAS
SumAggregator
false
13,723
[ "Apache-2.0" ]
94
b4f05bb10b8b96bb9e82344bfae36a23db2431a6
https://github.com/GraphNAS/GraphNAS/tree/b4f05bb10b8b96bb9e82344bfae36a23db2431a6
ConvolutionBlock
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
dodoproptit99/WaveGrad
ConvolutionBlock
false
10,046
[ "BSD-3-Clause" ]
0
d5e3cb5d8c1c3d115eeb5f1673b87bdbb36f79e0
https://github.com/dodoproptit99/WaveGrad/tree/d5e3cb5d8c1c3d115eeb5f1673b87bdbb36f79e0
MySimpleNet
# 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....
GradyKurpasi/anfis-pytorch
MySimpleNet
false
9,099
[ "MIT" ]
0
4cce596193a8bc65e632405ca66d116c771033d7
https://github.com/GradyKurpasi/anfis-pytorch/tree/4cce596193a8bc65e632405ca66d116c771033d7
GCN
# 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....
negarhdr/PGCN
GCN
false
7,324
[ "MIT" ]
1
5143049afcfadc5ab0173e6083ebbb4fd8c8903d
https://github.com/negarhdr/PGCN/tree/5143049afcfadc5ab0173e6083ebbb4fd8c8903d
VirtualBatchNorm1d
from torch.nn import Module import torch import torch.utils import torch.utils.data from torch.nn.parameter import Parameter from torch.nn.modules import Module class VirtualBatchNorm1d(Module): """ Module for Virtual Batch Normalization. Implementation borrowed and modified from Rafael_Valle's code + hel...
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.nn import Module import torch.utils import torch.utils.data from tor...
Silent-Zebra/JEM
VirtualBatchNorm1d
false
17,937
[ "Apache-2.0" ]
6
33440aff8429d9a24a8ba858d0209f4b48be8e05
https://github.com/Silent-Zebra/JEM/tree/33440aff8429d9a24a8ba858d0209f4b48be8e05
UpsamplingBilinear
import torch import torch.nn as nn from torch.quantization import QuantStub from torch.quantization import DeQuantStub class UpsamplingBilinear(nn.Module): def __init__(self): super().__init__() self.quant = QuantStub() self.dequant = DeQuantStub() def forward(self, x): x = 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 import triton_helpers import torch.nn as nn from torch.quantization import QuantStub from torch.quantization im...
Archermmt/tvm
UpsamplingBilinear
false
11,193
[ "Apache-2.0" ]
0
8b900cec1a9c3cb453e159db4d497ebeb26ed289
https://github.com/Archermmt/tvm/tree/8b900cec1a9c3cb453e159db4d497ebeb26ed289
BCE_disc_sm_v2
import torch import torch.nn as nn import torch.nn.functional as F class BCE_disc_sm_v2(nn.Module): def __init__(self, weight_list=None, lb_sm=0.2): super(BCE_disc_sm_v2, self).__init__() self.weight_list = weight_list self.lb_sm = lb_sm def forward(self, x, labels): assert (...
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, math as tl_math import torc...
Sampson-Lee/SIB-Net
BCE_disc_sm_v2
false
2,806
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
SineODE
# 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 math assert_size_stride = torch._C._dynamo.guards.assert_size_stri...
BoyanJIANG/4D-Compositional-Representation
SineODE
false
7,850
[ "Apache-2.0" ]
12
64d5f4bbd6b8e6bc3bfd8f76736f6d468c71a73c
https://github.com/BoyanJIANG/4D-Compositional-Representation/tree/64d5f4bbd6b8e6bc3bfd8f76736f6d468c71a73c
EntmaxBisect
# 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.autograd import F...
antoniogois/entmax
EntmaxBisect
false
15,108
[ "MIT" ]
298
7ff3fa6b09ee53e04514173aacae9de90c95ca75
https://github.com/antoniogois/entmax/tree/7ff3fa6b09ee53e04514173aacae9de90c95ca75
Hsigmoid
import torch import torch.nn as nn from torch.quantization import QuantStub from torch.quantization import DeQuantStub class Hsigmoid(nn.Module): def __init__(self, inplace=True, add_stub=False): super().__init__() self.float_op = nn.quantized.FloatFunctional() self.relu6 = nn.ReLU6(inpla...
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.quantization import QuantStub from torch.quantization im...
Leslie-Fang/incubator-tvm
Hsigmoid
false
9,287
[ "Apache-2.0" ]
0
aa035f4650926f5e714b02cbab6d974f0a17352f
https://github.com/Leslie-Fang/incubator-tvm/tree/aa035f4650926f5e714b02cbab6d974f0a17352f
Multi_Head_Attention
import torch import torch.nn as nn import torch.nn.functional as F class Scaled_Dot_Product_Attention(nn.Module): """Scaled Dot-Product Attention """ def __init__(self): super(Scaled_Dot_Product_Attention, self).__init__() def forward(self, Q, K, V, scale=None): """ Args: ...
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...
Ch4ndelier/Transformer_Zero_Velocity_classification
Multi_Head_Attention
false
17,087
[ "MIT" ]
6
857efb66189c503e983c11bd7dde16ad19c51ada
https://github.com/Ch4ndelier/Transformer_Zero_Velocity_classification/tree/857efb66189c503e983c11bd7dde16ad19c51ada
SelfAttention
# 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....
STRCSussex-UbiCompSiegen/dl_har_model
SelfAttention
false
2,808
[ "MIT" ]
0
caac0f87fc7dd08a5d6ad3e4455ee25b35f5e7b4
https://github.com/STRCSussex-UbiCompSiegen/dl_har_model/tree/caac0f87fc7dd08a5d6ad3e4455ee25b35f5e7b4
MLPBody
import torch import torch.nn.functional as F import torch.nn as nn def layer_init(layer, w_scale=1.0): init_f = nn.init.orthogonal_ init_f(layer.weight.data) layer.weight.data.mul_(w_scale) if layer.bias is not None: nn.init.constant_(layer.bias.data, 0) return layer class MLPBody(nn.Mod...
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_...
lchenat/TSA
MLPBody
false
3,958
[ "Apache-2.0" ]
0
661266ba16e06f63962b306a7c30d25f37920c2d
https://github.com/lchenat/TSA/tree/661266ba16e06f63962b306a7c30d25f37920c2d
JaccardLoss
# 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...
HalestormAI/efficientnet-unet
JaccardLoss
false
2,334
[ "MIT" ]
0
b6d5ec86d667ce7ac1f689bc16269dca83a079f0
https://github.com/HalestormAI/efficientnet-unet/tree/b6d5ec86d667ce7ac1f689bc16269dca83a079f0
FCNet
# 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.nn.parallel import torch.optim import torch.u...
rilu0361/mytorch
FCNet
false
10,681
[ "MIT" ]
0
9f00b830b3ce8fdf942cd19704dedfe6ffd359a5
https://github.com/rilu0361/mytorch/tree/9f00b830b3ce8fdf942cd19704dedfe6ffd359a5
GHMC
import torch from torch.nn import functional as F import torch.nn as nn import torch._C import torch.serialization from torch import optim as optim def _expand_onehot_labels(labels, label_weights, target_shape, ignore_index): """Expand onehot labels to match the size of prediction.""" bin_labels = labels.new_...
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 ...
Atten4Vis/DemystifyLocalViT
GHMC
false
13,368
[ "MIT" ]
64
2e2327caec6d56ae2c8aa861b32bb62f3cdb786e
https://github.com/Atten4Vis/DemystifyLocalViT/tree/2e2327caec6d56ae2c8aa861b32bb62f3cdb786e
GLU
# 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...
tijsmaas/transformer-pytorch
GLU
false
16,586
[ "MIT" ]
237
bb517979d62c416f68d66325f51826bbbf4ba1bd
https://github.com/tijsmaas/transformer-pytorch/tree/bb517979d62c416f68d66325f51826bbbf4ba1bd
Sine
import torch import torch.nn as nn class Sine(nn.Module): def __init(self): super().__init__() def forward(self, input): return torch.sin(5 * input) def get_inputs(): return [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 from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
Bunnycakes62/SIREN
Sine
false
4,916
[ "MIT" ]
1
87c2c9e28411fd6a83d1d0d1bc5141cce30e646b
https://github.com/Bunnycakes62/SIREN/tree/87c2c9e28411fd6a83d1d0d1bc5141cce30e646b
Block
import torch import torch.nn as nn class Block(nn.Module): expansion = 1 def __init__(self, in_channels, out_channels, i_downsample=None, stride=1): super(Block, self).__init__() self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=3, padding=1, stride=stride, bias=False)...
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....
MagazzuGaetano/Weather-Classifier
Block
false
2,612
[ "MIT" ]
0
2bfac1918eea4aaa37563ef4ffabdc290e411d76
https://github.com/MagazzuGaetano/Weather-Classifier/tree/2bfac1918eea4aaa37563ef4ffabdc290e411d76
injective_pad
# 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...
Arnakii/invertinggradients
injective_pad
false
8,878
[ "MIT" ]
0
c4f66fc9c73f0a18e9ddf01650c0e82fe3998013
https://github.com/Arnakii/invertinggradients/tree/c4f66fc9c73f0a18e9ddf01650c0e82fe3998013
QNetwork
# 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....
Mavrepis/DeepLearning_FoodSafety
QNetwork
false
11,691
[ "MIT" ]
0
4f70b575036b06cd0edd4fdf9fc9303728872fc1
https://github.com/Mavrepis/DeepLearning_FoodSafety/tree/4f70b575036b06cd0edd4fdf9fc9303728872fc1
BaselineTokenCNN
# 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_...
Jesse-mk/10617_Project
BaselineTokenCNN
false
9,167
[ "MIT" ]
0
2290e582fddc74f2f2f3e64e25f33a3bef6b1841
https://github.com/Jesse-mk/10617_Project/tree/2290e582fddc74f2f2f3e64e25f33a3bef6b1841
ScaledDotProductAttention
import torch import numpy as np import torch.nn as nn import torch.utils.data import torch.nn.init class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super(ScaledDotProductAttention, self).__init__() self.tempera...
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....
ChrisGeishauser/ConvLab-2
ScaledDotProductAttention
false
2,222
[ "Apache-2.0" ]
0
8f55d033c6e2453fdc092c4f504be3973a55e7ea
https://github.com/ChrisGeishauser/ConvLab-2/tree/8f55d033c6e2453fdc092c4f504be3973a55e7ea
D_phiVpsi
# 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.utils.data import torch.nn as nn assert_size_stride = torch._C._dyn...
Bhaskers-Blu-Org1/SIC
D_phiVpsi
false
7,775
[ "Apache-2.0" ]
12
c4e45d7736da6e6faabdc56bfc1336445df99204
https://github.com/Bhaskers-Blu-Org1/SIC/tree/c4e45d7736da6e6faabdc56bfc1336445df99204
GramMatrix
import torch import torch.fft class GramMatrix(torch.nn.Module): def forward(self, input): b, c, h, w = input.size() features = input.view(b, c, h * w) gram_matrix = torch.bmm(features, features.transpose(1, 2)) gram_matrix.div_(h * w) return gram_matrix def get_inputs()...
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.fft assert_size_stride = torch._C._dynamo.guards.assert_size_stride...
NejcHirci/material-addon
GramMatrix
false
17,775
[ "MIT" ]
4
c08e2081413c3319b712c2f7193ac8013f601382
https://github.com/NejcHirci/material-addon/tree/c08e2081413c3319b712c2f7193ac8013f601382
CeilModule
import torch class CeilModule(torch.nn.Module): def __init__(self): super(CeilModule, self).__init__() def forward(self, x): return torch.ceil(x) def get_inputs(): return [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 from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
MichaelZhero/nncase
CeilModule
false
11,930
[ "Apache-2.0" ]
0
0fae6ce90d7adff386e1a286cd2b42422f4b850a
https://github.com/MichaelZhero/nncase/tree/0fae6ce90d7adff386e1a286cd2b42422f4b850a
APLoss_dist
# 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....
dongan-beta/deep-image-retrieval
APLoss_dist
false
15,202
[ "BSD-3-Clause" ]
253
3e0885f88da328aefb7abb2fa350f8860a4bd52d
https://github.com/dongan-beta/deep-image-retrieval/tree/3e0885f88da328aefb7abb2fa350f8860a4bd52d
GraphNet
# 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....
adam2392/dldo
GraphNet
false
12,070
[ "MIT" ]
0
fc57f8700eb048558ab205c2c77a064f1a7cc7f6
https://github.com/adam2392/dldo/tree/fc57f8700eb048558ab205c2c77a064f1a7cc7f6
LinearZeros
import torch import torch.nn as nn class LinearZeros(nn.Linear): def __init__(self, in_channels, out_channels, logscale_factor=3): super().__init__(in_channels, out_channels) self.logscale_factor = logscale_factor self.register_parameter('logs', nn.Parameter(torch.zeros(out_channels)) ...
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....
BQZic/glow-pytorch
LinearZeros
false
13,360
[ "MIT" ]
479
4b43042326bbe644ccfda3c81a138375321808ed
https://github.com/BQZic/glow-pytorch/tree/4b43042326bbe644ccfda3c81a138375321808ed
GlobalAttention
# 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....
rajasagashe/coarse2fine
GlobalAttention
false
16,315
[ "MIT" ]
164
d6c51a3073df9018e32c95c257c68b0d69d9aa46
https://github.com/rajasagashe/coarse2fine/tree/d6c51a3073df9018e32c95c257c68b0d69d9aa46
SchedulerTestNet
# 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 assert_size_stride = torch._C...
jfrancis71/pytorch-lightning-bolts
SchedulerTestNet
false
3,830
[ "Apache-2.0" ]
0
8a4cf8f61644c28d6df54ccffe3a52d6f5fce5a6
https://github.com/jfrancis71/pytorch-lightning-bolts/tree/8a4cf8f61644c28d6df54ccffe3a52d6f5fce5a6
SineGen
# 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.triton_helpers import libdevice, math as tl_math import numpy as np import torch.utils...
Ninushkat/Impact-Synth-Hardware
SineGen
false
14,108
[ "MIT" ]
55
37a2ecfec51b052b39d1ad0d4676f09d5f00e3c2
https://github.com/Ninushkat/Impact-Synth-Hardware/tree/37a2ecfec51b052b39d1ad0d4676f09d5f00e3c2
NacCell
# 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 from torch import T...
bharathgs/NALU
NacCell
false
14,952
[ "MIT" ]
118
5d52cc270786563b67837a3856841baafba20e60
https://github.com/bharathgs/NALU/tree/5d52cc270786563b67837a3856841baafba20e60
LayerNorm
import torch import torch.nn as nn class LayerNorm(nn.Module): def __init__(self, num_features, eps=1e-05, affine=True): super(LayerNorm, self).__init__() self.num_features = num_features self.affine = affine self.eps = eps if self.affine: self.gamma = nn.Param...
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_...
gntoni/pytorch-ddpg-naf
LayerNorm
false
12,457
[ "MIT" ]
0
d208d0c0c38a9d2d2041f1e7e95695359eba430e
https://github.com/gntoni/pytorch-ddpg-naf/tree/d208d0c0c38a9d2d2041f1e7e95695359eba430e
Context2AnswerAttention
# 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....
LucasAPayne/graph4nlp
Context2AnswerAttention
false
9,704
[ "Apache-2.0" ]
0
3b72308f6ed9ce04c535f78b4b21b6ae0a8f5421
https://github.com/LucasAPayne/graph4nlp/tree/3b72308f6ed9ce04c535f78b4b21b6ae0a8f5421
RelPositionMultiHeadedAttention
# 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....
Mashiro083/wenet-onnx
RelPositionMultiHeadedAttention
false
8,546
[ "Apache-2.0" ]
18
ae8f8451d73fa9ceac6f7738194543e83959ca86
https://github.com/Mashiro083/wenet-onnx/tree/ae8f8451d73fa9ceac6f7738194543e83959ca86
ResNetBlock
# 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....
kongdongdien/talking-head-anime-demo
ResNetBlock
false
15,858
[ "MIT" ]
1,670
d66c27a341f7256e4a37c55493b93dc9e846b423
https://github.com/kongdongdien/talking-head-anime-demo/tree/d66c27a341f7256e4a37c55493b93dc9e846b423
PositionwiseFeedForward
import math import torch from torch import nn class GELU(nn.Module): def forward(self, x): return 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 * torch.pow(x, 3)))) class PositionwiseFeedForward(nn.Module): """Implements FFN equation.""" def __init__(self, d_mod...
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 math from to...
Annelise2019/DeepLearning_Project
PositionwiseFeedForward
false
16,927
[ "MIT" ]
4
f63dcc266a5d9c33c118cabe8145f46f8e35945b
https://github.com/Annelise2019/DeepLearning_Project/tree/f63dcc266a5d9c33c118cabe8145f46f8e35945b
GraphConv
import torch from torch import nn import torch.nn import torch.autograd def sparse_bmm(sparse_matrix, dense_matrix_batch): """ Perform torch.bmm on an unbatched sparse matrix and a batched dense matrix. Args: sparse_matrix (torch.sparse.FloatTensor): Shape = (m, n) dense_matrix_batch (tor...
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 import nn import torch.nn import torch.autograd assert_size_stride = ...
Mason-McGough/kaolin
GraphConv
false
2,639
[ "ECL-2.0", "Apache-2.0" ]
0
2b628842cda7dac7452eedcf05881849a38b90b1
https://github.com/Mason-McGough/kaolin/tree/2b628842cda7dac7452eedcf05881849a38b90b1
Net
import torch import torch.nn.functional as F class Net(torch.nn.Module): def __init__(self, n_feature, n_hidden, n_output): super(Net, self).__init__() self.hidden = torch.nn.Linear(n_feature, n_hidden) self.predict = torch.nn.Linear(n_hidden, n_output) def forward(self, 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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
wikeex/pytorch-learning
Net
false
10,932
[ "MIT" ]
0
8cd710d65a52b58b1593fbba6c4134e08ea18d9f
https://github.com/wikeex/pytorch-learning/tree/8cd710d65a52b58b1593fbba6c4134e08ea18d9f
MOTION_ReplaceBlock_B
# 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.parallel import torch.optim import torch import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stri...
RongchangLi/DEN
MOTION_ReplaceBlock_B
false
17,865
[ "MIT" ]
4
f8b744f96a3a68cf0784080ffd561a5279715727
https://github.com/RongchangLi/DEN/tree/f8b744f96a3a68cf0784080ffd561a5279715727