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
Dnn_net_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 import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride e...
BaiYunLiu/newPLC
Dnn_net_Loss
false
4,883
[ "BSD-3-Clause" ]
1
18245a14648bc28b7269ea1d6e444ca6021ac8d2
https://github.com/BaiYunLiu/newPLC/tree/18245a14648bc28b7269ea1d6e444ca6021ac8d2
BayesLinear
import math import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import init def calculate_kl(mu_p, sig_p, mu_q, sig_q): """ Calculates the Kullback-Leibler divergence between two univariate Gaussians (p and q) Args: mu_p: mean of the Gaussian p sig_p: standard...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 libd...
chapmanbe/uncertainty
BayesLinear
false
6,424
[ "Apache-2.0" ]
1
d4eec00e937c76043d57a13ffcc9618b1e08d967
https://github.com/chapmanbe/uncertainty/tree/d4eec00e937c76043d57a13ffcc9618b1e08d967
BatchHardTripletLoss
import torch import torch.nn as nn import torch.nn.parallel import torch.optim from torch.nn import functional as F class BatchHardTripletLoss(nn.Module): def __init__(self, margin=1.0): super().__init__() self.margin = margin @staticmethod def get_anchor_positive_triplet_mask(target): ...
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 assert_size_stride = to...
Khanhnn00/image-retrieval
BatchHardTripletLoss
false
729
[ "MIT" ]
0
7c6c5fe9ec5fd6cb0f0906027fd80787e2ad1cf8
https://github.com/Khanhnn00/image-retrieval/tree/7c6c5fe9ec5fd6cb0f0906027fd80787e2ad1cf8
CeCriterion
import torch import torch.nn.functional as F from torch.nn.modules.loss import _Loss from torch.optim.lr_scheduler import * class Criterion(_Loss): def __init__(self, alpha=1.0, name='criterion'): super().__init__() """Alpha is used to weight each loss term """ self.alpha = alpha ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn.modules....
posuer/mt-dnn
CeCriterion
false
12,894
[ "MIT" ]
0
5106083238654777838aaab5d1111b3b05c4ce04
https://github.com/posuer/mt-dnn/tree/5106083238654777838aaab5d1111b3b05c4ce04
attentionLayer
# 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....
slapshin/TalkNet_ASD
attentionLayer
false
4,371
[ "MIT" ]
0
343fac5c8d2bef2b98244e3acf20ac322711a4c7
https://github.com/slapshin/TalkNet_ASD/tree/343fac5c8d2bef2b98244e3acf20ac322711a4c7
LayerNormalization
# 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_...
analvikingur/RGAN
LayerNormalization
false
18,310
[ "MIT" ]
8
b1893c2f53d11c9173c7a30f63f6d93d72232493
https://github.com/analvikingur/RGAN/tree/b1893c2f53d11c9173c7a30f63f6d93d72232493
L2
# 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_...
dark-tea/flownet2-pytorch
L2
false
10,079
[ "Apache-2.0" ]
0
41ea3353f11048833f6baebcf9f9c951b0b722d7
https://github.com/dark-tea/flownet2-pytorch/tree/41ea3353f11048833f6baebcf9f9c951b0b722d7
Actor
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data from torch.optim.lr_scheduler import * import torch.optim.lr_scheduler import torch.quantization import torch.onnx import torch.testing class Actor(nn.Module): def __init__(self, nb_states, nb_actions, hidden1=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
saman-aghazadeh/distiller
Actor
false
4,255
[ "Apache-2.0" ]
0
7e8d3e6193c807f7c55d8453f64e1bc3c02eee30
https://github.com/saman-aghazadeh/distiller/tree/7e8d3e6193c807f7c55d8453f64e1bc3c02eee30
BiAttention
# 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....
mwakaba2/KOBE
BiAttention
false
4,054
[ "MIT" ]
0
e225e78fb18b5fc9785d521a3cd611fff3eaaf87
https://github.com/mwakaba2/KOBE/tree/e225e78fb18b5fc9785d521a3cd611fff3eaaf87
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 libdevice, math as tl_math import torc...
okcd00/CDPrototype
FocalLoss
false
12,851
[ "MIT" ]
0
5a05b144e3e4b341c1a67fe455f94c01899539d8
https://github.com/okcd00/CDPrototype/tree/5a05b144e3e4b341c1a67fe455f94c01899539d8
DeiTOutput
# 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 import torch.utils.checkpoint assert_size_stride = torch._C...
ncoop57/transformers
DeiTOutput
false
4,056
[ "Apache-2.0" ]
0
d7e156bd1ae2467e9ea1dbc44f31da0ed2296aee
https://github.com/ncoop57/transformers/tree/d7e156bd1ae2467e9ea1dbc44f31da0ed2296aee
AP
# 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....
albertvillanova/s3prl
AP
false
6,151
[ "MIT" ]
1
b127ade4ed2f80a1027901bbd2f204b4fb1aaf03
https://github.com/albertvillanova/s3prl/tree/b127ade4ed2f80a1027901bbd2f204b4fb1aaf03
PositionalEncoding
import torch import numpy as np import torch.nn as nn class PositionalEncoding(nn.Module): def __init__(self, module_dim=512, dropout=0.1, max_len=5000): super(PositionalEncoding, self).__init__() self.dropout = nn.Dropout(p=dropout) pe = torch.zeros(max_len, module_dim) position ...
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 numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dyna...
TheoMoutakanni/hcrn-videoqa
PositionalEncoding
false
2,937
[ "Apache-2.0" ]
0
03a0fb1f24d756e7cd61d519f92925b610a91a29
https://github.com/TheoMoutakanni/hcrn-videoqa/tree/03a0fb1f24d756e7cd61d519f92925b610a91a29
ScModel
import torch import torch as t import torch.nn as nn from torch.nn.parameter import Parameter class ScModel(nn.Module): """ Model for single cell data """ def __init__(self, n_genes: 'int', n_celltypes: 'int', device: 't.device' ) ->None: super().__init__() self.K = n_celltypes ...
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...
jfnavarro/stereoscope
ScModel
false
3,715
[ "MIT" ]
0
0a64db45291c3a9b72abdf13183614a10f3dac40
https://github.com/jfnavarro/stereoscope/tree/0a64db45291c3a9b72abdf13183614a10f3dac40
ConvertPointsToHomogeneous
import torch import torch.nn as nn def convert_points_to_homogeneous(points): """Function that converts points from Euclidean to homogeneous space. See :class:`~torchgeometry.ConvertPointsToHomogeneous` for details. Examples:: >>> input = torch.rand(2, 4, 3) # BxNx3 >>> output = tgm.co...
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...
LucaswasTaken/frankmocap
ConvertPointsToHomogeneous
false
773
[ "BSD-3-Clause" ]
0
17c1761326991d0faab58bd10888e9043abf6bd5
https://github.com/LucaswasTaken/frankmocap/tree/17c1761326991d0faab58bd10888e9043abf6bd5
ToRGB
from torch.autograd import Function import math import torch from torch import nn import torch.nn.functional as F def make_kernel(k): k = torch.tensor(k, dtype=torch.float32) if k.ndim == 1: k = k[None, :] * k[:, None] k /= k.sum() return k def upfirdn2d(input, kernel, up=1, down=1, pad=(0, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.autograd import Function import math from torch import nn import torc...
johnberg1/psp_s
ToRGB
false
12,631
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
0
717f4c448a4e7537cf4b74067d454c7644609ca3
https://github.com/johnberg1/psp_s/tree/717f4c448a4e7537cf4b74067d454c7644609ca3
ConvReLUNorm
import torch import torch.utils.data import torch.cuda import torch.optim class ConvReLUNorm(torch.nn.Module): def __init__(self, in_channels, out_channels, kernel_size=1, dropout=0.0): super(ConvReLUNorm, self).__init__() self.conv = torch.nn.Conv1d(in_channels, out_channels, kernel_size= ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Malkovsky/NeMo
ConvReLUNorm
false
2,605
[ "Apache-2.0" ]
0
8cf9aad8ecba36f1bd7b096cf274c2bc8ac695c3
https://github.com/Malkovsky/NeMo/tree/8cf9aad8ecba36f1bd7b096cf274c2bc8ac695c3
C3D
# 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....
kar98kbang/c3d-pytorch
C3D
false
4,143
[ "MIT" ]
0
22b3564798cb9249ad6fdb6c9d929bff3fdfa567
https://github.com/kar98kbang/c3d-pytorch/tree/22b3564798cb9249ad6fdb6c9d929bff3fdfa567
VertexDirectEmbedder
# 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 libdevice import torch.utils.data from...
TWJianNuo/detectron2
VertexDirectEmbedder
false
1,118
[ "Apache-2.0" ]
0
091bc43e85b8f7cefdccebf8d85afb7cfff2a3f0
https://github.com/TWJianNuo/detectron2/tree/091bc43e85b8f7cefdccebf8d85afb7cfff2a3f0
FourierFeatures
import math import torch from torch import nn class FourierFeatures(nn.Module): def __init__(self, in_features, out_features, std=1.0): super().__init__() assert out_features % 2 == 0 self.weight = nn.Parameter(torch.randn([out_features // 2, in_features]) * std) def forw...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch im...
DeepTitan/v-diffusion-pytorch
FourierFeatures
false
9,032
[ "MIT" ]
0
857b6f2a4519973f9a8dc0b6c93f0134cebc3a8d
https://github.com/DeepTitan/v-diffusion-pytorch/tree/857b6f2a4519973f9a8dc0b6c93f0134cebc3a8d
DotProductAttention
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F class BaseAttention(nn.Module): def __init__(self): super().__init__() def forward(self, *args, **kwargs): raise NotImplementedError class DotProductAttention(BaseAttention): """Dot Product Attention"...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ROBINADC/BiGRU-CRF-with-Attention-for-NER
DotProductAttention
false
8,689
[ "MIT" ]
27
b9e037ebd6e1d56500ffb60c6030013982c17ded
https://github.com/ROBINADC/BiGRU-CRF-with-Attention-for-NER/tree/b9e037ebd6e1d56500ffb60c6030013982c17ded
GradientLoss
# 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 ...
LongerVision/oidn
GradientLoss
false
5,557
[ "Apache-2.0" ]
1
2f9e59f8b747b217f78c5c274f4f2bff347a03a7
https://github.com/LongerVision/oidn/tree/2f9e59f8b747b217f78c5c274f4f2bff347a03a7
MLP
# 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....
CoAxLab/azad
MLP
false
17,204
[ "MIT" ]
6
d1498069dd8856e93ae077b34dd7c9f1c7ce80e6
https://github.com/CoAxLab/azad/tree/d1498069dd8856e93ae077b34dd7c9f1c7ce80e6
LinearFBSP
import torch import numpy as np from typing import Tuple import torch.nn.functional as F from typing import cast def scale(old_value, old_min, old_max, new_min, new_max): old_range = old_max - old_min new_range = new_max - new_min new_value = (old_value - old_min) * new_range / old_range + new_min ret...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
Taekyoon/executors
LinearFBSP
false
11,945
[ "Apache-2.0" ]
0
567f12c4193bb7be814f84540ea31585cd35b344
https://github.com/Taekyoon/executors/tree/567f12c4193bb7be814f84540ea31585cd35b344
InstanceNorm
# 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.utils.data import torch.nn as nn from torch.nn.parameter import Pa...
doantientai/augmented_cyclegan
InstanceNorm
false
15,197
[ "MIT" ]
133
821274577e71c412198356ad6302c982554d558c
https://github.com/doantientai/augmented_cyclegan/tree/821274577e71c412198356ad6302c982554d558c
EncoderImagePrecomp
# 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....
Yoark/VG-NSL_ext
EncoderImagePrecomp
false
12,011
[ "MIT" ]
0
fea8155076020d294e840cf06ca5a8689c82a20e
https://github.com/Yoark/VG-NSL_ext/tree/fea8155076020d294e840cf06ca5a8689c82a20e
TAGConv
import torch import torch.nn.functional as F import torch.nn as nn class TAGConv(nn.Module): """ Description ----------- TAGCN convolutional layer. Parameters ---------- in_features : int Dimension of input features. out_features : int Dimension of output features. ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
sigeisler/grb
TAGConv
false
16,457
[ "MIT" ]
51
c89e21076dc05d1edb87dfe2eff20c29ba6bd0c1
https://github.com/sigeisler/grb/tree/c89e21076dc05d1edb87dfe2eff20c29ba6bd0c1
ClipLoss
import torch import torch.nn.functional as F from torch import nn import torch.distributed as dist import torch.distributed.nn def gather_features(image_features, text_features, aug1_embed=None, aug2_embed=None, local_loss=False, gather_with_grad=False, rank=0, world_size=1, horovod=False): if horovod: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Vaishaal/open_clip
ClipLoss
false
1,186
[ "MIT" ]
0
8877c4036dacde022da90769c64006d9f2c82e84
https://github.com/Vaishaal/open_clip/tree/8877c4036dacde022da90769c64006d9f2c82e84
ScoreLayer
import torch from torchvision.transforms import functional as F from torch.nn import functional as F import torch.nn as nn class ScoreLayer(nn.Module): def __init__(self, k): super(ScoreLayer, self).__init__() self.score = nn.Conv2d(k, 1, 1, 1) def forward(self, x, x_size=None): x = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Res2Net/Res2Net-PoolNet
ScoreLayer
false
8,703
[ "MIT" ]
35
7bef0652e83a6c4ebe4ed47f1b03ab5b7b16074a
https://github.com/Res2Net/Res2Net-PoolNet/tree/7bef0652e83a6c4ebe4ed47f1b03ab5b7b16074a
Fusion2_FCLayer
# 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...
RUCAIBox/WSDM2022-C2CRS
Fusion2_FCLayer
false
17,844
[ "MIT" ]
4
8ef2fa7c44bdba1799ab79f379ae7394bd468c02
https://github.com/RUCAIBox/WSDM2022-C2CRS/tree/8ef2fa7c44bdba1799ab79f379ae7394bd468c02
FakeRKHSConvNet
# 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....
Benjamin-Etheredge/lightning-bolts
FakeRKHSConvNet
false
163
[ "Apache-2.0" ]
0
1971d6a924729940b98793aa7751bdf769350aca
https://github.com/Benjamin-Etheredge/lightning-bolts/tree/1971d6a924729940b98793aa7751bdf769350aca
Conv
import torch import torch.nn as nn class Conv(nn.Module): def __init__(self, chn_in, chn_out, ker_sz=3): super().__init__() self.c = nn.Conv2d(chn_in, chn_out, ker_sz, padding=ker_sz // 2, padding_mode='circular', bias=False) self.a = nn.ReLU() def forward(self, x): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
tuxedcat/A2C
Conv
false
10,890
[ "Apache-2.0" ]
0
4a6686af05667f8760f2731f184e1845a2d11c6f
https://github.com/tuxedcat/A2C/tree/4a6686af05667f8760f2731f184e1845a2d11c6f
TwoLayerNet
import torch import torch.nn class TwoLayerNet(torch.nn.Module): def __init__(self, D_in, H, D_out): super(TwoLayerNet, self).__init__() self.linear1 = torch.nn.Linear(D_in, H) self.linear2 = torch.nn.Linear(H, D_out) def forward(self, x): h_relu = self.linear1(x).clamp(min=0...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn assert_size_s...
dionhaefner/delve
TwoLayerNet
false
15,183
[ "MIT" ]
69
811756520cbfd8dce4427c53203ac193f61a94d1
https://github.com/dionhaefner/delve/tree/811756520cbfd8dce4427c53203ac193f61a94d1
MaxPoolPad
# 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.nn.init assert_size_stride = torch._C._dynamo.guards.a...
dowhilefalse/DeOldify
MaxPoolPad
false
12,302
[ "MIT" ]
0
08f012cdbe36e3f8482460f57e1844b361a7fb16
https://github.com/dowhilefalse/DeOldify/tree/08f012cdbe36e3f8482460f57e1844b361a7fb16
LunaBlock
# 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_...
JulianKlug/scop
LunaBlock
false
688
[ "MIT" ]
0
b0d6a805a11ee8b4d0f53a4d6a5ec402988298e4
https://github.com/JulianKlug/scop/tree/b0d6a805a11ee8b4d0f53a4d6a5ec402988298e4
MyLinear
import torch from torch import nn import torch.nn import torch.nn.functional as F class MyLinear(nn.Module): """Linear layer with equalized learning rate and custom learning rate multiplier.""" def __init__(self, input_size, output_size, gain=2 ** 0.5, use_wscale= False, lrmul=1, bias=True): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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 assert_size_stride = torch._C._dynamo.guard...
Qingyang-Xu/GANInversion_with_ConsecutiveImgs
MyLinear
false
8,683
[ "MIT" ]
23
9078a48ec3474dacdd02693b051e3addef1c5697
https://github.com/Qingyang-Xu/GANInversion_with_ConsecutiveImgs/tree/9078a48ec3474dacdd02693b051e3addef1c5697
InstockMask
import torch import torch.nn as nn class InstockMask(nn.Module): def __init__(self, time_step, ltsp, min_instock_ratio=0.5, eps_instock_dph=0.001, eps_total_dph=0.001, **kwargs): super(InstockMask, self).__init__(**kwargs) if not eps_total_dph > 0: raise ValueError( ...
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_...
GoldbergData/pytorch-forecasting
InstockMask
false
2,326
[ "MIT" ]
0
e2ef3794da5d996c9740d932a4f55269bb4003f2
https://github.com/GoldbergData/pytorch-forecasting/tree/e2ef3794da5d996c9740d932a4f55269bb4003f2
TensorClampMin
# 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...
PogChamper/torch2trt
TensorClampMin
false
14,210
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
BoundSoftmaxImpl
import torch import torch.nn as nn class BoundSoftmaxImpl(nn.Module): def __init__(self, axis): super().__init__() self.axis = axis def forward(self, x): max_x = torch.max(x, dim=self.axis).values assert self.axis == int(self.axis) x = torch.exp(x - max_x.unsqueeze(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 import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
Mahoumaru/auto_LiRPA
BoundSoftmaxImpl
false
11,670
[ "BSD-3-Clause" ]
0
b03a6c36eb1b921726778359d6d2b94e0cd7e480
https://github.com/Mahoumaru/auto_LiRPA/tree/b03a6c36eb1b921726778359d6d2b94e0cd7e480
BCEBlurWithLogitsLoss
import torch import torch.nn as nn import torch.utils.data class BCEBlurWithLogitsLoss(nn.Module): def __init__(self, alpha=0.05): super(BCEBlurWithLogitsLoss, self).__init__() self.loss_fcn = nn.BCEWithLogitsLoss(reduction='none') self.alpha = alpha def forward(self, pred, true): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
Arui66/FPSAutomaticAiming
BCEBlurWithLogitsLoss
false
13,301
[ "Apache-2.0" ]
129
87674385d42b065b984b38a2ff59e7f2d4f07dc9
https://github.com/Arui66/FPSAutomaticAiming/tree/87674385d42b065b984b38a2ff59e7f2d4f07dc9
VDB
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class VDB(nn.Module): def __init__(self, num_inputs, args): super(VDB, self).__init__() self.fc1 = nn.Linear(num_inputs, args.hidden_size) self.fc2 = nn.Linear(args.hidden_size, args.z_size) self.fc3 ...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 libd...
amy12xx/lets-do-irl
VDB
false
14,831
[ "MIT" ]
408
fd469e9fb7426e41b07c83ce4b87962ac3543b1e
https://github.com/amy12xx/lets-do-irl/tree/fd469e9fb7426e41b07c83ce4b87962ac3543b1e
AdaptiveFeatureNorm
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dy...
neka-nat/Transfer-Learning-Library
AdaptiveFeatureNorm
false
16,136
[ "MIT" ]
1,474
a3b27b0d7562fa90a02e914140b37ab438469e6c
https://github.com/neka-nat/Transfer-Learning-Library/tree/a3b27b0d7562fa90a02e914140b37ab438469e6c
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....
Adoni/pytorch-pretrained-BERT
BertSelfAttention
false
3,503
[ "Apache-2.0" ]
0
845c33f00e933626dcfc96e0923ecf034295ef75
https://github.com/Adoni/pytorch-pretrained-BERT/tree/845c33f00e933626dcfc96e0923ecf034295ef75
MyLeakyReLU
# 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...
dsarrut/gaga
MyLeakyReLU
false
6,608
[ "Apache-2.0" ]
1
4b34210074f8f82acb12e0ffb38858e83c319dc3
https://github.com/dsarrut/gaga/tree/4b34210074f8f82acb12e0ffb38858e83c319dc3
MarginLoss
import torch import torch.nn.functional as F class MarginLoss(torch.nn.Module): def __init__(self, margin, C=0, reverse=False): super(MarginLoss, self).__init__() self.margin = margin self.C = C if not isinstance(reverse, bool): raise TypeError('param reverse must be 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
CogNLP/CogKGE
MarginLoss
false
5,021
[ "MIT" ]
1
70d851d6489600c1e90eb25b0388a3ceba2f078c
https://github.com/CogNLP/CogKGE/tree/70d851d6489600c1e90eb25b0388a3ceba2f078c
SE
# 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_...
AlexHoffman9/HAET-2021-competition-baseline-code
SE
false
11,177
[ "MIT" ]
0
1d71c94c68c9903854eceda6caf07442930caa44
https://github.com/AlexHoffman9/HAET-2021-competition-baseline-code/tree/1d71c94c68c9903854eceda6caf07442930caa44
Decoder
# 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...
jinyeom/ga-plastic-models
Decoder
false
3,755
[ "MIT" ]
0
e38b245ae51c35a5f32679cc9f215463a3d58f1a
https://github.com/jinyeom/ga-plastic-models/tree/e38b245ae51c35a5f32679cc9f215463a3d58f1a
AMSoftmaxLoss
import torch import torch.nn as nn import torch.nn.functional as F class AMSoftmaxLoss(nn.Module): def __init__(self, hidden_dim, speaker_num, s=30.0, m=0.4, **kwargs): """ AM Softmax Loss """ super(AMSoftmaxLoss, self).__init__() self.s = s self.m = m self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
B06901052/s3prl
AMSoftmaxLoss
false
113
[ "MIT" ]
0
5f63d2df043d2d7c81580cd042fa2cea34746f48
https://github.com/B06901052/s3prl/tree/5f63d2df043d2d7c81580cd042fa2cea34746f48
GlobalAvgPool1d
# 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...
Neronjust2017/challenge2020_test4
GlobalAvgPool1d
false
9,467
[ "BSD-2-Clause" ]
0
6494107a459b563aa51f8ea75c580c17557b13af
https://github.com/Neronjust2017/challenge2020_test4/tree/6494107a459b563aa51f8ea75c580c17557b13af
Lambda
import torch import torch.optim class KL(torch.nn.KLDivLoss): def __init__(self, is_input_log: 'bool'=False, is_target_log: 'bool'=False ): super(KL, self).__init__(reduction='none', log_target=is_target_log) self.is_input_log = is_input_log def forward(self, gt: 'torch.Tensor', pred...
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.optim assert_size_stride = torch._C._dynamo.guards.assert_si...
ai-in-motion/moai
Lambda
false
18,325
[ "Apache-2.0" ]
10
e38cac046c059d2e2331ef4883bbabc5a500a5cf
https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf
GeometryFeature
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data class GeometryFeature(nn.Module): def __init__(self): super(GeometryFeature, self).__init__() def forward(self, z, vnorm, unorm, h, w, ch, cw, fh, fw): x = z * (0.5 * h * (vnorm + 1) - ch) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data assert_size_stride = torch._C._dynamo.guards.asser...
maciej-3/PENet_ICRA2021
GeometryFeature
false
15,986
[ "MIT" ]
155
40b5b20fb5d64455f8964045204fa9e7629d0c8c
https://github.com/maciej-3/PENet_ICRA2021/tree/40b5b20fb5d64455f8964045204fa9e7629d0c8c
outconv
# 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...
AntarSidgi/LiverTumorSegmentation
outconv
false
4,854
[ "MIT" ]
1
9e8b1182541e011dc9f14218276ee9cb736ce479
https://github.com/AntarSidgi/LiverTumorSegmentation/tree/9e8b1182541e011dc9f14218276ee9cb736ce479
learned_similarity_8
# 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....
laurinwagner/grouploss_plus
learned_similarity_8
false
10,369
[ "MIT" ]
0
add9e3e7b4fcfccf0393124aeb6e1f35a442ed88
https://github.com/laurinwagner/grouploss_plus/tree/add9e3e7b4fcfccf0393124aeb6e1f35a442ed88
SoftMarginTriplet
# 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.nn.modules.loss import _Loss assert_size_stride = torch._C._dynamo.guards.asse...
zhangxinyu-tj/PAST
SoftMarginTriplet
false
16,794
[ "MIT" ]
112
67f1f7a780e869aa7867167538edb03faa96dec5
https://github.com/zhangxinyu-tj/PAST/tree/67f1f7a780e869aa7867167538edb03faa96dec5
Downsample
import torch from torch import Tensor from torch import nn class Downsample(nn.Module): """Downsample transition stage""" def __init__(self, c1, c2): super().__init__() self.proj = nn.Conv2d(c1, c2, 3, 2, 1) def forward(self, x: 'Tensor') ->Tensor: x = x.permute(0, 3, 1, 2) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
Genevievekim/segformer
Downsample
false
17,325
[ "MIT" ]
10
4a0800746ade51101ec2573c683b06eccadb9683
https://github.com/Genevievekim/segformer/tree/4a0800746ade51101ec2573c683b06eccadb9683
KopoinANNNetwork
import torch import torch.nn as nn class KopoinANNNetwork(nn.Module): def __init__(self, featShape): super(KopoinANNNetwork, self).__init__() self.featShape = featShape self.act = nn.Sigmoid() self.layer0 = nn.Linear(featShape, featShape // 2) self.layer1 = nn.Linear(featS...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
bmd2007/benchmark_eval
KopoinANNNetwork
false
6,344
[ "MIT" ]
1
aa42bb3369e79db4cb63e1963afcc8af6d8f5696
https://github.com/bmd2007/benchmark_eval/tree/aa42bb3369e79db4cb63e1963afcc8af6d8f5696
GAP1d
import torch from torch import nn import torch.nn.functional class Flatten(nn.Module): def forward(self, x): return x.view(x.size(0), -1) class GAP1d(nn.Module): """Global Adaptive Pooling + Flatten """ def __init__(self, output_size=1): super(GAP1d, self).__init__() self.g...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.nn.functional assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._...
VincentSch4rf/torchtime
GAP1d
false
18,039
[ "Apache-2.0" ]
4
bebd006cd67b31c342e0658285c9771c27411df0
https://github.com/VincentSch4rf/torchtime/tree/bebd006cd67b31c342e0658285c9771c27411df0
GraphConv
# 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 import torch.nn import torch.autograd assert_size_stride = ...
Burningdust21/kaolin
GraphConv
false
13,429
[ "ECL-2.0", "Apache-2.0" ]
3,747
23e8a0fa4e2cb0249cee4c3c0c1ab1f7e6793531
https://github.com/Burningdust21/kaolin/tree/23e8a0fa4e2cb0249cee4c3c0c1ab1f7e6793531
GameNet
# 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.utils.data asser...
DanIulian/minigrid_rl
GameNet
false
346
[ "MIT" ]
0
d7b59fd1d1e62fc99d5134c89f59c6ad16246cfa
https://github.com/DanIulian/minigrid_rl/tree/d7b59fd1d1e62fc99d5134c89f59c6ad16246cfa
WSConv2d
# 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 import torch.utils.data import torch.nn assert_size_stride ...
shimon-c/Machine-Learning-Collection
WSConv2d
false
16,407
[ "MIT" ]
3,094
ac5dcd03a40a08a8af7e1a67ade37f28cf88db43
https://github.com/shimon-c/Machine-Learning-Collection/tree/ac5dcd03a40a08a8af7e1a67ade37f28cf88db43
BertSelfAttention
from _paritybench_helpers import _mock_config import math import torch from torch import nn class BertSelfAttention(nn.Module): def __init__(self, config): super(BertSelfAttention, self).__init__() if config.hidden_size % config.num_attention_heads != 0: raise ValueError( ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
BIT-ENGD/eeqa
BertSelfAttention
false
15,834
[ "MIT" ]
142
2995abbaff1fb47131246a247ee7ed62aa94f4c3
https://github.com/BIT-ENGD/eeqa/tree/2995abbaff1fb47131246a247ee7ed62aa94f4c3
Similarity
import torch import torch.nn as nn class Similarity(nn.Module): """ Dot product or cosine similarity """ def __init__(self, temp): super().__init__() self.temp = temp self.cos = nn.CosineSimilarity(dim=-1) def forward(self, x, y): return self.cos(x, y) / self.temp...
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...
firefighter-eric/SentEmbedding
Similarity
false
10,045
[ "MIT" ]
0
c1ad140c42ef946ac7d155a85581c0cf35871133
https://github.com/firefighter-eric/SentEmbedding/tree/c1ad140c42ef946ac7d155a85581c0cf35871133
SelfAttentionPooling
# 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....
AyushExel/s3prl
SelfAttentionPooling
false
1,995
[ "MIT" ]
0
6531904e9621a778978b9cfef3ba9f582e56639a
https://github.com/AyushExel/s3prl/tree/6531904e9621a778978b9cfef3ba9f582e56639a
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.triton_helpers import libdevice import math import ...
byeongjokim/LateTemporalModeling3DCNN_for_sign
PositionwiseFeedForward
false
1,626
[ "MIT" ]
0
e3a802fcf91dc3930aea782464ee34d9b747d3ab
https://github.com/byeongjokim/LateTemporalModeling3DCNN_for_sign/tree/e3a802fcf91dc3930aea782464ee34d9b747d3ab
InResBlock
import math import torch from torch import nn from torch.nn import functional as F def make_kernel(k): k = torch.tensor(k, dtype=torch.float32) if k.ndim == 1: k = k[None, :] * k[:, None] k /= k.sum() return k def upfirdn2d_native(input, kernel, up_x, up_y, down_x, down_y, pad_x0, pad_x1...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math from to...
ishine/GANsNRoses
InResBlock
false
15,638
[ "MIT" ]
969
414e9e77c3df47d4ecf7941b5dcfdffec67403ee
https://github.com/ishine/GANsNRoses/tree/414e9e77c3df47d4ecf7941b5dcfdffec67403ee
MultiHeadAttention
import math import torch import torch.nn as nn class SelfAttention(nn.Module): def __init__(self, dropout=0.1): super(SelfAttention, self).__init__() self.softmax = nn.Softmax(dim=-1) self._dropout = nn.Dropout(dropout) def forward(self, q, k, v, pad_mask=None): """ :...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.a...
LindgeW/DomainAdaption4DependencyParsing
MultiHeadAttention
false
5,532
[ "Apache-2.0" ]
1
5de136a37d8fe730e4235ed95bf923763fe21ea6
https://github.com/LindgeW/DomainAdaption4DependencyParsing/tree/5de136a37d8fe730e4235ed95bf923763fe21ea6
Conv2dWithConstraint
import torch from torch import nn class Conv2dWithConstraint(nn.Conv2d): def __init__(self, *args, max_norm=1, **kwargs): self.max_norm = max_norm super(Conv2dWithConstraint, self).__init__(*args, **kwargs) def forward(self, x): self.weight.data = torch.renorm(self.weight.data, p=2, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
ErikBjare/braindecode
Conv2dWithConstraint
false
411
[ "BSD-3-Clause" ]
0
d77788d4813d353b65f0bfc61c6129015b0390b4
https://github.com/ErikBjare/braindecode/tree/d77788d4813d353b65f0bfc61c6129015b0390b4
DenseGCNConv
# 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....
CFF-Dream/pytorch_geometric
DenseGCNConv
false
2,059
[ "MIT" ]
0
7c19ad74957409ee9e07314ce81524b3113b9c84
https://github.com/CFF-Dream/pytorch_geometric/tree/7c19ad74957409ee9e07314ce81524b3113b9c84
Discriminator
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
ChenChengKuan/DGI
Discriminator
false
11,296
[ "MIT" ]
0
432bf78418b8dd52648c9cac45e8841bee4c5032
https://github.com/ChenChengKuan/DGI/tree/432bf78418b8dd52648c9cac45e8841bee4c5032
MultiHeadAttn
# 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....
HikariNoMJ14/bebopnet-code
MultiHeadAttn
false
2,366
[ "MIT" ]
0
9dfa800d3e24c53de5dc948b87a7db2bc2919b54
https://github.com/HikariNoMJ14/bebopnet-code/tree/9dfa800d3e24c53de5dc948b87a7db2bc2919b54
WeightedFeatureFusion
# 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 torchvision.models.resnet import * import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_si...
PanJason/ML_Proj
WeightedFeatureFusion
false
17,898
[ "MIT" ]
4
663be12e8eb6e30e3c902a4984ac0db33bfce605
https://github.com/PanJason/ML_Proj/tree/663be12e8eb6e30e3c902a4984ac0db33bfce605
Brain
import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions import Categorical class Replay: def __init__(self): self.hidden0 = None self.states = [] self.actions = [] self.rewards = [] self.is_terminal = False self.iter = 0 ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
anhddo/ai-arena
Brain
false
1,452
[ "MIT" ]
0
bc881e83073be4f9130b1a50fa56a51c11d21f9f
https://github.com/anhddo/ai-arena/tree/bc881e83073be4f9130b1a50fa56a51c11d21f9f
RSubFloat
# 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
RSubFloat
false
14,211
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
MinibatchStdDev
import torch import torch.nn as nn class MinibatchStdDev(nn.Module): """ Minibatch standard deviation layer for the discriminator """ def __init__(self): """ derived class constructor """ super().__init__() def forward(self, x, alpha=1e-08): """ fo...
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_...
zd-daniel/GANs-ZOO
MinibatchStdDev
false
4,650
[ "MIT" ]
0
fe72391e1db46616f97d1dec62441a299aa9c636
https://github.com/zd-daniel/GANs-ZOO/tree/fe72391e1db46616f97d1dec62441a299aa9c636
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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
csk7/CS550-NLP-McGill-
Linear
false
9,959
[ "MIT" ]
0
a6f295b88539015d8accdbd410357c42df7c4287
https://github.com/csk7/CS550-NLP-McGill-/tree/a6f295b88539015d8accdbd410357c42df7c4287
GELU
import torch import torch.nn as nn class GELU(nn.Module): def __init__(self): super(GELU, self).__init__() def forward(self, x): return torch.sigmoid(1.702 * x) * x def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
awgansekoele/outlier-exposure
GELU
false
1,500
[ "Apache-2.0" ]
0
9557c7915fa466fc54951357519cfba27f7659ad
https://github.com/awgansekoele/outlier-exposure/tree/9557c7915fa466fc54951357519cfba27f7659ad
AsymmetricLossMultiLabel
import torch import torch.nn as nn import torch.utils.data import torch.nn.parallel from torch import optim as optim class AsymmetricLossMultiLabel(nn.Module): def __init__(self, gamma_neg=4, gamma_pos=1, clip=0.05, eps=1e-08, disable_torch_grad_focal_loss=False): super(AsymmetricLossMultiLabel, ...
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...
DifferentSC/pytorch-image-models
AsymmetricLossMultiLabel
false
11,344
[ "Apache-2.0" ]
0
ccfb5751abc70d80add4f197464190c4a2637c6c
https://github.com/DifferentSC/pytorch-image-models/tree/ccfb5751abc70d80add4f197464190c4a2637c6c
MetaAconC
import torch import torch.nn as nn class MetaAconC(nn.Module): """ ACON activation (activate or not). MetaAconC: (p1*x-p2*x) * sigmoid(beta*(p1*x-p2*x)) + p2*x, beta is generated by a small network according to "Activate or Not: Learning Customized Activation" <https://arxiv.org/pdf/2009.04759.pdf>. "...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
cuiboyuan/plato
MetaAconC
false
15,094
[ "Apache-2.0" ]
135
260b785cbbf8588c92331d6343211ff72321f90e
https://github.com/cuiboyuan/plato/tree/260b785cbbf8588c92331d6343211ff72321f90e
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....
memesoo99/AdelaiDet
folder
false
12,767
[ "BSD-2-Clause" ]
0
1e9cdfee3d1c35dcb6b4e04fdcc966115f34c71f
https://github.com/memesoo99/AdelaiDet/tree/1e9cdfee3d1c35dcb6b4e04fdcc966115f34c71f
MyUpsample2
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data.distributed class MyUpsample2(nn.Module): def forward(self, x): return x[:, :, :, None, :, None].expand(-1, -1, -1, 2, -1, 2).reshape(x .size(0), x.size(1), x.size(2) * 2, x.size(3) * 2) 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 import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data.distributed assert_size_stride = torch._C._dynamo....
TransformersWsz/onestage_grounding
MyUpsample2
false
2,904
[ "MIT" ]
0
c939a7d5d7c7f9e1bfa8df2e6269397b8f840b5a
https://github.com/TransformersWsz/onestage_grounding/tree/c939a7d5d7c7f9e1bfa8df2e6269397b8f840b5a
BertPooler
# 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 ...
AlanFokCo/bert-chinese-horovod-elastic
BertPooler
false
7,476
[ "Apache-2.0" ]
1
02317d0857e0e8e313dd63ead61ca9996b25548e
https://github.com/AlanFokCo/bert-chinese-horovod-elastic/tree/02317d0857e0e8e313dd63ead61ca9996b25548e
Attn
import torch import torch.nn.functional as F from torch import nn class Attn(nn.Module): def __init__(self, hidden_size): super().__init__() self.hidden_size = hidden_size self.attn = nn.Linear(self.hidden_size * 2, hidden_size) self.v = nn.Linear(hidden_size, 1, bias=False) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
gusalsdmlwlq/DAMD
Attn
false
12,474
[ "Apache-2.0" ]
0
e98feaf5d9f251132e655bbc5fdb2c080cbed90e
https://github.com/gusalsdmlwlq/DAMD/tree/e98feaf5d9f251132e655bbc5fdb2c080cbed90e
FreqUpsample
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
Rikorose/DeepFilterNet
FreqUpsample
false
14,306
[ "ECL-2.0", "Apache-2.0", "MIT" ]
54
afe6bfb53efae70207e18df7ed372c2cfe337fee
https://github.com/Rikorose/DeepFilterNet/tree/afe6bfb53efae70207e18df7ed372c2cfe337fee
Policy
import torch import torch.nn as nn import torch.nn.functional as F from functools import * class Policy(nn.Module): def __init__(self): super(Policy, self).__init__() self.affine1 = nn.Linear(4, 128) self.dropout = nn.Dropout(p=0.6) self.affine2 = nn.Linear(128, 2) self.sa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
AJSVB/GPBT
Policy
false
2,082
[ "MIT" ]
0
746c11d06ecc4c3b62fc0a3290d672d336cbb11e
https://github.com/AJSVB/GPBT/tree/746c11d06ecc4c3b62fc0a3290d672d336cbb11e
Attn
# 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....
stillarrow/NRT-Lite
Attn
false
4,389
[ "MIT" ]
0
ba0f091ebfeae19325ce713e11bc426ff63402cd
https://github.com/stillarrow/NRT-Lite/tree/ba0f091ebfeae19325ce713e11bc426ff63402cd
TSA_Fusion
# 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.utils.data impor...
sutkarsh/EDVR
TSA_Fusion
false
4,467
[ "Apache-2.0" ]
0
cd9f2d46edbb00333d8ffb31aebc52cfbda4b6e3
https://github.com/sutkarsh/EDVR/tree/cd9f2d46edbb00333d8ffb31aebc52cfbda4b6e3
MessageNorm
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch.nn import Paramet...
camus1337/pytorch_geometric
MessageNorm
false
6,379
[ "MIT" ]
1
38514197a327541eb47abb69d4ab224910852605
https://github.com/camus1337/pytorch_geometric/tree/38514197a327541eb47abb69d4ab224910852605
LeCunTanh
import torch import torch.nn as nn class LeCunTanh(nn.Module): def forward(self, x): return 1.7159 * torch.tanh(2.0 / 3 * x) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
awlange/pysurvival
LeCunTanh
false
14,924
[ "Apache-2.0" ]
242
841b9bc6ce700ba8898d2a1488aa9cd25ee7a8e6
https://github.com/awlange/pysurvival/tree/841b9bc6ce700ba8898d2a1488aa9cd25ee7a8e6
GatedLinear
import torch import torch.nn as nn import torch.utils.data class GatedLinear(nn.Module): def __init__(self, in_features, out_features): super(GatedLinear, self).__init__() self.layer_f = nn.Linear(in_features, out_features) self.layer_g = nn.Linear(in_features, out_features) def forw...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
D-hash-code/ffjord
GatedLinear
false
11,360
[ "MIT" ]
0
3647ab35537a8bac3b4dc1e45a593819ac8e2c18
https://github.com/D-hash-code/ffjord/tree/3647ab35537a8bac3b4dc1e45a593819ac8e2c18
UnfoldTemporalWindows
import torch import torch.nn as nn class UnfoldTemporalWindows(nn.Module): def __init__(self, window_size, window_stride, window_dilation=1): super().__init__() self.window_size = window_size self.window_stride = window_stride self.window_dilation = window_dilation self.pa...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
Siujohnjai/MS-G3D
UnfoldTemporalWindows
false
11,876
[ "MIT" ]
0
615b1002ba1780f6d1fc4f7b93c9525c07aeed6a
https://github.com/Siujohnjai/MS-G3D/tree/615b1002ba1780f6d1fc4f7b93c9525c07aeed6a
AttentiveTrans2d
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data class AttentiveTrans2d(nn.Module): def __init__(self, num_features, hidden_channels=32): super(AttentiveTrans2d, self).__init__() self.avgpool = nn.AdaptiveAvgPool2d(1) self.smooth_gamma = 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.triton_helpers import libdevice import torch.nn as ...
ppomelo/Attentive-Transformation-Based-Normalization
AttentiveTrans2d
false
4,138
[ "Apache-2.0" ]
0
62ad02eb025613e90f4fe0e0a9f0f85839e53092
https://github.com/ppomelo/Attentive-Transformation-Based-Normalization/tree/62ad02eb025613e90f4fe0e0a9f0f85839e53092
AttentionModule
from _paritybench_helpers import _mock_config import torch class AttentionModule(torch.nn.Module): """ SimGNN Attention Module to make a pass on graph. """ def __init__(self, args): """ :param args: Arguments object. """ super(AttentionModule, 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.triton_helpers import libdevice assert_size_stride ...
cloudcjf/SG_PR
AttentionModule
false
15,043
[ "MIT" ]
105
1339d00811ea3c4c18963efa24bf6fc778e15794
https://github.com/cloudcjf/SG_PR/tree/1339d00811ea3c4c18963efa24bf6fc778e15794
Critic
import torch import torch as t import torch.nn as nn class Critic(nn.Module): def __init__(self, state_dim): super().__init__() self.fc1 = nn.Linear(state_dim, 32) self.fc2 = nn.Linear(32, 32) self.fc3 = nn.Linear(32, 1) def forward(self, state): v = t.relu(self.fc1(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_...
iffiX/machin
Critic
false
15,599
[ "MIT" ]
287
7fa986b1bafdefff117d6ff73d14644a5488de9d
https://github.com/iffiX/machin/tree/7fa986b1bafdefff117d6ff73d14644a5488de9d
DeltaGFit
import torch from scipy import constants import torch.nn as nn import torch as t class DeltaGFit(nn.Module): def __init__(self, deltaG): super(DeltaGFit, self).__init__() self.deltaG = deltaG def forward(self, temperature, X, k_int, timepoints): """ # inputs, list of: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
sebaztiano/PyHDX
DeltaGFit
false
10,749
[ "MIT" ]
0
12fc2b5f67200885706226823bd8e1f46e3b5db1
https://github.com/sebaztiano/PyHDX/tree/12fc2b5f67200885706226823bd8e1f46e3b5db1
VAELoss
import torch import torch.nn as nn class VAELoss(nn.Module): def __init__(self): super(VAELoss, self).__init__() self.bce = nn.BCELoss(reduction='sum') def forward(self, recon_x, x, mu, logvar): BCE = self.bce(recon_x, x) KLD = -0.5 * torch.sum(1 + logvar - mu.pow(2) - logvar...
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...
jlrussin/RL_project
VAELoss
false
10,275
[ "Apache-2.0" ]
0
a8562b4797afdf5944dba768a88d779056e8506a
https://github.com/jlrussin/RL_project/tree/a8562b4797afdf5944dba768a88d779056e8506a
GeneralizedMeanPooling
# 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 libdevice, math as tl_math from torch ...
YuxinZou/mmclassification
GeneralizedMeanPooling
false
14,722
[ "Apache-2.0" ]
1,190
2037260ea6c98a3b115e97727e1151a1c2c32f7a
https://github.com/YuxinZou/mmclassification/tree/2037260ea6c98a3b115e97727e1151a1c2c32f7a
Sine
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
HexagonPrime/pixel-nerf
Sine
false
2,415
[ "BSD-2-Clause" ]
0
298aa7a3451c01e6f19f73f0c756672d3de54bf9
https://github.com/HexagonPrime/pixel-nerf/tree/298aa7a3451c01e6f19f73f0c756672d3de54bf9
SoftExp
# 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 ...
jpeg729/pytorch-bits
SoftExp
false
15,743
[ "MIT" ]
73
5d107094042c27472dfb7dee77506b603f5d3e45
https://github.com/jpeg729/pytorch-bits/tree/5d107094042c27472dfb7dee77506b603f5d3e45
OutPutBlock
# 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.functional assert_size_stride = torch._C._...
timothytancy/SSL4MIS
OutPutBlock
false
13,036
[ "MIT" ]
0
7879ad3483223e31a2785f5112eac1d4fa36b66e
https://github.com/timothytancy/SSL4MIS/tree/7879ad3483223e31a2785f5112eac1d4fa36b66e
SemanticComposite
# 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....
Ambitioner-c/MatchZoo-py
SemanticComposite
false
13,272
[ "Apache-2.0" ]
468
bb088edce8e01c2c2326ca1a8ac647f0d23f088d
https://github.com/Ambitioner-c/MatchZoo-py/tree/bb088edce8e01c2c2326ca1a8ac647f0d23f088d