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
ScaledDotProductAttention
import torch import torch.nn as nn import torch.nn.functional as F class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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
ScaledDotProductAttention
false
7,807
[ "MIT" ]
27
16fb37d81c5b1182a31fcf7da08a9c0013b20cd6
https://github.com/BlackNoodle/TUCORE-GCN/tree/16fb37d81c5b1182a31fcf7da08a9c0013b20cd6
Normalize
# 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 assert_size_stride = torch._...
Tomoya-K-0504/deepSELF
Normalize
false
5,903
[ "MIT" ]
1
0e5a7d0169b3e9edcb5c8d9802140a84ce5cb69a
https://github.com/Tomoya-K-0504/deepSELF/tree/0e5a7d0169b3e9edcb5c8d9802140a84ce5cb69a
FusedConvBN
import math import torch import torch.nn as nn import torch.nn.functional as F import torch.quantization import torch.onnx import torchaudio.functional as F import torch.nn.parallel import torch.utils.data from torch.functional import F import torch.fx import torch.nn import torch.optim import torch.profiler def unsq...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
youkaichao/tutorials
FusedConvBN
false
13,202
[ "BSD-3-Clause" ]
0
af34b10b70d99659eb016a2a1d5c31b9ae8ba3da
https://github.com/youkaichao/tutorials/tree/af34b10b70d99659eb016a2a1d5c31b9ae8ba3da
h_sigmoid
import torch import torch.nn as nn from itertools import product as product import torch.nn.parallel import torch.utils.data class h_sigmoid(nn.Module): def __init__(self, inplace=True): super(h_sigmoid, self).__init__() self.relu = nn.ReLU6(inplace=inplace) def forward(self, x): ret...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from itertools import product as product import torch.nn.parallel i...
DefTruth/PIPNet
h_sigmoid
false
13,578
[ "MIT" ]
162
a1fb1e229319dac0069e37eb8fb4278d454edbb0
https://github.com/DefTruth/PIPNet/tree/a1fb1e229319dac0069e37eb8fb4278d454edbb0
KLNormal
# 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 import torch.utils.data import torch.utils.data.dis...
kayburns/craftassist
KLNormal
false
3,806
[ "MIT" ]
0
07909493d320afc2c9ff428d0891bc3acd4dc68f
https://github.com/kayburns/craftassist/tree/07909493d320afc2c9ff428d0891bc3acd4dc68f
Critic
import torch import torch.nn as nn import torch.nn.functional as F class Critic(nn.Module): def __init__(self, state_dim, action_dim): super(Critic, self).__init__() self.l1 = nn.Linear(state_dim + action_dim, 256) self.l2 = nn.Linear(256, 256) self.l3 = nn.Linear(256, 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 import ...
Kelym/TD3
Critic
false
9,194
[ "MIT" ]
0
ea565c9d6f74aeb47b096538274cbd5ffc657de5
https://github.com/Kelym/TD3/tree/ea565c9d6f74aeb47b096538274cbd5ffc657de5
Maximum
# 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 as th import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.ass...
HKUST-KnowComp/DualMessagePassing
Maximum
false
8,195
[ "MIT" ]
12
d29d627be2a8c8f24b52e3db2c383e33a059aaa7
https://github.com/HKUST-KnowComp/DualMessagePassing/tree/d29d627be2a8c8f24b52e3db2c383e33a059aaa7
MultiHeadedAttention
import math import torch from torch import Tensor import torch.nn as nn class MultiHeadedAttention(nn.Module): """ Multi-Head Attention module from "Attention is All You Need" Implementation modified from OpenNMT-py. https://github.com/OpenNMT/OpenNMT-py """ def __init__(self, num_heads: 'in...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Tim-blo/ACTOR
MultiHeadedAttention
false
2,907
[ "MIT" ]
0
f10d7534a34fa557ab6b1739217649ae4f654505
https://github.com/Tim-blo/ACTOR/tree/f10d7534a34fa557ab6b1739217649ae4f654505
BertOutput
# 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 ...
Elvisambition/bert_seq2seq
BertOutput
false
7,617
[ "Apache-2.0" ]
1
643ac537c16872f0d13200de06001d8201a54fbb
https://github.com/Elvisambition/bert_seq2seq/tree/643ac537c16872f0d13200de06001d8201a54fbb
MemoryUpdater
from _paritybench_helpers import _mock_config import math import torch import torch.utils.data import torch.nn as nn import torch import torch.nn.parallel class BertSelfAttention(nn.Module): def __init__(self, config): super(BertSelfAttention, self).__init__() if config.hidden_size % config.num_a...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
adymaharana/VLCStoryGan
MemoryUpdater
false
18,286
[ "MIT" ]
10
74112404689e8144c2ed2d375e1e5a1cde09debb
https://github.com/adymaharana/VLCStoryGan/tree/74112404689e8144c2ed2d375e1e5a1cde09debb
ConcatFusionLayer
import torch import torch.nn as nn import torch.nn.functional as F class ConcatFusionLayer(nn.Module): def __init__(self, dim_model, voc_size, dout_p): super(ConcatFusionLayer, self).__init__() self.linear = nn.Linear(dim_model, voc_size) self.dropout = nn.Dropout(dout_p) self.lin...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
KirkGuo/HCN
ConcatFusionLayer
false
5,441
[ "MIT" ]
1
7d8020c8d76413b6ca3a359fb2e9b34652949e17
https://github.com/KirkGuo/HCN/tree/7d8020c8d76413b6ca3a359fb2e9b34652949e17
FFModule
import torch import torch.nn as nn class FFModule(nn.Module): """Feed-forward module default output dimension = idim x0 -> LayerNorm -> FC -> Swish -> Dropout -> FC -> Dropout -> x1 x0 + res_factor * x1 -> output """ def __init__(self, idim: 'int', res_factor: 'float'=0.5, dropout: '...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
maxwellzh/CAT
FFModule
false
16,057
[ "Apache-2.0" ]
237
b1a9c3f95e84d968593a05bf8b176b5f77b8055e
https://github.com/maxwellzh/CAT/tree/b1a9c3f95e84d968593a05bf8b176b5f77b8055e
L2N
import torch from torch import nn import torch.autograd def l2n(x, eps=1e-06): return x / (torch.norm(x, p=2, dim=1, keepdim=True) + eps).expand_as(x) class L2N(nn.Module): def __init__(self, eps=1e-06): super(L2N, self).__init__() self.eps = eps def forward(self, x): return l2...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn import torch.autograd assert_size_stride = torch._C._dynam...
bestfitting/instance_level_recognition
L2N
false
14,942
[ "Apache-2.0" ]
103
683f021b4e65876835f028797ec28b0d1071bb45
https://github.com/bestfitting/instance_level_recognition/tree/683f021b4e65876835f028797ec28b0d1071bb45
DownConv
import torch import torch.nn as nn import torch.nn.functional as F def conv3x3(in_channels, out_channels, stride=1, padding=1, bias=True, groups=1 ): return nn.Conv2d(in_channels, out_channels, kernel_size=3, stride= stride, padding=padding, bias=bias, groups=groups) class DownConv(nn.Module): "...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
duchn92/transfer-object
DownConv
false
15,251
[ "MIT" ]
80
4db96931545ac0d28891375fbca3c0a5a382fb32
https://github.com/duchn92/transfer-object/tree/4db96931545ac0d28891375fbca3c0a5a382fb32
_Hsigmoid
# 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...
hzwangjl/Lightweight-Segmentation
_Hsigmoid
false
12,705
[ "Apache-2.0" ]
0
3a476719bdfee653ac1e1617c22714b7ee932cef
https://github.com/hzwangjl/Lightweight-Segmentation/tree/3a476719bdfee653ac1e1617c22714b7ee932cef
Reshape
import torch class Reshape(torch.nn.Module): """ Reshaping layer """ def __init__(self, shapes1, shapes2): super(Reshape, self).__init__() self.shapes = shapes1, shapes2 def forward(self, tensor): return torch.reshape(tensor.clone(), (tensor.shape[0], self.shapes[ ...
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...
NGoetz/NF
Reshape
false
5,625
[ "MIT" ]
1
935886db48f4675db1a2c42f7c264b12d5014ed8
https://github.com/NGoetz/NF/tree/935886db48f4675db1a2c42f7c264b12d5014ed8
WeightedBinaryCrossEntropyLoss
# 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...
blakechen97/SASA
WeightedBinaryCrossEntropyLoss
false
14,964
[ "Apache-2.0" ]
46
cd79f60e923242590b64cb0cc70203a524e7e9a7
https://github.com/blakechen97/SASA/tree/cd79f60e923242590b64cb0cc70203a524e7e9a7
SEModule
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn import Module i...
BillKerman/FaceNetCustomized
SEModule
false
17,003
[ "MIT" ]
4
30bb99b62f960034c4aa4206d7dc22de672a997f
https://github.com/BillKerman/FaceNetCustomized/tree/30bb99b62f960034c4aa4206d7dc22de672a997f
FFN
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class FC(nn.Module): def __init__(self, in_size, out_size, dropout_rate=0.0, use_relu=True): super(FC, self).__init__() self.dropout_r = dropout_rate self.use_relu = use_relu self.linear = nn.Linear(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 import torch.nn as nn assert_...
Originofamonia/mcan-vqa
FFN
false
4,558
[ "Apache-2.0" ]
0
e7e9fdc654d72dbbcbc03e43ae8a59c16b6d10d1
https://github.com/Originofamonia/mcan-vqa/tree/e7e9fdc654d72dbbcbc03e43ae8a59c16b6d10d1
BinaryLinear
# 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....
uzair789/pytorch-retinanet
BinaryLinear
false
10,961
[ "Apache-2.0" ]
0
cabac159a9877825ef04ab06d3b9a63bdfa4f306
https://github.com/uzair789/pytorch-retinanet/tree/cabac159a9877825ef04ab06d3b9a63bdfa4f306
SetConv
# 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_...
danield137/deep_query_optimzation
SetConv
false
1,790
[ "MIT" ]
0
01a25c966338007f15d14dea1b37e388e47bcfe3
https://github.com/danield137/deep_query_optimzation/tree/01a25c966338007f15d14dea1b37e388e47bcfe3
FrequencyLoss
# 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...
vztu/DebandingNet
FrequencyLoss
false
4,515
[ "MIT" ]
0
4af8e83ffbfc70dc220dd6fea2827fb75796f10c
https://github.com/vztu/DebandingNet/tree/4af8e83ffbfc70dc220dd6fea2827fb75796f10c
TorchAdd
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data class TorchAdd(nn.Module): """ TorchAdd Module. """ def forward(self, input_list): return input_list[0] + input_list[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 import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data assert_size_stride = torch._C._dynamo.guards.asser...
savan77/nni
TorchAdd
false
4,279
[ "MIT" ]
0
510213393d9cae58c5a8cccd21f322f7bba4e0cf
https://github.com/savan77/nni/tree/510213393d9cae58c5a8cccd21f322f7bba4e0cf
AdditiveAttention
# 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....
Janelovelzy/NewsRecommendation
AdditiveAttention
false
640
[ "MIT" ]
0
bd2d70e828ffa66ea4cbbd3c6ac09f14e7f0179b
https://github.com/Janelovelzy/NewsRecommendation/tree/bd2d70e828ffa66ea4cbbd3c6ac09f14e7f0179b
DiceLossV1
import torch from torch import nn class DiceLossV1(nn.Module): def __init__(self, reduction='mean', epsilon=1e-09): """【ERROR, 不收敛-原因未知】Dice-Loss, 切块损失, 用于不均衡数据, 但是收敛困难 paper: Dice Loss for Data-imbalanced NLP Tasks url: https://arxiv.org/pdf/1911.02855.pdf args: reduc...
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...
dumpmemory/Pytorch-NLU
DiceLossV1
false
15,248
[ "Apache-2.0" ]
115
864fb9acc7751fc51abd3d05d24b5a9a7eab7110
https://github.com/dumpmemory/Pytorch-NLU/tree/864fb9acc7751fc51abd3d05d24b5a9a7eab7110
FixupBasicBlock
import torch import torch.nn as nn def conv3x3(in_planes, out_planes, stride=1): """3x3 convolution with padding""" return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False) class FixupBasicBlock(nn.Module): expansion = 1 def __init__(self, inplanes, plane...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
IlanPrice/DCTpS
FixupBasicBlock
false
8,321
[ "MIT" ]
12
e3219ac132959f484724e0d0bd48a0cb8af3d0fa
https://github.com/IlanPrice/DCTpS/tree/e3219ac132959f484724e0d0bd48a0cb8af3d0fa
CrossEntropyLossOneHot
import torch from torch import nn class CrossEntropyLossOneHot(nn.Module): def __init__(self): super(CrossEntropyLossOneHot, self).__init__() self.soft_max = nn.LogSoftmax(dim=-1) self.nll_loss = nn.NLLLoss() def forward(self, preds, labels): """ preds: [batch_size, l...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
ChrisZhangcx/reproduce_elliptic
CrossEntropyLossOneHot
false
5,009
[ "MIT" ]
1
b5297456376aa944c9b17bb2394407ec482e1bb2
https://github.com/ChrisZhangcx/reproduce_elliptic/tree/b5297456376aa944c9b17bb2394407ec482e1bb2
GlobalMaxPool1d
import torch from torch import nn class GlobalMaxPool1d(nn.Module): """Performs global max pooling over the entire length of a batched 1D tensor # Arguments input: Input tensor """ def forward(self, input): return nn.functional.max_pool1d(input, kernel_size=input.size()[2:] ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
Shadowalker1995/few-shot
GlobalMaxPool1d
false
9,437
[ "MIT" ]
0
68026f4d5d092b9cb7cc3b50ba8d28ca1b70ade9
https://github.com/Shadowalker1995/few-shot/tree/68026f4d5d092b9cb7cc3b50ba8d28ca1b70ade9
neuralNet
# 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_...
ayushmaan02/Plant-Disease-Detection
neuralNet
false
3,173
[ "MIT" ]
0
35e5b8112e933fd558a80a1e5350df541c29bd6b
https://github.com/ayushmaan02/Plant-Disease-Detection/tree/35e5b8112e933fd558a80a1e5350df541c29bd6b
BinaryLoss
import functools import torch import torch.nn.functional as F import torch.nn as nn import torch._C import torch.serialization def binary_ce_loss(pred, label, **kwargs): loss = F.binary_cross_entropy(pred, label, reduction='none') loss = torch.mean(loss, dim=(1, 2)) return loss def reduce_loss(loss, red...
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 func...
puzzledsky/mmsegmentation-lesion
BinaryLoss
false
10,656
[ "Apache-2.0" ]
0
522efceab6735dfec13acf6f45dc6bfdb35cfd60
https://github.com/puzzledsky/mmsegmentation-lesion/tree/522efceab6735dfec13acf6f45dc6bfdb35cfd60
UpSample
# 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_...
kimtaehyeong/msnnff
UpSample
false
12,680
[ "MIT" ]
0
75586be601bbdbfafcdf4038bc08f239e119b417
https://github.com/kimtaehyeong/msnnff/tree/75586be601bbdbfafcdf4038bc08f239e119b417
SSD512
# 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....
doduythao/ssd
SSD512
false
13,234
[ "MIT" ]
0
170064a3edef05d3274b08ea7f622eb3238b5c5c
https://github.com/doduythao/ssd/tree/170064a3edef05d3274b08ea7f622eb3238b5c5c
WavePool
# 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 import numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
noapadan/WCT2
WavePool
false
12,840
[ "MIT" ]
0
56c819bebb9f023e9eb8603f1f56a37650231730
https://github.com/noapadan/WCT2/tree/56c819bebb9f023e9eb8603f1f56a37650231730
CRF
import torch from torch import nn class CRF(nn.Module): def __init__(self, num_nodes, iteration=10): """Initialize the CRF module Args: num_nodes: int, number of nodes/patches within the fully CRF iteration: int, number of mean field iterations, e.g. 10 """ ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
dradientgescent/NCRF
CRF
false
1,879
[ "Apache-2.0" ]
0
21e95c0e0f965de2b1daa2d446306052b3703b6a
https://github.com/dradientgescent/NCRF/tree/21e95c0e0f965de2b1daa2d446306052b3703b6a
ConvMlp
# 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...
SimonCqk/towhee
ConvMlp
false
9,629
[ "Apache-2.0" ]
0
a187833b1411216106a80a71e6f2c6e68e1be330
https://github.com/SimonCqk/towhee/tree/a187833b1411216106a80a71e6f2c6e68e1be330
MaskL1Loss
import torch from torch import nn class MaskL1Loss(nn.Module): def __init__(self, eps=1e-06): super(MaskL1Loss, self).__init__() self.eps = eps def forward(self, pred: 'torch.Tensor', gt, mask): loss = (torch.abs(pred - gt) * mask).sum() / (mask.sum() + self.eps) return 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 from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
Vivianyzw/Dual.DBNet.pytorch
MaskL1Loss
false
1,179
[ "Apache-2.0", "MIT" ]
0
19d823ed7c05076c087a3f7ad1127c71c1c0d692
https://github.com/Vivianyzw/Dual.DBNet.pytorch/tree/19d823ed7c05076c087a3f7ad1127c71c1c0d692
SelfAttention_naive
# 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....
insop/transformer_simple
SelfAttention_naive
false
6,884
[ "Apache-2.0" ]
1
d07e6c3b9ddc9687d332ac3a980bbce22880ad46
https://github.com/insop/transformer_simple/tree/d07e6c3b9ddc9687d332ac3a980bbce22880ad46
TverskyLoss
# 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...
ivadomed-profile-analysis-project/ivadomed
TverskyLoss
false
15,652
[ "MIT" ]
87
3b53e2cb2b210511943da439401e2471fd387876
https://github.com/ivadomed-profile-analysis-project/ivadomed/tree/3b53e2cb2b210511943da439401e2471fd387876
ChannelPool
import torch import torch.nn as nn import torch._C import torch.serialization class ChannelPool(nn.Module): def forward(self, x): channel_out = torch.cat((torch.max(x, 1)[0].unsqueeze(1), torch. mean(x, 1).unsqueeze(1)), dim=1) return channel_out def get_inputs(): return [torch....
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch._C import torch.serialization assert_size_stride = tor...
pprp/mmsegmentation
ChannelPool
false
12,902
[ "Apache-2.0" ]
0
5d615401358dea2d6527a033bef505a9c7e0f034
https://github.com/pprp/mmsegmentation/tree/5d615401358dea2d6527a033bef505a9c7e0f034
GCN
from torch.nn import Module import torch import torch.nn as nn from torch.nn.modules.module import Module import torch.nn.functional as F class GraphConvolution(Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907 """ def __init__(self, in_features, out_features, 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._inductor.runtime import triton_helpers from torch.nn import Module i...
wangzefan666/pygcn
GCN
false
13,089
[ "MIT" ]
0
2a5e4f299e3c9d3eafe3014622e8ec3742ba365c
https://github.com/wangzefan666/pygcn/tree/2a5e4f299e3c9d3eafe3014622e8ec3742ba365c
InputInjection
# 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 import torch._C import torch.serialization assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strid...
Jun-jieChen/real-time-segmentation
InputInjection
false
5,415
[ "Apache-2.0" ]
1
22d0cb1a8a0dfa3b38f25bcd05db15f345be291a
https://github.com/Jun-jieChen/real-time-segmentation/tree/22d0cb1a8a0dfa3b38f25bcd05db15f345be291a
Net
import torch import torch.fft import torch.nn.functional as torchf class Net(torch.nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = torch.nn.Conv2d(2, 4, 3, padding=1) self.conv2 = torch.nn.Conv2d(4, 4, 3, padding=1) self.conv3 = torch.nn.Conv2d(4, 2, 3, pa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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.fft assert_size_...
Sh0cktr4p/PhiFlow
Net
false
9,433
[ "MIT" ]
0
cc87c5887bc3abfa1ef3c03252122a06e9fd2c18
https://github.com/Sh0cktr4p/PhiFlow/tree/cc87c5887bc3abfa1ef3c03252122a06e9fd2c18
MultiHeadedAttention
import math import torch from torch import Tensor import torch.nn as nn class MultiHeadedAttention(nn.Module): """ Multi-Head Attention module from "Attention is All You Need" Implementation modified from OpenNMT-py. https://github.com/OpenNMT/OpenNMT-py """ def __init__(self, num_heads: 'in...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ClementNguyen/slt
MultiHeadedAttention
false
307
[ "Apache-2.0" ]
0
20ee90349d1ed0655b99612ffcfae6d079116db6
https://github.com/ClementNguyen/slt/tree/20ee90349d1ed0655b99612ffcfae6d079116db6
TLU
import torch from torch import nn from torch.nn import Parameter from torch.nn.parameter import Parameter class TLU(nn.Module): def __init__(self, num_features): """max(y, tau) = max(y - tau, 0) + tau = ReLU(y - tau) + tau""" super(TLU, self).__init__() self.num_features = num_features ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn from torch.nn import Parameter from torch.nn.parameter import Parame...
asvk/fast-reid
TLU
false
14,909
[ "Apache-2.0" ]
71
cf246e9bee5b5e5d154de98ba0395b7a5d0d0ab7
https://github.com/asvk/fast-reid/tree/cf246e9bee5b5e5d154de98ba0395b7a5d0d0ab7
GHMC
# 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 ...
AlphaLFC/mmdetection
GHMC
false
4,849
[ "Apache-2.0" ]
1
45619c5b8aca0ca3e6ddc211210a8946c94694d8
https://github.com/AlphaLFC/mmdetection/tree/45619c5b8aca0ca3e6ddc211210a8946c94694d8
Baseline
# 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_...
nyu-dl/MultimodalGame
Baseline
false
16,199
[ "BSD-3-Clause" ]
54
0782a7bf3cf5125cd7c35a243e97f0e9e016fca3
https://github.com/nyu-dl/MultimodalGame/tree/0782a7bf3cf5125cd7c35a243e97f0e9e016fca3
GatedConv2d
import torch from torch import nn from torch.nn import functional as F class GatedConv2d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride, padding, dilation=1): super(GatedConv2d, self).__init__() self.conv = nn.Conv2d(in_channels, 2 * out_channels, kernel_siz...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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...
JamesRitchie/nsf
GatedConv2d
false
5,382
[ "MIT" ]
1
5628a6f8190c9e3840208da8baf5cf403ca9b892
https://github.com/JamesRitchie/nsf/tree/5628a6f8190c9e3840208da8baf5cf403ca9b892
BatchSpectralShrinkage
import torch import torch.nn as nn import torch.utils.data class BatchSpectralShrinkage(nn.Module): """ The regularization term in `Catastrophic Forgetting Meets Negative Transfer: Batch Spectral Shrinkage for Safe Transfer Learning (NIPS 2019) <https://proceedings.neurips.cc/paper/2019/file/c6bff625bdb03...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
Neronjust2017/TransferBed
BatchSpectralShrinkage
false
5,680
[ "MIT" ]
1
eaa703a4bc10eaf6216fe1394cd272f6e75489e2
https://github.com/Neronjust2017/TransferBed/tree/eaa703a4bc10eaf6216fe1394cd272f6e75489e2
SoftDetectionModule
import torch import torch.nn.functional as F import torch.nn as nn class SoftDetectionModule(nn.Module): def __init__(self, soft_local_max_size=3): super(SoftDetectionModule, self).__init__() self.soft_local_max_size = soft_local_max_size self.pad = self.soft_local_max_size // 2 def ...
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 ...
UditSinghParihar/d2-net
SoftDetectionModule
false
18,027
[ "BSD-3-Clause-Clear" ]
6
b3592beebe6759cf4cc1acdfd23d603ef059ef30
https://github.com/UditSinghParihar/d2-net/tree/b3592beebe6759cf4cc1acdfd23d603ef059ef30
ScaleDotProductAttention
import torch import torch.nn.functional as F import torch.nn as nn class ScaleDotProductAttention(nn.Module): def __init__(self, k_dim, dropout=0.1): super(ScaleDotProductAttention, self).__init__() self.scale = 1.0 / k_dim ** 0.5 self.dropout = dropout def forward(self, q, k, v, mas...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
LindgeW/BiaffineNER
ScaleDotProductAttention
false
8,484
[ "Apache-2.0" ]
13
0ae179e9ff731362f6c8ba6d0b24485ad45e8bbf
https://github.com/LindgeW/BiaffineNER/tree/0ae179e9ff731362f6c8ba6d0b24485ad45e8bbf
Word2Vec
# 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....
kfaRabi/NNTI-WS2021-NLP-Project
Word2Vec
false
10,342
[ "MIT" ]
0
9b0d28e64e3abc373e88265e47a4be4503d59a93
https://github.com/kfaRabi/NNTI-WS2021-NLP-Project/tree/9b0d28e64e3abc373e88265e47a4be4503d59a93
JointsMSELoss
# 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 import torch.utils.data import torch.nn.parallel import torch.optim import torch.utils.data.distributed import torch.m...
ankhzaya/HigherHRNet-Human-Pose-Estimation
JointsMSELoss
false
14,861
[ "MIT" ]
775
b4610aecaa5cf3de3cd69bfb13c7c79c8d514c7c
https://github.com/ankhzaya/HigherHRNet-Human-Pose-Estimation/tree/b4610aecaa5cf3de3cd69bfb13c7c79c8d514c7c
NPIArg
import torch import torch.nn as nn import torch.nn.functional as F class NPIArg(nn.Module): def __init__(self, input_dim: 'int', arg_dim: 'int'): super(NPIArg, self).__init__() self.f_arg = nn.Linear(input_dim, arg_dim) def forward(self, x): x = self.f_arg(x) x = F.log_softma...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
nienjiuntai/pytorch-npi
NPIArg
false
4,088
[ "MIT" ]
0
16b413c152dfb7f1506a85997adc10ddc2d9af35
https://github.com/nienjiuntai/pytorch-npi/tree/16b413c152dfb7f1506a85997adc10ddc2d9af35
SelfAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
xlwreally/Graduation-project-ABAE
SelfAttention
false
4,587
[ "MIT" ]
0
7c389acfff0fd207e4588b4333521e2dfbf12ec7
https://github.com/xlwreally/Graduation-project-ABAE/tree/7c389acfff0fd207e4588b4333521e2dfbf12ec7
Critic
# 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_...
KuangenZhang/StructuredRL
Critic
false
5,463
[ "MIT" ]
1
9b05e5034ff0e045aabf83786efb0859f08e989a
https://github.com/KuangenZhang/StructuredRL/tree/9b05e5034ff0e045aabf83786efb0859f08e989a
ListEnvEncoder
# 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....
geektoni/AlphaNPI
ListEnvEncoder
false
3,532
[ "MIT" ]
0
ab48cb9cfb74f3960e264da4f3eb2d6917bfb9c9
https://github.com/geektoni/AlphaNPI/tree/ab48cb9cfb74f3960e264da4f3eb2d6917bfb9c9
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....
rmarcacini/LC-ABSA
Attention
false
7,567
[ "MIT" ]
1
90ae7f41b3766761005caf015292926127fe3949
https://github.com/rmarcacini/LC-ABSA/tree/90ae7f41b3766761005caf015292926127fe3949
TwoWordPSDProbe
import torch import torch.nn as nn class Probe(nn.Module): pass class TwoWordPSDProbe(Probe): """ Computes squared L2 distance after projection by a matrix. For a batch of sentences, computes all n^2 pairs of distances for each sentence in the batch. """ def __init__(self, model_dim, probe_...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
muziyongshixin/pytorch_SSRP
TwoWordPSDProbe
false
7,308
[ "MIT" ]
1
e54b3098927ba2ff16bdc8f64f3a2bf46d1f72c5
https://github.com/muziyongshixin/pytorch_SSRP/tree/e54b3098927ba2ff16bdc8f64f3a2bf46d1f72c5
injective_pad
import torch import torch.nn as nn class injective_pad(nn.Module): def __init__(self, pad_size): super(injective_pad, self).__init__() self.pad_size = pad_size self.pad = nn.ZeroPad2d((0, 0, 0, pad_size)) def forward(self, x): x = x.permute(0, 2, 1, 3) x = self.pad(x)...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
david-klindt/invertible-resnet
injective_pad
false
3,389
[ "MIT" ]
0
ac6756a7ba5d0dbcb6b4cec43f8b86079318fd89
https://github.com/david-klindt/invertible-resnet/tree/ac6756a7ba5d0dbcb6b4cec43f8b86079318fd89
Softmax
import torch import torch.nn as nn class Softmax(nn.Module): def __init__(self, dim=1, keep_variance_fn=None): super(Softmax, self).__init__() self.dim = dim self._keep_variance_fn = keep_variance_fn def forward(self, features_mean, features_variance, eps=1e-05): """Softmax f...
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...
SaumilShah66/dqn_uav
Softmax
false
9,584
[ "MIT" ]
0
2bf780369e964b870624aebcff16c0714cad03c1
https://github.com/SaumilShah66/dqn_uav/tree/2bf780369e964b870624aebcff16c0714cad03c1
SigmoidRange
import torch def sigmoid_range(x, low, high): """Sigmoid function with range `(low, high)`""" return torch.sigmoid(x) * (high - low) + low class SigmoidRange(torch.nn.Module): """Sigmoid module with range `(low, x_max)`""" def __init__(self, low, high): super(SigmoidRange, self).__init__() ...
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...
BojarLab/glycowork
SigmoidRange
false
7,804
[ "MIT" ]
22
72d37d406ad70bb9def4a5632a6605778e295fbb
https://github.com/BojarLab/glycowork/tree/72d37d406ad70bb9def4a5632a6605778e295fbb
Generator
import math import torch import torch.nn as nn class LayerNorm(nn.Module): """Construct a layernorm module (See citation for details).""" def __init__(self, features, eps=1e-06): super(LayerNorm, self).__init__() self.a_2 = nn.Parameter(torch.ones(features)) self.b_2 = nn.Parameter(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 import math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.a...
eweiner/MAT_Extension
Generator
false
12,357
[ "MIT" ]
0
505884a67f97bf54e1198077d15a48531fcac7a5
https://github.com/eweiner/MAT_Extension/tree/505884a67f97bf54e1198077d15a48531fcac7a5
DiscShiftLoss
import torch import torch.nn as nn class DiscShiftLoss(nn.Module): """Disc shift loss. Args: loss_weight (float, optional): Loss weight. Defaults to 1.0. """ def __init__(self, loss_weight=0.1): super(DiscShiftLoss, self).__init__() 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
hejm37/mmediting
DiscShiftLoss
false
12,481
[ "Apache-2.0" ]
0
d4086aaf8a36ae830f1714aad585900d24ad1156
https://github.com/hejm37/mmediting/tree/d4086aaf8a36ae830f1714aad585900d24ad1156
SoftDiceLoss
import torch import torch.nn as nn class SoftDiceLoss(nn.Module): """ Soft Dice Loss """ def __init__(self, weight=None, size_average=True): super(SoftDiceLoss, self).__init__() def forward(self, logits, targets): smooth = 1.0 logits = torch.sigmoid(logits) iflat ...
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...
prateekstark/unet.pytorch
SoftDiceLoss
false
10,631
[ "MIT" ]
0
b6ef6302f35ca93c6c818215c915e05b7f3055dc
https://github.com/prateekstark/unet.pytorch/tree/b6ef6302f35ca93c6c818215c915e05b7f3055dc
DiracInitBlock
# 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...
HyperGAN/imgclsmob
DiracInitBlock
false
17,671
[ "MIT" ]
9
88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
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....
gluver/video-caption.pytorch
Attention
false
10,168
[ "MIT" ]
0
15000246980e43f71a254ab3deeb91f0957309bb
https://github.com/gluver/video-caption.pytorch/tree/15000246980e43f71a254ab3deeb91f0957309bb
GSA
# 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....
VKCOM/TopicsDataset
GSA
false
5,930
[ "MIT" ]
1
149919321ba61a8f17b22f62f60f4aedec43d72b
https://github.com/VKCOM/TopicsDataset/tree/149919321ba61a8f17b22f62f60f4aedec43d72b
TensorClampMin
import torch class TensorClampMin(torch.nn.Module): def forward(self, x): return x.clamp_min(-0.1) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
Ilyabasharov/torch2trt
TensorClampMin
false
2,533
[ "MIT" ]
0
76bf298b3da408509665e23e2494922b131afb10
https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10
ReferenceActivationBinarizationModule
import torch from torch import nn from torchvision import models as models import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed from torchvision.transforms import * import torch.onnx def get_per_channel_scale_shape(input_shape, is_weights): scale_shape = [(1) for...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn from torchvision import models as models import torch.nn.parallel import torch.optim import torch.utils.data import tor...
aalborov/openvino_training_extensions
ReferenceActivationBinarizationModule
false
6,039
[ "Apache-2.0" ]
1
a0bb39424151a98e1ca80c4aa5c865636d401785
https://github.com/aalborov/openvino_training_extensions/tree/a0bb39424151a98e1ca80c4aa5c865636d401785
IIDIsotropicGaussianUVLoss
import math import torch import torch.utils.data import torch.nn.functional as F from torch import nn class IIDIsotropicGaussianUVLoss(nn.Module): """ Loss for the case of iid residuals with isotropic covariance: $Sigma_i = sigma_i^2 I$ The loss (negative log likelihood) is then: $1/2 sum_{i=1}^n ...
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 math...
AbirKhan96/facebook-detectron2
IIDIsotropicGaussianUVLoss
false
16,861
[ "Apache-2.0" ]
5
6a3bf813353d74bbeb8674e3566e7bbb33eb5c87
https://github.com/AbirKhan96/facebook-detectron2/tree/6a3bf813353d74bbeb8674e3566e7bbb33eb5c87
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....
minhdo3000/visual_storytelling
AttentionLayer
false
4,008
[ "MIT" ]
0
451c5194564fb1bb02929f57eac8f026662637b1
https://github.com/minhdo3000/visual_storytelling/tree/451c5194564fb1bb02929f57eac8f026662637b1
MyMetric
# 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...
Min-Sheng/template
MyMetric
false
2,650
[ "MIT" ]
0
c58b2c41383668c45cd7851a88c9b0e222d7a25b
https://github.com/Min-Sheng/template/tree/c58b2c41383668c45cd7851a88c9b0e222d7a25b
Downsample
# 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...
Richard456/TRADES
Downsample
false
9,405
[ "MIT" ]
0
6093dbd92ca548cc1b98306e168842982b281140
https://github.com/Richard456/TRADES/tree/6093dbd92ca548cc1b98306e168842982b281140
FocalLossMultiClass
import torch import torch.nn as nn class FocalLossMultiClass(nn.Module): """ Implementation of the multi class focal loss. https://arxiv.org/abs/1708.02002 """ def __init__(self, alpha: 'float'=0.25, gamma: 'float'=2.0) ->None: """ Constructor method :param alpha: (float) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
ChristophReich1996/Cell-DETR
FocalLossMultiClass
false
13,505
[ "MIT" ]
55
4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
https://github.com/ChristophReich1996/Cell-DETR/tree/4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
AE_2D_v4
import torch import torch.nn as nn import torch.utils.data class AE_2D_v4(nn.Module): def __init__(self, n_features=4): super(AE_2D_v4, self).__init__() self.en1 = nn.Linear(n_features, 500) self.en2 = nn.Linear(500, 200) self.en3 = nn.Linear(200, 100) self.en4 = nn.Linear...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
gitter-badger/HEPAutoencoders
AE_2D_v4
false
12,442
[ "Apache-2.0" ]
0
43010cd66fa4335a04b30b87926148e1c8d92de9
https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9
Encoder3
# 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....
EndyWon/Texture-Reformer
Encoder3
false
8,158
[ "MIT" ]
11
f84f95accb3574c7b759a7f03c0b0b4e150314b5
https://github.com/EndyWon/Texture-Reformer/tree/f84f95accb3574c7b759a7f03c0b0b4e150314b5
ConvHardtanh
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import t...
XiaobingSuper/intel-extension-for-pytorch
ConvHardtanh
false
9,721
[ "Apache-2.0" ]
0
b61029be10e46e6d2e13b0e700c81f8e59164df0
https://github.com/XiaobingSuper/intel-extension-for-pytorch/tree/b61029be10e46e6d2e13b0e700c81f8e59164df0
FFNLayer
import math import torch import torch.nn as nn def gelu(x): return x * 0.5 * (1.0 + torch.erf(x / math.sqrt(2.0))) class FFNLayer(nn.Module): def __init__(self, input_dim, intermediate_dim, output_dim, dropout, layer_norm=True): super(FFNLayer, self).__init__() self.fc1 = nn.Linear(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
NExTplusplus/tat-qa
FFNLayer
false
8,596
[ "MIT" ]
23
4ce5d8e637b80143de0d2492ecd4b861d6ba9a89
https://github.com/NExTplusplus/tat-qa/tree/4ce5d8e637b80143de0d2492ecd4b861d6ba9a89
MultiSoftmaxCrossEntropyLoss
# 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 numpy as np imp...
microsoft/vision-longformer
MultiSoftmaxCrossEntropyLoss
false
16,062
[ "MIT" ]
169
c9ce386de3e633bb3c805368d118356fbd696487
https://github.com/microsoft/vision-longformer/tree/c9ce386de3e633bb3c805368d118356fbd696487
ModulatedConv2d
from torch.autograd import Function import math import torch from torch import nn from torch.nn import functional as F from torch.nn.functional import leaky_relu def fused_leaky_relu(input_, bias, negative_slope=0.2, scale=2 ** 0.5): return scale * leaky_relu(input_ + bias[:input_.shape[1]], negative_slop...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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.autograd...
jchetboun/anycost-gan
ModulatedConv2d
false
10,396
[ "MIT" ]
0
7e0005e50b915e2dfeb90fe7a9846c5df38d7c06
https://github.com/jchetboun/anycost-gan/tree/7e0005e50b915e2dfeb90fe7a9846c5df38d7c06
DotProductAttention
# 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....
masanorihirano/pytorch_extra_mhirano
DotProductAttention
false
7,167
[ "MIT" ]
1
d19e07445567c069793b7ca1a22a846d7cbce58d
https://github.com/masanorihirano/pytorch_extra_mhirano/tree/d19e07445567c069793b7ca1a22a846d7cbce58d
CombineSlices
import torch from torch import nn import torch.utils.data import torch.utils.data.distributed import torch.optim import torch.fft class CombineSlices(nn.Module): def __init__(self, slice_dim=2): super().__init__() self.slice_dim = slice_dim def forward(self, x): return torch.index_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 import nn import torch.utils.data import torch.utils.data.distributed import torch.optim import torch.fft assert_size_stride = to...
Gaskell-1206/fastMRI
CombineSlices
false
13,695
[ "MIT" ]
815
1b6d1f9020bc9209afa65ef9b9f2f3fa3348901c
https://github.com/Gaskell-1206/fastMRI/tree/1b6d1f9020bc9209afa65ef9b9f2f3fa3348901c
Neg
# AOT ID: ['2_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.onnx import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynam...
mil-tokyo/webdnn
Neg
false
16,073
[ "MIT" ]
1,967
38a60fd3e1a4e72bc01108189a3aa51e0752aecd
https://github.com/mil-tokyo/webdnn/tree/38a60fd3e1a4e72bc01108189a3aa51e0752aecd
Downsampler
# 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 import numpy as np import torch.nn as nn import torch.nn.functional as F assert_...
Global19/revolver
Downsampler
false
13,732
[ "BSD-2-Clause" ]
151
200082798d862516de6d9aa18e863a5968127a3f
https://github.com/Global19/revolver/tree/200082798d862516de6d9aa18e863a5968127a3f
KeypointRCNNPredictorNoUpscale
import torch import torch.nn as nn import torch.quantization.quantize_fx import torch.utils.data class KeypointRCNNPredictorNoUpscale(nn.Module): def __init__(self, in_channels, num_keypoints): super(KeypointRCNNPredictorNoUpscale, self).__init__() input_features = in_channels deconv_kern...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.quantization.quantize_fx import torch.utils.d...
petoor/d2go
KeypointRCNNPredictorNoUpscale
false
10,666
[ "Apache-2.0" ]
0
d0a20d048738f447945d7c948a8d3019a110d2e8
https://github.com/petoor/d2go/tree/d0a20d048738f447945d7c948a8d3019a110d2e8
ToRGB
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import numpy as np from torch import nn import torch.nn.functional a...
techthiyanes/annotated_deep_learning_paper_implementations
ToRGB
false
16,574
[ "MIT" ]
3,714
8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
AttentionPool2d
# 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....
graceduansu/CLIP
AttentionPool2d
false
12,492
[ "MIT" ]
0
14605e2118f43312cc00bf549aec388f5ddf802b
https://github.com/graceduansu/CLIP/tree/14605e2118f43312cc00bf549aec388f5ddf802b
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 from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
CFF-Dream/pytorch_geometric
Discriminator
false
2,041
[ "MIT" ]
0
7c19ad74957409ee9e07314ce81524b3113b9c84
https://github.com/CFF-Dream/pytorch_geometric/tree/7c19ad74957409ee9e07314ce81524b3113b9c84
myDecoder
# 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 assert_size_stride ...
Pressio/pressio4py
myDecoder
false
17,816
[ "Unlicense", "BSD-3-Clause" ]
4
36676dbd112a7c7960ccbf302ff14d4376c819ec
https://github.com/Pressio/pressio4py/tree/36676dbd112a7c7960ccbf302ff14d4376c819ec
RpowFloat
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
Akababa/torch2trt
RpowFloat
false
18,419
[ "MIT" ]
2
03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
ContrastiveLoss
# 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...
anish-lu-yihe/abcpy
ContrastiveLoss
false
6,208
[ "BSD-3-Clause-Clear" ]
1
be58367c4d7e38ee696238e3d8405e8abe2defb7
https://github.com/anish-lu-yihe/abcpy/tree/be58367c4d7e38ee696238e3d8405e8abe2defb7
SimpleDropoutOptimizer
# 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...
Danish-VSL/deep-person-reid
SimpleDropoutOptimizer
false
13,554
[ "MIT" ]
244
2e3a4b6706b84c77203f9905683b917ab0871b93
https://github.com/Danish-VSL/deep-person-reid/tree/2e3a4b6706b84c77203f9905683b917ab0871b93
AlbertAttention
from _paritybench_helpers import _mock_config import math import torch from typing import List from typing import Tuple from torch import nn from typing import Set import torch.utils.checkpoint def find_pruneable_heads_and_indices(heads: 'List[int]', n_heads: 'int', head_size: 'int', already_pruned_heads: 'Set[in...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Clemens123/transformers
AlbertAttention
false
13,226
[ "Apache-2.0" ]
0
22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
https://github.com/Clemens123/transformers/tree/22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
CrossEntropyLossWithSoftLabel
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn import *...
UNIST-LIM-Lab/NeuBoots
CrossEntropyLossWithSoftLabel
false
2,913
[ "MIT" ]
0
196adf9e1ece2abc145f69966504bac2676e5b5e
https://github.com/UNIST-LIM-Lab/NeuBoots/tree/196adf9e1ece2abc145f69966504bac2676e5b5e
Luong_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....
placaille/nmt-comp550
Luong_Attention
false
7,499
[ "MIT" ]
1
5809ca68dbd7e5452361700f905740a783f9451c
https://github.com/placaille/nmt-comp550/tree/5809ca68dbd7e5452361700f905740a783f9451c
SVIGlobalMaxPool2D
import torch import torch.nn as nn class SVIGlobalMaxPool2D(nn.Module): """ Expects :param x: [examples, samples, channels, H, W] :return: [examples, samples, channels] """ def __init__(self): super(SVIGlobalMaxPool2D, self).__init__() def forward(self, x): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
SebFar/radial_bnn
SVIGlobalMaxPool2D
false
8,755
[ "MIT" ]
29
2497e5e009409ac910d609850eae27f7cc74cec2
https://github.com/SebFar/radial_bnn/tree/2497e5e009409ac910d609850eae27f7cc74cec2
PPMConcat
import torch import torch.nn as nn import torch._C import torch.serialization from torch import optim as optim class PPMConcat(nn.ModuleList): """Pyramid Pooling Module that only concat the features of each layer. Args: pool_scales (tuple[int]): Pooling scales used in Pooling Pyramid Modu...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch._C import torch.serialization from torch import optim as optim assert_size_stride = torch._C._dynamo.guar...
Atten4Vis/DemystifyLocalViT
PPMConcat
false
13,376
[ "MIT" ]
64
2e2327caec6d56ae2c8aa861b32bb62f3cdb786e
https://github.com/Atten4Vis/DemystifyLocalViT/tree/2e2327caec6d56ae2c8aa861b32bb62f3cdb786e
MLP
import torch import torch.nn as nn class SharedDropout(nn.Module): def __init__(self, p=0.5, batch_first=True): super(SharedDropout, self).__init__() self.p = p self.batch_first = batch_first def extra_repr(self): info = f'p={self.p}' if self.batch_first: ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
CNLPT/lightNLP
MLP
false
13,443
[ "Apache-2.0" ]
889
c7f128422ba5b16f514bb294145cb3b562e95829
https://github.com/CNLPT/lightNLP/tree/c7f128422ba5b16f514bb294145cb3b562e95829
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....
SamarthMM/cs769-assignments
BertSelfAttention
false
4,569
[ "MIT" ]
0
bac2ad57c50043608276df8e0f21181ef62696c7
https://github.com/SamarthMM/cs769-assignments/tree/bac2ad57c50043608276df8e0f21181ef62696c7
AlexNet
# 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....
jjeamin/obJDetection
AlexNet
false
7,088
[ "MIT" ]
1
eb7fbc410beb00fad1a6477e827e9ce2d8efbac5
https://github.com/jjeamin/obJDetection/tree/eb7fbc410beb00fad1a6477e827e9ce2d8efbac5