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
MatrixAttention
import math import torch import torch.nn as nn class SimilarityFunction(nn.Module): """ A ``SimilarityFunction`` takes a pair of tensors with the same shape, and computes a similarity function on the vectors in the last dimension. For example, the tensors might both have shape `(batch_size, sentence_...
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 math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guar...
Aunsiels/qagnn
MatrixAttention
false
11,303
[ "MIT" ]
0
d89a3dd650ac4b8b8aae34e0cce7cfc698892d80
https://github.com/Aunsiels/qagnn/tree/d89a3dd650ac4b8b8aae34e0cce7cfc698892d80
Relu_Caps
import torch from torch import nn import torch.nn.functional as F class Relu_Caps(nn.Module): def __init__(self, num_C, num_D, theta=0.2, eps=0.0001): super(Relu_Caps, self).__init__() self.num_C = num_C self.num_D = num_D self.theta = theta self.eps = eps def forward...
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 import nn assert_...
WdBlink/AugMix-3DOCUNet-Brats2019
Relu_Caps
false
5,957
[ "MIT" ]
1
125c6c8682b51a550eeac9173d13d0a211576abc
https://github.com/WdBlink/AugMix-3DOCUNet-Brats2019/tree/125c6c8682b51a550eeac9173d13d0a211576abc
Block
# 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....
Junhojuno/vision-transformer
Block
false
5,440
[ "MIT" ]
1
38f8a17967e91e98f767c8e5754081ee8bcd72b4
https://github.com/Junhojuno/vision-transformer/tree/38f8a17967e91e98f767c8e5754081ee8bcd72b4
DistilMHAScoresCalculation_v1
import math import torch import torch.nn as nn import torch.cuda import torch.backends.cudnn import torch.backends.mkl class DistilMHAScoresCalculation_v1(nn.Module): def __init__(self, dim_per_head, softmax_dim=-1): super(DistilMHAScoresCalculation_v1, self).__init__() self.softmax = nn.Softmax(...
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....
JudeDavis1/intel-extension-for-pytorch
DistilMHAScoresCalculation_v1
false
2,580
[ "Apache-2.0" ]
0
364e34cb4917a709f5108c07d4005bf82f3d5067
https://github.com/JudeDavis1/intel-extension-for-pytorch/tree/364e34cb4917a709f5108c07d4005bf82f3d5067
TorchDiv
import torch class TorchDiv(torch.nn.Module): def __init__(self): super(TorchDiv, self).__init__() def forward(self, x, y): return torch.div(x, y) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
Ilyabasharov/torch2trt
TorchDiv
false
2,570
[ "MIT" ]
0
76bf298b3da408509665e23e2494922b131afb10
https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10
RankingLoss
import torch import torch.nn as nn import torch.nn.functional as F from abc import abstractmethod import torch.utils.data.dataloader import torch.nn class SimilarityLoss(nn.Module): def __init__(self): super(SimilarityLoss, self).__init__() @abstractmethod def forward(self, inputs, targets): ...
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 abc import abstractmethod import torch.utils.data.dataloader i...
GT-SALT/LADA
RankingLoss
false
8,139
[ "MIT" ]
31
2838a4c90694bf1054c6bab7f3b60ab5e04a5d4d
https://github.com/GT-SALT/LADA/tree/2838a4c90694bf1054c6bab7f3b60ab5e04a5d4d
PermEqui2_max
# 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_...
haoruilee/DeepSets
PermEqui2_max
false
15,492
[ "Apache-2.0" ]
213
b405dd6b51a34fb1ef622e25e6685b417b7b7cbb
https://github.com/haoruilee/DeepSets/tree/b405dd6b51a34fb1ef622e25e6685b417b7b7cbb
MultiHeadAttention
from torch.nn import Module import torch import numpy as np import torch.nn as nn class ScaledDotProductAttention(nn.Module): """ Scaled dot-product attention """ def __init__(self, d_model, d_k, d_v, h): """ :param d_model: Output dimensionality of the model :param d_k: Dimen...
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....
CurryYuan/X-Trans2Cap
MultiHeadAttention
false
7,933
[ "Apache-2.0" ]
11
c78a27209f14fcbbec74fe8b5edc06faea2e7d44
https://github.com/CurryYuan/X-Trans2Cap/tree/c78a27209f14fcbbec74fe8b5edc06faea2e7d44
KlCriterion
# 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....
johnson7788/mt-dnn
KlCriterion
false
3,902
[ "MIT" ]
0
26e5c4a5bfdbf1a1dd1c903e606db1c070568237
https://github.com/johnson7788/mt-dnn/tree/26e5c4a5bfdbf1a1dd1c903e606db1c070568237
Downsample
# 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...
GastonMazzei/escher-project-website
Downsample
false
17,289
[ "MIT" ]
5
b3861eeeca11a7c31502f539ded9ae718f3d9e2e
https://github.com/GastonMazzei/escher-project-website/tree/b3861eeeca11a7c31502f539ded9ae718f3d9e2e
Encoder
# 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....
Ergtou/TextWord
Encoder
false
2,197
[ "MIT" ]
0
f05cc5a630fc8d05357b8a9bc0da3ec5cc255a30
https://github.com/Ergtou/TextWord/tree/f05cc5a630fc8d05357b8a9bc0da3ec5cc255a30
FocalLossBinary
import torch import torch.jit import torch.nn.functional as F from functools import partial import torch.utils.data import torch.nn.functional from torch.nn.modules.loss import _Loss def reduced_focal_loss(outputs: 'torch.Tensor', targets: 'torch.Tensor', threshold: 'float'=0.5, gamma: 'float'=2.0, reduction='mea...
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...
Magnety/nnUNet
FocalLossBinary
false
9,593
[ "Apache-2.0" ]
0
f07e6fdf191377550c57bcdc8859798486f60443
https://github.com/Magnety/nnUNet/tree/f07e6fdf191377550c57bcdc8859798486f60443
GLU
import torch import torch.nn as nn import torch.utils.data class GLU(nn.Module): """ Overview: Gating Linear Unit. This class does a thing like this: .. code:: python # Inputs: input, context, output_size # The gate value is a learnt function of the input. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
L-Net-1992/DI-engine
GLU
false
5,510
[ "Apache-2.0" ]
1
06803b4e18fa64bbed0fd1d44952242c0c063b0f
https://github.com/L-Net-1992/DI-engine/tree/06803b4e18fa64bbed0fd1d44952242c0c063b0f
clip_nonlinear
import torch import torch.nn as nn def quantize_a(x): x = Q_A.apply(x) return x def fa(x, bitA): if bitA == 32: return x return quantize_a(x) class Q_A(torch.autograd.Function): @staticmethod def forward(ctx, x): ctx.save_for_backward(x) out = x.new(x.size()) ...
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...
GakkiChen/TWB-Net
clip_nonlinear
false
2,264
[ "MIT" ]
0
bb4917c697c09585bb3fe163a8b429b6dd250f18
https://github.com/GakkiChen/TWB-Net/tree/bb4917c697c09585bb3fe163a8b429b6dd250f18
DiscriminatorLoss
from torch.nn import Module import torch import torch.nn.functional as F import torch.utils.data import torch.nn.functional import torch.autograd class DiscriminatorLoss(Module): """ ## Discriminator Loss We want to find $w$ to maximize $$\\mathbb{E}_{x \\sim \\mathbb{P}_r} [f_w(x)]- \\mathbb{E}_{z \...
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 import Module import torch.utils.data import torch.nn.functional import tor...
mcx/annotated_deep_learning_paper_implementations
DiscriminatorLoss
false
7,194
[ "MIT" ]
1
f169f3a71dd2d36eb28ad31062d3475efa367b88
https://github.com/mcx/annotated_deep_learning_paper_implementations/tree/f169f3a71dd2d36eb28ad31062d3475efa367b88
Net
import torch import torch.nn as nn import torch.nn.functional as F def set_init(layers): for layer in layers: nn.init.normal_(layer.weight, mean=0.0, std=0.1) nn.init.constant_(layer.bias, 0.0) class Net(nn.Module): def __init__(self, s_dim, a_dim): super(Net, self).__init__() ...
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 ...
taomo/pytorch-A3C-1
Net
false
4,413
[ "MIT" ]
0
8e26720c75ca8b7e987b267e5e0e652d0c5d23cf
https://github.com/taomo/pytorch-A3C-1/tree/8e26720c75ca8b7e987b267e5e0e652d0c5d23cf
VPGELU
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
DucNguyen183/nfnet_f5
VPGELU
false
13,592
[ "Apache-2.0" ]
133
567a1126ff6ea09b33ffa5dacfac9c983fd48713
https://github.com/DucNguyen183/nfnet_f5/tree/567a1126ff6ea09b33ffa5dacfac9c983fd48713
SELayer
# 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_...
implus/pytorch_image_classification
SELayer
false
10,284
[ "MIT" ]
0
cac490ed518ad09b0429fc01af060457fb050e68
https://github.com/implus/pytorch_image_classification/tree/cac490ed518ad09b0429fc01af060457fb050e68
QuadrupletLoss
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
VictorCallejas/FB-Similarity-Challenge
QuadrupletLoss
false
2,932
[ "MIT" ]
0
0092071f29d5d8fab055d27a1e542e2e64e9cdab
https://github.com/VictorCallejas/FB-Similarity-Challenge/tree/0092071f29d5d8fab055d27a1e542e2e64e9cdab
LayerNorm
import torch import torch.utils.data import torch.nn as nn class LayerNorm(nn.Module): def __init__(self, d): super().__init__() self.a = nn.Parameter(torch.ones(d).unsqueeze(0).unsqueeze(0)) self.b = nn.Parameter(torch.zeros(d).unsqueeze(0).unsqueeze(0)) 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.utils.data import torch.nn as nn assert_size_stride = torch._C._dy...
AntoBcc/benchmarking-gnns
LayerNorm
false
1,961
[ "MIT" ]
0
c5750054b2f4ba0822f203fa18d382f6a3b16542
https://github.com/AntoBcc/benchmarking-gnns/tree/c5750054b2f4ba0822f203fa18d382f6a3b16542
PositionWiseFFN
import torch from torch import nn from torch.nn.functional import relu class PositionWiseFFN(nn.Module): def __init__(self, model_dim, dropout=0.0): super().__init__() dff = model_dim * 4 self.l = nn.Linear(model_dim, dff) self.o = nn.Linear(dff, model_dim) self.dropout = ...
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....
ruifan831/NLP-Tutorials
PositionWiseFFN
false
12,949
[ "MIT" ]
0
d1fe27b2891156be4d8054022b762f758e9113a9
https://github.com/ruifan831/NLP-Tutorials/tree/d1fe27b2891156be4d8054022b762f758e9113a9
Attention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
OneAdder/hseling-repo-chukchi-type
Attention
false
921
[ "MIT" ]
0
5f5e651510bca7cfb89dc2e98b07bcc63b6330a4
https://github.com/OneAdder/hseling-repo-chukchi-type/tree/5f5e651510bca7cfb89dc2e98b07bcc63b6330a4
BondEnergyModule
# 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.nn as nn from itertools import repeat assert_size_...
torchmd/mdgrad
BondEnergyModule
false
16,626
[ "MIT" ]
54
77bd7685b74b41acf54a9483546e1e8cb545eb01
https://github.com/torchmd/mdgrad/tree/77bd7685b74b41acf54a9483546e1e8cb545eb01
SelfAttentionPooling
import torch import torch.nn as nn class SelfAttentionPooling(nn.Module): """ Implementation of SelfAttentionPooling Original Paper: Self-Attention Encoding and Pooling for Speaker Recognition https://arxiv.org/pdf/2008.01077v1.pdf """ def __init__(self, input_dim): super(SelfAttenti...
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....
AyushExel/s3prl
SelfAttentionPooling
false
1,995
[ "MIT" ]
0
6531904e9621a778978b9cfef3ba9f582e56639a
https://github.com/AyushExel/s3prl/tree/6531904e9621a778978b9cfef3ba9f582e56639a
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 import torch.nn as nn assert_...
ablou1/dqn-navigation
QNetwork
false
9,659
[ "MIT" ]
0
c89011220983061685ae4501d0207b8958eafc21
https://github.com/ablou1/dqn-navigation/tree/c89011220983061685ae4501d0207b8958eafc21
SineODE
import math import torch class SineODE(torch.nn.Module): def forward(self, t, y): return 2 * y / t + t ** 4 * torch.sin(2 * t) - t ** 2 + 4 * t ** 3 def y_exact(self, t): return -0.5 * t ** 4 * torch.cos(2 * t) + 0.5 * t ** 3 * torch.sin( 2 * t) + 0.25 * t ** 2 * torch.cos(2 * t)...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import math assert_size_stride = torch._C._dynamo.guards.assert_size_stri...
MaricelaM/torchdiffeq
SineODE
false
14,002
[ "MIT" ]
4,088
4e070fb687167e53082a91f32e102af7f4521058
https://github.com/MaricelaM/torchdiffeq/tree/4e070fb687167e53082a91f32e102af7f4521058
ForwardNet
# 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....
jamaalhay/Final_Proj
ForwardNet
false
15,671
[ "MIT" ]
104
3f524a90fee5a3cb21466ab76f630d060792045d
https://github.com/jamaalhay/Final_Proj/tree/3f524a90fee5a3cb21466ab76f630d060792045d
MaxPool2dDynamicSamePadding
import math import torch from torch import nn import torch.nn.functional as F import torch.utils class MaxPool2dDynamicSamePadding(nn.MaxPool2d): """2D MaxPooling like TensorFlow's 'SAME' mode, with a dynamic image size. The padding is operated in forward function by calculating dynamically. """ d...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import torch.utils assert_size_stride = torch._C._dynamo.guards.asse...
BlakeDai/FedML-test
MaxPool2dDynamicSamePadding
false
9,198
[ "Apache-2.0" ]
0
3cb9a7234f3f0294f3137e4be572153ba7b62f8f
https://github.com/BlakeDai/FedML-test/tree/3cb9a7234f3f0294f3137e4be572153ba7b62f8f
MultiheadAttention
import torch import torch.nn as nn def BuildDropout(dropout_type, **kwargs): supported_dropouts = {'droppath': DropPath, 'dropout': nn.Dropout, 'dropout2d': nn.Dropout2d, 'dropout3d': nn.Dropout3d} assert dropout_type in supported_dropouts, 'unsupport dropout type %s...' % dropout_type return supp...
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....
CharlesPikachu/mcibi
MultiheadAttention
false
7,903
[ "MIT" ]
41
6ce453504741c2eed1d290306055258a377a4094
https://github.com/CharlesPikachu/mcibi/tree/6ce453504741c2eed1d290306055258a377a4094
AdaIN
# 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 ...
fpaupier/stargan-v2
AdaIN
false
6,697
[ "MIT" ]
1
18d2e04ed6e6df963b84345e798d94383757aaa2
https://github.com/fpaupier/stargan-v2/tree/18d2e04ed6e6df963b84345e798d94383757aaa2
ScaledDotProductAttention
import math import torch from torch import nn class ScaledDotProductAttention(nn.Module): def __init__(self, d_k): super().__init__() self.dropout = nn.Dropout(0.5) self.sqrt_d_k = math.sqrt(d_k) def forward(self, Q, K, V): attn = torch.bmm(Q, K.transpose(2, 1)) attn ...
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....
DaanG96/breakfastDSNet
ScaledDotProductAttention
false
8,936
[ "MIT" ]
0
17a146ef5ad077e935e6f4b773e0a1f605f76a78
https://github.com/DaanG96/breakfastDSNet/tree/17a146ef5ad077e935e6f4b773e0a1f605f76a78
RNN
# 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....
chenyuntc/practical-pytorch
RNN
false
12,214
[ "MIT" ]
0
42cbde5275d37bf3f3623a85fd71f13069d95089
https://github.com/chenyuntc/practical-pytorch/tree/42cbde5275d37bf3f3623a85fd71f13069d95089
MetaLayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
KIMGEONUNG/multi-memory-siren
MetaLayerNorm
false
716
[ "MIT" ]
0
b372e1b9abe2b3fb502d808eb3a47c2ad287ca3b
https://github.com/KIMGEONUNG/multi-memory-siren/tree/b372e1b9abe2b3fb502d808eb3a47c2ad287ca3b
Inception3
import torch import torch.nn as nn import torch.nn.functional as F class BasicConv2d(nn.Module): def __init__(self, in_channels, out_channels, **kwargs): super(BasicConv2d, self).__init__() self.conv = nn.Conv2d(in_channels, out_channels, bias=True, **kwargs) def forward(self, x): 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 import torch.nn as nn import ...
Galaxies99/inception-cuda
Inception3
false
11,638
[ "MIT" ]
0
ed8fdbe3caef415e60b52e671273be90e9423e44
https://github.com/Galaxies99/inception-cuda/tree/ed8fdbe3caef415e60b52e671273be90e9423e44
MultiplyLearned
import torch import torch.fft import torch.nn class MultiplyLearned(torch.nn.Module): def __init__(self, omega_0: 'float'): """ out = omega_0 * x, with a learned omega_0 """ super().__init__() self.omega_0 = torch.nn.Parameter(torch.Tensor(1)) with torch.no_grad():...
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.fft import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guard...
dwromero/ckconv
MultiplyLearned
false
15,280
[ "MIT" ]
74
d44c6441a98792477d6259368c210089bb33fe7a
https://github.com/dwromero/ckconv/tree/d44c6441a98792477d6259368c210089bb33fe7a
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 import ...
xuanyuyt/pytorch-tutorial
Net
false
4,604
[ "MIT" ]
0
92076ac56d42da98ea61ce06708bb8c537a49af0
https://github.com/xuanyuyt/pytorch-tutorial/tree/92076ac56d42da98ea61ce06708bb8c537a49af0
Attention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ZagHe568/pytorch-seq2seq
Attention
false
6,035
[ "MIT" ]
1
2491c04650b480944c76a15532e5cc89e9dc62fb
https://github.com/ZagHe568/pytorch-seq2seq/tree/2491c04650b480944c76a15532e5cc89e9dc62fb
SIREN_layer
import torch import numpy as np import torch.nn as nn def act(act_fun='LeakyReLU'): """ Either string defining an activation function or module (e.g. nn.ReLU) """ if isinstance(act_fun, str): if act_fun == 'LeakyReLU': return nn.LeakyReLU(0.2, inplace=True) elif act_fun...
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 numpy ...
dustlrdk/noise2self
SIREN_layer
false
3,445
[ "MIT" ]
0
46e8c4650f7ec4f664448417fecd39b4cae477f7
https://github.com/dustlrdk/noise2self/tree/46e8c4650f7ec4f664448417fecd39b4cae477f7
FSM
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_st...
Genevievekim/semantic-segmentation-1
FSM
false
13,709
[ "BSD-3-Clause" ]
196
f28b026e44cff80fe3ca4cac94cea27e4073821b
https://github.com/Genevievekim/semantic-segmentation-1/tree/f28b026e44cff80fe3ca4cac94cea27e4073821b
DivideMax
import torch from torch import nn class DivideMax(nn.Module): def __init__(self, dim): super().__init__() self.dim = dim def forward(self, x): maxes = x.amax(dim=self.dim, keepdim=True).detach() return x / maxes def get_inputs(): return [torch.rand([4, 4, 4, 4, 4])] d...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
Tiamat-Tech/DALLE-pytorch
DivideMax
false
11,937
[ "MIT" ]
0
d7bd745b23424e5a47c0db7e7ab093542427b22d
https://github.com/Tiamat-Tech/DALLE-pytorch/tree/d7bd745b23424e5a47c0db7e7ab093542427b22d
DepthwiseSeparableConv
# 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_...
MobtgZhang/MWMLNet
DepthwiseSeparableConv
false
5,607
[ "MIT" ]
1
125bb39935916b6b4be505c51cb6a04eb49b96d0
https://github.com/MobtgZhang/MWMLNet/tree/125bb39935916b6b4be505c51cb6a04eb49b96d0
FocalLoss
import torch class FocalLoss(torch.nn.Module): def __init__(self, gamma=2, alpha=0.5, size_average=True): super(FocalLoss, self).__init__() self.gamma = gamma self.alpha = alpha self.size_average = size_average self.elipson = 1e-06 def forward(self, logits, labels): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = t...
RuiBai1999/HiMatch
FocalLoss
false
5,771
[ "MIT" ]
1
199ebc6b06b3cce2b3f2298cb9e20f81c01dc7a6
https://github.com/RuiBai1999/HiMatch/tree/199ebc6b06b3cce2b3f2298cb9e20f81c01dc7a6
MultiLayerPerceptron
import torch import torch.utils.data import torch.optim class MultiLayerPerceptron(torch.nn.Module): """ A simple MLP that can either be used independently or put on top of pretrained models (such as BERT) and act as a classifier. Args: hidden_size (int): the size of each layer num_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....
Zenodia/NeMo
MultiLayerPerceptron
false
1,299
[ "Apache-2.0" ]
0
3c288d8a7caf667c95444c39434e3ebc5f53d911
https://github.com/Zenodia/NeMo/tree/3c288d8a7caf667c95444c39434e3ebc5f53d911
BinaryCrossEntropyLoss
# 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...
Elameri/ivadomed
BinaryCrossEntropyLoss
false
9,302
[ "MIT" ]
0
76b5cea46f90f938aafd5ec26e072d559c764b43
https://github.com/Elameri/ivadomed/tree/76b5cea46f90f938aafd5ec26e072d559c764b43
AvgConsensus
# 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...
scenarios/dev
AvgConsensus
false
4,453
[ "Apache-2.0" ]
0
9f91ebc142cea1c31231d233571ad59460ab6fba
https://github.com/scenarios/dev/tree/9f91ebc142cea1c31231d233571ad59460ab6fba
PyramidDown
import torch import torch.nn as nn from torch.nn import functional as F class PyramidDown(nn.Module): def __init__(self) ->None: super(PyramidDown, self).__init__() self.filter = nn.Parameter(torch.tensor([[1, 4, 6, 4, 1], [4, 16, 24, 16, 4], [6, 24, 36, 24, 6], [4, 16, 24, 16, 4], [...
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...
masanorihirano/pytorch_extra_mhirano
PyramidDown
false
7,165
[ "MIT" ]
1
d19e07445567c069793b7ca1a22a846d7cbce58d
https://github.com/masanorihirano/pytorch_extra_mhirano/tree/d19e07445567c069793b7ca1a22a846d7cbce58d
PixelNorm
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
Iceland-Leo/StyleGAN2_PyTorch
PixelNorm
false
5,318
[ "MIT" ]
1
3621f5e4ba1c7fde7e2fae1f4700d050656a0b02
https://github.com/Iceland-Leo/StyleGAN2_PyTorch/tree/3621f5e4ba1c7fde7e2fae1f4700d050656a0b02
NodeAdaptiveEncoder
# 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...
Brickser/cogdl
NodeAdaptiveEncoder
false
2,259
[ "MIT" ]
0
3952dd11075634cc0f3b669996cfc780635ce026
https://github.com/Brickser/cogdl/tree/3952dd11075634cc0f3b669996cfc780635ce026
TensorClampOptionMin
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
Akababa/torch2trt
TensorClampOptionMin
false
18,431
[ "MIT" ]
2
03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
CriticNetwork
import torch import torch as T import torch.nn as nn import torch.optim as optim class CriticNetwork(nn.Module): def __init__(self, beta, state_dim, action_dim, fc1_dim, fc2_dim): super(CriticNetwork, self).__init__() self.fc1 = nn.Linear(state_dim + action_dim, fc1_dim) self.ln1 = nn.Lay...
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....
indigoLovee/TD3
CriticNetwork
false
6,890
[ "MIT" ]
1
0e86a40c27ec376b52e9f8e0e70db28e7411276b
https://github.com/indigoLovee/TD3/tree/0e86a40c27ec376b52e9f8e0e70db28e7411276b
GMoF_unscaled
import torch import torch.nn as nn class GMoF_unscaled(nn.Module): def __init__(self, rho=1): super(GMoF_unscaled, self).__init__() self.rho = rho def extra_repr(self): return 'rho = {}'.format(self.rho) def forward(self, residual): squared_res = residual ** 2 di...
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...
sanweiliti/HMP
GMoF_unscaled
false
16,374
[ "MIT" ]
92
3d1a96ec86a72396349daa9f8dde9b2e5a3fc578
https://github.com/sanweiliti/HMP/tree/3d1a96ec86a72396349daa9f8dde9b2e5a3fc578
LayerNorm
import torch from torch import nn from torch.nn import functional as F import torch.utils.data class LayerNorm(nn.Module): def __init__(self, channels, eps=1e-05): super().__init__() self.channels = channels self.eps = eps self.gamma = nn.Parameter(torch.ones(channels)) se...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn import torch.utils.data assert_size_stride = torch._C._dyn...
roedoejet/vits
LayerNorm
false
10,790
[ "MIT" ]
0
982e3632c876562563bc74c37d485eaf53715ecc
https://github.com/roedoejet/vits/tree/982e3632c876562563bc74c37d485eaf53715ecc
CNNLayer
# 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....
NUSTM/PyTorch-DNN
CNNLayer
false
17,731
[ "MIT" ]
5
3cea33380df60e5db307cab50f273efe9ac445c1
https://github.com/NUSTM/PyTorch-DNN/tree/3cea33380df60e5db307cab50f273efe9ac445c1
AvgPool2dSame
import math import torch import numpy as np from typing import List import torch.nn as nn import torch.nn.functional as F import torch.utils.data def get_same_padding(x: 'int', k: 'int', s: 'int', d: 'int'): return max((math.ceil(x / s) - 1) * s + (k - 1) * d + 1 - x, 0) def pad_same(x, k: 'List[int]', s: 'List...
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 math import numpy as np from typing import List import torch.nn as nn import torch.nn.functional as F import torch.utils.data assert_...
Weiyuhong-1998/DI-engine
AvgPool2dSame
false
14,582
[ "Apache-2.0" ]
464
88658ea358298c6e61e95a454284b8853a3e9484
https://github.com/Weiyuhong-1998/DI-engine/tree/88658ea358298c6e61e95a454284b8853a3e9484
FrameMaxPool
# 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...
EGO4D/episodic-memory
FrameMaxPool
false
8,076
[ "MIT" ]
27
2a3464882cd4f665c358c1b05a6397339e33c2e1
https://github.com/EGO4D/episodic-memory/tree/2a3464882cd4f665c358c1b05a6397339e33c2e1
FM
import torch from torch import nn class FM(nn.Module): """Factorization Machine models pairwise (order-2) feature interactions without linear term and bias. Input shape - 3D tensor with shape: ``(batch_size,field_size,embedding_size)``. Output shape - 2D tensor with shape: ``(batc...
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...
Jie-Yuan/Deeps
FM
false
17,486
[ "MIT" ]
4
b4acbb8e16b8ff5d181e70c3b549df0d818d0d76
https://github.com/Jie-Yuan/Deeps/tree/b4acbb8e16b8ff5d181e70c3b549df0d818d0d76
MaxPool2dDynamicSamePadding
# 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 import torch.utils.data assert_size_stride = torch._C._dynamo.guard...
BigFishMaster/tnt
MaxPool2dDynamicSamePadding
false
17,509
[ "BSD-3-Clause" ]
3
8b80bb3b194eb87ac18924428ef0924c2fb263c5
https://github.com/BigFishMaster/tnt/tree/8b80bb3b194eb87ac18924428ef0924c2fb263c5
SimpleTwoLayer
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_st...
euidong/ML
SimpleTwoLayer
false
10,052
[ "Apache-2.0" ]
0
7e28b6e52c4c145aa6f8342714f16f7fd8880d9b
https://github.com/euidong/ML/tree/7e28b6e52c4c145aa6f8342714f16f7fd8880d9b
BalancedL1Loss
# 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 functools impor...
CityU-AIM-Group/HTD
BalancedL1Loss
false
17,132
[ "MIT" ]
5
0be9fd844118c275abc6053b3cbd5ffb589e62ee
https://github.com/CityU-AIM-Group/HTD/tree/0be9fd844118c275abc6053b3cbd5ffb589e62ee
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_...
tassotirap/data-science
Net
false
13,032
[ "Apache-2.0" ]
0
644bc351740cda90c0d8c907132d9da9630266c9
https://github.com/tassotirap/data-science/tree/644bc351740cda90c0d8c907132d9da9630266c9
Qnet
# 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 random import torch.nn...
rainwangphy/minimalRL
Qnet
false
10,644
[ "MIT" ]
0
646cc771107f1b15098d7f52f0e7c4444862fb90
https://github.com/rainwangphy/minimalRL/tree/646cc771107f1b15098d7f52f0e7c4444862fb90
Swish
import torch import torch.nn import torch.nn as nn class Swish(nn.Module): """Applies the element-wise function: .. math:: \\text{Swish}(x) = x * \\text{Sigmoid}(\\alpha * x) for constant value alpha. Citation: Searching for Activation Functions, Ramachandran et al., 2017, https://arxiv.org/abs/...
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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo....
danielschulz/MONAI
Swish
false
1,772
[ "Apache-2.0" ]
0
54ef6e9e700f0de3d50184c0148f953be871a58e
https://github.com/danielschulz/MONAI/tree/54ef6e9e700f0de3d50184c0148f953be871a58e
LR
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
Brikwerk/learn2learn
LR
false
13,418
[ "MIT" ]
1,774
7997c13c26ec627d13ce77ba98427260df78ada8
https://github.com/Brikwerk/learn2learn/tree/7997c13c26ec627d13ce77ba98427260df78ada8
ReflectionPad3d
# 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 import torch import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cud...
giuliabaldini/Pix2PixNIfTI
ReflectionPad3d
false
3,542
[ "BSD-3-Clause" ]
0
59ff825760f682d2734bd5e95503a03f80d32414
https://github.com/giuliabaldini/Pix2PixNIfTI/tree/59ff825760f682d2734bd5e95503a03f80d32414
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 from torch import nn a...
gurucharanmk/Fruits-360_Image_Classification
FocalLoss
false
10,129
[ "MIT" ]
0
9d26bba972ed3eca762ff225b33bd70e82edc7f0
https://github.com/gurucharanmk/Fruits-360_Image_Classification/tree/9d26bba972ed3eca762ff225b33bd70e82edc7f0
SelfAttention
import torch from torch import nn as nn import torch.utils.data.distributed class SelfAttention(nn.Module): """ Self SelfAttention Layer Given $X\\in \\mathbb{R}^{n imes in_feature}$, the attention is calculated by: $a=Softmax(W_2tanh(W_1X))$, where $W_1 \\in \\mathbb{R}^{hidden imes in_fea...
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....
MatthewMasters/grover
SelfAttention
false
836
[ "MIT" ]
0
737a340754bc4c63134ef84019a0a84023fd69a3
https://github.com/MatthewMasters/grover/tree/737a340754bc4c63134ef84019a0a84023fd69a3
ShuffleBlock
import torch import torch.nn as nn class ShuffleBlock(nn.Module): def __init__(self, groups=2): super(ShuffleBlock, self).__init__() self.groups = groups def forward(self, x): """Channel shuffle: [N,C,H,W] -> [N,g,C/g,H,W] -> [N,C/g,g,H,w] -> [N,C,H,W]""" N, C, H, W = x.size(...
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...
Fede112/pytorch-cifar
ShuffleBlock
false
452
[ "MIT" ]
0
2e89028e9aaabb22dd944f0002d29548059c24df
https://github.com/Fede112/pytorch-cifar/tree/2e89028e9aaabb22dd944f0002d29548059c24df
AddReadout
import torch import torch.nn as nn class AddReadout(nn.Module): def __init__(self, start_index=1): super(AddReadout, self).__init__() self.start_index = start_index def forward(self, x): if self.start_index == 2: readout = (x[:, 0] + x[:, 1]) / 2 else: ...
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...
DazhiZhong/MiDaS
AddReadout
false
11,378
[ "MIT" ]
0
e8bafa9c0cf6d2a9d940d2dc36f0ea28a75e5809
https://github.com/DazhiZhong/MiDaS/tree/e8bafa9c0cf6d2a9d940d2dc36f0ea28a75e5809
ExampleBackbone
# 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...
BostonCrayfish/mmsegmentation
ExampleBackbone
false
171
[ "Apache-2.0" ]
0
e8b87242b877bfe0c32ea2630c2fd08977d7dd4b
https://github.com/BostonCrayfish/mmsegmentation/tree/e8b87242b877bfe0c32ea2630c2fd08977d7dd4b
ActorDiscrete
# 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....
iffiX/machin
ActorDiscrete
false
15,597
[ "MIT" ]
287
7fa986b1bafdefff117d6ff73d14644a5488de9d
https://github.com/iffiX/machin/tree/7fa986b1bafdefff117d6ff73d14644a5488de9d
CMDS_Loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
Gustoaxel/Cells_Cycle
CMDS_Loss
false
11,456
[ "MIT" ]
0
d211dea8c05a8d5535e6e72d95c781d6bc02baeb
https://github.com/Gustoaxel/Cells_Cycle/tree/d211dea8c05a8d5535e6e72d95c781d6bc02baeb
Stack
import torch import torch.utils import torch.utils.data class Stack(torch.nn.Module): def __init__(self, repeats): super(Stack, self).__init__() self.repeats = repeats def forward(self, x): x = torch.repeat_interleave(x, self.repeats, dim=1) return x def get_inputs(): r...
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 import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dy...
angusl95/darts-kbc
Stack
false
1,437
[ "Apache-2.0" ]
0
85fc6f4bdb7ba73c07d96ce47e96634599b346f9
https://github.com/angusl95/darts-kbc/tree/85fc6f4bdb7ba73c07d96ce47e96634599b346f9
PreNet
import torch import torch.nn as nn import torch.nn.functional as F class PreNet(nn.Module): def __init__(self, in_dims, fc1_dims=256, fc2_dims=128, dropout=0.5): super().__init__() self.fc1 = nn.Linear(in_dims, fc1_dims) self.fc2 = nn.Linear(fc1_dims, fc2_dims) self.p = dropout ...
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_...
Rongjiehuang/Multiband-WaveRNN
PreNet
false
8,733
[ "MIT" ]
18
432e449678220eed841fcb4971415e2e0ac4d9bb
https://github.com/Rongjiehuang/Multiband-WaveRNN/tree/432e449678220eed841fcb4971415e2e0ac4d9bb
WordAttentionPool
# 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....
CFM-MSG/Code_LEORN
WordAttentionPool
false
6,030
[ "MIT" ]
1
fabea1e1ded973a4db692e51e2df442bde55f626
https://github.com/CFM-MSG/Code_LEORN/tree/fabea1e1ded973a4db692e51e2df442bde55f626
CQAttention
import torch import torch.nn as nn import torch.utils.data import torch.backends.cudnn def mask_logits(inputs, mask, mask_value=-1e+30): mask = mask.type(torch.float32) return inputs + (1.0 - mask) * mask_value class Conv1D(nn.Module): def __init__(self, in_dim, out_dim, kernel_size=1, stride=1, paddin...
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....
IsaacChanghau/VSLNet
CQAttention
false
13,885
[ "MIT" ]
62
3793c625f2e251a5f19a0d59f0c83b12e386f808
https://github.com/IsaacChanghau/VSLNet/tree/3793c625f2e251a5f19a0d59f0c83b12e386f808
MultiHeadAttention
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
MultiHeadAttention
false
1,878
[ "MIT" ]
0
6320a27420e686666a4d7172437cf55fe42de2b6
https://github.com/dukeNashor/CaptainStony/tree/6320a27420e686666a4d7172437cf55fe42de2b6
ClassificationModel
# 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_...
AdityaKane2001/answersheet_automation
ClassificationModel
false
8,891
[ "Apache-2.0" ]
0
f7f30a514f94bfbdb68ab43a3dfc6e3fd770e8f1
https://github.com/AdityaKane2001/answersheet_automation/tree/f7f30a514f94bfbdb68ab43a3dfc6e3fd770e8f1
equalized_conv2d
import torch import torch.nn as nn from torch.nn.init import normal import torch.utils.data def _calculate_fan_in_and_fan_out(tensor): dimensions = tensor.ndimension() if dimensions < 2: raise ValueError( 'Fan in and fan out can not be computed for tensor with less than 2 dimensions' ...
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 from torch.nn.init import normal import torch.utils.data a...
mingo-x/pggan-pytorch
equalized_conv2d
false
7,232
[ "MIT" ]
1
a1dde73cd4df52476fe7c948d81fa9caea8070a5
https://github.com/mingo-x/pggan-pytorch/tree/a1dde73cd4df52476fe7c948d81fa9caea8070a5
ComputeDeltas
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
tbright17/audio
ComputeDeltas
false
10,938
[ "BSD-2-Clause" ]
0
00d38203e401b8d9472a8f8394a10e2c309be02c
https://github.com/tbright17/audio/tree/00d38203e401b8d9472a8f8394a10e2c309be02c
Softplus
import torch import torch.onnx import torch.nn as nn class Softplus(nn.Module): def forward(self, x): return torch.nn.Softplus()(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, math as tl_math import torch.onnx import torch.nn as nn assert_size_stride = t...
mil-tokyo/webdnn
Softplus
false
16,160
[ "MIT" ]
1,967
38a60fd3e1a4e72bc01108189a3aa51e0752aecd
https://github.com/mil-tokyo/webdnn/tree/38a60fd3e1a4e72bc01108189a3aa51e0752aecd
MinibatchStdLayer
import torch import torch.nn as nn class MinibatchStdLayer(nn.Module): def __init__(self, group_size=4): super().__init__() self.group_size = group_size def forward(self, x): group_size = min(self.group_size, x.shape[0]) s = x.shape y = x.view([group_size, -1, s[1], s...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
bg459/gan-ensembling-loader
MinibatchStdLayer
false
14,960
[ "MIT" ]
86
5ff6fae5fd5ced0a48ef2cd3dcb1d74aa1dadce8
https://github.com/bg459/gan-ensembling-loader/tree/5ff6fae5fd5ced0a48ef2cd3dcb1d74aa1dadce8
LittleAdversarialNetwork
# 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 import torch.nn as nn assert_size_stride = ...
FigaroK/pytorch-CycleGAN-and-pix2pix
LittleAdversarialNetwork
false
9,070
[ "BSD-3-Clause" ]
0
74407363baf4626782398040e34a342e20915d41
https://github.com/FigaroK/pytorch-CycleGAN-and-pix2pix/tree/74407363baf4626782398040e34a342e20915d41
PositionwiseFeedForward
import torch import torch.nn as nn from torch.nn import functional as F class PointwiseConv(nn.Module): """ Pointwise Convolution (1x1 Conv) Convolution 1 Dimension (Faster version) (cf. https://github.com/huggingface/pytorch-openai-transformer-lm/blob/ eafc28abdfadfa0732f03a0fc65805c5bfb2ffe7...
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 to...
hamishivi/claf
PositionwiseFeedForward
false
3,563
[ "MIT" ]
0
8e35f30e3fc4a45a45cc0766eb6ab55a6ba3f0c2
https://github.com/hamishivi/claf/tree/8e35f30e3fc4a45a45cc0766eb6ab55a6ba3f0c2
OcrPtrNet
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_st...
junj2ejj/sam-textvqa
OcrPtrNet
false
15,744
[ "W3C" ]
48
6bf646d741fb2536e3a8f331c78b594f6199df15
https://github.com/junj2ejj/sam-textvqa/tree/6bf646d741fb2536e3a8f331c78b594f6199df15
NumericLabelEncoder
import torch from abc import ABC class BaseOperator(ABC): """ Abstract class defining the basic structure for operator implementations in Hummingbird. """ def __init__(self, regression=False, classification=False, transformer= False, anomaly_detection=False, **kwargs): """ Arg...
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 abc import ABC assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_stri...
hannahaih/hummingbird
NumericLabelEncoder
false
6,781
[ "MIT" ]
1
b8ec670b3c90ec7e87d3ae4a2b268075bd5eae65
https://github.com/hannahaih/hummingbird/tree/b8ec670b3c90ec7e87d3ae4a2b268075bd5eae65
ScaledLeakyReLU
import math import torch from torch.nn import functional as F from torch import nn class ScaledLeakyReLU(nn.Module): def __init__(self, negative_slope=0.2): super().__init__() self.negative_slope = negative_slope def forward(self, input): out = F.leaky_relu(input, negative_slope=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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
BillyXYB/TransEditor
ScaledLeakyReLU
false
17,067
[ "MIT" ]
4
0194cd6f0e96c801d55c0cb9683e1f552bcf6d48
https://github.com/BillyXYB/TransEditor/tree/0194cd6f0e96c801d55c0cb9683e1f552bcf6d48
Channel_mean
import torch import torch.nn as nn class Channel_mean(nn.Module): def __init__(self) ->None: super().__init__() def forward(self, V): """ only V[0] """ return torch.sum(V[0], dim=0).squeeze() def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inp...
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...
wk989898/ARES-implement
Channel_mean
false
4,536
[ "MIT" ]
0
b2411be01124feaccbc89d74f6025fbfa584bb3f
https://github.com/wk989898/ARES-implement/tree/b2411be01124feaccbc89d74f6025fbfa584bb3f
SP
# 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....
JDAI-CV/CM-NAS
SP
false
8,305
[ "Apache-2.0" ]
31
bbc77f427b2c8afb9f3865f5a04e86079d33dd28
https://github.com/JDAI-CV/CM-NAS/tree/bbc77f427b2c8afb9f3865f5a04e86079d33dd28
TranspConv3DBlock
# 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...
Siyuan89/self-attention-cv
TranspConv3DBlock
false
14,427
[ "MIT" ]
759
b39cde2fb68e05351bf3bc8048f4af13bbab256a
https://github.com/Siyuan89/self-attention-cv/tree/b39cde2fb68e05351bf3bc8048f4af13bbab256a
FusedLeakyReLU
import torch from torch import nn from torch.nn import functional as F def fused_leaky_relu(input, bias=None, negative_slope=0.2, scale=2 ** 0.5): if bias is not None: rest_dim = [1] * (input.ndim - bias.ndim - 1) return F.leaky_relu(input + bias.view(1, bias.shape[0], *rest_dim), nega...
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 from torch.nn import functional as F assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda...
RaghavaDhanya/stylegan2-pytorch
FusedLeakyReLU
false
11,800
[ "MIT", "BSD-2-Clause", "Apache-2.0" ]
0
6a2b0c228c56830a7e669bc66dc92073d3c81ca8
https://github.com/RaghavaDhanya/stylegan2-pytorch/tree/6a2b0c228c56830a7e669bc66dc92073d3c81ca8
MultiheadAttention
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import Parameter class MultiheadAttention(nn.Module): """Multi-headed attention. See "Attention Is All You Need" for more details. """ def __init__(self, embed_dim, num_heads, attn_dropout=0.0, bias=True, add_bia...
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....
Redaimao/RERD
MultiheadAttention
false
991
[ "MIT" ]
0
40413d4b6743f3e5db0c30ee969d45661d001834
https://github.com/Redaimao/RERD/tree/40413d4b6743f3e5db0c30ee969d45661d001834
Classifier
import torch import torch.distributed import torch import torch.nn as nn class Classifier(nn.Module): def __init__(self, hidden_size): super(Classifier, self).__init__() self.linear1 = nn.Linear(hidden_size, 1) self.sigmoid = nn.Sigmoid() def forward(self, x, mask_cls): h = 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 import torch.distributed import torch import torch.nn as nn assert_size_stride =...
BoonthichaSaejia/ThaiSum
Classifier
false
7,809
[ "Apache-2.0" ]
23
fdb99eab23e60a933acf4e84836f53ddf05b7c8b
https://github.com/BoonthichaSaejia/ThaiSum/tree/fdb99eab23e60a933acf4e84836f53ddf05b7c8b
BilinearConvLayer
# 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...
m-dml/lil2021swe
BilinearConvLayer
false
7,152
[ "Apache-2.0" ]
1
45352f214ec28c9f91dd24ed3669f492d8b68382
https://github.com/m-dml/lil2021swe/tree/45352f214ec28c9f91dd24ed3669f492d8b68382
SeparableBlock
# 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.nn import Module from torch.nn import Linear assert_size_stride = tor...
andreasjansson/hyperstyle
SeparableBlock
false
3,137
[ "MIT" ]
0
d9847c76dd75da129a60bf995534ff6e71cbbaa6
https://github.com/andreasjansson/hyperstyle/tree/d9847c76dd75da129a60bf995534ff6e71cbbaa6
InputInjection
import torch import torch.nn as nn import torch._C import torch.serialization class InputInjection(nn.Module): """Downsampling module for CGNet.""" def __init__(self, num_downsampling): super(InputInjection, self).__init__() self.pool = nn.ModuleList() for i in range(num_downsampling)...
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._C import torch.serialization assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strid...
ImportPaddle/APCNet
InputInjection
false
2,365
[ "MIT" ]
0
68ade1f83827b4cdd60ee4b6ac25454397100316
https://github.com/ImportPaddle/APCNet/tree/68ade1f83827b4cdd60ee4b6ac25454397100316
Decoder
import torch import torch.nn as nn import torch.nn.functional as F class Decoder(nn.Module): def __init__(self, input_shape, output_shape): super(Decoder, self).__init__() self.input_shape = input_shape self.decoder_out_shape = output_shape self.linear_one = nn.Linear(self.input_s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
akaprasanga/AutoEncoder
Decoder
false
3,059
[ "MIT" ]
0
a1562a7a720c199b717796e469b9957eb958264a
https://github.com/akaprasanga/AutoEncoder/tree/a1562a7a720c199b717796e469b9957eb958264a
ChebConv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
phil-hawkins/deepsphere-pytorch
ChebConv
false
16,261
[ "MIT" ]
99
f23c531445b3ddf234c7e98cdadb010163051e6d
https://github.com/phil-hawkins/deepsphere-pytorch/tree/f23c531445b3ddf234c7e98cdadb010163051e6d
Softsign
# 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.onnx import torch.nn as nn assert_size_stride = torch._C._dy...
mil-tokyo/webdnn
Softsign
false
16,082
[ "MIT" ]
1,967
38a60fd3e1a4e72bc01108189a3aa51e0752aecd
https://github.com/mil-tokyo/webdnn/tree/38a60fd3e1a4e72bc01108189a3aa51e0752aecd
FocalLoss
import torch import torch.nn as nn import torch.nn.functional as F import torch.cuda import torch.distributed import torch.multiprocessing class FocalLoss(nn.Module): """Focal Loss - https://arxiv.org/abs/1708.02002""" def __init__(self, alpha=0.25, gamma=2): super().__init__() self.alpha = a...
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...
azuredsky/retinanet-examples
FocalLoss
false
9,794
[ "BSD-3-Clause" ]
0
1b35d8e7d3360050f25fd80e09ecac3eb2654301
https://github.com/azuredsky/retinanet-examples/tree/1b35d8e7d3360050f25fd80e09ecac3eb2654301
Up
# 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 ...
Smith42/unet-pytorch
Up
false
9,550
[ "MIT" ]
0
45a0459da69cee7f57fb369a8e2fc58668d81167
https://github.com/Smith42/unet-pytorch/tree/45a0459da69cee7f57fb369a8e2fc58668d81167