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
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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
SaneBow/AttentionAgentCarRacing
SelfAttention
false
5,795
[ "Apache-2.0" ]
1
944dc18b99b2c51a25c206f722a0bbc43cb7bbb0
https://github.com/SaneBow/AttentionAgentCarRacing/tree/944dc18b99b2c51a25c206f722a0bbc43cb7bbb0
FixedSubnetConv
# 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 torch.multiprocessing import torch.nn as nn import torch.nn.p...
RICE-EIC/Robust_Scratch_Ticket
FixedSubnetConv
false
8,669
[ "MIT" ]
13
f77b41cdaab6db4922a6d4b5970db75a9bfc7257
https://github.com/RICE-EIC/Robust_Scratch_Ticket/tree/f77b41cdaab6db4922a6d4b5970db75a9bfc7257
MTFullyConnected
# 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 time import numpy as n...
EXYNOS-999/DrugEx
MTFullyConnected
false
5,177
[ "MIT" ]
1
f75a90fbc0b9863d594fbff6afecb0f866c076d6
https://github.com/EXYNOS-999/DrugEx/tree/f75a90fbc0b9863d594fbff6afecb0f866c076d6
Affine2D
import torch import torch.nn as nn class Affine2D(nn.Module): def __init__(self, cin): """ :param cin: """ super(Affine2D, self).__init__() self.weight = nn.Parameter(torch.ones(1, cin, 1, 1)) self.bias = nn.Parameter(torch.zeros(1, cin, 1, 1)) def forward(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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
alexandre-giuly/Project-Acoustic-Scene-Classification-DCASE
Affine2D
false
9,693
[ "Apache-2.0" ]
0
13b565c20e59f204151d2dafbd221c7e1b9303c5
https://github.com/alexandre-giuly/Project-Acoustic-Scene-Classification-DCASE/tree/13b565c20e59f204151d2dafbd221c7e1b9303c5
ConvBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
aliasghar53/packnet-sfm
ConvBlock
false
9,773
[ "MIT" ]
0
d07dcbf026194b618a2bd9fc05b599563611f9a3
https://github.com/aliasghar53/packnet-sfm/tree/d07dcbf026194b618a2bd9fc05b599563611f9a3
BaseQuantization
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_...
UniSerj/ai-research
BaseQuantization
false
14,536
[ "Apache-2.0" ]
46
79f0093c93408cc5dd7d3f56aafd7dc1f901421c
https://github.com/UniSerj/ai-research/tree/79f0093c93408cc5dd7d3f56aafd7dc1f901421c
CalibrationModel
import torch class CalibrationModel(torch.nn.Module): """ Adds temperature scaling parameters to trained model""" def __init__(self): super().__init__() self.temperature = torch.nn.Parameter(torch.ones(1) * 1.5) def forward(self, logits, device=torch.device('cpu')): return logits...
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...
kungfuai/d3m-segmentation-research
CalibrationModel
false
7,061
[ "MIT" ]
1
5bc44ddd0e8522fb2b369866ad47aa62a24a8f63
https://github.com/kungfuai/d3m-segmentation-research/tree/5bc44ddd0e8522fb2b369866ad47aa62a24a8f63
TargetContextGate
# 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 ...
NaomiatLibrary/OpenNMT-kpg-release
TargetContextGate
false
877
[ "MIT" ]
0
1da3468d7dad22529a77f3526abf9b373bd3dc4c
https://github.com/NaomiatLibrary/OpenNMT-kpg-release/tree/1da3468d7dad22529a77f3526abf9b373bd3dc4c
LinearExcitability
# 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 from torch import nn from torch.nn.parameter import Parameter assert...
cuongpxu/continual-learning
LinearExcitability
false
1,761
[ "MIT" ]
0
0f799ddc0efe7e6df7038d2e97303add8d5e01fd
https://github.com/cuongpxu/continual-learning/tree/0f799ddc0efe7e6df7038d2e97303add8d5e01fd
BiAttention
import torch from typing import Optional import torch.nn as nn from torch.nn.parameter import Parameter class BiAttention(nn.Module): def __init__(self, input_size_encoder: 'int', input_size_decoder: 'int', num_labels: 'int', biaffine: 'bool'=True, **kwargs) ->None: super(BiAttention, self).__ini...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.nn.parameter import Parameter assert_size_strid...
katie0809/KLUE-baseline
BiAttention
false
3,823
[ "Apache-2.0" ]
0
144973359e9dc3bbbb3ce7a0cc765b0207f63775
https://github.com/katie0809/KLUE-baseline/tree/144973359e9dc3bbbb3ce7a0cc765b0207f63775
GHMR
# 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...
AlphaLFC/mmdetection
GHMR
false
4,859
[ "Apache-2.0" ]
1
45619c5b8aca0ca3e6ddc211210a8946c94694d8
https://github.com/AlphaLFC/mmdetection/tree/45619c5b8aca0ca3e6ddc211210a8946c94694d8
LocalizationNet
# 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...
Sanny26/indic-htr
LocalizationNet
false
5,812
[ "MIT" ]
1
c473573b05c251f6e266cbd69acaa7ab18837f37
https://github.com/Sanny26/indic-htr/tree/c473573b05c251f6e266cbd69acaa7ab18837f37
Conv1d_mp
# 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_...
atosystem/MIDI-BERT
Conv1d_mp
false
14,911
[ "MIT" ]
109
61f7efb3be85a2a847e6585237036e052235a6a0
https://github.com/atosystem/MIDI-BERT/tree/61f7efb3be85a2a847e6585237036e052235a6a0
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.triton_helpers import libdevice import torch.autogr...
yifding/W2NER
MLP
false
13,139
[ "MIT" ]
0
d13128e45f3930a8b8faa794318939dc90a75974
https://github.com/yifding/W2NER/tree/d13128e45f3930a8b8faa794318939dc90a75974
BitEstimator
# 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, math as tl_math import torch.nn as nn import torch.nn.functional as F import t...
Geunwoo-Jeon/iclr_17_compression
BitEstimator
false
13,725
[ "MIT" ]
56
a28746b1f1c518d91125d8f289d9511cde488c77
https://github.com/Geunwoo-Jeon/iclr_17_compression/tree/a28746b1f1c518d91125d8f289d9511cde488c77
MaxPoolStride1
import torch from torch import nn from torch.nn import functional as F class MaxPoolStride1(nn.Module): def __init__(self, kernel_size): super(MaxPoolStride1, self).__init__() self.kernel_size = kernel_size self.pad = kernel_size - 1 def forward(self, x): padded_x = F.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 from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
MaoXianXin/pytorchx
MaxPoolStride1
false
11,689
[ "MIT" ]
0
f46cc9692c3bd11ea9d5d54c20de3ac2f67dabcc
https://github.com/MaoXianXin/pytorchx/tree/f46cc9692c3bd11ea9d5d54c20de3ac2f67dabcc
CORblock_Z
import torch import torch.nn as nn import torch.utils.model_zoo class Identity(nn.Module): """ Helper module that stores the current tensor. Useful for accessing by name """ def forward(self, x): return x class CORblock_Z(nn.Module): def __init__(self, in_channels, out_channels, kernel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
ViCCo-Group/THINGSvision
CORblock_Z
false
14,561
[ "MIT" ]
45
27273564631605639287f9b3bd3c57ba8cdb720f
https://github.com/ViCCo-Group/THINGSvision/tree/27273564631605639287f9b3bd3c57ba8cdb720f
ContrastiveDistanceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn from torch.nn.modules.loss import * from torch.nn.modules import * f...
Casyfill/catalyst
ContrastiveDistanceLoss
false
8,991
[ "Apache-2.0" ]
0
7f63545dbc53902c3dd959463def28a67a16a989
https://github.com/Casyfill/catalyst/tree/7f63545dbc53902c3dd959463def28a67a16a989
KdCeLoss
import torch import torch.nn as nn import torch.nn.functional as F class KdCeLoss(nn.Module): def __init__(self): super().__init__() def forward(self, logits_S, logits_T, temperature=1): """ Calculate the cross entropy between logits_S and logits_T :param logits_S: Tensor of...
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 ...
lonePatient/TorchBlocks
KdCeLoss
false
15,969
[ "MIT" ]
82
4a65d746cc8a396cb7df73ed4644d97ddf843e29
https://github.com/lonePatient/TorchBlocks/tree/4a65d746cc8a396cb7df73ed4644d97ddf843e29
PatchEmbed3D
import torch import torchvision.transforms.functional as F import torch.nn.functional as F from torch import nn class PatchEmbed3D(nn.Module): """ Video to Patch Embedding. Args: patch_size (int): Patch token size. Default: (2,4,4). in_chans (int): Number of input video channels. Default: 3. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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...
XiaoJake/MTTR
PatchEmbed3D
false
14,623
[ "Apache-2.0" ]
516
c383c5b151e3c97aeb45cd2fb4bf08719016498b
https://github.com/XiaoJake/MTTR/tree/c383c5b151e3c97aeb45cd2fb4bf08719016498b
PolynomialEnvelope
# 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...
krylea/ocp
PolynomialEnvelope
false
10,491
[ "MIT" ]
0
00fc1df29731d70ff1b5cf8e9323d1d2f1f8e540
https://github.com/krylea/ocp/tree/00fc1df29731d70ff1b5cf8e9323d1d2f1f8e540
soft_L1
import torch import torch.utils.data import torch.nn as nn class soft_L1(nn.Module): def __init__(self): super(soft_L1, self).__init__() def forward(self, input, target, eps=0.0): ret = torch.abs(input - target) - eps ret = torch.clamp(ret, min=0.0, max=100.0) return ret de...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils.dat...
haidongz-usc/Curriculum-DeepSDF
soft_L1
false
15,480
[ "MIT" ]
65
ca216dda8edc6435139a6f657c45800791be94a7
https://github.com/haidongz-usc/Curriculum-DeepSDF/tree/ca216dda8edc6435139a6f657c45800791be94a7
L2Norm
import torch import torch.nn as nn class L2Norm(nn.Module): def __init__(self, n_channels, scale=1.0): super(L2Norm, self).__init__() self.n_channels = n_channels self.scale = scale self.eps = 1e-10 self.weight = nn.Parameter(torch.Tensor(self.n_channels)) self.wei...
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_...
CCC-123/ECCVC
L2Norm
false
11,265
[ "MIT" ]
0
322009a3423dba831cb3ae4182e7129be3441e70
https://github.com/CCC-123/ECCVC/tree/322009a3423dba831cb3ae4182e7129be3441e70
MyCustomFunctionReluModel
import torch import torch.nn import torch.onnx import torch.utils.checkpoint class MyCustomFunctionReluModel(torch.nn.Module): def __init__(self): super().__init__() class MyReLU(torch.autograd.Function): @staticmethod def forward(ctx, input): ctx.save_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 import triton_helpers import torch.nn import torch.onnx import torch.utils.checkpoint assert_size_stride = torc...
almiliMSFT/onnxruntime
MyCustomFunctionReluModel
false
14,801
[ "MIT" ]
6,036
c002dc86a364852859ca9642698fcfc5edf22c9d
https://github.com/almiliMSFT/onnxruntime/tree/c002dc86a364852859ca9642698fcfc5edf22c9d
AttnGCNLayer
# 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....
Roc-Ng/HANet
AttnGCNLayer
false
8,713
[ "MIT" ]
34
e679703e9e725205424d87f750358fb4f62ceec5
https://github.com/Roc-Ng/HANet/tree/e679703e9e725205424d87f750358fb4f62ceec5
FocalLoss
import torch import torch.nn as nn class FocalLoss(nn.Module): """ Softmax and sigmoid focal loss https://github.com/lonePatient/TorchBlocks/blob/master/torchblocks/losses/focal_loss.py """ def __init__(self, num_labels, gamma=2.0, alpha=0.25, epsilon=1e-09, reduction='mean', activation_t...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
okcd00/CDPrototype
FocalLoss
false
12,851
[ "MIT" ]
0
5a05b144e3e4b341c1a67fe455f94c01899539d8
https://github.com/okcd00/CDPrototype/tree/5a05b144e3e4b341c1a67fe455f94c01899539d8
WScaleLayer
import torch import torch.nn as nn class WScaleLayer(nn.Module): def __init__(self, size): super(WScaleLayer, self).__init__() self.scale = nn.Parameter(torch.randn([1])) self.b = nn.Parameter(torch.randn(size)) self.size = size def forward(self, x): x_size = x.size()...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
ChandreyeeB/Blind-Image-Deconvolution-using-Deep-Generative-Priors
WScaleLayer
false
7,848
[ "MIT" ]
24
4198bd2d325a32ffc4e714c486540e63440ab110
https://github.com/ChandreyeeB/Blind-Image-Deconvolution-using-Deep-Generative-Priors/tree/4198bd2d325a32ffc4e714c486540e63440ab110
InstanceNorm
import torch import torch.utils.data import torch from torch import nn class InstanceNorm(nn.Module): def __init__(self, epsilon=1e-08): super(InstanceNorm, self).__init__() self.epsilon = epsilon def forward(self, x): x = x - torch.mean(x, (2, 3), True) tmp = torch.mul(x, x)...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.utils.data import torch from torch import nn assert_size_stride = ...
siyuhuang/PoseStylizer
InstanceNorm
false
16,463
[ "BSD-3-Clause" ]
75
d1d832781ddfd3efde24bf32b36a4074fafebcc1
https://github.com/siyuhuang/PoseStylizer/tree/d1d832781ddfd3efde24bf32b36a4074fafebcc1
BiaffineAttention
import torch from torch import optim as optim import torch.utils.data import torch.onnx.operators import torch.optim import torch.optim.lr_scheduler import torch.utils.checkpoint class BiaffineAttention(torch.nn.Module): """Implements a biaffine attention operator for binary relation classification. PyTorch ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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 optim as optim import torch.utils.data import torch.onnx.opera...
Maria-philna/unilm
BiaffineAttention
false
14,009
[ "MIT" ]
5,129
5550a335c6d2ae5838b1a90e50cb46f81edcd50f
https://github.com/Maria-philna/unilm/tree/5550a335c6d2ae5838b1a90e50cb46f81edcd50f
AttentiveStatsPool
import torch import torch.nn as nn class AttentiveStatsPool(nn.Module): def __init__(self, in_dim, bottleneck_dim): super().__init__() self.linear1 = nn.Conv1d(in_dim, bottleneck_dim, kernel_size=1) self.linear2 = nn.Conv1d(bottleneck_dim, in_dim, kernel_size=1) 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 from torch._inductor.runtime....
SecretKeyTeam/voxceleb_trainer
AttentiveStatsPool
false
9,552
[ "MIT" ]
0
e235cbc2961d32395d30cf606ee830cd47716383
https://github.com/SecretKeyTeam/voxceleb_trainer/tree/e235cbc2961d32395d30cf606ee830cd47716383
KLDivLoss
# 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 torchvision.trans...
mangye16/Cross-Modal-Re-ID-baseline
KLDivLoss
false
15,990
[ "MIT" ]
249
26bc0ce088eb97867ff489dceda386b8092b9fde
https://github.com/mangye16/Cross-Modal-Re-ID-baseline/tree/26bc0ce088eb97867ff489dceda386b8092b9fde
h_swish
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_swish
false
13,582
[ "MIT" ]
162
a1fb1e229319dac0069e37eb8fb4278d454edbb0
https://github.com/DefTruth/PIPNet/tree/a1fb1e229319dac0069e37eb8fb4278d454edbb0
Gate
# 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...
tailerr/R-NET-pytorch
Gate
false
4,404
[ "MIT" ]
0
a6ed4a02b0cf68bade9e9a43a93ec290a3b6fabd
https://github.com/tailerr/R-NET-pytorch/tree/a6ed4a02b0cf68bade9e9a43a93ec290a3b6fabd
DQN
import torch import torch.nn.functional as F from torch import nn class DQN(nn.Module): def __init__(self, observation_size, action_size, H1=200, H2=160, H3= 120, H4=60): """ :param observation_size: Size of belief as defined in belief_agent.py :param action_size: Model has 1 out...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
lilianluong/multitask-card-games
DQN
false
7,093
[ "MIT" ]
1
ae32e85583c61cc27a44946a6b5fa7c1e2c152ff
https://github.com/lilianluong/multitask-card-games/tree/ae32e85583c61cc27a44946a6b5fa7c1e2c152ff
RewardModelNetwork
import torch import torch.nn as nn import torch.utils.data class RewardModelNetwork(nn.Module): def __init__(self, input_size: 'int', hidden_size: 'int', output_size: 'int') ->None: super(RewardModelNetwork, self).__init__() self.l1 = nn.Linear(input_size, hidden_size) self.l2 = n...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Hcnaeg/DI-engine
RewardModelNetwork
false
2,393
[ "Apache-2.0" ]
0
aba0c629f87649854091e9e59d948f83962e3e1e
https://github.com/Hcnaeg/DI-engine/tree/aba0c629f87649854091e9e59d948f83962e3e1e
MyConv3d
import torch import torch.nn as nn import torch.nn.functional as F class MyConv3d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, bias=True): super(MyConv3d, self).__init__() self.kernel_size = kernel_size self.conv = nn.Conv3d(in_channels=in_chann...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
xinxindefeiyu/S2VD-master_RESID
MyConv3d
false
16,742
[ "MIT" ]
48
b075d6873842d70f1d8d3215daf0565f8c0ffe9a
https://github.com/xinxindefeiyu/S2VD-master_RESID/tree/b075d6873842d70f1d8d3215daf0565f8c0ffe9a
AffineDropPath
import torch import torch.nn as nn import torch.utils.data def drop_path(x, drop_prob=0.0, training=False): """ Stochastic Depth per sample. """ if drop_prob == 0.0 or not training: return x keep_prob = 1 - drop_prob shape = (x.shape[0],) + (1,) * (x.ndim - 1) mask = keep_prob + to...
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....
yjh0410/actionformer_release
AffineDropPath
false
16,765
[ "MIT" ]
61
7a97422111d3e29c8d2e14088c850c6975855ea7
https://github.com/yjh0410/actionformer_release/tree/7a97422111d3e29c8d2e14088c850c6975855ea7
NormalisedSigmoid
# 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.utils.dat...
hoedt/stable-nalu
NormalisedSigmoid
false
3,601
[ "MIT" ]
0
64b3d240db8bff4da857d955f213ef3c7e38e035
https://github.com/hoedt/stable-nalu/tree/64b3d240db8bff4da857d955f213ef3c7e38e035
Oracle
import torch import torch.nn as nn class Oracle(nn.Module): def __init__(self): super().__init__() self._criteria = nn.CrossEntropyLoss() def forward(self, output, y): y_copy = y.clone() y_copy[:, 0] += 0.005 return self._criteria(output, y_copy.argmax(dim=1)) def g...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
yanxurui/portfolio
Oracle
false
4,605
[ "MIT" ]
0
032cf47ccac1c5815fd4827bf0d5f3cf43cec990
https://github.com/yanxurui/portfolio/tree/032cf47ccac1c5815fd4827bf0d5f3cf43cec990
FunctionalConv3d
import torch class FunctionalConv3d(torch.nn.Module): def __init__(self, *args, **kwargs): super().__init__() self.conv = torch.nn.Conv3d(*args, **kwargs) def forward(self, x): x = torch.nn.functional.conv3d(x, self.conv.weight, self.conv.bias, self.conv.stride, self.conv...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride reinterpret_tens...
Ilyabasharov/torch2trt
FunctionalConv3d
false
2,542
[ "MIT" ]
0
76bf298b3da408509665e23e2494922b131afb10
https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10
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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
BrunoKM/rhoana_graph_tools
ContrastiveLoss
false
4,904
[ "MIT" ]
1
7150f4bc6337ecf51dd9123cf03561a57d655160
https://github.com/BrunoKM/rhoana_graph_tools/tree/7150f4bc6337ecf51dd9123cf03561a57d655160
Precision
# 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...
ChristophReich1996/Cell-DETR
Precision
false
13,496
[ "MIT" ]
55
4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
https://github.com/ChristophReich1996/Cell-DETR/tree/4d0c3a2d3ffd19184c8443e5b3a6dccc053c77ea
PreNet
import torch from torch import nn import torch.nn.functional as F import torch.utils.data class PreNet(nn.Module): def __init__(self, in_dims, fc1_dims=256, fc2_dims=128, dropout=0.5): super().__init__() self.fc1 = nn.Linear(in_dims, fc1_dims) self.fc2 = nn.Linear(fc1_dims, fc2_dims) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
airobotnews/cloneVoice
PreNet
false
14,764
[ "MIT" ]
15,983
8ad9ba2b60aef57d6d7c83832f07c4f1173d493b
https://github.com/airobotnews/cloneVoice/tree/8ad9ba2b60aef57d6d7c83832f07c4f1173d493b
SpatialAttention
# 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 from ...
Rick-960123/centermask-mdf-master
SpatialAttention
false
2,759
[ "BSD-2-Clause" ]
0
49388b03b9ffb06577cd28b9ddaa68cadb82e926
https://github.com/Rick-960123/centermask-mdf-master/tree/49388b03b9ffb06577cd28b9ddaa68cadb82e926
BalancedBinaryCrossEntropyWithLogits
# 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...
hehaoming/RSI-ChangeDetection
BalancedBinaryCrossEntropyWithLogits
false
6,799
[ "MIT" ]
1
f24a1d79c03fb9fefc49bc91bc94b3c120992496
https://github.com/hehaoming/RSI-ChangeDetection/tree/f24a1d79c03fb9fefc49bc91bc94b3c120992496
BarlowTwinLoss
import torch import torch.nn.functional as F def off_diagonal(x): """Return a flattened view of the off-diagonal elements of a square matrix. >>> x = np.array([[1,2,3],[4,5,6],[7,8,9]]) array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) >>> x.flatten() array([1, 2, 3, 4, 5, 6, 7, 8,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
jianzhnie/self_supervised
BarlowTwinLoss
false
6,950
[ "Apache-2.0" ]
1
d1e0f31ab032150ab0ad007c1e19773135a5fb79
https://github.com/jianzhnie/self_supervised/tree/d1e0f31ab032150ab0ad007c1e19773135a5fb79
FusedDownsample
import torch from torch import nn from torch.nn import functional as F from math import sqrt class FusedDownsample(nn.Module): def __init__(self, in_channel, out_channel, kernel_size, padding=0): super().__init__() weight = torch.randn(out_channel, in_channel, kernel_size, kernel_size) bi...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn from math import sqrt assert_size_stride = torch._C._dynamo...
KUMartin77/AAA738_StyleGAN_pytorch
FusedDownsample
false
11,628
[ "BSD-2-Clause" ]
0
ed0689102c922d336f53e374e8be2ab532a84ccd
https://github.com/KUMartin77/AAA738_StyleGAN_pytorch/tree/ed0689102c922d336f53e374e8be2ab532a84ccd
Perceptron
import torch import torch.nn as nn import torch.nn.functional as F class Perceptron(nn.Module): """Implements a 1-layer perceptron.""" def __init__(self, input_dimension, hidden_dimension, output_dimension): super(Perceptron, self).__init__() self._layer1 = nn.Linear(input_dimension, hidden_d...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
Bhaskers-Blu-Org2/PDP-Solver
Perceptron
false
7,780
[ "MIT" ]
28
1fca34d81f36268288f46416fb6956e5b36df69e
https://github.com/Bhaskers-Blu-Org2/PDP-Solver/tree/1fca34d81f36268288f46416fb6956e5b36df69e
Softmax
import torch import torch.nn as nn def keep_variance_fn(x): return x + 0.001 class Softmax(nn.Module): def __init__(self, dim=1, keep_variance_fn=None): super(Softmax, self).__init__() self.dim = dim self._keep_variance_fn = keep_variance_fn def forward(self, features_mean, fea...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
collector-m/LiDAR-MOS
Softmax
false
15,066
[ "MIT" ]
268
7ccbb63b4ee7c40195b35dd0dddd71473fae25b1
https://github.com/collector-m/LiDAR-MOS/tree/7ccbb63b4ee7c40195b35dd0dddd71473fae25b1
ExpLinear
# 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 from scipy.linalg import logm assert_size_s...
mshakerinava/nflows
ExpLinear
false
10,578
[ "MIT" ]
0
d86cb1478ff36ffd3e005e980d92a3b0bbffbf02
https://github.com/mshakerinava/nflows/tree/d86cb1478ff36ffd3e005e980d92a3b0bbffbf02
conv2d
import torch import torch.nn as nn from torch.autograd import Variable def spectral_norm(module, name='weight'): SpectralNorm.apply(module, name) return module class SpectralNorm: def __init__(self, name): self.name = name def compute_weight(self, module): weight = getattr(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 import torch.nn as nn from torch.autograd import Variable assert_size_stride = t...
vandit15/Self-Supervised-Gans-Pytorch
conv2d
false
16,654
[ "MIT" ]
66
01408fcce3e6cf4795d90c0f9d27e6906d5b59f3
https://github.com/vandit15/Self-Supervised-Gans-Pytorch/tree/01408fcce3e6cf4795d90c0f9d27e6906d5b59f3
ConvToVector
# 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_...
JannerM/spatial-reasoning
ConvToVector
false
13,887
[ "MIT" ]
54
e163003a33177e41ca02d5feefee3fdfca5ba154
https://github.com/JannerM/spatial-reasoning/tree/e163003a33177e41ca02d5feefee3fdfca5ba154
BinaryClassificationHead
# 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 ...
BunnyNoBugs/DeepPavlov
BinaryClassificationHead
false
12,322
[ "Apache-2.0" ]
0
b2213db633a669d27d6f745dd780530574ccf8b5
https://github.com/BunnyNoBugs/DeepPavlov/tree/b2213db633a669d27d6f745dd780530574ccf8b5
RSubInt
# 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...
ahangchen/torch2trt
RSubInt
false
6,109
[ "MIT" ]
1
53c663f0e0570ef7ffd6771354ae3478f63bd328
https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328
TargetQueryDecoderLayer
import torch import torch.distributed import torch import torch.nn as nn import torch.nn.functional import torch.utils.data import torch.optim import torch.optim.lr_scheduler class Mlp(nn.Module): """ Multilayer perceptron.""" def __init__(self, in_features, hidden_features=None, out_features=None, 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....
zhangzhengde0225/SwinTrack
TargetQueryDecoderLayer
false
16,843
[ "MIT" ]
143
526be17f8ef266cb924c6939bd8dda23e9b73249
https://github.com/zhangzhengde0225/SwinTrack/tree/526be17f8ef266cb924c6939bd8dda23e9b73249
ClippedLinearQuantization
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 def linear_dequantize(input, scale, zero_point, inplace=False): if inplace:...
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 import...
Donfa1con/distiller
ClippedLinearQuantization
false
11,531
[ "Apache-2.0" ]
0
645ee41bfebc463523b228ff087e41619607d8b2
https://github.com/Donfa1con/distiller/tree/645ee41bfebc463523b228ff087e41619607d8b2
ScaledDotProductAttention
import torch import numpy as np import torch.nn as nn class ScaledDotProductAttention(nn.Module): """ Scaled dot-product attention """ def __init__(self, d_model, d_k, d_v, h): """ :param d_model: Output dimensionality of the model :param d_k: Dimensionality of queries and key...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
CurryYuan/X-Trans2Cap
ScaledDotProductAttention
false
7,937
[ "Apache-2.0" ]
11
c78a27209f14fcbbec74fe8b5edc06faea2e7d44
https://github.com/CurryYuan/X-Trans2Cap/tree/c78a27209f14fcbbec74fe8b5edc06faea2e7d44
ChannelAttentionModule
import torch import numpy as np from torch import nn from torch.nn import init class SimplifiedScaledDotProductAttention(nn.Module): """ Scaled dot-product attention """ def __init__(self, d_model, h, dropout=0.1): """ :param d_model: Output dimensionality of the model :param ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Nitin-Mane/External-Attention-pytorch
ChannelAttentionModule
false
14,104
[ "MIT" ]
4,466
1ceda306c41063af11c956334747763444a4d83f
https://github.com/Nitin-Mane/External-Attention-pytorch/tree/1ceda306c41063af11c956334747763444a4d83f
WeightNet
# 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...
VisualAnalysisOfHumans/LOVEU_TRACK1_TOP3_SUBMISSION
WeightNet
false
5,933
[ "MIT" ]
1
6f4d1c7e6883d6b0664fcd04265f437247afab54
https://github.com/VisualAnalysisOfHumans/LOVEU_TRACK1_TOP3_SUBMISSION/tree/6f4d1c7e6883d6b0664fcd04265f437247afab54
HardAttn
import torch import torch.nn as nn import torch.nn.functional as F class HardAttn(nn.Module): """Hard Attention (Sec. 3.1.II)""" def __init__(self, in_channels): super(HardAttn, self).__init__() self.fc = nn.Linear(in_channels, 4 * 2) self.init_params() def init_params(self): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Danish-VSL/deep-person-reid
HardAttn
false
13,551
[ "MIT" ]
244
2e3a4b6706b84c77203f9905683b917ab0871b93
https://github.com/Danish-VSL/deep-person-reid/tree/2e3a4b6706b84c77203f9905683b917ab0871b93
CEFL
import torch import torch.nn as nn import torch.nn.functional as F import torch.onnx class CEFL(nn.Module): def __init__(self, gamma=1): super(CEFL, self).__init__() self.gamma = gamma def get_prob(self, input, target): prob = F.softmax(input, dim=-1) prob = prob[range(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 from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
umairjavaid/staff-employee-classification
CEFL
false
13,060
[ "MIT" ]
0
fc5fe32acfbde2b188094df90d888eeb0f4f4acd
https://github.com/umairjavaid/staff-employee-classification/tree/fc5fe32acfbde2b188094df90d888eeb0f4f4acd
RefModel1d
# 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....
shuohan/pytorch-layers
RefModel1d
false
4,335
[ "MIT" ]
0
020846fd02d501cf477552179c19ba4b5e9a0695
https://github.com/shuohan/pytorch-layers/tree/020846fd02d501cf477552179c19ba4b5e9a0695
BertLayerNorm
import torch import torch.nn as nn import torch.cuda import torch.onnx.utils import torch.random import torch.cuda.random import torch.utils.cpp_extension class BertLayerNorm(nn.Module): def __init__(self, hidden_size, eps=1e-12): super(BertLayerNorm, self).__init__() self.weight = nn.Parameter(t...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.cuda import torch.onnx.utils import torch.ra...
nict-wisdom/rannc
BertLayerNorm
false
16,294
[ "MIT" ]
45
a1708807e053e2d58b7f6d6ed925f03aa8504416
https://github.com/nict-wisdom/rannc/tree/a1708807e053e2d58b7f6d6ed925f03aa8504416
Skew
import torch from torch import nn class NonSquareError(ValueError): def __init__(self, name, size): super().__init__( 'The {} parametrization can just be applied to square matrices. Got a tensor of size {}' .format(name, size)) class VectorError(ValueError): def __init__(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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
vishalbelsare/geotorch
Skew
false
16,678
[ "MIT" ]
422
ba38d406c245d609fee4b4dac3f6427bf6d73a8e
https://github.com/vishalbelsare/geotorch/tree/ba38d406c245d609fee4b4dac3f6427bf6d73a8e
ExponentialEnvelope
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
krylea/ocp
ExponentialEnvelope
false
10,500
[ "MIT" ]
0
00fc1df29731d70ff1b5cf8e9323d1d2f1f8e540
https://github.com/krylea/ocp/tree/00fc1df29731d70ff1b5cf8e9323d1d2f1f8e540
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 import torch.nn as nn from torch.nn.parameter import Parameter assert_size_strid...
katie0809/KLUE-baseline
BiAttention
false
3,823
[ "Apache-2.0" ]
0
144973359e9dc3bbbb3ce7a0cc765b0207f63775
https://github.com/katie0809/KLUE-baseline/tree/144973359e9dc3bbbb3ce7a0cc765b0207f63775
Decoder5
import torch import torch.nn as nn class Decoder5(nn.Module): def __init__(self): super(Decoder5, self).__init__() self.reflecPad15 = nn.ReflectionPad2d((1, 1, 1, 1)) self.conv15 = nn.Conv2d(512, 512, 3, 1, 0) self.relu15 = nn.ReLU(inplace=True) self.unpool = nn.Upsampling...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
hologerry/wct_experiment
Decoder5
false
6,897
[ "MIT" ]
1
890d885561dc8df8c4ae732aebd902aa838257e6
https://github.com/hologerry/wct_experiment/tree/890d885561dc8df8c4ae732aebd902aa838257e6
AdaptiveTanh
import torch from torch.nn.parameter import Parameter class AdaptiveTanh(torch.nn.Module): """ Implementation of soft exponential activation. Shape: - Input: (N, *) where * means, any number of additional dimensions - Output: (N, *), same shape as the input Parameters: ...
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 from torch.nn.parameter import Parameter assert_size_stride = torch._C._d...
ndem0/PINA
AdaptiveTanh
false
10,727
[ "MIT" ]
0
1812ddb8d96a9c8aeb80ce35002dbd115e7d7931
https://github.com/ndem0/PINA/tree/1812ddb8d96a9c8aeb80ce35002dbd115e7d7931
ReOrgLayer
# 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.utils.data.distributed import torch._utils assert_size_stride = torch._C._dynamo....
Sarathismg/Pose-Estimator-Old-Version
ReOrgLayer
false
1,023
[ "Apache-2.0" ]
0
ecaa03769323b94a4d7222e2d3606d1ce92a2fae
https://github.com/Sarathismg/Pose-Estimator-Old-Version/tree/ecaa03769323b94a4d7222e2d3606d1ce92a2fae
Net
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(1, 4, (3, 3), 1) self.dropout2d_1 = nn.Dropout2d(p=0.5) self.conv2 = nn.Conv2d(4, 32, (3, 3), 1) self.dropout2d_2 = nn.Dro...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
nathantau/BigBrain
Net
false
7,354
[ "MIT" ]
1
b9e81ee3ca91fadeccd59043dcc0062af1e6d365
https://github.com/nathantau/BigBrain/tree/b9e81ee3ca91fadeccd59043dcc0062af1e6d365
SoftmaxAttention
import torch import torch.nn as nn def masked_softmax(tensor, mask, kb_mask): """ Apply a masked softmax on the last dimension of a tensor. The input tensor and mask should be of size (batch, *, sequence_length). Args: tensor: The tensor on which the softmax function must be applied along ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
TripuraPriyanka/ekmimn
SoftmaxAttention
false
2,952
[ "Apache-2.0" ]
0
389c2249369e5b0f09498d79034634ac1db4ff68
https://github.com/TripuraPriyanka/ekmimn/tree/389c2249369e5b0f09498d79034634ac1db4ff68
Mapping
from _paritybench_helpers import _mock_config import torch import torch.nn as nn def weights_init(m): classname = m.__class__.__name__ if classname.find('Linear') != -1: m.weight.data.normal_(0.0, 0.02) m.bias.data.fill_(0) elif classname.find('BatchNorm') != -1: m.weight.data.norm...
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 import triton_helpers from...
tasfia/BMCoGAN
Mapping
false
13,108
[ "MIT" ]
0
0d400c2c71dbfb69af422afc487f65afb98de8af
https://github.com/tasfia/BMCoGAN/tree/0d400c2c71dbfb69af422afc487f65afb98de8af
SiaLoss
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data.distributed class SiaLoss(nn.Module): """ Contrastive loss function. Based on: http://yann.lecun.com/exdb/publis/pdf/hadsell-chopra-lecun-06.pdf """ def __init__(self, margin=2.0): super(SiaLoss, 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 libdevice import torch.nn as nn import...
zwzhang121/OpenUnReID
SiaLoss
false
4,678
[ "Apache-2.0" ]
0
4f399efca3d560c608fb4c9c2ed43f522b17596a
https://github.com/zwzhang121/OpenUnReID/tree/4f399efca3d560c608fb4c9c2ed43f522b17596a
Pow
import torch class Pow(torch.nn.Module): def __init__(self): super(Pow, self).__init__() def forward(self, x, y): return x ** y def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
ahangchen/torch2trt
Pow
false
6,092
[ "MIT" ]
1
53c663f0e0570ef7ffd6771354ae3478f63bd328
https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328
LayerNorm
import numbers import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data import torch.nn.init as init import torch.onnx.operators import torch.optim import torch.optim.lr_scheduler class LayerNorm(nn.Module): """Applies Layer Normalization over a mini-batch of inputs as described ...
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 numbers import torch.nn as nn import torch.utils.data import torch.nn.in...
AbhilashMathews/adahessian
LayerNorm
false
4,835
[ "MIT" ]
1
bacccecc7a078c3e9e72aa55b17d8e46d21dc9c9
https://github.com/AbhilashMathews/adahessian/tree/bacccecc7a078c3e9e72aa55b17d8e46d21dc9c9
NoiseInjection
# 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
CurtisASmith/stylegan2-pytorch
NoiseInjection
false
11,322
[ "MIT", "BSD-2-Clause", "Apache-2.0" ]
0
139ded3394718b9b8a727949dd46ad77ec2ec746
https://github.com/CurtisASmith/stylegan2-pytorch/tree/139ded3394718b9b8a727949dd46ad77ec2ec746
MetaBilinear
# 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 reinterpret_tensor = torch._C._dynamo.guards._reinterp...
RisingStockPrices/multi-shape-siren
MetaBilinear
false
2,772
[ "MIT" ]
0
f78d6deb94660fd11ef0caf55f88095b74d3e223
https://github.com/RisingStockPrices/multi-shape-siren/tree/f78d6deb94660fd11ef0caf55f88095b74d3e223
PONO
import torch import torch.nn as nn class PONO(nn.Module): def __init__(self, input_size=None, return_stats=False, affine=False, eps=1e-05): super(PONO, self).__init__() self.return_stats = return_stats self.input_size = input_size self.eps = eps self.affine = affin...
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_...
Boyiliee/PONO
PONO
false
13,411
[ "MIT" ]
133
b9108e8bf8ba0228635532ba5bdc973b7393d045
https://github.com/Boyiliee/PONO/tree/b9108e8bf8ba0228635532ba5bdc973b7393d045
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 from to...
desmarg/ehr_ml
PositionwiseFeedForward
false
6,560
[ "MIT" ]
1
48a385fe2ebdbef655bd4c6b6dd9a73a4e3f76b4
https://github.com/desmarg/ehr_ml/tree/48a385fe2ebdbef655bd4c6b6dd9a73a4e3f76b4
Mish
# 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, math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
mattroz/yatopi
Mish
false
3,983
[ "MIT" ]
0
278bac6f3d2f13916ae9d43309b9f38b608426bd
https://github.com/mattroz/yatopi/tree/278bac6f3d2f13916ae9d43309b9f38b608426bd
IN_self
# 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_...
EkdeepSLubana/BeyondBatchNorm
IN_self
false
17,239
[ "MIT" ]
10
2ab1626a1ebfdfe55f0a4bc6ac24c8bbdd4e0196
https://github.com/EkdeepSLubana/BeyondBatchNorm/tree/2ab1626a1ebfdfe55f0a4bc6ac24c8bbdd4e0196
ImageProcessingModuleAlt
import torch import torch.nn as nn import torch.nn.functional as F class ImageProcessingModuleAlt(nn.Module): def __init__(self, n_filters): super().__init__() self.conv1 = nn.Conv2d(in_channels=3, out_channels=n_filters * 2, kernel_size=7) self.conv2 = nn.Conv2d(in_channels=n...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
bentrevett/task-oriented-language-grounding
ImageProcessingModuleAlt
false
6,334
[ "MIT" ]
1
812a7bc21ee622030eb0594c576c7d60dc630148
https://github.com/bentrevett/task-oriented-language-grounding/tree/812a7bc21ee622030eb0594c576c7d60dc630148
SimpleDropoutOptimizer
import torch import torch.nn as nn class SimpleDropoutOptimizer(nn.Module): def __init__(self, p): super().__init__() if p is not None: self.dropout = nn.Dropout(p=p) else: self.dropout = None def forward(self, x): if self.dropout is not None: ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
ArronHZG/ABD-Net
SimpleDropoutOptimizer
false
9,587
[ "MIT" ]
0
4f6d15f4d389a55549ea10a2e00d4a5cdecb5753
https://github.com/ArronHZG/ABD-Net/tree/4f6d15f4d389a55549ea10a2e00d4a5cdecb5753
SimpleXorModule
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
briancoutinho/glow
SimpleXorModule
false
12,587
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
MarginDisparityDiscrepancy
import torch from typing import Optional import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data import torch.utils.data.distributed import torch.optim def shift_log(x: 'torch.Tensor', offset: 'Optional[float]'=1e-06 ) ->torch.Tensor: """ First shift, then ca...
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 typing import Opt...
mstoelzle/Transfer-Learning-Library
MarginDisparityDiscrepancy
false
12,885
[ "MIT" ]
0
7d5022668cbe6d1bedbc7c386d44b9d89c272d6b
https://github.com/mstoelzle/Transfer-Learning-Library/tree/7d5022668cbe6d1bedbc7c386d44b9d89c272d6b
Conv
import torch from torch import nn import torch.utils.data import torch.nn.init as init def initial_parameter(net, initial_method=None): """A method used to initialize the weights of PyTorch models. :param net: a PyTorch model :param str initial_method: one of the following initializations. -...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
LindaCY/fastNLP
Conv
false
17,624
[ "Apache-2.0" ]
4
3fa95b6cfc31211453bc21792e3eef87948858da
https://github.com/LindaCY/fastNLP/tree/3fa95b6cfc31211453bc21792e3eef87948858da
MultiHeadAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
UdbhavPrasad072300/CPS843_Final_Project
MultiHeadAttention
false
9,731
[ "MIT" ]
0
042f0bad48c7e49b71ab8efbc4ac5a9e6a6cf31c
https://github.com/UdbhavPrasad072300/CPS843_Final_Project/tree/042f0bad48c7e49b71ab8efbc4ac5a9e6a6cf31c
PositiveLinear
# 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...
oguzserbetci/monotone-network
PositiveLinear
false
10,593
[ "MIT" ]
0
33a317a1dde1a3d3e74dcbe3eb12d1a81e745c95
https://github.com/oguzserbetci/monotone-network/tree/33a317a1dde1a3d3e74dcbe3eb12d1a81e745c95
BoundedSingleVar
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
zweien/idrlnet
BoundedSingleVar
false
16,833
[ "Apache-2.0" ]
66
3a19a3301d565c0906aac84ff31eefcff75726a8
https://github.com/zweien/idrlnet/tree/3a19a3301d565c0906aac84ff31eefcff75726a8
TemporalConvNet
import torch import torch.nn as nn from torch.nn.utils import weight_norm class Chomp1d(nn.Module): def __init__(self, chomp_size): super(Chomp1d, self).__init__() self.chomp_size = chomp_size def forward(self, x, pad_right=True): return x[:, :, :-self.chomp_size].contiguous() if pad...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
ddcas/singing-language-identification
TemporalConvNet
false
1,835
[ "MIT" ]
0
d104419b196d56d4de37cff47c32e88e28c58690
https://github.com/ddcas/singing-language-identification/tree/d104419b196d56d4de37cff47c32e88e28c58690
VertexDirectEmbedder
import torch import torch.utils.data from torch import nn def normalize_embeddings(embeddings: 'torch.Tensor', epsilon: 'float'=1e-06 ) ->torch.Tensor: """ Normalize N D-dimensional embedding vectors arranged in a tensor [N, D] Args: embeddings (tensor [N, D]): N D-dimensional embedding vecto...
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...
YutouTaro/detectron2
VertexDirectEmbedder
false
12,026
[ "Apache-2.0" ]
0
29f90062fa2978a35f1d599bb30768a2370378ca
https://github.com/YutouTaro/detectron2/tree/29f90062fa2978a35f1d599bb30768a2370378ca
rotate
import torch import torch.nn as nn class rotate(nn.Module): def __init__(self): super().__init__() def forward(self, x): x90 = x.transpose(2, 3).flip(3) x180 = x.flip(2).flip(3) x270 = x.transpose(2, 3).flip(2) x = torch.cat((x, x90, x180, x270), dim=0) 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...
amonod/udvd
rotate
false
1,429
[ "MIT" ]
0
a1ccb777d205255ac68c40efb93dd3996f562c45
https://github.com/amonod/udvd/tree/a1ccb777d205255ac68c40efb93dd3996f562c45
EncoderUnit
# 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....
dugusword/transformer
EncoderUnit
false
6,633
[ "MIT" ]
1
7aa10968f0e60d545bbd17f1f8c1dfb7ee88c62b
https://github.com/dugusword/transformer/tree/7aa10968f0e60d545bbd17f1f8c1dfb7ee88c62b
psi
# 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...
LuckMonkeys/ATSPrivacy
psi
false
8,481
[ "MIT" ]
14
6b580942c6b98b6348d313f2bf90202ec19cefce
https://github.com/LuckMonkeys/ATSPrivacy/tree/6b580942c6b98b6348d313f2bf90202ec19cefce
BasicModel4_MultiArgs
# 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...
LMdeLiangMi/captum
BasicModel4_MultiArgs
false
5,471
[ "BSD-3-Clause" ]
1
8bd9686013fe0ba8996e9b1cbeb0ea8e91512787
https://github.com/LMdeLiangMi/captum/tree/8bd9686013fe0ba8996e9b1cbeb0ea8e91512787
TorchAdd
# 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...
NVIDIA-AI-IOT-private/torch2trt
TorchAdd
false
10,551
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
Block
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
denisleonov/pytorch-CycleGAN-and-pix2pix
Block
false
12,280
[ "BSD-3-Clause" ]
0
d1a5f0c5911f70ed896f826619b4067ce737a83d
https://github.com/denisleonov/pytorch-CycleGAN-and-pix2pix/tree/d1a5f0c5911f70ed896f826619b4067ce737a83d
IOUloss
import torch import torch.nn as nn class IOUloss(nn.Module): def __init__(self, reduction='none', loss_type='iou'): super(IOUloss, self).__init__() self.reduction = reduction self.loss_type = loss_type def forward(self, pred, target): assert pred.shape[0] == target.shape[0] ...
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...
augmentedstartups/EmotionDetectionYoloX
IOUloss
false
3,138
[ "Apache-2.0" ]
0
2b0e13b94486a0bd85628f1483a0b710503c2005
https://github.com/augmentedstartups/EmotionDetectionYoloX/tree/2b0e13b94486a0bd85628f1483a0b710503c2005
CrossEntropyLoss
# 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.functi...
RicJM/weighted_c2d
CrossEntropyLoss
false
14,315
[ "MIT" ]
49
38053869b77c1544349c53ba6f3c1325254aa413
https://github.com/RicJM/weighted_c2d/tree/38053869b77c1544349c53ba6f3c1325254aa413
DilatedResidualLayer
# 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...
Jaakik/hydra-ml
DilatedResidualLayer
false
11,535
[ "MIT" ]
0
eae54fc478163130c94450a2a2ddea4f204c1ea9
https://github.com/Jaakik/hydra-ml/tree/eae54fc478163130c94450a2a2ddea4f204c1ea9