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
CAModule
# 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...
iampartho/EEE426
CAModule
false
3,645
[ "Apache-2.0" ]
0
a706660c0efcd4adea44d54c57a34bcaa4439ec1
https://github.com/iampartho/EEE426/tree/a706660c0efcd4adea44d54c57a34bcaa4439ec1
EncoderImageWeightNormPrecomp
import torch from collections import OrderedDict import torch.nn as nn import torch.nn.init from torch.nn.utils.weight_norm import weight_norm def l2norm(X, dim=-1, eps=1e-12): """L2-normalize columns of X """ norm = torch.pow(X, 2).sum(dim=dim, keepdim=True).sqrt() + eps X = torch.div(X, norm) re...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 collections im...
AndresPMD/semantic_adaptive_margin
EncoderImageWeightNormPrecomp
false
7,673
[ "Apache-2.0" ]
12
1e8bf2f1836498c48df030cb0a967b72b52e8460
https://github.com/AndresPMD/semantic_adaptive_margin/tree/1e8bf2f1836498c48df030cb0a967b72b52e8460
PointWiseConvolution
# 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 as nn assert_size_stride = torch._C._dynamo.guards.assert_s...
Pranshu-Bahadur/g2net
PointWiseConvolution
false
9,485
[ "MIT" ]
0
a117df7699837c9a3ae21ec59a310d7384369601
https://github.com/Pranshu-Bahadur/g2net/tree/a117df7699837c9a3ae21ec59a310d7384369601
EntropyLoss
# 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 ...
LakeAndCat/CluOReg
EntropyLoss
false
746
[ "MIT" ]
0
ba50cb056061b3833050d32e532e08152bdc8de2
https://github.com/LakeAndCat/CluOReg/tree/ba50cb056061b3833050d32e532e08152bdc8de2
DenseGCNConv
import math import torch from torch.nn import Parameter import torch.utils.data def glorot(tensor): if tensor is not None: stdv = math.sqrt(6.0 / (tensor.size(-2) + tensor.size(-1))) tensor.data.uniform_(-stdv, stdv) def zeros(tensor): if tensor is not None: tensor.data.fill_(0) cl...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
douglasrizzo/pytorch_geometric
DenseGCNConv
false
12,292
[ "MIT" ]
0
effc617c6ad6daad506038bb79e4407082e74740
https://github.com/douglasrizzo/pytorch_geometric/tree/effc617c6ad6daad506038bb79e4407082e74740
DiceLoss_TRDP
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn.modules.loss import _Loss assert_size_stride = torch._C._dynamo.guards.asse...
sebasmos/Spacenet7TRDP
DiceLoss_TRDP
false
12,957
[ "Apache-2.0" ]
0
03b5819321108017f8f8c2d359264c8e18d9e38a
https://github.com/sebasmos/Spacenet7TRDP/tree/03b5819321108017f8f8c2d359264c8e18d9e38a
C3D
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
DuyHung21/actionrecognition
C3D
false
5,214
[ "MIT" ]
1
a095b2e16db249bff97b1eebdab1e90468224fcb
https://github.com/DuyHung21/actionrecognition/tree/a095b2e16db249bff97b1eebdab1e90468224fcb
HuberLoss
# 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 ...
Vidit631/FLAVR
HuberLoss
false
9,635
[ "Apache-2.0" ]
0
c1cf558190761b244736786c44fe45ca114331f2
https://github.com/Vidit631/FLAVR/tree/c1cf558190761b244736786c44fe45ca114331f2
SigsqrtModule
# 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...
finalgruntgit/diautils
SigsqrtModule
false
10,273
[ "MIT" ]
0
b9d7666ed5023700db01a4295430c52721acfc25
https://github.com/finalgruntgit/diautils/tree/b9d7666ed5023700db01a4295430c52721acfc25
Lenet
# 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 torch.nn import Sequential from torch.nn import Conv2d...
partnernetsoftware/openlab
Lenet
false
7,442
[ "MIT" ]
1
faa4e58486a7bc4140ad3d56545bfb736cb86696
https://github.com/partnernetsoftware/openlab/tree/faa4e58486a7bc4140ad3d56545bfb736cb86696
InvertedFactorScalar
import torch import torch.nn as nn class InvertedFactorScalar(nn.Module): def __init__(self, initial_value=1.0, **kwargs): super().__init__() self._factor = nn.Parameter(torch.tensor(initial_value)) @property def factor(self): return 1 / (self._factor + 1e-07) def on_task_en...
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...
billpsomas/incremental_learning.pytorch
InvertedFactorScalar
false
14,959
[ "MIT" ]
277
a401a6609fc61c74698739cf937c0ece1c10913f
https://github.com/billpsomas/incremental_learning.pytorch/tree/a401a6609fc61c74698739cf937c0ece1c10913f
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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
DongChengdongHangZhou/Siamese-Network-tiff
ContrastiveLoss
false
375
[ "MIT" ]
0
aaf923ad59301af1b3237e605964341a90dc414b
https://github.com/DongChengdongHangZhou/Siamese-Network-tiff/tree/aaf923ad59301af1b3237e605964341a90dc414b
Word2Vec
import torch from torch import nn import torch.functional as F import torch.nn.functional as F class Word2Vec(torch.nn.Module): def __init__(self, vocab_size, embedding_size=300): super(Word2Vec, self).__init__() self.E = nn.Linear(vocab_size, embedding_size, bias=False) self.W = nn.Linea...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
kfaRabi/NNTI-WS2021-NLP-Project
Word2Vec
false
10,342
[ "MIT" ]
0
9b0d28e64e3abc373e88265e47a4be4503d59a93
https://github.com/kfaRabi/NNTI-WS2021-NLP-Project/tree/9b0d28e64e3abc373e88265e47a4be4503d59a93
KLDivergence
import torch from torch import nn import torch.nn.functional as F class KLDivergence(nn.Module): """A measure of how one probability distribution Q is different from a second, reference probability distribution P. Args: tau (float): Temperature coefficient. Defaults to 1.0. reduction (str...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
HIT-cwh/mmrazor
KLDivergence
false
13,743
[ "Apache-2.0" ]
553
2dad24044d7f1dad88f20221f8fc071dd40fdd4f
https://github.com/HIT-cwh/mmrazor/tree/2dad24044d7f1dad88f20221f8fc071dd40fdd4f
AffineConstantFlow
# 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 math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
LamaLenny/DeepGenerativeModels
AffineConstantFlow
false
2,648
[ "MIT" ]
0
c2a40e4e71af844f8357da5267b1d017f762a235
https://github.com/LamaLenny/DeepGenerativeModels/tree/c2a40e4e71af844f8357da5267b1d017f762a235
CustomBatchNormManualModule
import torch import torch.nn as nn class CustomBatchNormManualFunction(torch.autograd.Function): """ This torch.autograd.Function implements a functional custom version of the batch norm operation for MLPs. Using torch.autograd.Function allows you to write a custom backward function. The function will be 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.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
askliar/deep_learning
CustomBatchNormManualModule
false
1,489
[ "MIT" ]
0
e61b2391a3258d18719bf12d9ed1404620ce6c02
https://github.com/askliar/deep_learning/tree/e61b2391a3258d18719bf12d9ed1404620ce6c02
DenseSAGEConv
# 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 math from torch.nn imp...
cshjin/pytorch_geometric
DenseSAGEConv
false
1,760
[ "MIT" ]
0
8dd0e76beb72135949a275edd851f80f7b97648f
https://github.com/cshjin/pytorch_geometric/tree/8dd0e76beb72135949a275edd851f80f7b97648f
NormKLLoss
import torch import torch.utils.data import torch.nn.init import torch as th from torch.nn.modules.loss import _Loss class NormKLLoss(_Loss): def __init__(self, unit_average=False): super(NormKLLoss, self).__init__() self.unit_average = unit_average def forward(self, recog_mu, recog_logvar, ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.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
CatDotProdAttention
import torch import torch.nn as nn import torch.nn.functional as F class CatDotProdAttention(nn.Module): """Dot-Production Attention concatenated with query values Attribute: linear (nn.Linear): linear layer to compress output """ def __init__(self, dim): super().__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....
Tzu-An/ml_seq2seq_attn
CatDotProdAttention
false
2,933
[ "Apache-2.0" ]
0
1f29b1156c5e66e2bb5255c6d214c70162c91528
https://github.com/Tzu-An/ml_seq2seq_attn/tree/1f29b1156c5e66e2bb5255c6d214c70162c91528
LinearRegression
import torch import torch.nn as nn class LinearRegression(nn.Module): def __init__(self): super().__init__() self.a = nn.Parameter(torch.randn(1, requires_grad=True, dtype= torch.float)) self.b = nn.Parameter(torch.randn(1, requires_grad=True, dtype= torch.float)) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
JohnlNguyen/FLSim
LinearRegression
false
13,906
[ "BSD-3-Clause" ]
79
a5ed7c0b84499cd9dbc5fe95f8bcb4ba8ab5a5cb
https://github.com/JohnlNguyen/FLSim/tree/a5ed7c0b84499cd9dbc5fe95f8bcb4ba8ab5a5cb
DfAlphaLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import Tens...
JinmingChe/DeepFilterNet
DfAlphaLoss
false
5,402
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
0e35a24c33c091b4c34afb3599f2945bf5e87adf
https://github.com/JinmingChe/DeepFilterNet/tree/0e35a24c33c091b4c34afb3599f2945bf5e87adf
teacherNet
import torch import torch.nn as nn import torch.nn.functional as F class teacherNet(nn.Module): def __init__(self): super(teacherNet, self).__init__() self.fc1 = nn.Linear(28 * 28, 1200) self.fc2 = nn.Linear(1200, 1200) self.fc3 = nn.Linear(1200, 10) def forward(self, x): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
kamiyakenta/knowledge-distillation-pytorch
teacherNet
false
3,798
[ "MIT" ]
0
749c6bb353961147718371b2b694046af0a6e3f1
https://github.com/kamiyakenta/knowledge-distillation-pytorch/tree/749c6bb353961147718371b2b694046af0a6e3f1
ResampleNorm
import torch import torch.nn.functional as F import torch.nn as nn import torch.functional as F class TimeDistributedInterpolation(nn.Module): def __init__(self, output_size: 'int', batch_first: 'bool'=False, trainable: 'bool'=False): super().__init__() self.output_size = output_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 from torch._inductor.runtime.triton_helpers import libdevice import torch.nn.functional as F import torch.nn as nn import torch.functional a...
GoldbergData/pytorch-forecasting
ResampleNorm
false
2,333
[ "MIT" ]
0
e2ef3794da5d996c9740d932a4f55269bb4003f2
https://github.com/GoldbergData/pytorch-forecasting/tree/e2ef3794da5d996c9740d932a4f55269bb4003f2
FocalLoss
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 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...
YangfeiLiu/mmclassification
FocalLoss
false
11,998
[ "Apache-2.0" ]
0
422c757e287a45aae5049b90238fbe038ee766aa
https://github.com/YangfeiLiu/mmclassification/tree/422c757e287a45aae5049b90238fbe038ee766aa
InstanceNormLayer
import torch import torch.nn as nn import torch.fft class InstanceNormLayer(nn.Module): """Implements instance normalization layer.""" def __init__(self, epsilon=1e-08): super().__init__() self.eps = epsilon def forward(self, x): if len(x.shape) != 4: raise ValueError...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.fft assert_size_stride = torch._C._dynamo.gu...
NejcHirci/material-addon
InstanceNormLayer
false
17,770
[ "MIT" ]
4
c08e2081413c3319b712c2f7193ac8013f601382
https://github.com/NejcHirci/material-addon/tree/c08e2081413c3319b712c2f7193ac8013f601382
VocabGraphConvolution
import math import torch import torch.nn as nn import torch.nn.init as init class VocabGraphConvolution(nn.Module): """Vocabulary GCN module. Params: `voc_dim`: The size of vocabulary graph `num_adj`: The number of the adjacency matrix of Vocabulary graph `hid_dim`: The hidden dimensi...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn import torch.nn.init as init assert_size_strid...
JakobVokac/VGCN-BERT
VocabGraphConvolution
false
9,150
[ "MIT" ]
0
f82f1922c0d461c12d43c45bc58b61b92534b99b
https://github.com/JakobVokac/VGCN-BERT/tree/f82f1922c0d461c12d43c45bc58b61b92534b99b
MeanMap
import torch import torch.nn as nn import torch.autograd class MeanMap(nn.Module): """ Compute vanilla mean on a 4D tensor. This acts as a standard PyTorch layer. The Mean is computed independantly for each batch item at each location x,y Input should be: (1...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.autograd assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._d...
LLNL/fastcam
MeanMap
false
8,422
[ "BSD-3-Clause" ]
25
99cefe37528014247319468cf05f54fef259d3bf
https://github.com/LLNL/fastcam/tree/99cefe37528014247319468cf05f54fef259d3bf
Qnet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import random import torch.nn...
azeye/QuickstartRL
Qnet
false
6,313
[ "MIT" ]
1
ae1a9eb8bc0c5f52700fa0ac19ce5abcf3ccdefa
https://github.com/azeye/QuickstartRL/tree/ae1a9eb8bc0c5f52700fa0ac19ce5abcf3ccdefa
MPJPE
import torch import torch.nn as nn import torch.nn.functional class BaseMetric(nn.Module): def forward(self, y_pr, points_gt, gt_mask=None): """ Base forward method for metric evaluation Args: y_pr: 3D prediction of joints, tensor of shape (BATCH_SIZExN_JOINTSx3) p...
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.nn.functional assert_size_stride = torch._C....
miracleyoo/lifting_events_to_3d_hpe
MPJPE
false
10,599
[ "Apache-2.0" ]
0
dfe734ee055900d6ab90c064bf82db7672830ac7
https://github.com/miracleyoo/lifting_events_to_3d_hpe/tree/dfe734ee055900d6ab90c064bf82db7672830ac7
BertPooler2
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import n...
samuelyu2002/PACS
BertPooler2
false
4,257
[ "MIT" ]
0
5010b2f0d20933b0647e3d6230d673e1830249ec
https://github.com/samuelyu2002/PACS/tree/5010b2f0d20933b0647e3d6230d673e1830249ec
CosMargin
# 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....
belphegor2211/khoa_luan
CosMargin
false
9,985
[ "MIT" ]
0
c9c163ebf3aff3005639ce7e4020e510295d1c75
https://github.com/belphegor2211/khoa_luan/tree/c9c163ebf3aff3005639ce7e4020e510295d1c75
ScaleNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import math import torch.nn ...
JoseAntonioSiguenza/deepchem
ScaleNorm
false
9,206
[ "MIT" ]
0
05fe1b186ec154e18de9aa1b110e9258dc484e21
https://github.com/JoseAntonioSiguenza/deepchem/tree/05fe1b186ec154e18de9aa1b110e9258dc484e21
MaxPoolStride1
import torch import torch.nn as nn import torch.utils.data import torch.utils.data.distributed import torch.nn.functional as F import torch._utils class MaxPoolStride1(nn.Module): def __init__(self, kernel_size): super(MaxPoolStride1, self).__init__() self.kernel_size = kernel_size self.p...
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.data import torch.utils.data.distributed import ...
Sarathismg/Pose-Estimator-Old-Version
MaxPoolStride1
false
1,062
[ "Apache-2.0" ]
0
ecaa03769323b94a4d7222e2d3606d1ce92a2fae
https://github.com/Sarathismg/Pose-Estimator-Old-Version/tree/ecaa03769323b94a4d7222e2d3606d1ce92a2fae
LearnedPositionalEncoding
import torch import torch.nn as nn import torch.cuda import torch.distributed class LearnedPositionalEncoding(nn.Module): def __init__(self, context_size, embedding_dim, dropout=0): super(LearnedPositionalEncoding, self).__init__() self.pe = nn.Embedding(context_size, embedding_dim) 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 import torch.cuda import torch.distributed assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strid...
fangleai/encoder-agnostic-adaptation
LearnedPositionalEncoding
false
15,340
[ "MIT" ]
70
d917e654152df202dd35bba49c409c3ecd24eaf7
https://github.com/fangleai/encoder-agnostic-adaptation/tree/d917e654152df202dd35bba49c409c3ecd24eaf7
GeneralizedMeanPooling
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn from to...
lxc86739795/fast-reid
GeneralizedMeanPooling
false
7,138
[ "Apache-2.0" ]
1
29178d70c591ef64021f10767eb606f3053156b9
https://github.com/lxc86739795/fast-reid/tree/29178d70c591ef64021f10767eb606f3053156b9
MaskedHuberLoss
# 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...
anshulpaigwar/GndNet
MaskedHuberLoss
false
14,884
[ "MIT" ]
73
24328602a8cbaeabe67cafbf1b96c35f5c5c9023
https://github.com/anshulpaigwar/GndNet/tree/24328602a8cbaeabe67cafbf1b96c35f5c5c9023
PositionAttentionModule
# 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....
rushirajsherlocked/External-Attention-pytorch
PositionAttentionModule
false
4,344
[ "MIT" ]
0
7d6814b2d90909adf81c62f3f8a89e30a59d6481
https://github.com/rushirajsherlocked/External-Attention-pytorch/tree/7d6814b2d90909adf81c62f3f8a89e30a59d6481
MergeLayer
# 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 assert_size_stride = torch._C...
Aryn-VG/ASTGN-cDB
MergeLayer
false
1,981
[ "MIT" ]
0
a9977736a361adac9a7b6f8bad2b5317651be36a
https://github.com/Aryn-VG/ASTGN-cDB/tree/a9977736a361adac9a7b6f8bad2b5317651be36a
StaticArchGenerator
import torch import numpy as np import torch.nn as nn import torch.nn.init as weight_init from torch.nn import Parameter class ArchSampler(nn.Module): def __init__(self, distrib_dim, all_same, deter_eval, var_names=None, * args, **kwargs): super().__init__() self.distrib_dim = distrib_dim...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np import torch.nn as nn import torch.nn.init as weight_init from torch.nn import Parameter assert_size_stride = torch._C._d...
RaoefTaki/MNTDP-forked
StaticArchGenerator
false
8,700
[ "MIT" ]
15
d9ea59a6638f6cdc93eca180ab02672f5bf5d2a1
https://github.com/RaoefTaki/MNTDP-forked/tree/d9ea59a6638f6cdc93eca180ab02672f5bf5d2a1
Squash
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
MobtgZhang/MWMLNet
Squash
false
5,602
[ "MIT" ]
1
125bb39935916b6b4be505c51cb6a04eb49b96d0
https://github.com/MobtgZhang/MWMLNet/tree/125bb39935916b6b4be505c51cb6a04eb49b96d0
AdaptiveInstanceNorm
# 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 ...
jiangwenj02/mmgeneration
AdaptiveInstanceNorm
false
12,615
[ "Apache-2.0" ]
0
da9ad377ae19260467fc332ddb88f505c38a915a
https://github.com/jiangwenj02/mmgeneration/tree/da9ad377ae19260467fc332ddb88f505c38a915a
Baz
import torch import torch.onnx import torch.nn class Baz(torch.nn.Module): def __init__(self, x): super(Baz, self).__init__() self.x = x def forward(self, a, b): return a + b * self.x def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_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 import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guar...
hl475/glow
Baz
false
3,595
[ "Apache-2.0" ]
0
f24d960e3cc80db95ac0bc17b1900dbf60ca044a
https://github.com/hl475/glow/tree/f24d960e3cc80db95ac0bc17b1900dbf60ca044a
Cartesian
# 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 from torch import nn import torch.utils.data import torch.utils.data.dist...
gbosdet/fastMRI
Cartesian
false
6,722
[ "MIT" ]
1
7f94f8006f8919d98fb87788b6dadec9a58d1a3a
https://github.com/gbosdet/fastMRI/tree/7f94f8006f8919d98fb87788b6dadec9a58d1a3a
Decoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.utils.data impor...
benedictquartey/modified-wm
Decoder
false
3,214
[ "MIT" ]
0
bc6cab1aadff24f4be8bb7b9c183b6ef266cf8ba
https://github.com/benedictquartey/modified-wm/tree/bc6cab1aadff24f4be8bb7b9c183b6ef266cf8ba
JsdCrossEntropy
# 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...
NYCU-MLLab/Strategic-Optimization-for-Worst-case-Augmentation
JsdCrossEntropy
false
17,742
[ "MIT" ]
3
fd0feab42151c0bae60712480301ea26f627a81d
https://github.com/NYCU-MLLab/Strategic-Optimization-for-Worst-case-Augmentation/tree/fd0feab42151c0bae60712480301ea26f627a81d
Qnet
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import random import torch.nn...
jinPrelude/minimalRL
Qnet
false
3,744
[ "MIT" ]
0
4eba82feac15bb29f4ad715c6c8fd7b11426b840
https://github.com/jinPrelude/minimalRL/tree/4eba82feac15bb29f4ad715c6c8fd7b11426b840
InvDepth
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
MareenaKunjachan/kornia
InvDepth
false
2,687
[ "Apache-2.0" ]
0
0a3cbb02850ac78059e0615da93144b5a64d3330
https://github.com/MareenaKunjachan/kornia/tree/0a3cbb02850ac78059e0615da93144b5a64d3330
BiDAFAttention
import torch import torch.nn.functional as F import torch.nn as nn def masked_softmax(logits, mask, dim=-1, log_softmax=False): """Take the softmax of `logits` over given dimension, and set entries to 0 wherever `mask` is 0. Args: logits (torch.Tensor): Inputs to the softmax function. mas...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Derek318/Adversarial-Squad-CS224N
BiDAFAttention
false
5,091
[ "MIT" ]
1
9b4a5da2a262f4de9b9b05d7b67dc48b2b857e46
https://github.com/Derek318/Adversarial-Squad-CS224N/tree/9b4a5da2a262f4de9b9b05d7b67dc48b2b857e46
CrossEntropyLoss2d
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
AtlasGooo2/WoodScape
CrossEntropyLoss2d
false
13,340
[ "MIT" ]
348
597d9dda472c09bafea58ea69853948d63197eca
https://github.com/AtlasGooo2/WoodScape/tree/597d9dda472c09bafea58ea69853948d63197eca
StyleBlock
# 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 ...
Hadryan/nn
StyleBlock
false
9,389
[ "MIT" ]
0
b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d
https://github.com/Hadryan/nn/tree/b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d
UGRNNLRCell
import torch import torch.nn as nn import torch.onnx from itertools import product as product def gen_nonlinearity(A, nonlinearity): """ Returns required activation for a tensor based on the inputs nonlinearity is either a callable or a value in ['tanh', 'sigmoid', 'relu', 'quantTanh', 'quantSigm...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
ShishirPatil/EdgeML-1
UGRNNLRCell
false
1,090
[ "MIT" ]
0
cbba9f8b989e545788427c004eb8450e7e4c1a21
https://github.com/ShishirPatil/EdgeML-1/tree/cbba9f8b989e545788427c004eb8450e7e4c1a21
ReverseMaskConv
# 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....
Vious/LBAM_Pytorch
ReverseMaskConv
false
14,581
[ "MIT" ]
112
b9292440e7a7559c027f48d6fd061dcabc41a6bf
https://github.com/Vious/LBAM_Pytorch/tree/b9292440e7a7559c027f48d6fd061dcabc41a6bf
GlobalAveragePool
import torch from torch import nn import torch.onnx class GlobalAveragePool(nn.Module): def forward(self, input: 'torch.Tensor'): spatial_shape = input.ndimension() - 2 dim = tuple(range(spatial_shape, spatial_shape + 2)) return torch.mean(input, dim=dim, keepdim=True) def get_inputs():...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.onnx assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo...
Creation-Labs-AI/onnx2pytorch
GlobalAveragePool
false
13,559
[ "Apache-2.0" ]
147
eaf70c6b75009efa7d07c6042a62f336194c4786
https://github.com/Creation-Labs-AI/onnx2pytorch/tree/eaf70c6b75009efa7d07c6042a62f336194c4786
FastAdaptiveAvgPool2d
import torch import torch.nn as nn import torch.nn.parallel import torch._utils import torch.optim class FastAdaptiveAvgPool2d(nn.Module): def __init__(self, flatten=False): super(FastAdaptiveAvgPool2d, self).__init__() self.flatten = flatten def forward(self, x): return x.mean((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 import torch.nn as nn import torch.nn.parallel import torch._utils import torch.optim assert_size_stride = torch._C._dynamo.guards.assert_si...
Alicegaz/torchok
FastAdaptiveAvgPool2d
false
16,918
[ "Apache-2.0" ]
8
7b8f95df466a25b1ad8ee93bed1a3c7516440cf4
https://github.com/Alicegaz/torchok/tree/7b8f95df466a25b1ad8ee93bed1a3c7516440cf4
LNN
import math import torch import torch.nn.functional as F import torch.utils.data class LNN(torch.nn.Module): """ A pytorch implementation of LNN layer Input shape - A 3D tensor with shape: ``(batch_size,field_size,embedding_size)``. Output shape - 2D tensor with shape:``(batch_size,LNN...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ZEKAICHEN/RecSys
LNN
false
2,986
[ "MIT" ]
0
7ab66b4a6cee620cc4baeb00f916ff329834f903
https://github.com/ZEKAICHEN/RecSys/tree/7ab66b4a6cee620cc4baeb00f916ff329834f903
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....
priyamtejaswin/minbert-assignment
BertSelfAttention
false
10,670
[ "Apache-2.0" ]
0
fd41a54441916a6d421640bbee910f64786b303d
https://github.com/priyamtejaswin/minbert-assignment/tree/fd41a54441916a6d421640bbee910f64786b303d
EALSTM
import torch import torch.nn as nn import torch.utils.data class EALSTM(nn.Module): """Implementation of the Entity-Aware-LSTM (EA-LSTM) TODO: Include paper ref and latex equations Parameters ---------- input_size_dyn : int Number of dynamic features, which are those, passed to the LSTM at...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
jdwillard19/lake_conus_surface_temp_2021
EALSTM
false
10,306
[ "MIT" ]
0
88334091dec71ae43fe4256603d65045141936b5
https://github.com/jdwillard19/lake_conus_surface_temp_2021/tree/88334091dec71ae43fe4256603d65045141936b5
SpaceToBatch
import torch import torch.nn as nn import torch.utils.data class SpaceToDim(nn.Module): def __init__(self, scale_factor, dims=(-2, -1), dim=0): super(SpaceToDim, self).__init__() self.scale_factor = scale_factor self.dims = dims self.dim = dim def forward(self, 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
cestcedric/TSSR-GAN
SpaceToBatch
false
1,649
[ "BSD-2-Clause", "MIT" ]
0
d6e1b50409e0f0591660552993e6d5b70d41e766
https://github.com/cestcedric/TSSR-GAN/tree/d6e1b50409e0f0591660552993e6d5b70d41e766
SelfAttentionGPT2
import torch from torch import nn def mask_(matrices, maskval=0.0, mask_diagonal=True): """ Masks out all values in the given batch of matrices where i <= j holds, i < j if mask_diagonal is false In place operation :param tns: :return: """ h, w = matrices.size(-2), matrices.size(-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 from torch._inductor.runtime....
jplasser/former
SelfAttentionGPT2
false
15,749
[ "MIT" ]
674
7dabf7b355e94f2f0af966bd0daead539a30675a
https://github.com/jplasser/former/tree/7dabf7b355e94f2f0af966bd0daead539a30675a
GT
import torch class GT(torch.nn.Module): def __init__(self): super(GT, 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
bunderhi/torch2trt
GT
false
1,594
[ "MIT" ]
0
fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d
https://github.com/bunderhi/torch2trt/tree/fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d
BilinearUpsample
import torch from typing import Union from typing import List import torch.nn as nn import torch.nn.functional as F import torch.utils.data class BilinearUpsample(nn.Module): """ Overview: Upsamples the input to the given member varible scale_factor using mode biliner Interface: forward ...
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 typing import Union from typing import List import torch.nn as nn import torch.utils...
Weiyuhong-1998/DI-engine
BilinearUpsample
false
14,565
[ "Apache-2.0" ]
464
88658ea358298c6e61e95a454284b8853a3e9484
https://github.com/Weiyuhong-1998/DI-engine/tree/88658ea358298c6e61e95a454284b8853a3e9484
scSE
# 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_...
mattroz/yatopi
scSE
false
3,996
[ "MIT" ]
0
278bac6f3d2f13916ae9d43309b9f38b608426bd
https://github.com/mattroz/yatopi/tree/278bac6f3d2f13916ae9d43309b9f38b608426bd
Temporal_Attention_layer
# 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....
kevin-xuan/Traffic-Benchmark
Temporal_Attention_layer
false
15,837
[ "MIT" ]
120
b9f8e40b4df9b58f5ad88432dc070cbbbcdc0228
https://github.com/kevin-xuan/Traffic-Benchmark/tree/b9f8e40b4df9b58f5ad88432dc070cbbbcdc0228
MultiHeadAttention
import math import torch import numpy as np from torch import nn class MultiHeadAttention(nn.Module): def __init__(self, n_heads, input_dim, embed_dim, val_dim=None, key_dim =None): super(MultiHeadAttention, self).__init__() if val_dim is None: val_dim = embed_dim // n_heads ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ChristinaTan0704/transTSP
MultiHeadAttention
false
311
[ "MIT" ]
0
b97cd7ed8ae97e91b687d5007d13a021781f3d1d
https://github.com/ChristinaTan0704/transTSP/tree/b97cd7ed8ae97e91b687d5007d13a021781f3d1d
GroupedChannelNorm
# 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.utils.data import torch import torch.nn as nn assert_size_stride =...
bomtorazek/contrastive-unpaired-translation
GroupedChannelNorm
false
12,180
[ "BSD-3-Clause" ]
0
07c048038375e1b9a4e464154b8dbc49f5e16ede
https://github.com/bomtorazek/contrastive-unpaired-translation/tree/07c048038375e1b9a4e464154b8dbc49f5e16ede
InvConv2d
import torch from torch import nn from torch.nn import functional as F class InvConv2d(nn.Module): def __init__(self, in_channel): super().__init__() weight = torch.randn(in_channel, in_channel) q, _ = torch.qr(weight) weight = q.unsqueeze(2).unsqueeze(3) self.weight = nn....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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 torch.nn import functional as F assert_size_stride = t...
hologerry/glow-pytorch-1
InvConv2d
false
3,639
[ "MIT" ]
0
9d3f95f4ff7f0a1361796a9b2554e3c229aad9b7
https://github.com/hologerry/glow-pytorch-1/tree/9d3f95f4ff7f0a1361796a9b2554e3c229aad9b7
ThreeNet
import torch import torch.nn as nn class ThreeNet(nn.Module): """ A network with three layers. This is used for testing a network with more than one operation. The network has a convolution layer followed by two fully connected layers. """ def __init__(self, input_dim: 'int', conv_dim: 'int',...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
johnanthonyjose/fvcore
ThreeNet
false
15,722
[ "Apache-2.0" ]
1,137
af30fd4028553c1d1e4e5d389f309f52e046e67d
https://github.com/johnanthonyjose/fvcore/tree/af30fd4028553c1d1e4e5d389f309f52e046e67d
CyclicShift
import torch import torch.nn as nn def to_2tuple(value): return value, value class CyclicShift(nn.Module): def __init__(self, displacement): super().__init__() if isinstance(displacement, int): self.displacement = to_2tuple(displacement) else: self.displaceme...
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...
Justin900429/vision-transformer
CyclicShift
false
5,417
[ "MIT" ]
1
e149092efbb83c166449944137db0ee5200f9325
https://github.com/Justin900429/vision-transformer/tree/e149092efbb83c166449944137db0ee5200f9325
Attention
import math import torch from torch import nn import torch.nn.functional as F import torch.utils.data.distributed def matmul(x, y): if x.dim() == y.dim(): return x @ y if x.dim() == y.dim() - 1: return (x.unsqueeze(-2) @ y).squeeze(-2) return (x @ y.unsqueeze(-2)).squeeze(-2) class Atten...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
xurantju/densecap
Attention
false
11,049
[ "BSD-3-Clause" ]
0
2e58501e453bf98b9cc892e5b64997f5c1dfc808
https://github.com/xurantju/densecap/tree/2e58501e453bf98b9cc892e5b64997f5c1dfc808
Dense_net_transition
# 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_...
aditya140/NoveltyDetectionResearch
Dense_net_transition
false
6,072
[ "MIT" ]
1
f9b27e6e8d9c23f85d4d91241ee5d050ecd6b6ef
https://github.com/aditya140/NoveltyDetectionResearch/tree/f9b27e6e8d9c23f85d4d91241ee5d050ecd6b6ef
Conv2dBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
FUTUREEEEEE/S2R-DepthNet
Conv2dBlock
false
2,249
[ "MIT" ]
0
415cc40aef10f9540026ff435d14a9ba9e30ad74
https://github.com/FUTUREEEEEE/S2R-DepthNet/tree/415cc40aef10f9540026ff435d14a9ba9e30ad74
GLU
import torch import torch.nn as nn import torch.utils.data import torch.onnx.operators import torch.optim import torch.optim.lr_scheduler class GLU(nn.Module): def __init__(self, dim): super().__init__() self.dim = dim def forward(self, x): out, gate = x.chunk(2, dim=self.dim) ...
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.onnx.operators import torch.optim import torch.optim.lr_scheduler assert_size_str...
IIP-Sogang/Audio-Visual-Speech-Recognition
GLU
false
17,423
[ "MIT" ]
9
bd03be91135acbc6162b83092d462b7fe71dd007
https://github.com/IIP-Sogang/Audio-Visual-Speech-Recognition/tree/bd03be91135acbc6162b83092d462b7fe71dd007
ReRegualizedLinearMNACLayer
import collections import math import torch import torch.utils.data def sparsity_error(W): W_error = torch.min(torch.abs(W), torch.abs(1 - torch.abs(W))) return torch.max(W_error) def mnac(x, W, mode='prod'): out_size, in_size = W.size() x = x.view(x.size()[0], in_size, 1) W = W.t().view(1, in_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 from torch._inductor.runtime import triton_helpers import collections import math import torch.utils.data assert_size_stride = torch._C._dyn...
wlm2019/Neural-Arithmetic-Units
ReRegualizedLinearMNACLayer
false
16,720
[ "MIT" ]
147
f9de9d004bb2dc2ee28577cd1760d0a00c185836
https://github.com/wlm2019/Neural-Arithmetic-Units/tree/f9de9d004bb2dc2ee28577cd1760d0a00c185836
nSGC
# 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 math import torch.util...
tealminivan/FinalProject
nSGC
false
13,027
[ "MIT" ]
0
ef6e0cda619b7e00f112ffadd56d259a5cc8a85b
https://github.com/tealminivan/FinalProject/tree/ef6e0cda619b7e00f112ffadd56d259a5cc8a85b
Conv2dSame
# 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...
adityamehta00/HIDeGAN
Conv2dSame
false
3,027
[ "BSD-3-Clause" ]
0
91a0674e092ccde2784a82bf927dfefd8673eb4c
https://github.com/adityamehta00/HIDeGAN/tree/91a0674e092ccde2784a82bf927dfefd8673eb4c
ScaleNorm
import torch from torch import nn class ScaleNorm(nn.Module): def __init__(self, dim, eps=1e-05): super().__init__() self.scale = dim ** -0.5 self.eps = eps self.g = nn.Parameter(torch.ones(1)) def forward(self, x): norm = torch.norm(x, dim=-1, keepdim=True) * self.sc...
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_...
ncoop57/x-transformers
ScaleNorm
false
10,609
[ "MIT" ]
0
b65f25384349abfc101001b42482b05745c861fa
https://github.com/ncoop57/x-transformers/tree/b65f25384349abfc101001b42482b05745c861fa
_ScaledDotProductAttention
import torch import torch.nn as nn class _ScaledDotProductAttention(nn.Module): def __init__(self, dropout: 'float'=None, scale: 'bool'=True): super(_ScaledDotProductAttention, self).__init__() if dropout is not None: self.dropout = nn.Dropout(p=dropout) else: self...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
amadejkocbek/darts
_ScaledDotProductAttention
false
12,106
[ "Apache-2.0" ]
0
074be2a76eee11258da066878c564badf40834e9
https://github.com/amadejkocbek/darts/tree/074be2a76eee11258da066878c564badf40834e9
Downsampling
import torch import torch.nn as M def DepthwiseConv(in_channels, kernel_size, stride, padding): return M.Conv2d(in_channels=in_channels, out_channels=in_channels, kernel_size=kernel_size, stride=stride, padding=padding, groups= in_channels, bias=False) def PointwiseConv(in_channels, out_channels...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 M assert_s...
SuperbTUM/RAW-image-denoising
Downsampling
false
17,987
[ "MIT" ]
4
9f81be8da6a576f641022707d98b8c37f5c599ab
https://github.com/SuperbTUM/RAW-image-denoising/tree/9f81be8da6a576f641022707d98b8c37f5c599ab
FT
# 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...
wangxianliang/FaceX-Zoo
FT
false
13,085
[ "Apache-2.0" ]
0
b0555c88a0350fa7b59c317f3a171f551fef4e6e
https://github.com/wangxianliang/FaceX-Zoo/tree/b0555c88a0350fa7b59c317f3a171f551fef4e6e
SAB
import math import torch import numpy as np import torch.nn.functional as F import torch.nn as nn def qkv_attention(queries, keys, values, presence=None): """ Transformer-like self-attention. Args: queries: Tensor of shape [B, N, d_k]. keys: Tensor of shape [B, M, d_k]. values: : Tensor...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
KohavTal/SCAE_Project
SAB
false
8,410
[ "Apache-2.0" ]
40
bc6d1c3697fcb9327dd96e9657c3299b47cf355e
https://github.com/KohavTal/SCAE_Project/tree/bc6d1c3697fcb9327dd96e9657c3299b47cf355e
ChannelSpatialSELayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
HiLab-git/PyMIC
ChannelSpatialSELayer
false
13,777
[ "Apache-2.0" ]
147
abf5c43de43668b85f4c049c95a8f1b7cf1d9f16
https://github.com/HiLab-git/PyMIC/tree/abf5c43de43668b85f4c049c95a8f1b7cf1d9f16
Upsample
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
AyushExel/GANSketching
Upsample
false
13,442
[ "MIT" ]
598
c72524ac4425de898087af7a4c554b777a4e2218
https://github.com/AyushExel/GANSketching/tree/c72524ac4425de898087af7a4c554b777a4e2218
ResNetV2
import torch import numpy as np from collections import OrderedDict from torch import nn import torch.nn.functional as F def conv1x1(cin, cout, stride=1, bias=False): return StdConv2d(cin, cout, kernel_size=1, stride=stride, padding=0, bias=bias) def conv3x3(cin, cout, stride=1, groups=1, bias=False): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
marekb-sci/kaggle_cassava
ResNetV2
false
13,235
[ "Apache-2.0" ]
0
158d1e398e713381c889e071329b96b9c0ba98d2
https://github.com/marekb-sci/kaggle_cassava/tree/158d1e398e713381c889e071329b96b9c0ba98d2
Align
import torch import torch.nn.functional as F class Align(torch.nn.Module): def __init__(self, p): super(Align, self).__init__() self.p = p def forward(self, e1, e2): pred = -torch.norm(e1 - e2, p=self.p, dim=1) return pred def only_pos_loss(self, e1, r, e2): retu...
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.functional as F assert_size_stride = torch._C._dynamo.guards.as...
TMUITLab/EAFR
Align
false
1,108
[ "MIT" ]
0
dadb6485d48711ccb8aa2f03760aeb437645f1ff
https://github.com/TMUITLab/EAFR/tree/dadb6485d48711ccb8aa2f03760aeb437645f1ff
PairwiseRankingLoss
import torch from torch import nn class PairwiseRankingLoss(nn.Module): """ Pairwise ranking loss """ def __init__(self, margin): super(PairwiseRankingLoss, self).__init__() self.margin = margin def forward(self, anchor1, anchor2, img_sentc, sent_imgc): cost_sent = 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
maksimovVva/SentEval
PairwiseRankingLoss
false
10,457
[ "BSD-3-Clause" ]
0
d3aa5f24dd84b48ea476e73f4b59a4e1ace7775c
https://github.com/maksimovVva/SentEval/tree/d3aa5f24dd84b48ea476e73f4b59a4e1ace7775c
Hswish
# 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 from itertools import product as product assert_size_stride = torch...
PoWeiChiao/3DDFA_V2
Hswish
false
11,784
[ "MIT" ]
0
5b4ae883705a1f5b1f15c19203bedbd47fc8a832
https://github.com/PoWeiChiao/3DDFA_V2/tree/5b4ae883705a1f5b1f15c19203bedbd47fc8a832
Normalize
import torch import torch.nn as nn from itertools import product as product class Normalize(nn.Module): def __init__(self, n_channels, scale=1.0): super(Normalize, self).__init__() self.n_channels = n_channels self.scale = scale self.eps = 1e-10 self.weight = nn.Parameter(...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn from itertools import product as product assert_size_stri...
DongChengdongHangZhou/caffe-to-pytorch
Normalize
false
2,215
[ "Apache-2.0" ]
0
5e3104f3aa77d35bad5d2de235b067460c136fd5
https://github.com/DongChengdongHangZhou/caffe-to-pytorch/tree/5e3104f3aa77d35bad5d2de235b067460c136fd5
RRDB
import torch import torch.utils.data from torch.utils import data as data import torch.nn as nn from torch.nn import init as init from torch.nn.modules.batchnorm import _BatchNorm from torchvision.models import vgg as vgg from torch import autograd as autograd @torch.no_grad() def default_init_weights(module_list, sc...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data from torch.utils import data as data import torch.nn as ...
BCV-Uniandes/RSR
RRDB
false
8,172
[ "zlib-acknowledgement" ]
14
dad60eedd3560f2655e3d1ed444153ed2616af2e
https://github.com/BCV-Uniandes/RSR/tree/dad60eedd3560f2655e3d1ed444153ed2616af2e
ffnn
# 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.dataloader import torch.nn assert_...
db-bionlp/CLNER
ffnn
false
15,152
[ "MIT" ]
46
77910311acf0411252b9fea8c3e6efb7175eb21f
https://github.com/db-bionlp/CLNER/tree/77910311acf0411252b9fea8c3e6efb7175eb21f
BERTIntermediate
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn def gelu(x): """Implementation of the gelu activation function. For information: OpenAI GPT's gelu is slightly different (and gives slightly different results): 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
Chriskuei/FedMatch
BERTIntermediate
false
18,351
[ "Apache-2.0" ]
4
305e8c4bbb398712b00c883a986dfec17b500f76
https://github.com/Chriskuei/FedMatch/tree/305e8c4bbb398712b00c883a986dfec17b500f76
PatchMerging
import torch import torch.nn as nn def bchw_to_bhwc(input: 'torch.Tensor') ->torch.Tensor: """ Permutes a tensor to the shape [batch size, height, width, channels] :param input: (torch.Tensor) Input tensor of the shape [batch size, height, width, channels] :return: (torch.Tensor) Output tensor of the ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
ChristophReich1996/Swin-Transformer-V2
PatchMerging
false
7,929
[ "MIT" ]
43
d71c1b412cd0fe13dc2557ad090cf0f027e54d47
https://github.com/ChristophReich1996/Swin-Transformer-V2/tree/d71c1b412cd0fe13dc2557ad090cf0f027e54d47
DistillationLoss
import torch import torch.nn.functional as F import torch.utils import torch.utils.data.distributed from torch.nn.modules import loss class DistributionLoss(loss._Loss): def forward(self, model_output, real_output): self.size_average = True if real_output.requires_grad: raise ValueErr...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
CQUlearningsystemgroup/LearningToBinarize
DistillationLoss
false
4,966
[ "MIT" ]
1
1ecad897145af65ff52323bf2ec64a2154dc87d6
https://github.com/CQUlearningsystemgroup/LearningToBinarize/tree/1ecad897145af65ff52323bf2ec64a2154dc87d6
FiLMLayer
import torch from torch import nn class FiLMLayer(nn.Module): def __init__(self, input_dim, hidden_dim): super().__init__() self.layer = nn.Linear(input_dim, hidden_dim) def forward(self, x, freq, phase_shift): x = self.layer(x) freq = freq.unsqueeze(1).expand_as(x) p...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch im...
PeterouZh/CIPS-3D
FiLMLayer
false
14,173
[ "MIT" ]
308
9b8bfa0fb23f642af042e150ccd70408f9d137c6
https://github.com/PeterouZh/CIPS-3D/tree/9b8bfa0fb23f642af042e150ccd70408f9d137c6
ResidualBlock
import torch import torch.optim import torch.nn as nn import torch.nn.parallel class ResidualBlock(nn.Module): def __init__(self, in_f, out_f): super(ResidualBlock, self).__init__() self.conv = nn.Conv2d(in_f, out_f, 1, 1, padding=0, bias=False) def forward(self, x): residual = x ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.optim import torch.nn as nn import torch.nn.parallel assert_size_st...
PeiKaLunCi/code-cs-fairness
ResidualBlock
false
5,706
[ "MIT" ]
1
3c34d32c87ad244f6a9f302ba4f61e0acf886574
https://github.com/PeiKaLunCi/code-cs-fairness/tree/3c34d32c87ad244f6a9f302ba4f61e0acf886574
NormedLinear
import torch import torch.nn.functional as F import torch.nn as nn class NormedLinear(nn.Linear): """Normalized Linear Layer. Args: tempeature (float, optional): Tempeature term. Default to 20. power (int, optional): Power term. Default to 1.0. eps (float, optional): The minimal value...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
FMsunyh/mmdetection
NormedLinear
false
13,665
[ "Apache-2.0" ]
240
d3683eb06d1041aa3d55f35ad81d8c37718a4c2d
https://github.com/FMsunyh/mmdetection/tree/d3683eb06d1041aa3d55f35ad81d8c37718a4c2d
DiceLoss
# 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.utils.data import torch.nn as nn import torch.nn.parallel assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty...
HarshSulakhe/pytorch_connectomics
DiceLoss
false
9,864
[ "MIT" ]
0
73402e654afde69a43a5836cc90a32ef75c75dc2
https://github.com/HarshSulakhe/pytorch_connectomics/tree/73402e654afde69a43a5836cc90a32ef75c75dc2
EqualLinear
import torch import torch.nn as nn from math import sqrt def equal_lr(module, name='weight'): EqualLR.apply(module, name) return module class EqualLR: def __init__(self, name): self.name = name def compute_weight(self, module): weight = getattr(module, self.name + '_orig') ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from math import sqrt assert_size_stride = torch._C._dynam...
KwonGihyun/DiagonalGAN
EqualLinear
false
8,458
[ "MIT" ]
13
9e401c00e741d700f85df2c715ee11c1e66e1d1c
https://github.com/KwonGihyun/DiagonalGAN/tree/9e401c00e741d700f85df2c715ee11c1e66e1d1c
AttentionPooling
# 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....
Zed-Wu/ManiSkill-Learn
AttentionPooling
false
3,095
[ "Apache-2.0" ]
0
8056fe327752cd0863f8730672fe62bd85a0ec12
https://github.com/Zed-Wu/ManiSkill-Learn/tree/8056fe327752cd0863f8730672fe62bd85a0ec12
Q
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
ndangtt/LeadingOnesDAC
Q
false
7,320
[ "Apache-2.0" ]
1
953747d8702f179851d7973c65779a1f830e03a1
https://github.com/ndangtt/LeadingOnesDAC/tree/953747d8702f179851d7973c65779a1f830e03a1
TripletLossXBM
import torch import torch.nn as nn import torch.nn.functional as F import torchvision.transforms.functional as F import torch.utils.data def hard_examples_mining(dist_mat, identity_mat, return_idxes=False): """Select hard positives and hard negatives according to `In defense of the Triplet Loss for Person Re-...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
neka-nat/Transfer-Learning-Library
TripletLossXBM
false
16,168
[ "MIT" ]
1,474
a3b27b0d7562fa90a02e914140b37ab438469e6c
https://github.com/neka-nat/Transfer-Learning-Library/tree/a3b27b0d7562fa90a02e914140b37ab438469e6c