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
ConvEncoder3D
import torch from torch import nn class ConvEncoder3D(nn.Module): """ Simple convolutional conditioning network. It consists of 6 convolutional layers, each downsampling the input by a factor of 2, and a final fully-connected layer projecting the output to c_dim dimensions. """ def __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 from torch import nn assert_s...
BoyanJIANG/4D-Compositional-Representation
ConvEncoder3D
false
7,864
[ "Apache-2.0" ]
12
64d5f4bbd6b8e6bc3bfd8f76736f6d468c71a73c
https://github.com/BoyanJIANG/4D-Compositional-Representation/tree/64d5f4bbd6b8e6bc3bfd8f76736f6d468c71a73c
RepeatModule
import torch import torch.jit import torch.onnx import torch.nn class RepeatModule(torch.nn.Module): def __init__(self, repeats): super(RepeatModule, self).__init__() self.repeats = repeats def forward(self, tensor): tensor = tensor + tensor return tensor.repeat(self.repeats)...
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...
briancoutinho/glow
RepeatModule
false
12,555
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
SigmoidFocalClassificationLoss
import torch import torch.nn as nn class SigmoidFocalClassificationLoss(nn.Module): """ Sigmoid focal cross entropy loss. """ def __init__(self, gamma: 'float'=2.0, alpha: 'float'=0.25): """ Args: gamma: Weighting parameter to balance loss for hard and easy examples. ...
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...
ElodieShan/OpenPCDet
SigmoidFocalClassificationLoss
false
9,030
[ "Apache-2.0" ]
0
d23959d70c73b29f3f14462628fa8520a64f2eae
https://github.com/ElodieShan/OpenPCDet/tree/d23959d70c73b29f3f14462628fa8520a64f2eae
DepthLogLoss
import torch import torch.nn as nn class DepthLogLoss(nn.Module): def __init__(self, balance_factor): super(DepthLogLoss, self).__init__() self.balance_factor = balance_factor def forward(self, inputs, targets): n, _, h, w = inputs.shape n_pixel = n * h * w inputs = t...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
pystokes/depth_estimation
DepthLogLoss
false
4,140
[ "MIT" ]
0
b5b1955bcb5b3f1a1f1c8ddde45431cf38514f90
https://github.com/pystokes/depth_estimation/tree/b5b1955bcb5b3f1a1f1c8ddde45431cf38514f90
SimpleMatmulModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleMatmulModule(torch.nn.Module): def __init__(self): super(SimpleMatmulModule, self).__init__() def forward(self, a, b): return a.matmul(b + b) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 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.jit import torch.onnx import torch.nn assert_size_stride = torch._C...
opti-mix/glow
SimpleMatmulModule
false
7,405
[ "Apache-2.0" ]
1
4ba074df5da9822986a23a6679ab592c22660f6d
https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d
BertSelfAttention
# 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....
Ago3/VLP
BertSelfAttention
false
9,980
[ "Apache-2.0" ]
0
4dec0e04b8592f4a74fe66c253dbb92574e7e2ba
https://github.com/Ago3/VLP/tree/4dec0e04b8592f4a74fe66c253dbb92574e7e2ba
RobertaAttention
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn from typing import Tuple from typing import List from typing import Set def find_pruneable_heads_and_indices(heads: 'List[int]', n_heads: 'int', head_size: 'int', already_pruned_heads: 'Set[int]') ->Tuple[Set[int], to...
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....
BlackNoodle/TUCORE-GCN
RobertaAttention
false
8,808
[ "MIT" ]
27
16fb37d81c5b1182a31fcf7da08a9c0013b20cd6
https://github.com/BlackNoodle/TUCORE-GCN/tree/16fb37d81c5b1182a31fcf7da08a9c0013b20cd6
AdaptiveMaxPool2d
import torch import torch.nn as nn class AdaptiveMaxPool2d(nn.Module): def __init__(self): super(AdaptiveMaxPool2d, self).__init__() self.layer = nn.AdaptiveMaxPool2d((5, 7)) def forward(self, x): x = self.layer(x) return x def get_inputs(): return [torch.rand([4, 4, 4,...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
yifanpu001/PytorchToCaffe
AdaptiveMaxPool2d
false
4,711
[ "MIT" ]
0
37c1ebfc3547e93b1c174721036d03c831c60e48
https://github.com/yifanpu001/PytorchToCaffe/tree/37c1ebfc3547e93b1c174721036d03c831c60e48
MonomialNN
# 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 from warnings import warn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._...
Tiamat-Tech/neurodiffeq
MonomialNN
false
14,495
[ "MIT" ]
202
622827e5b9b65d285ebe36614fbdae68ba07f4dc
https://github.com/Tiamat-Tech/neurodiffeq/tree/622827e5b9b65d285ebe36614fbdae68ba07f4dc
My_SmoothL1Loss
# 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 assert_size_stride = t...
theleokul/AWR-Adaptive-Weighting-Regression
My_SmoothL1Loss
false
4,415
[ "MIT" ]
0
a6c224302bab474db8b774a2d009c9497e32f6bd
https://github.com/theleokul/AWR-Adaptive-Weighting-Regression/tree/a6c224302bab474db8b774a2d009c9497e32f6bd
cPReLU
import torch import torch.nn as nn class cPReLU(nn.Module): def __init__(self, complex_axis=1): super(cPReLU, self).__init__() self.r_prelu = nn.PReLU() self.i_prelu = nn.PReLU() self.complex_axis = complex_axis def forward(self, inputs): real, imag = torch.chunk(inpu...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
JamesLiao714/FullSubNet
cPReLU
false
605
[ "MIT" ]
0
dad740bac35b5d7544c97740ae59101455acdc40
https://github.com/JamesLiao714/FullSubNet/tree/dad740bac35b5d7544c97740ae59101455acdc40
SoftmaxAttention
import torch import torch.nn as nn def masked_softmax(tensor, mask): """ Apply a masked softmax on the last dimension of a tensor. The input tensor and mask should be of size (batch, *, sequence_length). Args: tensor: The tensor on which the softmax function must be applied along t...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
YJiangcm/Chinese-sentence-pair-modeling
SoftmaxAttention
false
14,626
[ "Apache-2.0" ]
49
90adbc5c121832ce3e4a4057e30417a6ec5e7ebc
https://github.com/YJiangcm/Chinese-sentence-pair-modeling/tree/90adbc5c121832ce3e4a4057e30417a6ec5e7ebc
Classify
import torch import torch.nn as nn import torch.utils.data def autopad(k, p=None): if p is None: p = k // 2 if isinstance(k, int) else [(x // 2) for x in k] return p class Classify(nn.Module): def __init__(self, c1, c2, k=1, s=1, p=None, g=1): super(Classify, self).__init__() se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
Arui66/FPSAutomaticAiming
Classify
false
13,304
[ "Apache-2.0" ]
129
87674385d42b065b984b38a2ff59e7f2d4f07dc9
https://github.com/Arui66/FPSAutomaticAiming/tree/87674385d42b065b984b38a2ff59e7f2d4f07dc9
MFBFusion
from _paritybench_helpers import _mock_config import time import torch from torch import nn class BaseModel(nn.Module): def __init__(self): super(BaseModel, self).__init__() self.model_name = str(type(self)) def load(self, path): self.load_state_dict(torch.load(path)) def save(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 time from torch import nn assert_size_stride = torch._C._dynamo.guards.as...
chorseng/UMD
MFBFusion
false
15,039
[ "MIT" ]
48
680681fea76abcea02ff5f351727bcbb468c372a
https://github.com/chorseng/UMD/tree/680681fea76abcea02ff5f351727bcbb468c372a
upsample
# 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...
Arno3165229/Corner_Traffic_Light
upsample
false
8,882
[ "BSD-3-Clause" ]
0
91eead49318a3b1e3a9c2295cbe5661cb1074b69
https://github.com/Arno3165229/Corner_Traffic_Light/tree/91eead49318a3b1e3a9c2295cbe5661cb1074b69
Color_MNIST_CNN
# 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....
VinAIResearch/mDSDI
Color_MNIST_CNN
false
18,081
[ "Apache-2.0" ]
9
8ec49085d8389ab490ec633c3ae4bf66be085366
https://github.com/VinAIResearch/mDSDI/tree/8ec49085d8389ab490ec633c3ae4bf66be085366
SimpleMinModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleMinModule(torch.nn.Module): def __init__(self): super(SimpleMinModule, self).__init__() def forward(self, a, b): return torch.min(a + a, b + b) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4,...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo....
briancoutinho/glow
SimpleMinModule
false
12,582
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
PatchEmbedding
# 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...
sithu31296/image_classification
PatchEmbedding
false
16,464
[ "MIT" ]
57
6b8cbce96100225621cee3166a73e852ba216cc3
https://github.com/sithu31296/image_classification/tree/6b8cbce96100225621cee3166a73e852ba216cc3
BiDAFAttention
# 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....
HakobJak/ml-mipt
BiDAFAttention
false
13,746
[ "MIT" ]
440
ab0cbd5d553e9da309bda54d35b4e93a8eb99696
https://github.com/HakobJak/ml-mipt/tree/ab0cbd5d553e9da309bda54d35b4e93a8eb99696
RelPositionMultiHeadedAttention
import math import torch from typing import Optional from typing import Tuple from torch import nn class MultiHeadedAttention(nn.Module): """Multi-Head Attention layer. Args: n_head (int): The number of heads. n_feat (int): The number of features. dropout_rate (float): Dropout rate. ...
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....
WenjingXia/wenet
RelPositionMultiHeadedAttention
false
1,248
[ "Apache-2.0" ]
0
9a1fd005cd06be16518a5476076b2ae6af2ec41a
https://github.com/WenjingXia/wenet/tree/9a1fd005cd06be16518a5476076b2ae6af2ec41a
OELoss
import torch import torch.nn as nn import torch.distributions import torch.utils.data class OELoss(nn.Module): def __init__(self): super().__init__() def forward(self, logits): return -torch.log_softmax(logits, 1).mean(1) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_in...
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 ...
AlexMeinke/Provable-OOD-Detection
OELoss
false
7,705
[ "MIT" ]
21
9a132aec994ff718c96b81885736ab866df60d87
https://github.com/AlexMeinke/Provable-OOD-Detection/tree/9a132aec994ff718c96b81885736ab866df60d87
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....
EVASHINJI/Seq2Seq-PyTorch
Attention
false
17,233
[ "Apache-2.0" ]
4
d53f8d7c240bd7c16ebd1475384774bd064b4b03
https://github.com/EVASHINJI/Seq2Seq-PyTorch/tree/d53f8d7c240bd7c16ebd1475384774bd064b4b03
GEGLU
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
TabbenBenchmark/tabben
GEGLU
false
17,963
[ "MIT" ]
5
d74114afc4b6f67be488ab6bf8ad6fd316fdb888
https://github.com/TabbenBenchmark/tabben/tree/d74114afc4b6f67be488ab6bf8ad6fd316fdb888
ChannelMixer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
Cardroid/Muskits
ChannelMixer
false
8,981
[ "Apache-2.0" ]
0
91708bb243bc671e48893a734aee710c356e4bd8
https://github.com/Cardroid/Muskits/tree/91708bb243bc671e48893a734aee710c356e4bd8
Attention_layer
import torch from torch import nn class Attention_layer(nn.Module): def __init__(self, sequence_length): super(Attention_layer, self).__init__() self.input_size = sequence_length self.output_size = sequence_length self.dense = nn.Linear(sequence_length, sequence_length) se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
w6688j/ChatBot-PyTorch
Attention_layer
false
13,080
[ "Apache-2.0" ]
0
84f5a3267d16c650b90727ce80e4952901faa902
https://github.com/w6688j/ChatBot-PyTorch/tree/84f5a3267d16c650b90727ce80e4952901faa902
ResidualBlock
import torch import torch.nn as nn from torch.nn import Parameter def l2normalize(v, eps=1e-12): return v / (v.norm() + eps) class SpectralNorm(nn.Module): def __init__(self, module, name='weight', power_iterations=1): super(SpectralNorm, self).__init__() self.module = module self.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 torch.nn as nn from to...
GEN418/EventGAN
ResidualBlock
false
484
[ "MIT" ]
0
372318bc8f285f513db4babf7786b5c04e97c86d
https://github.com/GEN418/EventGAN/tree/372318bc8f285f513db4babf7786b5c04e97c86d
inplace_softmax
import torch import torch.nn as nn import torch.cuda import torch.backends.cudnn import torch.backends.mkl class inplace_softmax(torch.nn.Module): def __init__(self): super().__init__() def forward(self, x): x1 = x + 1 x2 = nn.Softmax(dim=-1)(x1) return x2 def get_inputs():...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.cuda impo...
JudeDavis1/intel-extension-for-pytorch
inplace_softmax
false
2,575
[ "Apache-2.0" ]
0
364e34cb4917a709f5108c07d4005bf82f3d5067
https://github.com/JudeDavis1/intel-extension-for-pytorch/tree/364e34cb4917a709f5108c07d4005bf82f3d5067
SpatialSoftmax
# 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 from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
ozcell/ENet-SAD_Pytorch
SpatialSoftmax
false
16,209
[ "MIT" ]
53
aaa79b5e96316e1bf24d3c2147ee622d4f17bc24
https://github.com/ozcell/ENet-SAD_Pytorch/tree/aaa79b5e96316e1bf24d3c2147ee622d4f17bc24
SelectiveMarginLoss
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data class SelectiveMarginLoss(nn.Module): def __init__(self, loss_weight=5e-05, margin=0.2): super(SelectiveMarginLoss, self).__init__() self.margin = margin self.loss_weight = loss_weight ...
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.nn.parallel import torch.optim import torch.utils.data...
Dogacel/mmfashion
SelectiveMarginLoss
false
11,411
[ "Apache-2.0" ]
0
e49613245c8501042edd7aeeaa8fb93e5ea13238
https://github.com/Dogacel/mmfashion/tree/e49613245c8501042edd7aeeaa8fb93e5ea13238
CrossUnit
# 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 assert_s...
LSTM-Kirigaya/NUAA-guandan
CrossUnit
false
9,216
[ "MIT" ]
0
f6920868649c26536b3dc3fce8ecd1d4f7c755fa
https://github.com/LSTM-Kirigaya/NUAA-guandan/tree/f6920868649c26536b3dc3fce8ecd1d4f7c755fa
SelfAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
JunKong5/WestBERT
SelfAttention
false
9,168
[ "MIT" ]
0
8e0fc9aca290103698cd08239710193c36b06eff
https://github.com/JunKong5/WestBERT/tree/8e0fc9aca290103698cd08239710193c36b06eff
GeneralizedMeanPooling
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_...
gmt710/fast-reid
GeneralizedMeanPooling
false
12,441
[ "Apache-2.0" ]
0
44a609280013eb6928f67c418c7212d67e40fb5d
https://github.com/gmt710/fast-reid/tree/44a609280013eb6928f67c418c7212d67e40fb5d
TemperatureTanh
# 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 as nn assert_size_stride = torch._C._dynamo.guards.assert_...
Mingxiao-Li/vln-ce-eval
TemperatureTanh
false
2,652
[ "MIT" ]
0
2217513e9d9b6352bf0939d3b76a359c64e89dda
https://github.com/Mingxiao-Li/vln-ce-eval/tree/2217513e9d9b6352bf0939d3b76a359c64e89dda
Arborist
import torch import torch.nn as nn class Arborist(nn.Module): def __init__(self, l_dim, r_dim, k=5): super(Arborist, self).__init__() self.u = nn.Linear(l_dim * 2, k, bias=False) self.W = nn.Bilinear(l_dim * 2, r_dim, k, bias=False) def forward(self, e1, e2, q): """ e...
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...
QingkaiZeng/GenTaxo
Arborist
false
8,722
[ "MIT" ]
28
10257a1714d14c6a4c49cbfa0b507408f718cdf0
https://github.com/QingkaiZeng/GenTaxo/tree/10257a1714d14c6a4c49cbfa0b507408f718cdf0
BackboneModel1
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data class BackboneModel1(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(1, 1, 1, 1) def forward(self, x): return self.conv1(x) def get_inputs(): 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 import torch.nn as nn import torch.nn.parallel import torch.optim import torch.u...
savan77/nni
BackboneModel1
false
4,272
[ "MIT" ]
0
510213393d9cae58c5a8cccd21f322f7bba4e0cf
https://github.com/savan77/nni/tree/510213393d9cae58c5a8cccd21f322f7bba4e0cf
Foo
import torch import torch.jit import torch.onnx import torch.nn class Foo(torch.nn.Module): def __init__(self): super(Foo, self).__init__() self.conv1 = torch.nn.Conv2d(3, 6, 3) self.relu = torch.nn.ReLU() self.conv2 = torch.nn.Conv2d(6, 16, 3) 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.jit import torch...
YaronBenAtar/glow
Foo
false
14,673
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
PKT
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math fr...
kctsiolis/RepDistiller
PKT
false
3,932
[ "BSD-2-Clause" ]
0
ce88f6e53fcf8ef81c5bac2d20ad31628dd279ac
https://github.com/kctsiolis/RepDistiller/tree/ce88f6e53fcf8ef81c5bac2d20ad31628dd279ac
WeldonPooling
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
maxgreat/dsve-loc
WeldonPooling
false
16,024
[ "BSD-3-Clause-Clear" ]
56
dd6807d02c0d5fd3e215be8e5c7a88e73102e561
https://github.com/maxgreat/dsve-loc/tree/dd6807d02c0d5fd3e215be8e5c7a88e73102e561
L2Norm
import torch import torch.nn as nn from math import sqrt as sqrt from itertools import product as product import torch.nn.init as init class L2Norm(nn.Module): def __init__(self, n_channels, scale): super(L2Norm, self).__init__() self.n_channels = n_channels self.gamma = scale or None ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn from math import sqrt as sqrt from itertools import produ...
Feywell/association_lstm_implement
L2Norm
false
5,161
[ "MIT" ]
1
4e439bd934dc865aad0015a897980a8f124602af
https://github.com/Feywell/association_lstm_implement/tree/4e439bd934dc865aad0015a897980a8f124602af
Critic
import torch import torch.nn as nn import torch.nn.functional as F class Critic(nn.Module): def __init__(self, hidden_size, num_inputs, action_space): super(Critic, self).__init__() self.action_space = action_space num_outputs = action_space.shape[0] self.linear1 = nn.Linear(num_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._inductor.runtime import triton_helpers from torch._inductor.runtime....
gntoni/pytorch-ddpg-naf
Critic
false
12,466
[ "MIT" ]
0
d208d0c0c38a9d2d2041f1e7e95695359eba430e
https://github.com/gntoni/pytorch-ddpg-naf/tree/d208d0c0c38a9d2d2041f1e7e95695359eba430e
SparseConv2d
# 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....
Sense-GVT/BigPretrain
SparseConv2d
false
17,920
[ "Apache-2.0" ]
8
d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e
https://github.com/Sense-GVT/BigPretrain/tree/d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e
CosLoss
# 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.nn as nn assert...
lonePatient/TorchBlocks
CosLoss
false
15,936
[ "MIT" ]
82
4a65d746cc8a396cb7df73ed4644d97ddf843e29
https://github.com/lonePatient/TorchBlocks/tree/4a65d746cc8a396cb7df73ed4644d97ddf843e29
IDiv
# 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 @triton.jit def triton_poi_fused_div_0(in_ptr0, in_ptr1, out_ptr1, xnumel,...
PogChamper/torch2trt
IDiv
false
14,196
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
ResizeConv2d
# 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...
sanghiad/vae_vampprior
ResizeConv2d
false
16,372
[ "MIT" ]
218
d24bc0c8781b7ee7b9570c2d560e43bceff50da4
https://github.com/sanghiad/vae_vampprior/tree/d24bc0c8781b7ee7b9570c2d560e43bceff50da4
SegmentationLoss
import torch import torch.nn as nn import torch.nn.functional as F class LovaszHingeLoss(nn.Module): """ This class implements the lovasz hinge loss which is the continuous of the IoU for binary segmentation. Source: https://github.com/bermanmaxim/LovaszSoftmax """ def __init__(self) ->None: ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
ChristophReich1996/Cell-DETR
SegmentationLoss
false
13,668
[ "MIT" ]
55
4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
https://github.com/ChristophReich1996/Cell-DETR/tree/4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
GlobalAvgPool2d
import torch from torch import nn import torch.nn.functional as F class GlobalAvgPool2d(nn.Module): def __init__(self): super(GlobalAvgPool2d, self).__init__() def forward(self, x): return F.avg_pool2d(x, kernel_size=x.size()[2:]) def get_inputs(): return [torch.rand([4, 4, 4, 4])] d...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
JamesWang007/Dive-into-DL-PyTorch
GlobalAvgPool2d
false
5,372
[ "Apache-2.0" ]
1
267b54168322ab37da44e83008fba4f24b70fa9f
https://github.com/JamesWang007/Dive-into-DL-PyTorch/tree/267b54168322ab37da44e83008fba4f24b70fa9f
CPULayerNorm
# 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_...
Smerity/pytorch-qrnn
CPULayerNorm
false
17,928
[ "BSD-3-Clause" ]
4
907c8ea53f689136fcc50996b6474de967745202
https://github.com/Smerity/pytorch-qrnn/tree/907c8ea53f689136fcc50996b6474de967745202
ShiftBias
import torch import torch.nn as nn class ShiftBias(nn.Module): def __init__(self, bias): super(ShiftBias, self).__init__() self.bias = bias def forward(self, x): return x + self.bias 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...
yuangan/A2L
ShiftBias
false
4,637
[ "MIT" ]
0
8cbc9b5f368924c8c75cbab53e9bb10dcf265c7e
https://github.com/yuangan/A2L/tree/8cbc9b5f368924c8c75cbab53e9bb10dcf265c7e
wide_basic
import torch import torch.nn as nn def get_norm(n_filters, norm): if norm is None: return Identity() elif norm == 'batch': return nn.BatchNorm2d(n_filters, momentum=0.9) elif norm == 'instance': return nn.InstanceNorm2d(n_filters, affine=True) elif norm == 'layer': retu...
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...
FloralZhao/unlimited_labeled_data_project_strong_augmen
wide_basic
false
509
[ "MIT" ]
0
caf90d70145e5d841a38b2e2f18a710703264a28
https://github.com/FloralZhao/unlimited_labeled_data_project_strong_augmen/tree/caf90d70145e5d841a38b2e2f18a710703264a28
FocalLoss
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.nn.functional as F def focal_loss(input_values, gamma): """Computes the focal loss""" p = torch.exp(-input_values) loss = (1 - p) ** gamma * input_values return loss.mean() class Focal...
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 ...
raman32/LDAM-DRW
FocalLoss
false
7,530
[ "MIT" ]
1
7ce2251c01b94c7259108a1e188457f0b720651d
https://github.com/raman32/LDAM-DRW/tree/7ce2251c01b94c7259108a1e188457f0b720651d
FCNet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
Johnsonms/NNI_master
FCNet
false
11,609
[ "MIT" ]
0
e5e5c7aed89cf3189cffe1056464833c15eb54ff
https://github.com/Johnsonms/NNI_master/tree/e5e5c7aed89cf3189cffe1056464833c15eb54ff
CoPredictor
import torch import torch.autograd import torch.nn as nn class Biaffine(nn.Module): def __init__(self, n_in, n_out=1, bias_x=True, bias_y=True): super(Biaffine, self).__init__() self.n_in = n_in self.n_out = n_out self.bias_x = bias_x self.bias_y = bias_y weight = ...
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.autogr...
dumpmemory/W2NER
CoPredictor
false
15,291
[ "MIT" ]
128
fb1b6eb1111eb001b1c965097d995244b840bdda
https://github.com/dumpmemory/W2NER/tree/fb1b6eb1111eb001b1c965097d995244b840bdda
PyTorchMLP
import torch import torch.nn as nn class PyTorchMLP(nn.Module): """ A feed forward network to make single step predictions on 1D time series data. """ def __init__(self, inputsize, prefix): super(PyTorchMLP, self).__init__() self.fc1 = nn.Linear(in_features=inputsize, out_features=rou...
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_...
danvran/ASM
PyTorchMLP
false
9,955
[ "MIT" ]
0
e678fa507f847ec2ff947ec4ca123858ffe46d4d
https://github.com/danvran/ASM/tree/e678fa507f847ec2ff947ec4ca123858ffe46d4d
encoderVH
import torch import torch.nn as nn import torch.nn.functional as F class encoderVH(nn.Module): def __init__(self): super(encoderVH, self).__init__() self.conv1 = nn.Conv3d(in_channels=1, out_channels=64, kernel_size= 4, stride=2, padding=1, bias=True) self.gn1 = nn.GroupNorm(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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Miles629/TransparentShapeRealData
encoderVH
false
14,051
[ "MIT" ]
91
b81098a2d1882f5fd33fba6167d7258dbe02d6d2
https://github.com/Miles629/TransparentShapeRealData/tree/b81098a2d1882f5fd33fba6167d7258dbe02d6d2
NegativeLearningLoss
import torch import torch.nn as nn import torch.backends.cudnn import torch.utils import torch.distributed class NegativeLearningLoss(nn.Module): def __init__(self, threshold=0.05): super(NegativeLearningLoss, self).__init__() self.threshold = threshold def forward(self, predict): ma...
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 ...
BIT-DA/RIPU
NegativeLearningLoss
false
16,953
[ "MIT" ]
9
125edf112c9ded1e7497aedb2a092331824df100
https://github.com/BIT-DA/RIPU/tree/125edf112c9ded1e7497aedb2a092331824df100
ReconstructionLoss
# 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 functools import reduce import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
NjuHaoZhang/AutoregressModel-AE_VAD_CVPR2019
ReconstructionLoss
false
8,607
[ "MIT" ]
12
b9843f34ecb59f908d78ddf977ee4670e0ed6cb4
https://github.com/NjuHaoZhang/AutoregressModel-AE_VAD_CVPR2019/tree/b9843f34ecb59f908d78ddf977ee4670e0ed6cb4
L2Norm
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_...
Steffen-Wolf/vit-pytorch
L2Norm
false
9,609
[ "MIT" ]
0
4f590b9bd570091d9070a039ad33301516caa341
https://github.com/Steffen-Wolf/vit-pytorch/tree/4f590b9bd570091d9070a039ad33301516caa341
BoundCos
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import math import numpy as np import torch.nn as nn import torch.nn.func...
Mahoumaru/auto_LiRPA
BoundCos
false
13,228
[ "BSD-3-Clause" ]
0
b03a6c36eb1b921726778359d6d2b94e0cd7e480
https://github.com/Mahoumaru/auto_LiRPA/tree/b03a6c36eb1b921726778359d6d2b94e0cd7e480
CatImgs
import torch from torch import nn class CatImgs(nn.Module): def forward(self, img1, img2, img3): return torch.cat((img1, img2, img3), 3) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4]), torch.rand( [4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
crisdeodates/AI-depthai-experiments
CatImgs
false
6,484
[ "MIT" ]
1
74b8b84a03cb637d20a7fcd091cce11add78bd2c
https://github.com/crisdeodates/AI-depthai-experiments/tree/74b8b84a03cb637d20a7fcd091cce11add78bd2c
Weighed_Bce_Loss
import torch import torch.nn.functional as F from torch import nn class Weighed_Bce_Loss(nn.Module): def __init__(self): super(Weighed_Bce_Loss, self).__init__() def forward(self, x, label): x = x.view(-1, 1, x.shape[1], x.shape[2]) label = label.view(-1, 1, label.shape[1], label.sha...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
suyukun666/UFO
Weighed_Bce_Loss
false
16,513
[ "MIT" ]
122
e57016948b03cd2f75155d2958cea69b6e4b56f8
https://github.com/suyukun666/UFO/tree/e57016948b03cd2f75155d2958cea69b6e4b56f8
resblock
import torch import torch.nn as nn class mfm(nn.Module): def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, padding=1, type=1): super(mfm, self).__init__() self.out_channels = out_channels if type == 1: self.filter = nn.Conv2d(in_channels, 2 * out_c...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
BradyFU/DVG
resblock
false
13,416
[ "MIT" ]
102
53fd50cdc51d783b33394726b8f8a2b2216f157b
https://github.com/BradyFU/DVG/tree/53fd50cdc51d783b33394726b8f8a2b2216f157b
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....
davide-belli/generative-graph-transformer
DecoderLayer
false
15,166
[ "MIT" ]
51
949aacf57246e8c28df7dfa38e5c59bf8b2b0ee8
https://github.com/davide-belli/generative-graph-transformer/tree/949aacf57246e8c28df7dfa38e5c59bf8b2b0ee8
Linear
# 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 from torch.nn.parameter import Parameter assert_size_strid...
collector-m/LiDAR-MOS
Linear
false
15,068
[ "MIT" ]
268
7ccbb63b4ee7c40195b35dd0dddd71473fae25b1
https://github.com/collector-m/LiDAR-MOS/tree/7ccbb63b4ee7c40195b35dd0dddd71473fae25b1
SelfAttn
# 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....
TuBui/deep_image_comparator
SelfAttn
false
1,169
[ "MIT" ]
0
2dea7738d794b91a960ee9f41461a4e3ffcd5e44
https://github.com/TuBui/deep_image_comparator/tree/2dea7738d794b91a960ee9f41461a4e3ffcd5e44
EncoderLayer
# 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....
congson1293/Transformer
EncoderLayer
false
1,762
[ "Apache-2.0" ]
0
249638f3287e0ed11c71496178fe2ceac2d758df
https://github.com/congson1293/Transformer/tree/249638f3287e0ed11c71496178fe2ceac2d758df
AlterCoAttn
import torch import torch.nn.functional as F import torch.nn as nn import torch.autograd import torch.nn class Attn(nn.Module): """ Unit attention operation for alternating co-attention. ``https://arxiv.org/pdf/1606.00061.pdf`` .. math:: \\begin{array}{ll} H = \\tanh(W_x * X + (W_...
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....
HCY123902/visdial-gnn
AlterCoAttn
false
8,229
[ "MIT" ]
44
c38090c672cdf04a4fabe139f96d944fd82cb123
https://github.com/HCY123902/visdial-gnn/tree/c38090c672cdf04a4fabe139f96d944fd82cb123
FocalLoss
import torch import torch.nn as nn class FocalLoss(nn.Module): def __init__(self, gamma=2, eps=1e-07): super(FocalLoss, self).__init__() self.gamma = gamma self.eps = eps self.ce = nn.CrossEntropyLoss(reduction='none') def forward(self, input, target): logp = self.ce(...
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 ...
delldu/EQFace
FocalLoss
false
6,543
[ "MIT" ]
1
a088e80709c1e31a57e302cabfa85ab96f2c0aa5
https://github.com/delldu/EQFace/tree/a088e80709c1e31a57e302cabfa85ab96f2c0aa5
BertIntermediate
# 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 math import ...
VinodS7/sota-music-tagging-models
BertIntermediate
false
14,584
[ "MIT" ]
199
6232abe693ebe6a99ea64a3ea1fe65c34d0a9dd0
https://github.com/VinodS7/sota-music-tagging-models/tree/6232abe693ebe6a99ea64a3ea1fe65c34d0a9dd0
Sine
import torch import torch.utils.data import torch.nn as nn class Sine(nn.Module): def __init(self): super().__init__() def forward(self, input): return torch.sin(30 * input) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils.data import torch.nn as nn assert_size_stride = torch....
RisingStockPrices/sirenized-deepsdf
Sine
false
11,808
[ "MIT" ]
0
c0fb33e26b6bf0753c02adc5186af344e40a6d04
https://github.com/RisingStockPrices/sirenized-deepsdf/tree/c0fb33e26b6bf0753c02adc5186af344e40a6d04
GenNoise
import torch import torch.nn as nn import torch.nn.init class GenNoise(nn.Module): def __init__(self, dim2): super(GenNoise, self).__init__() self.dim2 = dim2 def forward(self, input): a = list(input.size()) a[1] = self.dim2 b = torch.zeros(a).type_as(input.data) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.init assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dy...
DDQXZcp/FYP_ProjectFile_TANG_Zhiheng
GenNoise
false
8,944
[ "MIT" ]
0
b0e3b9d1c5cee61e1d09a32e405244bda09b6f0d
https://github.com/DDQXZcp/FYP_ProjectFile_TANG_Zhiheng/tree/b0e3b9d1c5cee61e1d09a32e405244bda09b6f0d
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 ...
Dong-JinKim/ActionCooccurrencePriors
FocalLoss
false
7,970
[ "MIT" ]
27
110dbeecf4c25955b5b0160bd7d31d25c759ef21
https://github.com/Dong-JinKim/ActionCooccurrencePriors/tree/110dbeecf4c25955b5b0160bd7d31d25c759ef21
GEGLU
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Actis92/saint-lightning
GEGLU
false
4,756
[ "MIT" ]
1
8f64fa0751fd7a36663f9e8b79bdea777905ea84
https://github.com/Actis92/saint-lightning/tree/8f64fa0751fd7a36663f9e8b79bdea777905ea84
SE_layer_3d
import torch import torch.nn as nn import torch.multiprocessing class SE_layer_3d(nn.Module): def __init__(self, num_channels, reduction_ratio=2): super(SE_layer_3d, self).__init__() num_channels_reduced = num_channels // reduction_ratio self.reduction_ratio = reduction_ratio self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
vinbigdata-medical/abdomen-phases
SE_layer_3d
false
4,495
[ "MIT" ]
0
4adf5b8bf13aec85247d74e3cd3789c52cb88b92
https://github.com/vinbigdata-medical/abdomen-phases/tree/4adf5b8bf13aec85247d74e3cd3789c52cb88b92
ResidualBlock
# 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....
naver-ai/cgl_fairness
ResidualBlock
false
7,335
[ "MIT" ]
1
00d3bec233c9b3e0f88496118abaed8321ca3159
https://github.com/naver-ai/cgl_fairness/tree/00d3bec233c9b3e0f88496118abaed8321ca3159
PAM
import torch from typing import Union import torch.nn.functional as F from typing import Tuple from torch import nn from typing import Dict from typing import List def strip_param_name(param_name: 'str') ->str: """Input an module's param name, return it's origin name with out parent modules' name Args: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
HAL-42/AlchemyCat
PAM
false
17,354
[ "Apache-2.0" ]
8
ca924755ff48e2ff74543bb0e446376eb2b1f150
https://github.com/HAL-42/AlchemyCat/tree/ca924755ff48e2ff74543bb0e446376eb2b1f150
MultiHeadAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
AviVarma/torchASN-Transformer
MultiHeadAttention
false
107
[ "MIT" ]
0
55bccf4cdb099cd8e9ac99f5f87f989ce2add983
https://github.com/AviVarma/torchASN-Transformer/tree/55bccf4cdb099cd8e9ac99f5f87f989ce2add983
folder
import torch from torch import nn import torch.nn.functional as F import torch.nn.parallel class folder(nn.Module): def __init__(self): super().__init__() def forward(self, feature_map): N, _, H, W = feature_map.size() feature_map = F.unfold(feature_map, kernel_size=3, padding=1) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.nn.parallel assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
avinash-asink/AdelaiDet
folder
false
1,501
[ "BSD-2-Clause" ]
0
a8722579c8a724b02a36ef0f33a176ba282623fa
https://github.com/avinash-asink/AdelaiDet/tree/a8722579c8a724b02a36ef0f33a176ba282623fa
SEBlock
import torch import torch.nn as nn import torch.nn.functional as F class SEBlock(nn.Module): def __init__(self, input_channels, internal_neurons): super(SEBlock, self).__init__() self.down = nn.Conv2d(in_channels=input_channels, out_channels= internal_neurons, kernel_size=1, stride=1,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
sysu-shey/ACNet
SEBlock
false
16,523
[ "MIT" ]
767
6d967d3fff2d79a37f85799b78a21ffbd9001bd2
https://github.com/sysu-shey/ACNet/tree/6d967d3fff2d79a37f85799b78a21ffbd9001bd2
RegularizationLoss
import torch import torch.nn as nn class RegularizationLoss(nn.Module): def __init__(self, lambda_p: 'float', max_layers: 'int'): super().__init__() p_g = torch.zeros((max_layers,)) not_halted = 1.0 for k in range(max_layers): p_g[k] = lambda_p * not_halted ...
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...
ChenghaoMou/embeddings
RegularizationLoss
false
7,883
[ "MIT" ]
12
e63c2f2f4a688302de37bb8ccfd37a0170e2c374
https://github.com/ChenghaoMou/embeddings/tree/e63c2f2f4a688302de37bb8ccfd37a0170e2c374
BertSelfAttention
# 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....
codecaution/Hetu
BertSelfAttention
false
1,741
[ "Apache-2.0" ]
0
e278732c2fe3554c8d576585f5bcbf79ade31b68
https://github.com/codecaution/Hetu/tree/e278732c2fe3554c8d576585f5bcbf79ade31b68
StructuredAutoencoderNet
# 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 from collections import OrderedDict assert_size_stride = t...
CHuanSite/smautoPy
StructuredAutoencoderNet
false
13,216
[ "MIT" ]
0
46c6b2088fc3c488870cee2ab88ac9f1ce779c0d
https://github.com/CHuanSite/smautoPy/tree/46c6b2088fc3c488870cee2ab88ac9f1ce779c0d
MeanPoolConv
# 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.functional as F import torch.nn as nn assert_size_stride = torch...
tsirif/cortex
MeanPoolConv
false
16,623
[ "BSD-3-Clause" ]
109
2837b220f9fb73279df3815bb18b274106412c08
https://github.com/tsirif/cortex/tree/2837b220f9fb73279df3815bb18b274106412c08
Balance_Theory
import torch from typing import Optional from typing import Tuple import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter from typing import Union class Balance_Theory(nn.Module): """The signed graph clustering model with balance theory, restricted to 2 hops for fair compari...
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....
SherylHYX/SSSNET_Signed_Clustering
Balance_Theory
false
17,922
[ "MIT" ]
5
85736c18e86b396d64177d22b8c7f9859dfd794c
https://github.com/SherylHYX/SSSNET_Signed_Clustering/tree/85736c18e86b396d64177d22b8c7f9859dfd794c
NeuralNetMultiplePositionalArgumentsMultiOutputsWithoutDependency
# 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....
almiliMSFT/onnxruntime
NeuralNetMultiplePositionalArgumentsMultiOutputsWithoutDependency
false
14,815
[ "MIT" ]
6,036
c002dc86a364852859ca9642698fcfc5edf22c9d
https://github.com/almiliMSFT/onnxruntime/tree/c002dc86a364852859ca9642698fcfc5edf22c9d
MHSA
# 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....
lzu-zhanghr/vision-transformer-zoo
MHSA
false
10,475
[ "MIT" ]
0
2cc6e3551c39816acc95ade040bbf9bd115a6b03
https://github.com/lzu-zhanghr/vision-transformer-zoo/tree/2cc6e3551c39816acc95ade040bbf9bd115a6b03
DQN
# 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...
NeilWangziyu/torch_light
DQN
false
5,684
[ "MIT" ]
1
daf8fd62f57885cf182f1b3edc3152156d229ef3
https://github.com/NeilWangziyu/torch_light/tree/daf8fd62f57885cf182f1b3edc3152156d229ef3
EQ
# 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...
PogChamper/torch2trt
EQ
false
14,180
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
SDNE_layer
import torch import torch.utils.data import torch.nn as nn import torch.nn.functional as F class SDNE_layer(nn.Module): def __init__(self, num_node, hidden_size1, hidden_size2, droput, alpha, beta, nu1, nu2): super(SDNE_layer, self).__init__() self.num_node = num_node self.hidden_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
Brickser/cogdl
SDNE_layer
false
2,275
[ "MIT" ]
0
3952dd11075634cc0f3b669996cfc780635ce026
https://github.com/Brickser/cogdl/tree/3952dd11075634cc0f3b669996cfc780635ce026
MeanAct
# 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 ...
jdasam/scDCC
MeanAct
false
10,232
[ "Apache-2.0" ]
0
8ebaed766db5ad56021983ebc13e9a60b6c7b453
https://github.com/jdasam/scDCC/tree/8ebaed766db5ad56021983ebc13e9a60b6c7b453
BiaffineAttention
import torch import torch.utils.data.dataloader from torch.nn import Parameter import torch.nn as nn import torch.nn from torch.nn.parameter import Parameter class BiaffineAttention(nn.Module): """ Adopted from NeuroNLP2: https://github.com/XuezheMax/NeuroNLP2/blob/master/neuronlp2/nn/modules/attentio...
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....
Dadmatech/DadmaTools
BiaffineAttention
false
7,991
[ "Apache-2.0" ]
25
c1b7add5c33544f69c1ba1c5250a5ea07caf9aa2
https://github.com/Dadmatech/DadmaTools/tree/c1b7add5c33544f69c1ba1c5250a5ea07caf9aa2
AlphaEntropy
import torch import torch.nn as nn class AlphaEntropy(nn.Module): def __init__(self): super().__init__() self.v_loss = nn.MSELoss() def forward(self, props, v, pi, reward): v_loss = self.v_loss(v, reward) p_loss = -torch.mean(torch.sum(props * pi, 1)) return p_loss + ...
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...
shinoyuki222/torch-light
AlphaEntropy
false
16,423
[ "MIT" ]
310
4799805d9bcae82a9f12a574dcf9fdd838c92ee9
https://github.com/shinoyuki222/torch-light/tree/4799805d9bcae82a9f12a574dcf9fdd838c92ee9
PositionwiseFeedForward
# 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 ...
srlee-ai/claf
PositionwiseFeedForward
false
10,884
[ "MIT" ]
0
89b3e5c5ec0486886876ea3bac381508c6a6bf58
https://github.com/srlee-ai/claf/tree/89b3e5c5ec0486886876ea3bac381508c6a6bf58
MSELoss2d
import torch import torch.nn as nn class MSELoss2d(nn.Module): def __init__(self, size_average=None, reduce=None, reduction='mean', ignore_index=255): super(MSELoss2d, self).__init__() self.MSE = nn.MSELoss(size_average=size_average, reduce=reduce, reduction=reduction) de...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
mimiliaogo/DACS
MSELoss2d
false
16,092
[ "MIT" ]
59
9f13e32566c293de560df4848b23631d9e11cf32
https://github.com/mimiliaogo/DACS/tree/9f13e32566c293de560df4848b23631d9e11cf32
VariableSoftmax
import torch from torch import Tensor from torch import nn from typing import * class VariableSoftmax(nn.Softmax): """Softmax with temperature""" def __init__(self, temp: 'float'=1, dim: 'int'=-1): super().__init__(dim=dim) self.temp = temp def forward(self, x: 'Tensor') ->Tensor: ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn f...
llayer/pytorch_inferno
VariableSoftmax
false
3,936
[ "Apache-2.0" ]
0
922eba5e04e447126506512eb82adcd9ed1dab25
https://github.com/llayer/pytorch_inferno/tree/922eba5e04e447126506512eb82adcd9ed1dab25
LocalNet
import torch import torch.nn as nn class LocalNet(nn.Module): def forward(self, x_in): """Defines a double convolution :param x_in: input convolutional features :returns: convolutional features :rtype: Tensor """ x = self.lrelu(self.conv1(self.refpad(x_in))) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
deshwalmahesh/CURL---cpu-gpu
LocalNet
false
3,421
[ "BSD-3-Clause" ]
0
f4e87275b6cce556b9e04a188cf7ae13d810d82a
https://github.com/deshwalmahesh/CURL---cpu-gpu/tree/f4e87275b6cce556b9e04a188cf7ae13d810d82a
BothContextGate
import torch import torch.nn as nn import torch.cuda import torch.distributed class ContextGate(nn.Module): """ Context gate is a decoder module that takes as input the previous word embedding, the current decoder state and the attention state, and produces a gate. The gate can be used to select t...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
ESCM-summarization/ESCM-summary-evaluation
BothContextGate
false
9,117
[ "MIT" ]
0
3780b51f0ed44cbbea3f163a871d875f1e5e9393
https://github.com/ESCM-summarization/ESCM-summary-evaluation/tree/3780b51f0ed44cbbea3f163a871d875f1e5e9393
BertLayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Adelashl6/mask_transformers
BertLayerNorm
false
4,787
[ "MIT" ]
1
2a2e4d1b40ae3ed546cb850d041af246806b63e7
https://github.com/Adelashl6/mask_transformers/tree/2a2e4d1b40ae3ed546cb850d041af246806b63e7
GatedFusion
import torch from torch import nn import torch.nn.modules.loss from scipy.sparse import * class GatedFusion(nn.Module): def __init__(self, hidden_size): super(GatedFusion, self).__init__() """GatedFusion module""" self.fc_z = nn.Linear(4 * hidden_size, hidden_size, bias=True) def for...
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.modules.loss from scipy.sparse import * ass...
IBM/graph4nlp
GatedFusion
false
8,349
[ "Apache-2.0" ]
18
a9bf20b23fa1ec368d9bd40cc8c557f86a9f8297
https://github.com/IBM/graph4nlp/tree/a9bf20b23fa1ec368d9bd40cc8c557f86a9f8297
SampaddingConv1D
# 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...
amoonfana/Knowledge_Distillation
SampaddingConv1D
false
6,192
[ "Apache-2.0" ]
1
1ee814a8f70ae00d17e1e1ee778d5420d96c43c4
https://github.com/amoonfana/Knowledge_Distillation/tree/1ee814a8f70ae00d17e1e1ee778d5420d96c43c4
TemporalAggregation_Mean
from _paritybench_helpers import _mock_config import torch import torch.nn as nn from math import sqrt as sqrt from itertools import product as product class TemporalAggregation_Mean(nn.Module): def __init__(self, cfg): super(TemporalAggregation_Mean, self).__init__() self.K = cfg.K def forw...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from math import sqrt as sqrt from itertools import product as product assert_size_stride = torch._C._dynamo.guards.as...
burhanmudassar/pytorch-action-detection
TemporalAggregation_Mean
false
1,666
[ "MIT" ]
0
16afb9312248d73c0e2be56ac733e0a33040307e
https://github.com/burhanmudassar/pytorch-action-detection/tree/16afb9312248d73c0e2be56ac733e0a33040307e