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
MSELoss
import functools import torch import torch.nn as nn import torch.nn.functional as F def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". Return: Tensor: Reduced loss ten...
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 functools import torch.nn as nn import torch.nn.functional as F assert_size_stride...
Min-Sheng/mmregression
MSELoss
false
841
[ "Apache-2.0" ]
0
6d70383d89ccb3dea7f425b665c2a184d014a99f
https://github.com/Min-Sheng/mmregression/tree/6d70383d89ccb3dea7f425b665c2a184d014a99f
GramMatrix
# 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 torch.nn as nn import torch.onnx assert_size_stride = torch._C._dynamo.gu...
adi-horowitz/final-project
GramMatrix
false
1,377
[ "MIT" ]
0
0fd864663e92a6bcaa5f068e3e45b2a76460d335
https://github.com/adi-horowitz/final-project/tree/0fd864663e92a6bcaa5f068e3e45b2a76460d335
NormalProposal
import torch from torch import nn from torch.distributions import Normal class NormalProposal(nn.Module): def __init__(self, sigma): super(NormalProposal, self).__init__() self.sigma = sigma def forward(self, x): return Normal(x, self.sigma).sample() def get_inputs(): return [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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
BrettLeroux/GRIPS-MCMC
NormalProposal
false
168
[ "MIT" ]
0
154457acfc47977e25870aed76c7dc49d70608af
https://github.com/BrettLeroux/GRIPS-MCMC/tree/154457acfc47977e25870aed76c7dc49d70608af
_FakeMegatronMLP
from _paritybench_helpers import _mock_config import torch import torch.nn as nn import torch.nn.functional as F class _FakeMegatronMLP(nn.Module): """ A fake mlp without model parallelism for correctness testing """ def __init__(self, args, _): super().__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 torch.nn as ...
xxchenxx/fastmoe
_FakeMegatronMLP
false
13,131
[ "Apache-2.0" ]
0
f60dd0e1f9f0447e56ff265c9ede304b88d0556b
https://github.com/xxchenxx/fastmoe/tree/f60dd0e1f9f0447e56ff265c9ede304b88d0556b
StyledConv
# 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...
YotamNitzan/pixel2style2pixel
StyledConv
false
2,995
[ "MIT" ]
0
b943f9e6de046a54b901eea1d8714cb02a71605f
https://github.com/YotamNitzan/pixel2style2pixel/tree/b943f9e6de046a54b901eea1d8714cb02a71605f
ResBlk
import math import torch import torch.nn as nn import torch.nn.functional as F def normalize(x, eps=1e-06): """Apply min-max normalization.""" x = x.contiguous() N, C, H, W = x.size() x_ = x.view(N * C, -1) max_val = torch.max(x_, dim=1, keepdim=True)[0] min_val = torch.min(x_, dim=1, keepdim=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.functional as F assert_size_stride = torch...
fpaupier/stargan-v2
ResBlk
false
6,701
[ "MIT" ]
1
18d2e04ed6e6df963b84345e798d94383757aaa2
https://github.com/fpaupier/stargan-v2/tree/18d2e04ed6e6df963b84345e798d94383757aaa2
MaxPool2d
import torch import torch.nn as nn import torch.nn.functional as F class _SpikeMaxPoolNd(nn.Module): def __init__(self, kernel_size, stride=None, padding=0, dilation=1, ceil_mode=False): super(_SpikeMaxPoolNd, self).__init__() self.kernel_size = kernel_size self.stride = stride or...
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...
tomking/PySNN
MaxPool2d
false
16,598
[ "MIT" ]
175
c99ba6cd28a518dc07cab765acac9b69ac6fe36b
https://github.com/tomking/PySNN/tree/c99ba6cd28a518dc07cab765acac9b69ac6fe36b
Linear_tanh
import torch import torch.nn as nn class Linear_tanh(nn.Module): def __init__(self, dim_in, dim_out, bias=True): super().__init__() self.linear = nn.Linear(dim_in, dim_out, bias=bias) self.activation = nn.Tanh() def forward(self, x): out = self.linear(x) out = self.ac...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
Armand-Morin/AutoML
Linear_tanh
false
64
[ "MIT" ]
0
189867e2c7734d9afb87a9f51fd42bd6cc527a64
https://github.com/Armand-Morin/AutoML/tree/189867e2c7734d9afb87a9f51fd42bd6cc527a64
BertOutput
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class BertOutput(nn.Module): def __init__(self, config): super(BertOutput, self).__init__() self.dense = nn.Linear(config.intermediate_size, config.hidden_size) self.LayerNorm = nn.LayerNorm(config.hidden_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._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
IsaacChanghau/ReLoCLNet
BertOutput
false
8,783
[ "MIT" ]
31
56cb666ce516cce9acbcfce78fb4e95d81e11e54
https://github.com/IsaacChanghau/ReLoCLNet/tree/56cb666ce516cce9acbcfce78fb4e95d81e11e54
AddCoords
import torch import torch.nn as nn class AddCoords(nn.Module): def __init__(self, with_r=False): super().__init__() self.with_r = with_r def forward(self, input_tensor): """ Args: input_tensor: shape(batch, channel, x_dim, y_dim) """ batch_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...
NguyenTheAn/AdaptiveWingLoss
AddCoords
false
9,362
[ "Apache-2.0" ]
0
abaade9521c1382739a158f3ad5ce493948add1d
https://github.com/NguyenTheAn/AdaptiveWingLoss/tree/abaade9521c1382739a158f3ad5ce493948add1d
NormKLLoss
# 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.utils.data import torch.nn.init from torch.nn.modules.loss i...
ljw23/ConvLab-2
NormKLLoss
false
15,953
[ "Apache-2.0" ]
339
13d48ea0e441701bd66100689b6c25b561f15525
https://github.com/ljw23/ConvLab-2/tree/13d48ea0e441701bd66100689b6c25b561f15525
BasicConvTestModel
# 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 from torchvision import models as models import torch.nn.pa...
aalborov/openvino_training_extensions
BasicConvTestModel
false
6,058
[ "Apache-2.0" ]
1
a0bb39424151a98e1ca80c4aa5c865636d401785
https://github.com/aalborov/openvino_training_extensions/tree/a0bb39424151a98e1ca80c4aa5c865636d401785
SpatialGroupEnhance
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn from torch.nn import init assert_size_stride = torch._C._d...
LiChengChen666/DetectDee
SpatialGroupEnhance
false
9,809
[ "Apache-2.0" ]
0
1e6aaa0d15b1fc12d1342d8a922004e372b5f437
https://github.com/LiChengChen666/DetectDee/tree/1e6aaa0d15b1fc12d1342d8a922004e372b5f437
BertAttention
# 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....
caldoe/BERT-NL2SPARQL
BertAttention
false
6,386
[ "MIT" ]
1
2e09c1aeffc855bc7f1dc8c182e21153b2bc73a8
https://github.com/caldoe/BERT-NL2SPARQL/tree/2e09c1aeffc855bc7f1dc8c182e21153b2bc73a8
FocalLoss
import torch import torch.nn.functional as F class FocalLoss(torch.nn.Module): def __init__(self, gamma=2): super().__init__() self.gamma = gamma def forward(self, input, target): if not target.size() == input.size(): raise ValueError( 'Target size ({}) mu...
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 assert_size...
rskmoi/kaggle-imet
FocalLoss
false
7,582
[ "MIT" ]
1
483e9e6dbae5b1d8e023e0812c4b990afca874bc
https://github.com/rskmoi/kaggle-imet/tree/483e9e6dbae5b1d8e023e0812c4b990afca874bc
SoftAttention
import torch import numpy as np import torch.nn as nn class SoftAttention(nn.Module): """ https://arxiv.org/abs/1803.10916 """ def __init__(self, emb_dim, attn_dim): super().__init__() self.attn_dim = attn_dim self.emb_dim = emb_dim self.W = torch.nn.Linear(self.emb_di...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
shangeth/wavencoder
SoftAttention
false
16,399
[ "MIT" ]
56
cd1a277c2cc44075c9f4506e344b3a725ad5b9fe
https://github.com/shangeth/wavencoder/tree/cd1a277c2cc44075c9f4506e344b3a725ad5b9fe
BertPredictionHeadTransform
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math import ...
minjoong507/Image-Captioning-Transformer
BertPredictionHeadTransform
false
7,239
[ "MIT" ]
1
813060f0bb656e336154173f11e99a80362c8c2a
https://github.com/minjoong507/Image-Captioning-Transformer/tree/813060f0bb656e336154173f11e99a80362c8c2a
Hflip
# 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...
lyhyl/kornia
Hflip
false
12,742
[ "ECL-2.0", "Apache-2.0" ]
0
5bd3aeb0d54dedac01e6eaf8bac37779bab0bec5
https://github.com/lyhyl/kornia/tree/5bd3aeb0d54dedac01e6eaf8bac37779bab0bec5
GumbelQuantize
import torch from torch import nn from torch import einsum import torch.nn.functional as F class GumbelQuantize(nn.Module): """ Gumbel Softmax trick quantizer Categorical Reparameterization with Gumbel-Softmax, Jang et al. 2016 https://arxiv.org/abs/1611.01144 """ def __init__(self, num_hidde...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
baudm/deep-vector-quantization
GumbelQuantize
false
1,547
[ "MIT" ]
0
211bda99a6c750c1e65aff082aa865fed8677b8a
https://github.com/baudm/deep-vector-quantization/tree/211bda99a6c750c1e65aff082aa865fed8677b8a
Hardtanh
import torch import torch.nn as nn class Hardtanh(nn.Module): def __init__(self): super(Hardtanh, self).__init__() self.layer = nn.Hardtanh(-2, 2) def forward(self, x): x = self.layer(x) return x def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
yifanpu001/PytorchToCaffe
Hardtanh
false
4,710
[ "MIT" ]
0
37c1ebfc3547e93b1c174721036d03c831c60e48
https://github.com/yifanpu001/PytorchToCaffe/tree/37c1ebfc3547e93b1c174721036d03c831c60e48
AdaptiveFilterResponseNorm
import torch import torch.nn as nn import torch.nn.functional as func import torch.jit import torch.nn class AdaptiveFilterResponseNorm(nn.Module): def __init__(self, in_size, ada_size, eps=1e-16): super().__init__() self.eps = eps self.in_size = in_size self.scale = nn.Linear(ada...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ankmathur96/torchsupport
AdaptiveFilterResponseNorm
false
3,168
[ "MIT" ]
0
77bf4a90b8770a408665e2604428808c3ed2f979
https://github.com/ankmathur96/torchsupport/tree/77bf4a90b8770a408665e2604428808c3ed2f979
TensorClampOptionMax
import torch class TensorClampOptionMax(torch.nn.Module): def forward(self, x): return x.clamp(max=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...
ahangchen/torch2trt
TensorClampOptionMax
false
6,116
[ "MIT" ]
1
53c663f0e0570ef7ffd6771354ae3478f63bd328
https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328
AdversarialNetwork
# 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_...
caozhangjie/kinetics_i3d_pytorch
AdversarialNetwork
false
9,917
[ "MIT" ]
0
237713bb76cf71b6d60d1a4df98f00df3a489cc3
https://github.com/caozhangjie/kinetics_i3d_pytorch/tree/237713bb76cf71b6d60d1a4df98f00df3a489cc3
focal_BCELoss
import torch import torch.nn as nn class focal_BCELoss(nn.Module): def __init__(self, alpha=10, gamma=2): super(focal_BCELoss, self).__init__() self.alpha = alpha self.gamma = gamma def forward(self, input, target, eps=1e-07): input = torch.clamp(input, eps, 1 - eps) ...
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 ...
DRL-CASIA/Perception
focal_BCELoss
false
7,925
[ "MIT" ]
39
a0e7d3957267ce92a82b03ab3eca96916d22c4f2
https://github.com/DRL-CASIA/Perception/tree/a0e7d3957267ce92a82b03ab3eca96916d22c4f2
SingleHiddenLayer
import torch class SingleHiddenLayer(torch.nn.Module): def __init__(self, input_channels, hidden_channels): super(SingleHiddenLayer, self).__init__() self.input_channels = input_channels self.hidden_channels = hidden_channels self.linear1 = torch.nn.Linear(hidden_channels, 128) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
lysuk96/rl_representations
SingleHiddenLayer
false
15,985
[ "MIT" ]
438
19de69305e40c9b3a1d746a7af26d232c9fb3f6f
https://github.com/lysuk96/rl_representations/tree/19de69305e40c9b3a1d746a7af26d232c9fb3f6f
RAddFloat
# 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
RAddFloat
false
10,525
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
BasicBlock
# 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....
ferodia/MichiGAN
BasicBlock
false
15,351
[ "MIT" ]
235
a49acb49f9659d7538e62faa3ed08e46afb0ddae
https://github.com/ferodia/MichiGAN/tree/a49acb49f9659d7538e62faa3ed08e46afb0ddae
FocalLoss
import torch import torch.nn as nn import torch.nn.functional as F class FocalSigmoidLossFunc(torch.autograd.Function): """ compute backward directly for better numeric stability """ @staticmethod def forward(ctx, logits, label, alpha, gamma): logits = logits.float() coeff = 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 from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
jaredaevans/UltrafastNST
FocalLoss
false
6,923
[ "MIT" ]
1
6671c6b618ce6bb4920b15f782be962e484a5423
https://github.com/jaredaevans/UltrafastNST/tree/6671c6b618ce6bb4920b15f782be962e484a5423
MaskedInstanceNorm1d
import torch import torch.cuda from torch import nn import torch.distributed import torch.utils.data import torch.optim class MaskedInstanceNorm1d(nn.Module): """Instance norm + masking.""" MAX_CNT = 100000.0 def __init__(self, d_channel: 'int', unbiased: 'bool'=True, affine: 'bool'=False): ...
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.cuda from torch...
hamjam/NeMo
MaskedInstanceNorm1d
false
15,487
[ "Apache-2.0" ]
4,145
b3484d32e1317666151f931bfa39867d88ed8658
https://github.com/hamjam/NeMo/tree/b3484d32e1317666151f931bfa39867d88ed8658
SuperPointNet
import torch import torch.optim import torch.utils.data class SuperPointNet(torch.nn.Module): """ Pytorch definition of SuperPoint Network. """ def __init__(self): super(SuperPointNet, self).__init__() self.relu = torch.nn.ReLU(inplace=True) self.pool = torch.nn.MaxPool2d(kernel_size=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
KimSinjeong/SuperPoint_URP
SuperPointNet
false
9,330
[ "MIT" ]
0
11e6203f6b651f1f32067e85058f8961b556f85c
https://github.com/KimSinjeong/SuperPoint_URP/tree/11e6203f6b651f1f32067e85058f8961b556f85c
NearestNeighbourx4
# 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_...
wsdea/EfficientSR
NearestNeighbourx4
false
4,548
[ "MIT" ]
0
077dea18c90e0d5bed722c609a776033c09f80e6
https://github.com/wsdea/EfficientSR/tree/077dea18c90e0d5bed722c609a776033c09f80e6
Net
import torch import torch.nn as nn import torch.nn.functional as F from torch import tanh class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.a1 = nn.Conv2d(5, 16, kernel_size=3, padding=1) self.a2 = nn.Conv2d(16, 16, kernel_size=3, padding=1) self.a3 = nn.C...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
srivarshan-s/Neural-Chess-2D
Net
false
4,411
[ "MIT" ]
0
81ec7eb9b4c3c82dc7f6ba5bd4313bd6ede9994e
https://github.com/srivarshan-s/Neural-Chess-2D/tree/81ec7eb9b4c3c82dc7f6ba5bd4313bd6ede9994e
ContentLoss
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
Enigmatisms/NeuralStyle
ContentLoss
false
5,130
[ "Apache-2.0" ]
1
27b435b5c51b41427e9f465793a0b81ad7248ab8
https://github.com/Enigmatisms/NeuralStyle/tree/27b435b5c51b41427e9f465793a0b81ad7248ab8
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...
absallh/A_yolov3
Mish
false
18,215
[ "Apache-2.0" ]
6
550ec41de42b8efe638e887c51a568189947e049
https://github.com/absallh/A_yolov3/tree/550ec41de42b8efe638e887c51a568189947e049
TestNet
import torch import torch.nn as nn class ScaleLayer(nn.Module): def __init__(self, init_value=0.001): super().__init__() self.scale = nn.Parameter(torch.FloatTensor([init_value])) def forward(self, input): return input * self.scale class TestNet(nn.Module): def __init__(self):...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
dizzyvn/torch-tcav
TestNet
false
1,846
[ "Apache-2.0" ]
0
c9795e817d1104923ef7422f5575607e6b835abc
https://github.com/dizzyvn/torch-tcav/tree/c9795e817d1104923ef7422f5575607e6b835abc
AngleMultipleLinear
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from torch.nn import Parameter def normalize(x, dim, p=2, eps=1e-12): if torch.onnx.is_in_onnx_export(): return OnnxLpNormalization.apply(x, dim, p, eps) else: return F.normalize(x, dim=dim) class OnnxLpNor...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
sovrasov/mmaction2
AngleMultipleLinear
false
4,432
[ "Apache-2.0" ]
0
055625bf6d6e06e9f811cc4f8b0332c18cebc98c
https://github.com/sovrasov/mmaction2/tree/055625bf6d6e06e9f811cc4f8b0332c18cebc98c
GatedConvTranspose
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
Justin-Tan/ffjord
GatedConvTranspose
false
736
[ "MIT" ]
0
2caf8a4ff84933672fe0d94255d665b3dd7a6791
https://github.com/Justin-Tan/ffjord/tree/2caf8a4ff84933672fe0d94255d665b3dd7a6791
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
LouisCaixuran/gomoku
Net
false
5,585
[ "Apache-2.0" ]
1
c1b6d508522d9e8c78be827f326bbee54c4dfd8b
https://github.com/LouisCaixuran/gomoku/tree/c1b6d508522d9e8c78be827f326bbee54c4dfd8b
UpdateFunc
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import torch.nn as nn from torch.nn.modules.module i...
HAXRD/PIC
UpdateFunc
false
8,197
[ "MIT" ]
28
658b4dd6b01e64413d5f8f0107d9167f1bd78546
https://github.com/HAXRD/PIC/tree/658b4dd6b01e64413d5f8f0107d9167f1bd78546
L1RankLoss
import torch import torch.nn.functional as F import torch.onnx class L1RankLoss(torch.nn.Module): """ L1 loss + Rank loss """ def __init__(self, **kwargs): super(L1RankLoss, self).__init__() self.l1_w = kwargs.get('l1_w', 1) self.rank_w = kwargs.get('rank_w', 1) self.h...
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.onnx asse...
usutdzxych/CenseoQoE
L1RankLoss
false
16,658
[ "BSD-3-Clause" ]
75
3f653296b223da6190e1e1781e7b9b54ff877102
https://github.com/usutdzxych/CenseoQoE/tree/3f653296b223da6190e1e1781e7b9b54ff877102
Agent
import torch import torch.nn.functional as F import torch.nn as nn class Agent(torch.nn.Module): def __init__(self, numObs, numActions): super(Agent, self).__init__() self.critic_input = nn.Linear(numObs, 32) self.critic_fc1 = nn.Linear(32, 32) self.critic_output = nn.Linear(32, 1...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
mpgussert/fundamentalRL
Agent
false
7,277
[ "MIT" ]
1
4f45436226e0823c21cac316dec8bbf1df697467
https://github.com/mpgussert/fundamentalRL/tree/4f45436226e0823c21cac316dec8bbf1df697467
VarifocalLoss
import torch import torch.nn.functional as F import torch.nn as nn def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". Return: Tensor: Reduced loss tensor. """ ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
Guoning-Chen/mmdetection
VarifocalLoss
false
496
[ "Apache-2.0" ]
0
f1d1c5a19dbe6aa2e74fc9ca2e9578db4532fc64
https://github.com/Guoning-Chen/mmdetection/tree/f1d1c5a19dbe6aa2e74fc9ca2e9578db4532fc64
FCDiscriminator
# 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...
JohanVer/heatnet
FCDiscriminator
false
17,529
[ "MIT" ]
7
a2de9ec918fbbc6d9433aba344cbbcb2a2cdc85e
https://github.com/JohanVer/heatnet/tree/a2de9ec918fbbc6d9433aba344cbbcb2a2cdc85e
KLNormCriterion
# 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 ...
PaperCodeSubmission/ICML2020-697
KLNormCriterion
false
8,667
[ "MIT" ]
12
00f7732c236b9c6234e76a47dfebe5de314d5c01
https://github.com/PaperCodeSubmission/ICML2020-697/tree/00f7732c236b9c6234e76a47dfebe5de314d5c01
KLDLoss
from _paritybench_helpers import _mock_config import torch from torch import nn class KLDLoss(nn.Module): def __init__(self, opt): super().__init__() def forward(self, mu, logvar): kld_loss = torch.mean(-0.5 * torch.sum(1 + logvar - mu.pow(2) - logvar.exp(), dim=1), dim=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.triton_helpers import math as tl_math from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_...
DSciLab/VAE-Lab
KLDLoss
false
3,721
[ "MIT" ]
0
ab37cc1399e3ece28ce426d8bd31149b8f492f82
https://github.com/DSciLab/VAE-Lab/tree/ab37cc1399e3ece28ce426d8bd31149b8f492f82
SAB
import math import torch import torch.nn.functional as F import torch.nn as nn class MAB(nn.Module): def __init__(self, dim_Q, dim_K, dim_V, num_heads, ln=False): super(MAB, self).__init__() self.dim_V = dim_V self.num_heads = num_heads self.fc_q = nn.Linear(dim_Q, dim_V) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
AntonValk/BagGraph-Graph-MIL
SAB
false
16,960
[ "MIT" ]
8
1447b52b32995cf6c71e731dd1261104cd66ced0
https://github.com/AntonValk/BagGraph-Graph-MIL/tree/1447b52b32995cf6c71e731dd1261104cd66ced0
BoxOffsetIntersection
import torch import torch.nn as nn import torch.nn.functional as F class BoxOffsetIntersection(nn.Module): def __init__(self, dim): super(BoxOffsetIntersection, self).__init__() self.dim = dim self.layers = nn.Parameter(torch.zeros(self.dim * 2 + 2, self.dim)) nn.init.xavier_unifo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
google-research/smore
BoxOffsetIntersection
false
15,460
[ "Apache-2.0" ]
78
e4ba95a7466ef7d018987bce7688b77bf2ea7e4f
https://github.com/google-research/smore/tree/e4ba95a7466ef7d018987bce7688b77bf2ea7e4f
PositionwiseFeedForward
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ZfSangkuan/ASER
PositionwiseFeedForward
false
14,728
[ "MIT" ]
256
c34d6f2432b181bae9f4ee4fa70ce270dbc1dee7
https://github.com/ZfSangkuan/ASER/tree/c34d6f2432b181bae9f4ee4fa70ce270dbc1dee7
Blockdown
import torch import torch.utils.data import torch import torch.nn as nn class conv_bn_relu(nn.Module): def __init__(self, in_channel, out_channel, stride=1, has_relu=True): super(conv_bn_relu, self).__init__() self.conv = nn.Conv2d(in_channel, out_channel, 3, stride=stride, padding=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.utils.data impor...
SeanChenxy/GAN_RS
Blockdown
false
8,746
[ "BSD-3-Clause" ]
17
a1786b946caf7bd24c83cea4c7a9bb74445cc381
https://github.com/SeanChenxy/GAN_RS/tree/a1786b946caf7bd24c83cea4c7a9bb74445cc381
SoftmaxOutputLayer
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
oya163/torchnlp
SoftmaxOutputLayer
false
4,112
[ "Apache-2.0" ]
0
361caa24d741e47b8bd92af122ae281d6ad72d9d
https://github.com/oya163/torchnlp/tree/361caa24d741e47b8bd92af122ae281d6ad72d9d
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....
Andr3wis2Cool4School/AI-pro
BertSelfAttention
false
1,304
[ "MIT" ]
0
dfe5f5959bc187d899a86f13b84158c66f64d1cc
https://github.com/Andr3wis2Cool4School/AI-pro/tree/dfe5f5959bc187d899a86f13b84158c66f64d1cc
Attention
from _paritybench_helpers import _mock_config from torch.nn import Module import math import torch from torch import nn from torch.nn import Parameter from torch.nn.parameter import Parameter class Conv1D(nn.Module): def __init__(self, nf, nx): super(Conv1D, self).__init__() self.nf = nf ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
mandaltanmoy1938/VisualGPT
Attention
false
16,009
[ "MIT" ]
86
9ba78948282fdca502d5030f4eccc3df562982c3
https://github.com/mandaltanmoy1938/VisualGPT/tree/9ba78948282fdca502d5030f4eccc3df562982c3
MSE
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.checkpoint assert_size_stride = torch._C._dynamo...
byamao1/MMSA
MSE
false
14,984
[ "MIT" ]
198
1a894d042144c9ac75b3465d38871ce8c2987251
https://github.com/byamao1/MMSA/tree/1a894d042144c9ac75b3465d38871ce8c2987251
PositionwiseFeedForwardNet
# 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_...
ozzieba/pytorch-original-transformer
PositionwiseFeedForwardNet
false
16,212
[ "MIT" ]
654
4c1e17a701fae050e362e962284fb99547636f75
https://github.com/ozzieba/pytorch-original-transformer/tree/4c1e17a701fae050e362e962284fb99547636f75
vd_linear_1L_hetero
import math import torch import numpy as np import torch.nn as nn import torch.nn.functional as F import torch.utils.data def calculate_kl(log_alpha): return 0.5 * torch.sum(torch.log1p(torch.exp(-log_alpha))) class VdLinear(nn.Module): """ variational dropout """ def __init__(self, n_in, n_ou...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Neronjust2017/Bayesian-neural-networks
vd_linear_1L_hetero
false
17,780
[ "MIT" ]
4
9d7f781f5c2dfa8fadf26300b4b5b64366c939cd
https://github.com/Neronjust2017/Bayesian-neural-networks/tree/9d7f781f5c2dfa8fadf26300b4b5b64366c939cd
GatedFusion
import torch import torch.nn as nn from scipy.sparse import * class GatedFusion(nn.Module): def __init__(self, hidden_size): super(GatedFusion, self).__init__() """GatedFusion module""" self.fc_z = nn.Linear(4 * hidden_size, hidden_size, bias=True) def forward(self, h_state, input): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from scipy.sparse import * assert_size_stride = torch._C._...
talha1503/RL-based-Graph2Seq-for-NQG
GatedFusion
false
16,527
[ "Apache-2.0" ]
100
1039e0b6231ae7029ea6e4073b1e55df5ad2e928
https://github.com/talha1503/RL-based-Graph2Seq-for-NQG/tree/1039e0b6231ae7029ea6e4073b1e55df5ad2e928
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....
minjoong507/Image-Captioning-Transformer
BertSelfAttention
false
7,247
[ "MIT" ]
1
813060f0bb656e336154173f11e99a80362c8c2a
https://github.com/minjoong507/Image-Captioning-Transformer/tree/813060f0bb656e336154173f11e99a80362c8c2a
Fair
# 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 ...
davefiorino/EDSR-PyTorch
Fair
false
1,796
[ "MIT" ]
0
97ad32a09a71816a36c45d92cdb2ea7ab42ba685
https://github.com/davefiorino/EDSR-PyTorch/tree/97ad32a09a71816a36c45d92cdb2ea7ab42ba685
SE_Connect
import torch import torch.nn as nn import torch.nn.functional as F class SE_Connect(nn.Module): def __init__(self, channels, s=2): super().__init__() assert channels % s == 0, '{} % {} != 0'.format(channesl, s) self.linear1 = nn.Linear(channels, channels // s) self.linear2 = nn.Li...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
SecretKeyTeam/voxceleb_trainer
SE_Connect
false
9,573
[ "MIT" ]
0
e235cbc2961d32395d30cf606ee830cd47716383
https://github.com/SecretKeyTeam/voxceleb_trainer/tree/e235cbc2961d32395d30cf606ee830cd47716383
DAInsHead
# 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 ...
FengJunJian/Domain-Adaptive-Faster-RCNN-PyTorch
DAInsHead
false
9,318
[ "MIT" ]
0
35aa8d208fec22af8c502f8d6d2f562e857d4175
https://github.com/FengJunJian/Domain-Adaptive-Faster-RCNN-PyTorch/tree/35aa8d208fec22af8c502f8d6d2f562e857d4175
VAE
# 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 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...
benedictquartey/softgym_wm
VAE
false
12,200
[ "BSD-3-Clause" ]
0
0aef75fed207b11029f6052c656a679c105b4677
https://github.com/benedictquartey/softgym_wm/tree/0aef75fed207b11029f6052c656a679c105b4677
CReLU_IN
# 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_...
cnzeki/PSENet
CReLU_IN
false
3,305
[ "Apache-2.0" ]
0
c7e0785404e12866171e9da678736abae9cdb8cb
https://github.com/cnzeki/PSENet/tree/c7e0785404e12866171e9da678736abae9cdb8cb
MultiHeadAttention
import torch import torch.nn as nn import torch.utils.data import torch.nn.functional as F class MultiHeadAttention(nn.Module): """ input: query --- [N, T_q, query_dim] key --- [N, T_k, key_dim] output: out --- [N, T_q, num_units] """ def __init__(self, query_dim, key_dim,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
CookiePPP/mellotron
MultiHeadAttention
false
9,062
[ "BSD-3-Clause" ]
0
488425981c19cd0eddddea13d1348da4bfef8d26
https://github.com/CookiePPP/mellotron/tree/488425981c19cd0eddddea13d1348da4bfef8d26
GaussionConvF
import torch import torch.nn.functional as F import torch.nn as nn class GaussionConvF(nn.Module): """The first layer in `RobustGCN` that conver node features to distribution (mean, var)""" def __init__(self, in_features, out_features, bias=False, gamma=1.0): super().__init__() self.in_featur...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
EdisonLeeeee/Graphgallery
GaussionConvF
false
5,103
[ "MIT" ]
1
8ae9ef57d44f073d0ceaf3f33a3a998546f960a8
https://github.com/EdisonLeeeee/Graphgallery/tree/8ae9ef57d44f073d0ceaf3f33a3a998546f960a8
MultinomialNLLLoss
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import torch.onnx def _reduce(x, reduction='elementwise_mean'): if reduction == 'none': return x elif reduction == 'elementwise_mea...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
akshayka/gavel
MultinomialNLLLoss
false
14,795
[ "MIT" ]
67
40a22a725f2e70478483e98c9b07c6fc588e0c40
https://github.com/akshayka/gavel/tree/40a22a725f2e70478483e98c9b07c6fc588e0c40
GIoU_loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
debrouchovea/ReproduceGoturn
GIoU_loss
false
3,411
[ "MIT" ]
0
d60f13c781ca612cacc17536530bbee989bdfa45
https://github.com/debrouchovea/ReproduceGoturn/tree/d60f13c781ca612cacc17536530bbee989bdfa45
SimpleSliceModel
import torch import torch.onnx import torch.nn class SimpleSliceModel(torch.nn.Module): def __init__(self): super(SimpleSliceModel, self).__init__() def forward(self, tensor): other = (tensor + tensor)[1:] return other[0][1:] def get_inputs(): return [torch.rand([4, 4, 4, 4])] ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guar...
geoffberry/glow
SimpleSliceModel
false
12,412
[ "Apache-2.0" ]
0
24b2827c830eb58af56a0704e899968026832e9c
https://github.com/geoffberry/glow/tree/24b2827c830eb58af56a0704e899968026832e9c
BertOutput
from _paritybench_helpers import _mock_config import torch from torch import nn class BertOutput(nn.Module): def __init__(self, model_config): super().__init__() self.dense = nn.Linear(model_config.intermediate_size, model_config .hidden_size) self.LayerNorm = nn.LayerNorm(mod...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
HS-YN/PanoAVQA
BertOutput
false
18,391
[ "MIT" ]
3
657b83421ce64ea18b3e79fb580afc7034403ccc
https://github.com/HS-YN/PanoAVQA/tree/657b83421ce64ea18b3e79fb580afc7034403ccc
Contracting_Block
import torch import torch.nn as nn import torch.nn.functional as F class Contracting_Block(nn.Module): def __init__(self, in_channels, out_channels): super(Contracting_Block, self).__init__() self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=3) self.conv2 = nn.Conv2d(out_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 from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
parth2035/U-Net-Implementation
Contracting_Block
false
7,461
[ "MIT" ]
1
36ed8d140ef8a0031f63f2d1f577dcef92c4dab6
https://github.com/parth2035/U-Net-Implementation/tree/36ed8d140ef8a0031f63f2d1f577dcef92c4dab6
UpdateNodeEmbeddingLayer
# 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_...
NinaMaz/eco-dqn
UpdateNodeEmbeddingLayer
false
5,671
[ "MIT" ]
1
d9ea164c59014e4209ae069005029af818372ade
https://github.com/NinaMaz/eco-dqn/tree/d9ea164c59014e4209ae069005029af818372ade
TorchDiceLoss
import torch from torch import nn def soft_dice_loss(outputs, targets, per_image=False): batch_size = outputs.size()[0] eps = 1e-05 if not per_image: batch_size = 1 dice_target = targets.contiguous().view(batch_size, -1).float() dice_output = outputs.contiguous().view(batch_size, -1) i...
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...
Spiruel/solaris
TorchDiceLoss
false
11,944
[ "Apache-2.0" ]
0
eb2ce05265a462d69b01ee2b621a85a3e9082402
https://github.com/Spiruel/solaris/tree/eb2ce05265a462d69b01ee2b621a85a3e9082402
Vgg16
# 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...
Arthur1511/CAD-COVID
Vgg16
false
186
[ "MIT" ]
0
daab5d70b9f811da41f702e92179a15ca4809fa5
https://github.com/Arthur1511/CAD-COVID/tree/daab5d70b9f811da41f702e92179a15ca4809fa5
CoralLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
Raschka-research-group/coral-pytorch
CoralLayer
false
8,678
[ "MIT" ]
32
6b85e287118476095bac85d6f3dabc6ffb89a326
https://github.com/Raschka-research-group/coral-pytorch/tree/6b85e287118476095bac85d6f3dabc6ffb89a326
PositionwiseFeedForward
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
YunjieJi/attention-is-all-you-need-pytorch
PositionwiseFeedForward
false
12,018
[ "MIT" ]
0
636117b438d584ccba0ae5d6998fc02f3888f46e
https://github.com/YunjieJi/attention-is-all-you-need-pytorch/tree/636117b438d584ccba0ae5d6998fc02f3888f46e
MegatronGelu
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn import torch.onnx import torch.utils.checkpoint assert_size_str...
almiliMSFT/onnxruntime
MegatronGelu
false
14,799
[ "MIT" ]
6,036
c002dc86a364852859ca9642698fcfc5edf22c9d
https://github.com/almiliMSFT/onnxruntime/tree/c002dc86a364852859ca9642698fcfc5edf22c9d
_Logit
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
IKACE/DifferentialByzantine-1
_Logit
false
5,313
[ "MIT" ]
1
809fd6e070fedeb87a6dbff6f883e93e3c5c8e09
https://github.com/IKACE/DifferentialByzantine-1/tree/809fd6e070fedeb87a6dbff6f883e93e3c5c8e09
AE_big_2D_v3
import torch import torch.nn as nn import torch.utils.data class AE_big_2D_v3(nn.Module): def __init__(self, n_features=4): super(AE_big_2D_v3, self).__init__() self.en1 = nn.Linear(n_features, 8) self.en2 = nn.Linear(8, 6) self.en3 = nn.Linear(6, 2) self.de1 = nn.Linear(2...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
gitter-badger/HEPAutoencoders
AE_big_2D_v3
false
12,451
[ "Apache-2.0" ]
0
43010cd66fa4335a04b30b87926148e1c8d92de9
https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9
UNet
# 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.functional as...
Remosy/v2e
UNet
false
11,938
[ "MIT" ]
0
efc81cbcc113ca55d1631603323150be5ef8eb30
https://github.com/Remosy/v2e/tree/efc81cbcc113ca55d1631603323150be5ef8eb30
Sub
# 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
Sub
false
6,111
[ "MIT" ]
1
53c663f0e0570ef7ffd6771354ae3478f63bd328
https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328
ResBlock
import torch from torch import nn import torch.nn.functional as F class ResBlock(nn.Module): def __init__(self, dim, dropout=0): super(ResBlock, self).__init__() self.dim = dim self.dropout = nn.Dropout(dropout) self.linear1 = nn.Linear(self.dim, self.dim) self.linear2 = 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 from torch._inductor.runtime....
JiwanChung/tapm
ResBlock
false
8,388
[ "MIT" ]
14
ec42b139d1c012daccc55f85e67744488d526476
https://github.com/JiwanChung/tapm/tree/ec42b139d1c012daccc55f85e67744488d526476
BertNonFusedLayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Og-ChRoNiC/FasterTransformer
BertNonFusedLayerNorm
false
5,674
[ "Apache-2.0" ]
1
05c7e3db209064efec4798a570a488ce08ad211c
https://github.com/Og-ChRoNiC/FasterTransformer/tree/05c7e3db209064efec4798a570a488ce08ad211c
GAT
# 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....
OuYangg/GNNs
GAT
false
9,518
[ "Apache-2.0" ]
0
ef5b1944490507684d603de3ae0b2aa7b5168f47
https://github.com/OuYangg/GNNs/tree/ef5b1944490507684d603de3ae0b2aa7b5168f47
ClippedLinearQuantization
# 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.optim.lr_schedule...
Chih-Ling-Hsu/distiller
ClippedLinearQuantization
false
13,512
[ "Apache-2.0" ]
94
33d1697298c6e3a7f7bfa615741fd0cda61d2794
https://github.com/Chih-Ling-Hsu/distiller/tree/33d1697298c6e3a7f7bfa615741fd0cda61d2794
WeightedSmoothL1Loss
import torch import numpy as np import torch.nn as nn import torch.utils.data import torch.autograd class WeightedSmoothL1Loss(nn.Module): """ Code-wise Weighted Smooth L1 Loss modified based on fvcore.nn.smooth_l1_loss https://github.com/facebookresearch/fvcore/blob/master/fvcore/nn/smooth_l1_loss.py ...
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 numpy as np import torch.nn as nn import torch.utils.da...
LaudateCorpus1/LIGA-Stereo
WeightedSmoothL1Loss
false
13,983
[ "Apache-2.0" ]
56
aee3731a24a0ab1667e633e520cc89be2f135272
https://github.com/LaudateCorpus1/LIGA-Stereo/tree/aee3731a24a0ab1667e633e520cc89be2f135272
MyInstanceNorm2d
import torch from torch import nn class AffineChannelwise(nn.Module): def __init__(self, num_channels): super().__init__() self.num_channels = num_channels self.register_parameter('weight', nn.Parameter(torch.ones( num_channels))) self.register_parameter('bias', nn.Par...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
dniku/dl-norms
MyInstanceNorm2d
false
6,581
[ "MIT" ]
1
0f1eef942bd318ac988ec7dfa9caea300d17e82a
https://github.com/dniku/dl-norms/tree/0f1eef942bd318ac988ec7dfa9caea300d17e82a
PSLoss
import torch import torch.nn as nn import torch.fft class PSLoss(nn.Module): def __init__(self): super().__init__() self.l1_loss = torch.nn.L1Loss() def forward(self, x, y): x_power = torch.abs(torch.fft.fftn(x, dim=[2, 3])) y_power = torch.abs(torch.fft.fftn(y, dim=[2, 3])) ...
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 ...
NejcHirci/material-addon
PSLoss
false
17,767
[ "MIT" ]
4
c08e2081413c3319b712c2f7193ac8013f601382
https://github.com/NejcHirci/material-addon/tree/c08e2081413c3319b712c2f7193ac8013f601382
DownsampleA
import torch import torch.nn as nn import torch.utils.data.distributed class DownsampleA(nn.Module): def __init__(self, nIn, nOut, stride): super(DownsampleA, self).__init__() assert stride == 2 self.avg = nn.AvgPool2d(kernel_size=1, stride=stride) def forward(self, x): x = s...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data.distributed assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda...
HKBU-HPML/gtopkssgd
DownsampleA
false
8,190
[ "Apache-2.0" ]
33
6f57343f3749939b0345d36fcb2c24470942aefd
https://github.com/HKBU-HPML/gtopkssgd/tree/6f57343f3749939b0345d36fcb2c24470942aefd
EPELoss
import torch import torch.nn as nn class EPELoss(nn.Module): def __init__(self): super(EPELoss, self).__init__() def forward(self, output, target): lossvalue = torch.norm(output - target + 1e-16, p=2, dim=1).mean() return lossvalue def get_inputs(): return [torch.rand([4, 4, 4,...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
haochen23/GeoProj
EPELoss
false
10,180
[ "MIT" ]
0
4b31f51789f9cc41ea7dc977cee057b8bc8a83cc
https://github.com/haochen23/GeoProj/tree/4b31f51789f9cc41ea7dc977cee057b8bc8a83cc
InteractionLayer
import math import torch import torchvision.transforms.functional as F from torch import nn import torch.nn.functional as F class InteractionLayer(nn.Module): def __init__(self, d_model, d_feature, dropout=0.1): super().__init__() self.d_feature = d_feature self.det_tfm = nn.Linear(d_mode...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
yoyomimi/AS-Net
InteractionLayer
false
16,782
[ "MIT" ]
49
85ce753707c6d1838c3983111ccbba4b1861f438
https://github.com/yoyomimi/AS-Net/tree/85ce753707c6d1838c3983111ccbba4b1861f438
XnorConv
import torch import torch.multiprocessing import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import torch.autograd as autograd import torch.nn.functional as F class BinarizeWeight(autograd.Function): @staticmethod def forward(ctx, sco...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.multiprocessing import torch.nn as nn import torch.nn.parallel impo...
adityakusupati/LLC-2.0
XnorConv
false
18,235
[ "MIT" ]
10
38608bbaa425b15dcf5c971000b7a1b08120fb5c
https://github.com/adityakusupati/LLC-2.0/tree/38608bbaa425b15dcf5c971000b7a1b08120fb5c
Conv3x3
# 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 math as tl_math import torch....
Sid1057/sid1057.github.io
Conv3x3
false
17,964
[ "MIT" ]
4
623d1731e308b42b6f86304dcfd671a061b414bf
https://github.com/Sid1057/sid1057.github.io/tree/623d1731e308b42b6f86304dcfd671a061b414bf
Triaffine
import torch import torch.nn as nn class Triaffine(nn.Module): """ Triaffine layer for second-order scoring :cite:`zhang-etal-2020-efficient,wang-etal-2019-second`. This function has a tensor of weights :math:`W` and bias terms if needed. The score :math:`s(x, y, z)` of the vector triple :math:`(x, y...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
yzhangcs/parser
Triaffine
false
16,785
[ "MIT" ]
439
3abebde1c9fe0bf2e99adce845aaf2a04b194f8a
https://github.com/yzhangcs/parser/tree/3abebde1c9fe0bf2e99adce845aaf2a04b194f8a
FeatureResizer
# 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.utils....
mmaaz60/mdetr
FeatureResizer
false
10,485
[ "Apache-2.0" ]
0
fe1394c67e76a6c7e521bbda77d8294714038a3a
https://github.com/mmaaz60/mdetr/tree/fe1394c67e76a6c7e521bbda77d8294714038a3a
BeitPooler
from _paritybench_helpers import _mock_config import torch from torch import nn import torch.utils.checkpoint class BeitPooler(nn.Module): def __init__(self, config): super().__init__() self.layernorm = nn.LayerNorm(config.hidden_size, eps=config. layer_norm_eps) if config.use_mean_po...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn import torch.utils.checkpoint assert_size_stride = torch._...
Clemens123/transformers
BeitPooler
false
13,203
[ "Apache-2.0" ]
0
22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
https://github.com/Clemens123/transformers/tree/22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
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...
AytacKahveci/siamese-triplet
ContrastiveLoss
false
11,230
[ "BSD-3-Clause" ]
0
09860e36d934bb1773a4d49dbad183a5152cb0b0
https://github.com/AytacKahveci/siamese-triplet/tree/09860e36d934bb1773a4d49dbad183a5152cb0b0
PyConv2
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed def conv(in_planes, out_planes, kernel_size=3, stride=1, padding=1, dilation=1, groups=1): """standard convolution with padding""" return nn.Conv2d(in_planes, out_plan...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.optim import torch.u...
lkf59553/pyconv
PyConv2
false
15,943
[ "MIT" ]
295
d8b39cf43014b8fd277dcefc9eb7f8880511e977
https://github.com/lkf59553/pyconv/tree/d8b39cf43014b8fd277dcefc9eb7f8880511e977
GAT
import torch import torch.nn as nn import torch.nn.functional as F class GraphAttentionLayer(nn.Module): """ Simple GAT layer, similar to https://arxiv.org/abs/1710.10903 """ def __init__(self, in_features, out_features, dropout, alpha, concat=True): super(GraphAttentionLayer, self).__init__(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Prasath2001/commonsense-rl
GAT
false
2,763
[ "Apache-2.0" ]
0
ef3e83270d34cf211b2d2086120cccae0621477b
https://github.com/Prasath2001/commonsense-rl/tree/ef3e83270d34cf211b2d2086120cccae0621477b
Reorg
import torch import torch.nn as nn class Reorg(nn.Module): def __init__(self, stride=2): super(Reorg, self).__init__() self.stride = stride def forward(self, x): assert x.data.dim() == 4 B = x.data.size(0) C = x.data.size(1) H = x.data.size(2) W = x.da...
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...
CharlesPikachu/YOLO
Reorg
false
13,460
[ "MIT" ]
57
950b11c35517c1c3d7d7856b5768c4023c1f89eb
https://github.com/CharlesPikachu/YOLO/tree/950b11c35517c1c3d7d7856b5768c4023c1f89eb
BasicModel
# 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...
aravipati12/captum
BasicModel
false
10,088
[ "BSD-3-Clause" ]
0
ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
https://github.com/aravipati12/captum/tree/ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
Network
# 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_...
alexljenkins/reinforcement-learning-agents
Network
false
9,696
[ "MIT" ]
0
d5bdfad56c9b095d5bb0ac22ca69e19553327416
https://github.com/alexljenkins/reinforcement-learning-agents/tree/d5bdfad56c9b095d5bb0ac22ca69e19553327416