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
Attention
import math import torch import torch.nn as nn import torch.optim import torch.utils.data import torch.backends.cudnn class Attention(nn.Module): def __init__(self, dim, heads, max_len): super().__init__() self.q_mat = nn.Linear(dim, dim) self.k_mat = nn.Linear(dim, dim) self.v_ma...
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....
Divyanshu23/model-zoo
Attention
false
8,109
[ "MIT" ]
43
2eea6df691d302e182bb1ff8ec5af3542de562ba
https://github.com/Divyanshu23/model-zoo/tree/2eea6df691d302e182bb1ff8ec5af3542de562ba
VideoBoringModel
import torch import torch.nn as nn import torch.utils.data class VideoBoringModel(nn.Module): def __init__(self, in_channel): super().__init__() self.avg_pool3d = nn.AdaptiveAvgPool3d(1) self.fc = nn.Linear(in_channel, 1024) def forward(self, x): x = self.avg_pool3d(x).squeez...
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...
SheffieldAI/pykale
VideoBoringModel
false
14,403
[ "MIT" ]
324
be7670941fb06835883c80477b26702d407017db
https://github.com/SheffieldAI/pykale/tree/be7670941fb06835883c80477b26702d407017db
Log1p
import torch import torch.nn as nn class Log1p(nn.Module): """ Applies `log(1 + 10**a * x)`, with `a` fixed or trainable. """ def __init__(self, a=0, trainable=False): super(Log1p, self).__init__() if trainable: a = nn.Parameter(torch.tensor(a, dtype=torch.get_default_dtyp...
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_...
CPJKU/kagglebirds2020
Log1p
false
17,034
[ "MIT" ]
4
f86b459389b1d0b0af96ebc9252ffc8496c272e8
https://github.com/CPJKU/kagglebirds2020/tree/f86b459389b1d0b0af96ebc9252ffc8496c272e8
StatsPool
# 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 import torch.optim assert_size_stride = torch._C._dynamo....
FrenchKrab/pyannote-audio
StatsPool
false
9,011
[ "MIT" ]
0
14e3b999e3b3fa6063d6401c375a9f7a2534cb74
https://github.com/FrenchKrab/pyannote-audio/tree/14e3b999e3b3fa6063d6401c375a9f7a2534cb74
HuggingfaceClassifier
import torch import torch.nn.functional as F import torch.nn as nn import torch.onnx.operators def get_activation_fn(activation): """ Get activation function by name Args: activation: activation function name Returns: - activation function """ if activation == '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 import torch.nn.functional as...
godweiyang/ParaGen
HuggingfaceClassifier
false
15,441
[ "Apache-2.0" ]
50
9665d1244ea38a41fc06b4e0a7f6411985e2221f
https://github.com/godweiyang/ParaGen/tree/9665d1244ea38a41fc06b4e0a7f6411985e2221f
Tile
# 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...
ixaxaar/pytorch-npi
Tile
false
6,907
[ "MIT" ]
1
50b028840c00f7807fb6490ce6bb0918832dc360
https://github.com/ixaxaar/pytorch-npi/tree/50b028840c00f7807fb6490ce6bb0918832dc360
IdentityMessage
# 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.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_...
beneisner/pytorch_geometric
IdentityMessage
false
6,317
[ "MIT" ]
1
53d44a96bd2de2753b1ab1d7153c026c92606a81
https://github.com/beneisner/pytorch_geometric/tree/53d44a96bd2de2753b1ab1d7153c026c92606a81
Squash
import torch import torch.nn as nn import torch.jit class Squash(nn.Module): def forward(self, x): y = x ** 3 return torch.clamp(y, min=0) / (1 + y.abs()) 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 import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
ethanabrooks/teacher-RL
Squash
false
3,477
[ "MIT" ]
0
41b44fa4de1e8ce7e0c3eac726919c28ede63538
https://github.com/ethanabrooks/teacher-RL/tree/41b44fa4de1e8ce7e0c3eac726919c28ede63538
SEModule
import torch import torch.nn.functional as F import torch.nn as nn import torch.utils.data from collections import OrderedDict def make_divisible(v, divisor, min_val=None): """ This function is taken from the original tf repo. It ensures that all layers have a channel number that is divisible by 8 It ...
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.functional as...
WOODchen7/XNAS
SEModule
false
2,951
[ "MIT" ]
0
cc3d5cadfb4f755b4b4004dc368a102cdc68e6f6
https://github.com/WOODchen7/XNAS/tree/cc3d5cadfb4f755b4b4004dc368a102cdc68e6f6
SpatialAttentionLayer
# 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 ...
agusgun/EDSR-PyTorch
SpatialAttentionLayer
false
18,244
[ "MIT" ]
6
38ff657e2c4e2f148d38b8792bacdf8d81f8bf9f
https://github.com/agusgun/EDSR-PyTorch/tree/38ff657e2c4e2f148d38b8792bacdf8d81f8bf9f
DecoderLayer
import math import torch import torch.nn as nn import torch.nn.functional as F def attention(q, k, v, d_k, mask=None, dropout=None): scores = torch.matmul(q, k.transpose(-2, -1)) / math.sqrt(d_k) if mask is not None: mask = mask.unsqueeze(1) scores = scores.masked_fill(mask == 0, -1000000000.0...
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....
congson1293/Transformer
DecoderLayer
false
1,759
[ "Apache-2.0" ]
0
249638f3287e0ed11c71496178fe2ceac2d758df
https://github.com/congson1293/Transformer/tree/249638f3287e0ed11c71496178fe2ceac2d758df
DiceCoefMultilabelLoss
import torch from torch import nn class DiceCoefMultilabelLoss(nn.Module): def __init__(self, cuda=True): super().__init__() self.one = torch.tensor(1.0, dtype=torch.float32) self.activation = torch.nn.Softmax2d() def dice_loss(self, predict, target): predict = predict.contig...
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 from torch import nn a...
rominashirazi/SpineSegmentation
DiceCoefMultilabelLoss
false
12,948
[ "MIT" ]
0
fb08122ac6d9a598b60aecb4f1a1a2a31fba96ab
https://github.com/rominashirazi/SpineSegmentation/tree/fb08122ac6d9a598b60aecb4f1a1a2a31fba96ab
SoftCrossEntropyLoss2d
# 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....
songzijiang/FasterSeg
SoftCrossEntropyLoss2d
false
16,510
[ "MIT" ]
334
1a14ef6dd665afd229a16ab43b532b5a406512f8
https://github.com/songzijiang/FasterSeg/tree/1a14ef6dd665afd229a16ab43b532b5a406512f8
Reorg
# 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...
hilman-dayo/ObjectDetection-OneStageDet
Reorg
false
15,531
[ "MIT" ]
331
44054ad335e24e99a98fdad0d18b9bf3a80c941c
https://github.com/hilman-dayo/ObjectDetection-OneStageDet/tree/44054ad335e24e99a98fdad0d18b9bf3a80c941c
LayerNorm
import torch import torch.nn as nn class LayerNorm(nn.LayerNorm): def __init__(self, normalized_shape, eps=1e-05, elementwise_affine=True): """Layer Norm.""" super(LayerNorm, self).__init__(normalized_shape, eps=eps, elementwise_affine=elementwise_affine) def forward(self, x): ...
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_...
ChavesLiu/pytorch-dc-tts
LayerNorm
false
13,461
[ "MIT" ]
145
29a1ab11f69b2c4316ae0a8766e995b96385a29f
https://github.com/ChavesLiu/pytorch-dc-tts/tree/29a1ab11f69b2c4316ae0a8766e995b96385a29f
TorchGloVeModel
import torch import torch.nn as nn import torch.utils.data from torch.nn.init import xavier_uniform_ class TorchGloVeModel(nn.Module): def __init__(self, n_words, embed_dim): super().__init__() self.n_words = n_words self.embed_dim = embed_dim self.W = self._init_weights(self.n_wo...
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 from torch.nn.init import xavier_u...
tayfuntuna/cs224u
TorchGloVeModel
false
4,408
[ "Apache-2.0" ]
0
4368090c679d869f21ed2393b9ca0ef217b5c404
https://github.com/tayfuntuna/cs224u/tree/4368090c679d869f21ed2393b9ca0ef217b5c404
OneTupleModule
# 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.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
andreas-hommel/glow
OneTupleModule
false
3,313
[ "Apache-2.0" ]
0
2bbbf8188a2a941e85677c83f2146bbd076a262e
https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e
Model
# 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....
krishanrana/robot_learning_algorithms
Model
false
3,871
[ "MIT" ]
0
3e66c9bf44e81ff281195130c71bcc6ebdf5ccda
https://github.com/krishanrana/robot_learning_algorithms/tree/3e66c9bf44e81ff281195130c71bcc6ebdf5ccda
ContextgenCNN
# 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 ...
SarodYatawatta/federated-pytorch-test
ContextgenCNN
false
8,765
[ "Apache-2.0" ]
33
42a51ba12a92b32fa19273340d5b61e74e11d8e0
https://github.com/SarodYatawatta/federated-pytorch-test/tree/42a51ba12a92b32fa19273340d5b61e74e11d8e0
StageBlock
# 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...
kacel33/ActionAI_PC
StageBlock
false
15,789
[ "MIT" ]
1,311
a0528f49ea61cc07d7c1e9a3cd6846e5f50cfae7
https://github.com/kacel33/ActionAI_PC/tree/a0528f49ea61cc07d7c1e9a3cd6846e5f50cfae7
InvDepth
# 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 import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
IEM-Computer-Vision/kornia
InvDepth
false
9,260
[ "ECL-2.0", "Apache-2.0" ]
0
f98bd9a2158a6e59cda076d55d476acf13f4e0af
https://github.com/IEM-Computer-Vision/kornia/tree/f98bd9a2158a6e59cda076d55d476acf13f4e0af
QPCnet
# 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_...
davidwangtgs/CNN_PAC
QPCnet
false
3,403
[ "MIT" ]
0
d3824fc269ad5c86a962336e140b222856f26a2c
https://github.com/davidwangtgs/CNN_PAC/tree/d3824fc269ad5c86a962336e140b222856f26a2c
ChannelAttentionModule
import torch import numpy as np from torch import nn from torch.nn import init class SimplifiedScaledDotProductAttention(nn.Module): """ Scaled dot-product attention """ def __init__(self, d_model, h, dropout=0.1): """ :param d_model: Output dimensionality of the model :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....
LiChengChen666/DetectDee
ChannelAttentionModule
false
9,816
[ "Apache-2.0" ]
0
1e6aaa0d15b1fc12d1342d8a922004e372b5f437
https://github.com/LiChengChen666/DetectDee/tree/1e6aaa0d15b1fc12d1342d8a922004e372b5f437
ResidualBlock
import torch import torch.onnx class ConvLayer(torch.nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride): super(ConvLayer, self).__init__() reflection_padding = kernel_size // 2 self.reflection_pad = torch.nn.ReflectionPad2d(reflection_padding) self.conv...
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....
Ali-ry/azureml-examples
ResidualBlock
false
1,996
[ "MIT" ]
0
817ae89d2766dcafd70937a22cb3a80f100a2906
https://github.com/Ali-ry/azureml-examples/tree/817ae89d2766dcafd70937a22cb3a80f100a2906
ResidualBlock
import torch import torch.nn as nn class ConvLayer(nn.Module): def __init__(self, in_channels: 'int', out_channels: 'int', kernel_size: 'int', stride: 'int'): super().__init__() self._conv = nn.Conv2d(in_channels=in_channels, out_channels= out_channels, kernel_size=kernel_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....
Inkln/StyleTransferWithCatalyst
ResidualBlock
false
8,320
[ "Apache-2.0" ]
11
c3181ecdfd32160907efc2d9d917a55925c25c11
https://github.com/Inkln/StyleTransferWithCatalyst/tree/c3181ecdfd32160907efc2d9d917a55925c25c11
ActorMARL
import torch import torch.nn as nn import torch.nn.functional as F class ActorMARL(nn.Module): def __init__(self, dim_observation, dim_action): super(ActorMARL, self).__init__() self.FC1 = nn.Linear(dim_observation, 500) self.FC2 = nn.Linear(500, 128) self.FC3 = nn.Linear(128, dim...
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....
BIT-UAV-JJJ/ElegantRL
ActorMARL
false
4,889
[ "Apache-2.0" ]
1
5ce5c1030949bb862d0d56b0e78a9a1f47efe63a
https://github.com/BIT-UAV-JJJ/ElegantRL/tree/5ce5c1030949bb862d0d56b0e78a9a1f47efe63a
selfVLoss
import torch import torch.nn as nn class selfVLoss(nn.Module): def __init__(self, lambda_v, lambda_r): super(selfVLoss, self).__init__() self.lambda_v = lambda_v self.lambda_r = lambda_r def forward(self, v, z): return 1.0 * self.lambda_v / self.lambda_r * torch.mean(torch.su...
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...
FizzerYu/CollaborativeVAE
selfVLoss
false
476
[ "MIT" ]
0
4714cce49acba258600b1b5bbcd3a1a4762385e6
https://github.com/FizzerYu/CollaborativeVAE/tree/4714cce49acba258600b1b5bbcd3a1a4762385e6
IMul
import torch class IMul(torch.nn.Module): def __init__(self): super(IMul, self).__init__() def forward(self, x, y): x *= y return x 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 @triton.jit def triton_poi_fused_mul_0(in_ptr0, in_ptr1, out_ptr1, xnumel,...
Ilyabasharov/torch2trt
IMul
false
2,518
[ "MIT" ]
0
76bf298b3da408509665e23e2494922b131afb10
https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10
FactorizedSynthesizerDense
import torch import torch.nn as nn class FactorizedSynthesizerDense(nn.Module): def __init__(self, in_dims, sentence_length): super(FactorizedSynthesizerDense, self).__init__() self.a = 4 self.b = sentence_length // self.a self.a_proj = nn.Linear(in_dims, self.a) self.b_pr...
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....
leaderj1001/Synthesizer-Rethinking-Self-Attention-Transformer-Models
FactorizedSynthesizerDense
false
15,878
[ "MIT" ]
58
3ee5829438a8f9c063ae485e77c9ce7649d24139
https://github.com/leaderj1001/Synthesizer-Rethinking-Self-Attention-Transformer-Models/tree/3ee5829438a8f9c063ae485e77c9ce7649d24139
TransformerDecoderLayer
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import Linear from torch.nn.init import xavier_uniform_ from torch.nn import Dropout from torch.nn import LayerNorm class MultiheadAttention(nn.Module): """Allows the model to jointly attend to information from different represen...
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....
verages/PaddleOCR2Pytorch
TransformerDecoderLayer
false
4,696
[ "Apache-2.0" ]
0
201f0d5d6007f49620c49af7d222c3b220eb3e70
https://github.com/verages/PaddleOCR2Pytorch/tree/201f0d5d6007f49620c49af7d222c3b220eb3e70
RBFExpansion
# 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 numpy as np import torch.nn as nn assert_size_stride = torch._C._d...
padr31/dgl-lifesci
RBFExpansion
false
16,241
[ "Apache-2.0" ]
390
932581468b330862836c0f050077fa33d0eb9405
https://github.com/padr31/dgl-lifesci/tree/932581468b330862836c0f050077fa33d0eb9405
ConvAutoencoder
# 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...
dedbox/TOAD-GAN
ConvAutoencoder
false
6,536
[ "MIT" ]
1
8a0a84d10f9c5975ae4b1c54f7da99567c8ffd67
https://github.com/dedbox/TOAD-GAN/tree/8a0a84d10f9c5975ae4b1c54f7da99567c8ffd67
SoftQNetwork
# 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....
QasimWani/CityLearn
SoftQNetwork
false
14,262
[ "MIT" ]
202
ffc0584508dc9c796c97e6b908b75380b9bc6606
https://github.com/QasimWani/CityLearn/tree/ffc0584508dc9c796c97e6b908b75380b9bc6606
MegatronFastGelu
import torch import torch.nn import torch.onnx import torch.utils.checkpoint class MegatronFastGelu(torch.nn.Module): def forward(self, x): return 0.5 * x * (1.0 + torch.tanh(0.7978845608028654 * x * (1.0 + 0.044715 * x * x))) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def g...
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 import torch.onnx import torch.utils.checkpoint assert_size_str...
almiliMSFT/onnxruntime
MegatronFastGelu
false
14,800
[ "MIT" ]
6,036
c002dc86a364852859ca9642698fcfc5edf22c9d
https://github.com/almiliMSFT/onnxruntime/tree/c002dc86a364852859ca9642698fcfc5edf22c9d
UpSampleConv
import torch from torch import nn class IWConv2d(nn.Module): def __init__(self, input_dim, output_dim, kernel_size, he_init=True, stride=1, bias=True): super(IWConv2d, self).__init__() self.he_init = he_init self.padding = int((kernel_size - 1) / 2) self.conv = nn.Conv2d(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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
MIC-DKFZ/mood
UpSampleConv
false
8,507
[ "Apache-2.0" ]
42
a01303adb4256653b133e2f7cd4741d366b681f7
https://github.com/MIC-DKFZ/mood/tree/a01303adb4256653b133e2f7cd4741d366b681f7
PositionwiseFeedForward
import torch import torch.nn as nn import torch.nn.functional as F import torch.functional as F class PositionwiseFeedForward(nn.Module): """ A two-feed-forward-layer module """ def __init__(self, d_in, d_hid, dropout=0.1): super().__init__() self.onelayer = d_hid == d_in if self.onel...
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 ...
YuxiXie/Semantic-Graphs-for-Generating-Deep-Questions
PositionwiseFeedForward
false
14,712
[ "MIT" ]
62
6e5ef241c64b5b30a6ff54ddad31e610013b8388
https://github.com/YuxiXie/Semantic-Graphs-for-Generating-Deep-Questions/tree/6e5ef241c64b5b30a6ff54ddad31e610013b8388
IRevInjectivePad
import torch import torch.nn as nn class IRevInjectivePad(nn.Module): """ i-RevNet channel zero padding block. Parameters: ---------- padding : int Size of the padding. """ def __init__(self, padding): super(IRevInjectivePad, self).__init__() self.padding = paddin...
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...
iofthetiger/pkuad
IRevInjectivePad
false
6,895
[ "Apache-2.0" ]
1
07496d108c614c84be028f344830becc9cac8fe5
https://github.com/iofthetiger/pkuad/tree/07496d108c614c84be028f344830becc9cac8fe5
FeedForward
import torch import torch.nn as nn def exists(val): return val is not None def default(val, d): return val if exists(val) else d class FeedForward(nn.Module): def __init__(self, dim, mult=4, dropout=0.0, activation=None, glu=False): super().__init__() activation = default(activation, ...
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 ...
ExpectationMax/Translational-Equivariant-Performers
FeedForward
false
8,075
[ "MIT" ]
10
c7a55af3b581426512eb4a57d3a13eb20e93fbd6
https://github.com/ExpectationMax/Translational-Equivariant-Performers/tree/c7a55af3b581426512eb4a57d3a13eb20e93fbd6
Net
import torch class Net(torch.nn.Module): def __init__(self, n_input, n_hidden, n_output): super(Net, self).__init__() self.hidden1 = torch.nn.Linear(n_input, n_hidden) self.hidden2 = torch.nn.Linear(n_hidden, n_hidden) self.hidden3 = torch.nn.Linear(n_hidden, n_hidden) sel...
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...
AstroHiro/NCM
Net
false
7,737
[ "MIT" ]
23
720db63ec018a1986ac9e370613f8209328b89e1
https://github.com/AstroHiro/NCM/tree/720db63ec018a1986ac9e370613f8209328b89e1
SelfAttentionRE
import torch import torch.nn.functional as F from torch import nn class SelfAttentionRE(nn.Module): def __init__(self, emb_dim): super().__init__() self.query_mlp = nn.Linear(in_features=emb_dim, out_features=1) self.value_mlp = nn.Linear(in_features=emb_dim, out_features=emb_dim) de...
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....
chaitanya2334/lsm
SelfAttentionRE
false
1,662
[ "MIT" ]
0
504c732238b419cd77e7e0a97af040778ee9c7dd
https://github.com/chaitanya2334/lsm/tree/504c732238b419cd77e7e0a97af040778ee9c7dd
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....
Guangyun-Xu/uois
Conv2d_GN_ReLUx2
false
13,744
[ "MIT" ]
106
00069af841dd3ea9a86e6e3a89c3b7222240e6e5
https://github.com/Guangyun-Xu/uois/tree/00069af841dd3ea9a86e6e3a89c3b7222240e6e5
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....
w6688j/ChatBot-PyTorch
Attention_layer
false
13,080
[ "Apache-2.0" ]
0
84f5a3267d16c650b90727ce80e4952901faa902
https://github.com/w6688j/ChatBot-PyTorch/tree/84f5a3267d16c650b90727ce80e4952901faa902
StochasticGate
# 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...
candacelax/1-stage-wseg
StochasticGate
false
3,294
[ "Apache-2.0" ]
0
7a24791a3a78454e6611399ba55a808491551543
https://github.com/candacelax/1-stage-wseg/tree/7a24791a3a78454e6611399ba55a808491551543
C1
import torch import torch.nn as nn from collections import OrderedDict class C1(nn.Module): def __init__(self) ->None: super(C1, self).__init__() self.c1 = nn.Sequential(OrderedDict([('c1', nn.Conv2d(3, 16, kernel_size=(3, 3), bias=True)), ('relu1', nn.ReLU()), ('s1', nn.M...
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...
devillove084/DeepSignal
C1
false
12,263
[ "MIT" ]
0
1fe122b32752b11e10ca4bef3d07ddd7de4348b5
https://github.com/devillove084/DeepSignal/tree/1fe122b32752b11e10ca4bef3d07ddd7de4348b5
AmplitudeToDB
import math import torch from torch import Tensor import torchaudio.functional as F from typing import Optional class AmplitudeToDB(torch.nn.Module): """Turn a tensor from the power/amplitude scale to the decibel scale. This output depends on the maximum value in the input tensor, and so may return diffe...
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 math from typing impo...
tbright17/audio
AmplitudeToDB
false
10,922
[ "BSD-2-Clause" ]
0
00d38203e401b8d9472a8f8394a10e2c309be02c
https://github.com/tbright17/audio/tree/00d38203e401b8d9472a8f8394a10e2c309be02c
SpatialGatherModule
# 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....
ImportPaddle/APCNet
SpatialGatherModule
false
2,372
[ "MIT" ]
0
68ade1f83827b4cdd60ee4b6ac25454397100316
https://github.com/ImportPaddle/APCNet/tree/68ade1f83827b4cdd60ee4b6ac25454397100316
FocalLoss
# 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 ...
T-Visor/face.evoLVe
FocalLoss
false
9,636
[ "MIT" ]
0
73f41a63eec2d95928d4a5401977d4a913d97eba
https://github.com/T-Visor/face.evoLVe/tree/73f41a63eec2d95928d4a5401977d4a913d97eba
DynamicPreHead
import torch import torch.nn as nn class DynamicPreHead(nn.Module): def __init__(self, in_dim=3, embed_dim=100, kernel_size=1): super(DynamicPreHead, self).__init__() self.conv = nn.Conv2d(in_dim, embed_dim, kernel_size=kernel_size, stride=1, padding=int((kernel_size - 1) / 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 from torch._inductor.runtime....
huanglf714/COMatchNet
DynamicPreHead
false
6,838
[ "Apache-2.0" ]
1
79023f5be65d354eb9bdac026d7e0d73110bc4aa
https://github.com/huanglf714/COMatchNet/tree/79023f5be65d354eb9bdac026d7e0d73110bc4aa
AgentModel
# 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....
Purple-PI/rlstructures
AgentModel
false
14,254
[ "MIT" ]
281
9b201b083715bbda2f3534b010c84e11dfc0a1c7
https://github.com/Purple-PI/rlstructures/tree/9b201b083715bbda2f3534b010c84e11dfc0a1c7
UNet
# 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 ...
brainma/ASRNet
UNet
false
9,998
[ "MIT" ]
0
b88edbcfbcee2cc77f7f4b2a8d139ced303a4f14
https://github.com/brainma/ASRNet/tree/b88edbcfbcee2cc77f7f4b2a8d139ced303a4f14
AffineGridGen
from torch.nn import Module import torch import torch.nn.functional as F import torch.nn from torch.nn.modules.module import Module class AffineGridGen(Module): def __init__(self, out_h=240, out_w=240, out_ch=3, use_cuda=True): super(AffineGridGen, self).__init__() self.out_h = out_h 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.nn import Module import torch.nn from torch.nn.modules.module import Module assert_size_stride = torch._C._dynamo.guards.assert_s...
JiwonCocoder/-Joint-Learning-of-Feature-Extraction-and-Cost-Aggregation-for-Semantic-Matching
AffineGridGen
false
5,412
[ "MIT" ]
1
b79e0e20fd5a1a9ddc0ffa9d7a92e0ebd21018b9
https://github.com/JiwonCocoder/-Joint-Learning-of-Feature-Extraction-and-Cost-Aggregation-for-Semantic-Matching/tree/b79e0e20fd5a1a9ddc0ffa9d7a92e0ebd21018b9
EqualLinear
# 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 math import sqrt assert_size_stride = torch._C._dynamo...
g33sean/RTIL
EqualLinear
false
6,710
[ "BSD-2-Clause", "MIT" ]
1
5325f6d5e3ddf7579b6bd8199898e00eff3da631
https://github.com/g33sean/RTIL/tree/5325f6d5e3ddf7579b6bd8199898e00eff3da631
ActorNetwork
# 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_...
harwiltz/sac
ActorNetwork
false
3,572
[ "MIT" ]
0
076e01e63d8933665fbf4038513f163bbfd62800
https://github.com/harwiltz/sac/tree/076e01e63d8933665fbf4038513f163bbfd62800
Linear_2L_KFRA
import torch import torch.nn as nn import torch.utils.data def sample_K_laplace_MN(MAP, upper_Qinv, lower_HHinv): Z = MAP.data.new(MAP.size()).normal_(mean=0, std=1) all_mtx_sample = MAP + torch.matmul(torch.matmul(lower_HHinv, Z), upper_Qinv) weight_mtx_sample = all_mtx_sample[:, :-1] bias_mt...
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 ...
Neronjust2017/Bayesian-neural-networks
Linear_2L_KFRA
false
17,762
[ "MIT" ]
4
9d7f781f5c2dfa8fadf26300b4b5b64366c939cd
https://github.com/Neronjust2017/Bayesian-neural-networks/tree/9d7f781f5c2dfa8fadf26300b4b5b64366c939cd
TripletLogExpLoss
import torch import numpy as np import torch.nn.functional as F import torch.nn as nn class TripletLogExpLoss(nn.Module): """Creates a criterion that measures the triplet loss given an input tensors x1, x2, x3. This is used for measuring a relative similarity between samples. A triplet is composed by ...
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 import torch.nn as nn assert_size_stride = ...
dongan-beta/deep-image-retrieval
TripletLogExpLoss
false
15,201
[ "BSD-3-Clause" ]
253
3e0885f88da328aefb7abb2fa350f8860a4bd52d
https://github.com/dongan-beta/deep-image-retrieval/tree/3e0885f88da328aefb7abb2fa350f8860a4bd52d
MultiheadAttention
# 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....
Munna-Manoj/Team7_TTS
MultiheadAttention
false
11,733
[ "MIT" ]
0
5e2d473a2afe429023876bcc51c2ac966a4938b8
https://github.com/Munna-Manoj/Team7_TTS/tree/5e2d473a2afe429023876bcc51c2ac966a4938b8
ChebConv
import torch import torch.nn as nn from torch.nn import init class ChebConv(nn.Module): """ The ChebNet convolution operation. :param in_c: int, number of input channels. :param out_c: int, number of output channels. :param K: int, the order of Chebyshev Polynomial. """ def __init__(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.triton_helpers import libdevice import torch.nn as ...
zhaoweixi/GraFormer
ChebConv
false
16,826
[ "BSD-2-Clause" ]
384
0a0a04014cdf157c11ab8e952862efa27c6a1980
https://github.com/zhaoweixi/GraFormer/tree/0a0a04014cdf157c11ab8e952862efa27c6a1980
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 from torch._inductor.runtime....
zwc662/disentangling-vae
Net
false
11,086
[ "MIT" ]
0
7eeace2a30f8034e222be6a906f53748b3b2bb6e
https://github.com/zwc662/disentangling-vae/tree/7eeace2a30f8034e222be6a906f53748b3b2bb6e
DecoderLayer
# 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....
hyunwoongko/transformer
DecoderLayer
false
15,609
[ "Apache-2.0" ]
233
8f7aaa19d37b088c156db0512868127ba9bf1a0f
https://github.com/hyunwoongko/transformer/tree/8f7aaa19d37b088c156db0512868127ba9bf1a0f
Mul
import torch import torch.nn as nn class Mul(nn.Module): def __init__(self): super(Mul, self).__init__() def forward(self, x): x = torch.mul(x, 20) return 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
yifanpu001/PytorchToCaffe
Mul
false
4,721
[ "MIT" ]
0
37c1ebfc3547e93b1c174721036d03c831c60e48
https://github.com/yifanpu001/PytorchToCaffe/tree/37c1ebfc3547e93b1c174721036d03c831c60e48
PixelSort
import torch from torch import nn class PixelSort(nn.Module): """The inverse operation of PixelShuffle Reduces the spatial resolution, increasing the number of channels. Currently, scale 0.5 is supported only. Later, torch.nn.functional.pixel_sort may be implemented. Reference: http://pyto...
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...
alpayuz/DeepDeblur-PyTorch
PixelSort
false
14,808
[ "MIT" ]
158
771252e123e3a11da849bb9cef2a7cc49d8d1a2d
https://github.com/alpayuz/DeepDeblur-PyTorch/tree/771252e123e3a11da849bb9cef2a7cc49d8d1a2d
ConvNet
# 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_...
slowy07/dffml
ConvNet
false
13,006
[ "MIT" ]
0
bbf491064470f1170be75b6bec572b6e576940b9
https://github.com/slowy07/dffml/tree/bbf491064470f1170be75b6bec572b6e576940b9
LabelSmoothingCrossEntropyBCE
# 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 import torc...
Diyago/Graph-clasification-by-computer-vision
LabelSmoothingCrossEntropyBCE
false
17,224
[ "Apache-2.0" ]
9
703c44b98f9875d7a7b6db1c2b96372e11e256d6
https://github.com/Diyago/Graph-clasification-by-computer-vision/tree/703c44b98f9875d7a7b6db1c2b96372e11e256d6
EncoderLayer
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data.distributed class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature def...
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....
QiuhongAnnaWei/IBRNet
EncoderLayer
false
14,289
[ "Apache-2.0" ]
254
6c8b68e6d95eae04535ff0906387ec7899f5d5ce
https://github.com/QiuhongAnnaWei/IBRNet/tree/6c8b68e6d95eae04535ff0906387ec7899f5d5ce
SpectralConvergenceLoss
# 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.utils.data impo...
Oktai15/NeMo
SpectralConvergenceLoss
false
5,679
[ "Apache-2.0" ]
1
5b6dd3850129898be47cf0d65587897ec45a5b59
https://github.com/Oktai15/NeMo/tree/5b6dd3850129898be47cf0d65587897ec45a5b59
PolicyNetwork
import torch import torch.nn as nn import torch.nn.functional as F class PolicyNetwork(torch.nn.Module): def __init__(self, input_size, output_size): super().__init__() self.input_size = input_size self.linear1 = nn.Linear(input_size, 32) self.linear2 = nn.Linear(32, output_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....
NiccoloSacchi/rlcard
PolicyNetwork
false
885
[ "MIT" ]
0
046129e8616b12e25652957869a94ab5fd838ae1
https://github.com/NiccoloSacchi/rlcard/tree/046129e8616b12e25652957869a94ab5fd838ae1
Pow
# 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 empty_strided_c...
NVIDIA-AI-IOT-private/torch2trt
Pow
false
10,546
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
LocalStatisticsNetwork
import torch import torch.nn as nn class LocalStatisticsNetwork(nn.Module): def __init__(self, img_feature_channels: 'int'): """Local statistique nerwork Args: img_feature_channels (int): [Number of input channels] """ super().__init__() self.conv1 = nn.Conv2d...
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_...
MehdiZouitine/Learning-Disentangled-Representations-via-Mutual-Information-Estimation
LocalStatisticsNetwork
false
8,535
[ "MIT" ]
25
52952aff647a33b749b709cd7f0c3cd059c66b54
https://github.com/MehdiZouitine/Learning-Disentangled-Representations-via-Mutual-Information-Estimation/tree/52952aff647a33b749b709cd7f0c3cd059c66b54
Alignment
from _paritybench_helpers import _mock_config from torch.nn import Module import math import torch import torch.nn.functional as f import torch.nn as nn class Module(nn.Module): def __init__(self): super().__init__() self.summary = {} def add_summary(self, name, val): if self.trainin...
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....
IamHimon/re2
Alignment
false
11,817
[ "Apache-2.0" ]
0
d16b0ffc385f7b118a6160d035250da8d6320534
https://github.com/IamHimon/re2/tree/d16b0ffc385f7b118a6160d035250da8d6320534
FocalLossMultiClass
# 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 ...
ChristophReich1996/Cell-DETR
FocalLossMultiClass
false
13,505
[ "MIT" ]
55
4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
https://github.com/ChristophReich1996/Cell-DETR/tree/4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
Discriminator
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
mess-clarifai/DGI
Discriminator
false
10,496
[ "MIT" ]
0
3a7c96d59991d448b84d709916d1d5f256e5b9be
https://github.com/mess-clarifai/DGI/tree/3a7c96d59991d448b84d709916d1d5f256e5b9be
WeightedCrossEntropyLoss
import torch import torch.nn as nn import torch.utils.data import torch.nn.functional as F import torch.autograd class WeightedCrossEntropyLoss(nn.Module): """ Transform input to fit the fomation of PyTorch offical cross entropy loss with anchor-wise weighting. """ def __init__(self): sup...
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 ...
LaudateCorpus1/LIGA-Stereo
WeightedCrossEntropyLoss
false
13,994
[ "Apache-2.0" ]
56
aee3731a24a0ab1667e633e520cc89be2f135272
https://github.com/LaudateCorpus1/LIGA-Stereo/tree/aee3731a24a0ab1667e633e520cc89be2f135272
ResidualLayer
# 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....
Gradient-PG/live-nst
ResidualLayer
false
17,333
[ "MIT" ]
5
02244172646375ff4a4a417bc8220064fadae5a9
https://github.com/Gradient-PG/live-nst/tree/02244172646375ff4a4a417bc8220064fadae5a9
SimpleCNN
# 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_...
AnweshCR7/just-some-crypto-fun
SimpleCNN
false
16,945
[ "MIT" ]
4
e614cd9f46e355272aec37df7a7cc90a589c993a
https://github.com/AnweshCR7/just-some-crypto-fun/tree/e614cd9f46e355272aec37df7a7cc90a589c993a
SigmoidCrossEntropyLoss
# 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 ...
Connormcc3/ludwig
SigmoidCrossEntropyLoss
false
9,009
[ "Apache-2.0" ]
0
5d562cbc0c4fed3e607969e18611f34240eef177
https://github.com/Connormcc3/ludwig/tree/5d562cbc0c4fed3e607969e18611f34240eef177
ConvModule
import torch import warnings import torch.nn as nn def kaiming_init(module, mode='fan_out', nonlinearity='relu', bias=0, distribution='normal'): assert distribution in ['uniform', 'normal'] if distribution == 'uniform': nn.init.kaiming_uniform_(module.weight, mode=mode, nonlinearity= 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 import warnings import torch....
CrazySherman/mmdetection
ConvModule
false
13,523
[ "Apache-2.0" ]
82
3ba66ef0d377086996d2765f1cec3aa3577039aa
https://github.com/CrazySherman/mmdetection/tree/3ba66ef0d377086996d2765f1cec3aa3577039aa
CategoricalKLLoss
# 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...
kekayan/Info-HCVAE
CategoricalKLLoss
false
15,811
[ "Apache-2.0" ]
120
1f4d536523767f439e689d8963c54a55fb75c6f9
https://github.com/kekayan/Info-HCVAE/tree/1f4d536523767f439e689d8963c54a55fb75c6f9
Enhancement_Block
import torch import torch.nn as nn def conv3x3(in_ch, out_ch, stride=1): """3x3 convolution with padding.""" return nn.Conv2d(in_ch, out_ch, kernel_size=3, stride=stride, padding=1) class ResidualBlock(nn.Module): """Simple residual block with two 3x3 convolutions. Args: in_ch (int): number...
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...
fqhank/HESIC
Enhancement_Block
false
6,702
[ "Apache-2.0" ]
1
f15cb8e6822af45f0022ea4887fce915e250ed75
https://github.com/fqhank/HESIC/tree/f15cb8e6822af45f0022ea4887fce915e250ed75
Softmax
import torch import torch.nn as nn def keep_variance_fn(x): return x + 0.001 class Softmax(nn.Module): def __init__(self, dim=1, keep_variance_fn=None): super(Softmax, self).__init__() self.dim = dim self._keep_variance_fn = keep_variance_fn def forward(self, features_mean, fea...
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...
DoggyLiu0116/MamboNet
Softmax
false
5,088
[ "MIT" ]
1
3b708091422491f660c4bd5eb12b06ce3b8a5f79
https://github.com/DoggyLiu0116/MamboNet/tree/3b708091422491f660c4bd5eb12b06ce3b8a5f79
SafeLength
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_s...
clementpoiret/3D-AGSCaps
SafeLength
false
6,460
[ "MIT" ]
1
475eb1915bc1425cebbd0bec36e9096c9c2cb53c
https://github.com/clementpoiret/3D-AGSCaps/tree/475eb1915bc1425cebbd0bec36e9096c9c2cb53c
RSoftmax
# 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 ...
Atten4Vis/DemystifyLocalViT
RSoftmax
false
13,328
[ "MIT" ]
64
2e2327caec6d56ae2c8aa861b32bb62f3cdb786e
https://github.com/Atten4Vis/DemystifyLocalViT/tree/2e2327caec6d56ae2c8aa861b32bb62f3cdb786e
SoftSelectPrototype
import torch import torch.nn as nn class SoftSelectAttention(nn.Module): def __init__(self, hidden_size): super(SoftSelectAttention, self).__init__() def forward(self, support, query): """ :param support: [few, dim] :param query: [batch, dim] :return: """ ...
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....
JiaweiSheng/FAAN
SoftSelectPrototype
false
8,366
[ "MIT" ]
41
b439b829506c4e2e9044a6b2ab7f3d844f445a95
https://github.com/JiaweiSheng/FAAN/tree/b439b829506c4e2e9044a6b2ab7f3d844f445a95
ChannelAttentionModule
# 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....
Nitin-Mane/External-Attention-pytorch
ChannelAttentionModule
false
14,104
[ "MIT" ]
4,466
1ceda306c41063af11c956334747763444a4d83f
https://github.com/Nitin-Mane/External-Attention-pytorch/tree/1ceda306c41063af11c956334747763444a4d83f
BCEWithLogitsLoss
# 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 import torc...
Alicegaz/torchok
BCEWithLogitsLoss
false
16,919
[ "Apache-2.0" ]
8
7b8f95df466a25b1ad8ee93bed1a3c7516440cf4
https://github.com/Alicegaz/torchok/tree/7b8f95df466a25b1ad8ee93bed1a3c7516440cf4
SCNLayer
import torch import torch.nn as nn def chebyshev(L, X, k=3): if k == 1: return torch.sparse.mm(L, X) dp = [X, torch.sparse.mm(L, X)] for i in range(2, k): nxt = 2 * torch.sparse.mm(L, dp[i - 1]) dp.append(torch.sparse.FloatTensor.add(nxt, -dp[i - 2])) return torch.cat(dp, dim=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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
ggoh29/Simplicial-neural-network-benchmark
SCNLayer
false
6,733
[ "MIT" ]
1
9a12bcd054251790d85e3971f5473dcffaa5664b
https://github.com/ggoh29/Simplicial-neural-network-benchmark/tree/9a12bcd054251790d85e3971f5473dcffaa5664b
GeneralRelu
# 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 import nn from typing import * assert_size_stride = torch._C._dynamo.guards.as...
ImadDabbura/fastai-courses
GeneralRelu
false
17,430
[ "Apache-2.0" ]
3
053637a2dd3b4ad6c35f97a13f3fba87af1d3940
https://github.com/ImadDabbura/fastai-courses/tree/053637a2dd3b4ad6c35f97a13f3fba87af1d3940
WingLoss
import torch import torch.nn as nn class WingLoss(nn.Module): def __init__(self, l1_log_cutoff, epsilon): super().__init__() self.l1_log_cutoff = l1_log_cutoff self.epsilon = epsilon log_val = torch.log(torch.FloatTensor([1 + self.l1_log_cutoff / self.epsilon])).item()...
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 ...
Daiver/torch_fuze
WingLoss
false
5,038
[ "MIT" ]
1
6b7ad568e2d7549c7f0c0d4c309532ac1b92881d
https://github.com/Daiver/torch_fuze/tree/6b7ad568e2d7549c7f0c0d4c309532ac1b92881d
HuggingfaceFastGelu
# 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 import torch.onnx assert_size_stride = torch._C._dynamo.guards....
thilow/onnxruntime
HuggingfaceFastGelu
false
11,016
[ "MIT" ]
0
1a3ddf0714e1bdf9b807a342eee5f6e160ad1ec9
https://github.com/thilow/onnxruntime/tree/1a3ddf0714e1bdf9b807a342eee5f6e160ad1ec9
DenoisingBlock
import torch from torch import nn class DenoisingBlock(nn.Module): def __init__(self, in_channels, inner_channels, out_channels): super(DenoisingBlock, self).__init__() self.conv_0 = nn.Conv2d(in_channels, inner_channels, 3, padding=1) self.conv_1 = nn.Conv2d(in_channels + inner_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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
XaviGurrola/RDUNet
DenoisingBlock
false
9,666
[ "MIT" ]
0
549fc88c6faef1b310773944fc3988e22030d94d
https://github.com/XaviGurrola/RDUNet/tree/549fc88c6faef1b310773944fc3988e22030d94d
FCTestNN
import torch import torch.nn as nn import torch.nn.functional as F class FCTestNN(nn.Module): def __init__(self, class_size): super(FCTestNN, self).__init__() self.name = 'FCTestNN' self.fc1 = nn.Linear(3 * 224 * 224, 256) self.fc2 = nn.Linear(256, class_size) def forward(sel...
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_...
NirooshKa/APS360-Cold-Start-Problem
FCTestNN
false
9,449
[ "MIT" ]
0
4c864737b4e6db992e99610a0ed8e82c957fd6cc
https://github.com/NirooshKa/APS360-Cold-Start-Problem/tree/4c864737b4e6db992e99610a0ed8e82c957fd6cc
chroma_subsampling
import torch from torch import nn class chroma_subsampling(nn.Module): """ Chroma subsampling on CbCv channels Input: image(tensor): batch x height x width x 3 Output: y(tensor): batch x height x width cb(tensor): batch x height/2 x width/2 cr(tensor): batch x height/2 x wi...
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...
Liamkuo/SAIR
chroma_subsampling
false
17,573
[ "MIT" ]
6
0fb289cd975b5a196b58e7d16bac00e31fd41d39
https://github.com/Liamkuo/SAIR/tree/0fb289cd975b5a196b58e7d16bac00e31fd41d39
SplitChannels
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
cetmann/iunets
SplitChannels
false
15,004
[ "MIT" ]
86
80ed7cce0e505a0396c42359eaf27819222d71f6
https://github.com/cetmann/iunets/tree/80ed7cce0e505a0396c42359eaf27819222d71f6
OutConv_Sigmoid
# 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...
Curli-quan/oneshot-medical-landmark
OutConv_Sigmoid
false
17,164
[ "Apache-2.0" ]
7
572926077fffbe9832aa16baa98bd046ec326700
https://github.com/Curli-quan/oneshot-medical-landmark/tree/572926077fffbe9832aa16baa98bd046ec326700
mnist_model
# 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....
Xenovortex/INN_Embedding_Classification
mnist_model
false
1,302
[ "MIT" ]
0
df31ec3dcf70780cae5140a69ffafdd64f218e5f
https://github.com/Xenovortex/INN_Embedding_Classification/tree/df31ec3dcf70780cae5140a69ffafdd64f218e5f
IBNbResInitBlock
# 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....
HyperGAN/imgclsmob
IBNbResInitBlock
false
17,689
[ "MIT" ]
9
88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
DownConv
# 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_...
duchn92/transfer-object
DownConv
false
15,251
[ "MIT" ]
80
4db96931545ac0d28891375fbca3c0a5a382fb32
https://github.com/duchn92/transfer-object/tree/4db96931545ac0d28891375fbca3c0a5a382fb32
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....
nikhilweee/syntactic-seq2seq
GlobalAttention
false
7,350
[ "MIT" ]
1
807e524167b064fc85c91e5e2fa994de6b739455
https://github.com/nikhilweee/syntactic-seq2seq/tree/807e524167b064fc85c91e5e2fa994de6b739455
GCN
import torch from torch import nn import torch.nn.functional as F import torch.nn.parallel class Conv2D(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, padding= 'same', stride=1, dilation=1, groups=1): super(Conv2D, self).__init__() assert type(kernel_size) in [int,...
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.functional as F import torch.nn.parallel as...
hav4ik/AdelaiDet
GCN
false
3,716
[ "BSD-2-Clause" ]
0
6ed9c1e1a25a3e25dddfa858ce0f219a30593ce2
https://github.com/hav4ik/AdelaiDet/tree/6ed9c1e1a25a3e25dddfa858ce0f219a30593ce2
DivisiveNormalization2d
# 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 from torch.nn import M...
Noppornying00/constant-fraction-activation
DivisiveNormalization2d
false
917
[ "Apache-2.0" ]
0
b25745e7339df13e3db34d8c8372d5cbaa3c13bb
https://github.com/Noppornying00/constant-fraction-activation/tree/b25745e7339df13e3db34d8c8372d5cbaa3c13bb
EncoderBlock
import math import torch import torch.nn as nn import torch.nn.functional as F class ScaledDotProductAttention(nn.Module): def forward(self, query, key, value, mask=None): dk = query.size()[-1] scores = query.matmul(key.transpose(-2, -1)) / math.sqrt(dk) if mask is not None: 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 from torch._inductor.runtime....
dukeNashor/CaptainStony
EncoderBlock
false
1,885
[ "MIT" ]
0
6320a27420e686666a4d7172437cf55fe42de2b6
https://github.com/dukeNashor/CaptainStony/tree/6320a27420e686666a4d7172437cf55fe42de2b6