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
SSD300
# 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....
aarashfeizi/a-PyTorch-Tutorial-to-Object-Detection
SSD300
false
1,907
[ "MIT" ]
0
a9e1f3092d4b8c094bff5cd0897e0e3c1e0bc9c2
https://github.com/aarashfeizi/a-PyTorch-Tutorial-to-Object-Detection/tree/a9e1f3092d4b8c094bff5cd0897e0e3c1e0bc9c2
CosAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn.functional as F import torch.nn as nn from torch.nn import Parameter assert_size_stride = torch._C._dynamo.guards.assert_siz...
GraphNAS/GraphNAS
CosAttention
false
13,731
[ "Apache-2.0" ]
94
b4f05bb10b8b96bb9e82344bfae36a23db2431a6
https://github.com/GraphNAS/GraphNAS/tree/b4f05bb10b8b96bb9e82344bfae36a23db2431a6
AttCosine
# 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...
ishine/NISQA
AttCosine
false
15,647
[ "MIT" ]
223
2c8917f30c4e4bbca3a48e9852301f1e2480a741
https://github.com/ishine/NISQA/tree/2c8917f30c4e4bbca3a48e9852301f1e2480a741
_GRU_ODE
import torch class _GRU_ODE(torch.nn.Module): def __init__(self, input_channels, hidden_channels): super(_GRU_ODE, self).__init__() self.input_channels = input_channels self.hidden_channels = hidden_channels self.W_r = torch.nn.Linear(input_channels, hidden_channels, 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.triton_helpers import libdevice assert_size_stride ...
MLforHealth/state_representations_for_RLinHealth
_GRU_ODE
false
8,516
[ "MIT" ]
24
aa8dbb7d56caa95bf4380e3e745e134996291b66
https://github.com/MLforHealth/state_representations_for_RLinHealth/tree/aa8dbb7d56caa95bf4380e3e745e134996291b66
MyHingeLoss
import torch import torch.utils.data import torch import torch.nn as nn class MyHingeLoss(nn.Module): def __init__(self, margin=0.0): nn.Module.__init__(self) self.m = nn.MarginRankingLoss(margin=margin) def forward(self, positives, negatives): labels = positives.new_ones(positives.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 torch.utils.data import torch import torch.nn as nn assert_size_stride = torch._C....
huoxusg/ScenarioMeta
MyHingeLoss
false
15,562
[ "MIT" ]
79
ce753da45a3d46ac08961ffc71b2131ae3f7e551
https://github.com/huoxusg/ScenarioMeta/tree/ce753da45a3d46ac08961ffc71b2131ae3f7e551
diag_offdiag_maxpool
import torch class diag_offdiag_maxpool(torch.nn.Module): """diag_offdiag_maxpool""" def __init__(self): super(diag_offdiag_maxpool, self).__init__() def forward(self, inputs): max_diag = torch.max(torch.diagonal(inputs, dim1=-2, dim2=-1), dim=2)[0 ] max_val = torch.m...
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 assert_size_stride = t...
JoshuaMitton/InvariantGraphNetworks
diag_offdiag_maxpool
false
2,442
[ "Apache-2.0" ]
0
f6d8f43c7a053425eee785d11c5de91ac50f367c
https://github.com/JoshuaMitton/InvariantGraphNetworks/tree/f6d8f43c7a053425eee785d11c5de91ac50f367c
FeatureCorrelation
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data class FeatureCorrelation(nn.Module): def __init__(self): super(FeatureCorrelation, self).__init__() def forward(self, feat_a, feat_b): bs, c, h, w = feat_a.size() feat_a = feat_a.tr...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Karenou/mmfashion
FeatureCorrelation
false
9,459
[ "Apache-2.0" ]
0
dfc334232d1700cde18d144f983dd5b0a7f9852a
https://github.com/Karenou/mmfashion/tree/dfc334232d1700cde18d144f983dd5b0a7f9852a
PatchEmbed
import torch import torch.nn as nn class PatchEmbed(nn.Module): """ Image to Patch Embedding """ def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=768): super().__init__() num_patches = img_size // patch_size * (img_size // patch_size) self.img_size = img_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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
bmi-imaginelab/CD-Net-Histopathology-Representation-Learning-using-Pyramidal-Context-Detail-Network
PatchEmbed
false
6,347
[ "Apache-2.0" ]
1
cc4dad85cdeea7295cb48f6f947fd1ac25d8862e
https://github.com/bmi-imaginelab/CD-Net-Histopathology-Representation-Learning-using-Pyramidal-Context-Detail-Network/tree/cc4dad85cdeea7295cb48f6f947fd1ac25d8862e
AttentionConv
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.init as init class AttentionConv(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, groups=1, bias=False): super(AttentionConv, self).__init__() self.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.triton_helpers import math as tl_math import torch....
likui01/DRFuser
AttentionConv
false
7,089
[ "MIT" ]
1
06539a6fa9203b1e9dc9d4d944cfcd5f7603f5e9
https://github.com/likui01/DRFuser/tree/06539a6fa9203b1e9dc9d4d944cfcd5f7603f5e9
BasicModel5_MultiArgs
import torch import torch.nn as nn import torch.nn.functional as F class BasicModel5_MultiArgs(nn.Module): """ Slightly modified example model from the paper https://arxiv.org/pdf/1703.01365.pdf f(x1, x2) = RELU(ReLU(x1 - 1) * x3[0] - ReLU(x2) * x3[1]) """ def __init__(self) ->None: 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 torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
aravipati12/captum
BasicModel5_MultiArgs
false
10,094
[ "BSD-3-Clause" ]
0
ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
https://github.com/aravipati12/captum/tree/ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
Net3
import torch from torch import nn class Net3(nn.Module): """ Net3 is a neural network consisting of four hidden layers with sizes 400, 300, 300 and 70 """ layer_sizes = [400, 300, 300, 70] hidden1 = 400 hidden2 = 300 hidden3 = 300 hidden4 = 70 def __init__(self, input_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 import nn assert_s...
moritzschaefer/pavooc
Net3
false
7,274
[ "MIT" ]
1
735f5455f9a95a5734436a24e2aa92cf600c91af
https://github.com/moritzschaefer/pavooc/tree/735f5455f9a95a5734436a24e2aa92cf600c91af
RPN
# 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....
vadimadr/openvino_training_extensions
RPN
false
11,040
[ "Apache-2.0" ]
0
5d64b8423c8eb7b374ed629fad938359d34a07d2
https://github.com/vadimadr/openvino_training_extensions/tree/5d64b8423c8eb7b374ed629fad938359d34a07d2
SimpleGCN
import math import torch import torch.nn as nn from torch.nn.parameter import Parameter from torch.nn import Parameter import torch.nn import torch.autograd class SimpleGCN(nn.Module): """A simple graph convolution layer, similar to the one defined in Kipf et al. https://arxiv.org/abs/1609.02907 .. note:...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 from torch.nn.parameter import Parameter from ...
acivgin1/kaolin
SimpleGCN
false
12,072
[ "ECL-2.0", "Apache-2.0" ]
0
4c4e0098b2cd9a73709c81fea82de03abbd6cdd5
https://github.com/acivgin1/kaolin/tree/4c4e0098b2cd9a73709c81fea82de03abbd6cdd5
GatedConv2d
import torch from torch import nn from torch.nn import functional as F import torch.utils import torch.distributions class GatedConv2d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride, padding, dilation=1): super(GatedConv2d, self).__init__() self.conv = nn.Co...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.utils import torch.distributions assert_size_s...
Butters-cloud/denoising-normalizing-flow
GatedConv2d
false
7,828
[ "MIT" ]
12
12d56a0d069e10a744acabf5e78fdbfba8df54ee
https://github.com/Butters-cloud/denoising-normalizing-flow/tree/12d56a0d069e10a744acabf5e78fdbfba8df54ee
Classify
# 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...
Kumaken/fyp-vehicle-counting-system
Classify
false
2,473
[ "MIT" ]
0
51adb3bfc762d5489bc643da5f79bec3fa9eeb84
https://github.com/Kumaken/fyp-vehicle-counting-system/tree/51adb3bfc762d5489bc643da5f79bec3fa9eeb84
power
import torch import torch as tr import torch.nn as nn class power(nn.Module): def __init__(self): super(power, self).__init__() def forward(self, x: 'tr.Tensor'): return x.pow(2) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
pierreglaser/MMD-gradient-flow
power
false
10,689
[ "BSD-3-Clause" ]
0
43591137e1d04bed5153887a364fae72621b01ae
https://github.com/pierreglaser/MMD-gradient-flow/tree/43591137e1d04bed5153887a364fae72621b01ae
Embbed2
# 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 assert_size_s...
qway/nerfmeshes
Embbed2
false
16,309
[ "MIT" ]
113
d983dcbbcfec1337c9f2040969213c6d1ea0c39e
https://github.com/qway/nerfmeshes/tree/d983dcbbcfec1337c9f2040969213c6d1ea0c39e
L1CosineSim
# 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...
BlueAmulet/BasicSR
L1CosineSim
false
7,816
[ "Apache-2.0" ]
12
7040913d8659a05af4c2428feb71c260efbf1e9c
https://github.com/BlueAmulet/BasicSR/tree/7040913d8659a05af4c2428feb71c260efbf1e9c
MADDPGActorVersion1
# 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....
Brandon-HY-Lin/deep-reinforcement-learning
MADDPGActorVersion1
false
179
[ "MIT" ]
0
d809851b6f98d1089379392d4687e2acaf1c0c79
https://github.com/Brandon-HY-Lin/deep-reinforcement-learning/tree/d809851b6f98d1089379392d4687e2acaf1c0c79
TransitionUp
import torch from torch import nn import torch.onnx import torch.nn.functional as F import torch.utils.data class TransitionUp(nn.Module): def __init__(self, in_channels, out_channels): super().__init__() def forward(self, x, skip, concat=True): out = F.interpolate(x, size=(skip.size(2), ski...
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 import torch.onnx import torch.utils.data assert_size_stride = torch...
kuanhungchen/CenterNet-HarDNet
TransitionUp
false
15,856
[ "MIT" ]
164
050d55a532706d989105982c5bc10f1c89edc8d2
https://github.com/kuanhungchen/CenterNet-HarDNet/tree/050d55a532706d989105982c5bc10f1c89edc8d2
CTCHead
import torch import torch.nn as nn import torch.nn.functional as F class CTCHead(nn.Module): def __init__(self, in_channels, out_channels=6625, fc_decay=0.0004, mid_channels=None, **kwargs): super(CTCHead, self).__init__() if mid_channels is None: self.fc = nn.Linear(in_channe...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
BHD233/PaddleOCR2Pytorch
CTCHead
false
13,363
[ "Apache-2.0" ]
364
f114069b3e2669c6adf0adf9596756205f184c9c
https://github.com/BHD233/PaddleOCR2Pytorch/tree/f114069b3e2669c6adf0adf9596756205f184c9c
PKT
import torch import torch.nn as nn import torch.optim class PKT(nn.Module): """Probabilistic Knowledge Transfer for deep representation learning Code from author: https://github.com/passalis/probabilistic_kt""" def __init__(self): super(PKT, self).__init__() def forward(self, f_s, f_t): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
RylanSchaeffer/RepDistiller
PKT
false
5,786
[ "BSD-2-Clause" ]
1
3612d9d8f6f913527c7aaec7e5ea557e72ed7c5e
https://github.com/RylanSchaeffer/RepDistiller/tree/3612d9d8f6f913527c7aaec7e5ea557e72ed7c5e
NSELoss
import torch class NSELoss(torch.nn.Module): """Calculate (batch-wise) NSE Loss. Each sample i is weighted by 1 / (std_i + eps)^2, where std_i is the standard deviation of the discharge from the basin, to which the sample belongs. Parameters: ----------- eps : float Constant, added ...
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...
danielsuo/toy_flood
NSELoss
false
15,113
[ "MIT" ]
49
471d3c4091d86d4a00fbf910937d4e60fdaf79a1
https://github.com/danielsuo/toy_flood/tree/471d3c4091d86d4a00fbf910937d4e60fdaf79a1
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...
hurraygong/scGNN
VAE
false
6,835
[ "MIT" ]
1
bc555895fbd5740ddd82e03187171116889cc10e
https://github.com/hurraygong/scGNN/tree/bc555895fbd5740ddd82e03187171116889cc10e
Flatten
import torch from torch import nn class Flatten(nn.Module): def __init__(self): super(Flatten, self).__init__() def forward(self, x): """ Arguments: x: a float tensor with shape [batch_size, c, h, w]. Returns: a float tensor with shape [batch_size, c*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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
DeepVoodooFX/pixel2style2pixel
Flatten
false
11,341
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
0
0254c32400d55f7e400ead15b02ad6a992ba1e21
https://github.com/DeepVoodooFX/pixel2style2pixel/tree/0254c32400d55f7e400ead15b02ad6a992ba1e21
Generator
# 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....
chanhee0222/feed2resp
Generator
false
9,911
[ "MIT" ]
0
16dc7071f17af56cbf019eeabcd12a5dbd0693e7
https://github.com/chanhee0222/feed2resp/tree/16dc7071f17af56cbf019eeabcd12a5dbd0693e7
TimeStrech
# 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...
yuangan/A2L
TimeStrech
false
4,631
[ "MIT" ]
0
8cbc9b5f368924c8c75cbab53e9bb10dcf265c7e
https://github.com/yuangan/A2L/tree/8cbc9b5f368924c8c75cbab53e9bb10dcf265c7e
SoftmaxAffineLayer
# 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....
ishine/asv-subtools
SoftmaxAffineLayer
false
15,651
[ "Apache-2.0" ]
370
597dcb29a772b8113dbe7ab64f0d4cc1da298707
https://github.com/ishine/asv-subtools/tree/597dcb29a772b8113dbe7ab64f0d4cc1da298707
FactorTransfer
# 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 from torch ...
UBCDingXin/RepDistiller
FactorTransfer
false
14,530
[ "BSD-2-Clause" ]
1,347
dcc043277f2820efafd679ffb82b8e8195b7e222
https://github.com/UBCDingXin/RepDistiller/tree/dcc043277f2820efafd679ffb82b8e8195b7e222
Swish
# 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...
bglick13/multi-agent-emergence-environments
Swish
false
12,151
[ "MIT" ]
0
e02d66f0734d95470d15a4508ff369a75fa093a4
https://github.com/bglick13/multi-agent-emergence-environments/tree/e02d66f0734d95470d15a4508ff369a75fa093a4
DY_Conv2d
import torch import torch.nn as nn import torch.nn.functional as F class DY_Conv2d(nn.Conv2d): def __init__(self, in_chan, out_chan, kernel_size=3, stride=1, padding= 1, dilation=1, groups=1, bias=False, act=nn.ReLU(inplace=True), K=4, temperature=30, temp_anneal_steps=3000): super(DY_Con...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
imvladikon/pytorch-loss
DY_Conv2d
false
6,882
[ "MIT" ]
1
6cfaabe1be898e1ff000b3dffb46d0ef09096f6b
https://github.com/imvladikon/pytorch-loss/tree/6cfaabe1be898e1ff000b3dffb46d0ef09096f6b
T2A
import torch import torch.nn as nn import torch.nn.functional as F import torch.cuda import torch.distributed class T2A(nn.Module): def __init__(self, dim): super().__init__() self.W = nn.Linear(dim, dim, bias=False) self.U = nn.Linear(dim, dim, bias=False) self.b = nn.Parameter(t...
import torch from torch._inductor.select_algorithm import extern_kernels import 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_str...
InitialBug/BiSET
T2A
false
13,833
[ "MIT" ]
47
a697a3c61014281bbd83cd37ede29b1263c8832f
https://github.com/InitialBug/BiSET/tree/a697a3c61014281bbd83cd37ede29b1263c8832f
Affine
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data class Affine(nn.Module): def __init__(self, dim): super().__init__() self.alpha = nn.Parameter(torch.ones((1, 1, dim))) self.beta = nn.Parameter(torch.zeros((1, 1, dim))) def forward(self, x): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty...
rioyokotalab/pytorch-image-models
Affine
false
7,558
[ "Apache-2.0" ]
1
87d8d3c14b64bb6a76402f363a1e1ee1829bca93
https://github.com/rioyokotalab/pytorch-image-models/tree/87d8d3c14b64bb6a76402f363a1e1ee1829bca93
CircPad
# 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...
conlain-k/RLN_elasticity
CircPad
false
3,359
[ "MIT" ]
0
d8574c83d62f675960a7f8b86ddb553e9a7b1ca7
https://github.com/conlain-k/RLN_elasticity/tree/d8574c83d62f675960a7f8b86ddb553e9a7b1ca7
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...
chenyanghungry/person-reid-lib
ContrastiveLoss
false
15,019
[ "MIT" ]
81
783e66c9bfedf582e2cf935b9f5be960b543ac3c
https://github.com/chenyanghungry/person-reid-lib/tree/783e66c9bfedf582e2cf935b9f5be960b543ac3c
AlexOutputBlock
import torch import torch.utils.data import torch.nn as nn class AlexDense(nn.Module): """ AlexNet specific dense block. Parameters: ---------- in_channels : int Number of input channels. out_channels : int Number of output channels. """ def __init__(self, in_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.utils.data impor...
HyperGAN/imgclsmob
AlexOutputBlock
false
17,693
[ "MIT" ]
9
88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
LSGANLossDiscriminator
import torch import torch.nn as nn class LSGANLossDiscriminator(nn.Module): """ This class implements the least squares discriminator GAN loss proposed in: https://openaccess.thecvf.com/content_ICCV_2017/papers/Mao_Least_Squares_Generative_ICCV_2017_paper.pdf """ def __init__(self) ->None: ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
ChristophReich1996/Mode_Collapse
LSGANLossDiscriminator
false
7,913
[ "MIT" ]
14
937ee8bf96510fbf4070fc7e14b78276ab036b8c
https://github.com/ChristophReich1996/Mode_Collapse/tree/937ee8bf96510fbf4070fc7e14b78276ab036b8c
AUGRUCell
# 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 ...
Fanxingye/DeepRS
AUGRUCell
false
14,048
[ "Apache-2.0" ]
1,770
06b98cf2cb2781656805eafc577fbd088f37d17d
https://github.com/Fanxingye/DeepRS/tree/06b98cf2cb2781656805eafc577fbd088f37d17d
CRF_S
import torch import torch.nn as nn import torch.nn.init class CRF_S(nn.Module): """Conditional Random Field (CRF) layer. This version is used in Lample et al. 2016, has less parameters than CRF_L. args: hidden_dim: input dim size tagset_size: target_set_size if_biase: whether allow bi...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.init assert_size_stride = torch._C._dynamo...
markWJJ/LM-LSTM-CRF
CRF_S
false
12,752
[ "Apache-2.0" ]
0
e468974ce2193a5579417f9e253eb6c997932636
https://github.com/markWJJ/LM-LSTM-CRF/tree/e468974ce2193a5579417f9e253eb6c997932636
DenseSynthesizer
import torch import torch.nn as nn class DenseSynthesizer(nn.Module): def __init__(self, head_dim, n_heads, n_tokens, big=True): super().__init__() h = max(head_dim, n_tokens) if big else min(head_dim, n_tokens) w1 = torch.empty(n_heads, head_dim, h) b1 = torch.empty(n_heads, h) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
darkmatter08/dfa-scales-to-modern-deep-learning
DenseSynthesizer
false
6,538
[ "MIT" ]
1
72bf8a045b4bb7eb81736d8ec1d671c4949fb01e
https://github.com/darkmatter08/dfa-scales-to-modern-deep-learning/tree/72bf8a045b4bb7eb81736d8ec1d671c4949fb01e
MobileBertSelfAttention
from _paritybench_helpers import _mock_config import math import torch from torch import nn import torch.utils.checkpoint class MobileBertSelfAttention(nn.Module): def __init__(self, config): super().__init__() self.num_attention_heads = config.num_attention_heads self.attention_head_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....
jxhe/unify-parameter-efficient-tuning
MobileBertSelfAttention
false
15,773
[ "Apache-2.0" ]
101
3222ce2c0079566a28043e22380eb4ab6ad14389
https://github.com/jxhe/unify-parameter-efficient-tuning/tree/3222ce2c0079566a28043e22380eb4ab6ad14389
KnowledgeDistillationKLDivLoss
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 from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import func...
xiangn95/mmclassification
KnowledgeDistillationKLDivLoss
false
10,959
[ "Apache-2.0" ]
0
3a3307cd222fe5156a703cf5573e54dbb6692b10
https://github.com/xiangn95/mmclassification/tree/3a3307cd222fe5156a703cf5573e54dbb6692b10
ConvBnRel
import torch from torch.autograd.gradcheck import * import torch.nn as nn import torch.nn class ConvBnRel(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, active_unit='relu', same_padding=False, bn=False, reverse=False, bias=False): super(ConvBnRel, 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.autograd.gradcheck...
HastingsGreer/mermaid
ConvBnRel
false
13,759
[ "Apache-2.0" ]
120
bd13c5fc427eb8cd9054973a8eaaeb302078182d
https://github.com/HastingsGreer/mermaid/tree/bd13c5fc427eb8cd9054973a8eaaeb302078182d
AdaptiveInstanceNorm
from torch.autograd import Function import math import torch from torch import nn from torch.nn import functional as F from torch.cuda.amp import custom_fwd from torch.cuda.amp import custom_bwd def fused_leaky_relu(input, bias, negative_slope=0.2, scale=2 ** 0.5): if input.device.type == 'cpu': rest_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.triton_helpers import libdevice from torch.autograd...
G-arj/StyleSwin
AdaptiveInstanceNorm
false
13,707
[ "MIT" ]
398
0c592b3334159613ebe4a33bd6c4ea042dac42d4
https://github.com/G-arj/StyleSwin/tree/0c592b3334159613ebe4a33bd6c4ea042dac42d4
TVLoss
# 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...
Holmes-Alan/RefVAE
TVLoss
false
8,266
[ "MIT" ]
13
836b8f1168f1b0f923b609a48e202ace7806f79c
https://github.com/Holmes-Alan/RefVAE/tree/836b8f1168f1b0f923b609a48e202ace7806f79c
ToyNet
# 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_...
asalmanp/MIVisionX
ToyNet
false
15,028
[ "MIT" ]
153
a964774944331827c8d6e9bb1ffbb2578f335056
https://github.com/asalmanp/MIVisionX/tree/a964774944331827c8d6e9bb1ffbb2578f335056
DenoisingNet
import torch import torch.nn as nn class DenoisingNet(nn.Module): def __init__(self, input_vec_size): super(DenoisingNet, self).__init__() self.linear_layer = nn.Linear(input_vec_size, 1) self.elu_layer = nn.ELU() self.propensity_net = nn.Sequential(self.linear_layer, self.elu_lay...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
ULTR-Community/ULTRA_Pytorch
DenoisingNet
false
14,542
[ "Apache-2.0" ]
46
ec4fe329e4239b588a940cb4bcdd6a321aade679
https://github.com/ULTR-Community/ULTRA_Pytorch/tree/ec4fe329e4239b588a940cb4bcdd6a321aade679
LxmertCrossAttentionLayer
import math import torch from torch import nn from itertools import * class LxmertAttention(nn.Module): def __init__(self, hidden_size, num_attention_heads, attention_probs_dropout_prob, ctx_dim): super().__init__() if hidden_size % num_attention_heads != 0: raise ValueError( ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ashutoshbsathe/SmBop
LxmertCrossAttentionLayer
false
9,801
[ "MIT" ]
0
ce5f67ec070df55b84d7f3617659011732020c96
https://github.com/ashutoshbsathe/SmBop/tree/ce5f67ec070df55b84d7f3617659011732020c96
LinearMultiplicationComposition
# 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.parallel import torch.utils.data import torch.distributions asse...
XeniaOhmer/SystematicRepresentations
LinearMultiplicationComposition
false
1,235
[ "MIT" ]
0
825208d1be659dc820e61f577cdb53afc47302f4
https://github.com/XeniaOhmer/SystematicRepresentations/tree/825208d1be659dc820e61f577cdb53afc47302f4
Attention
import torch from torch import nn import torch.nn.functional as F class Attention(nn.Module): """ Applies an attention mechanism on the output features from the decoder. """ def __init__(self, dim): super(Attention, self).__init__() self.dim = dim self.linear1 = nn.Linear(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....
salmon7ish/Video-Captioning
Attention
false
4,378
[ "MIT" ]
0
08359b1824195a7f5eac5b58982efd19ebc6db01
https://github.com/salmon7ish/Video-Captioning/tree/08359b1824195a7f5eac5b58982efd19ebc6db01
Joiner
import torch from torch import nn import torch.nn.functional as F class Joiner(nn.Module): def __init__(self, input_dim: 'int', output_dim: 'int'): super().__init__() self.output_linear = nn.Linear(input_dim, output_dim) def forward(self, encoder_out: 'torch.Tensor', decoder_out: 'torch.Tens...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
thangdepzai/icefall
Joiner
false
13,028
[ "Apache-2.0" ]
0
8c7995d493c4309c3d09bdabfa1ab12b4eec2657
https://github.com/thangdepzai/icefall/tree/8c7995d493c4309c3d09bdabfa1ab12b4eec2657
DenseBlock
import torch from torch import nn from torch.nn import functional as F class CausalConv1d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size=2, dilation=2): super(CausalConv1d, self).__init__() self.padding = dilation self.causal_conv = nn.Conv1d(in_channels, out_channe...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
heyitsmine/FewRel
DenseBlock
false
10,254
[ "MIT" ]
0
2a2b8ae471298d9eb3557796a085c23b21982fb2
https://github.com/heyitsmine/FewRel/tree/2a2b8ae471298d9eb3557796a085c23b21982fb2
MultiHeadAttention
import math import torch import numpy as np import torch.nn as nn def logistic(x, c=1, a=20, b=np.e): return c / (1 + a * b ** -x) def attention(q, k, v, d_k, mask=None, dropout=None): scores = torch.matmul(q, k.transpose(-2, -1)) / math.sqrt(d_k) if mask is not None: mask = mask.unsqueeze(1) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math import ...
lysecret2/explainability-simulation
MultiHeadAttention
false
7,156
[ "MIT" ]
1
e558f6f527ac2ff66f00fcb37aeeaf404c32ff66
https://github.com/lysecret2/explainability-simulation/tree/e558f6f527ac2ff66f00fcb37aeeaf404c32ff66
Acos
import torch import torch.onnx import torch.nn as nn class Acos(nn.Module): def forward(self, x): return torch.acos(x) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.onnx import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
mil-tokyo/webdnn
Acos
false
16,067
[ "MIT" ]
1,967
38a60fd3e1a4e72bc01108189a3aa51e0752aecd
https://github.com/mil-tokyo/webdnn/tree/38a60fd3e1a4e72bc01108189a3aa51e0752aecd
LocallyConnectedLayer1d
import torch import torch.nn as nn import torch.nn.functional as F import torch.onnx class LocallyConnectedLayer1d(nn.Module): def __init__(self, input_dim, output_dim, kernel_size, stride, padding= True, bias=False): """ Defines one locally connected layer for one dimensional vector input....
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.onnx assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynam...
adityayedetore/LCRNN
LocallyConnectedLayer1d
false
3,033
[ "MIT" ]
0
7b6afaf6098fed584b90fe0196cfd26aa6a190c5
https://github.com/adityayedetore/LCRNN/tree/7b6afaf6098fed584b90fe0196cfd26aa6a190c5
GroupedLinearLayer
import torch from torch import nn import torch.utils.checkpoint class GroupedLinearLayer(nn.Module): def __init__(self, input_size, output_size, num_groups): super().__init__() self.input_size = input_size self.output_size = output_size self.num_groups = num_groups self.gr...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.utils.checkpoint assert_size_stride = torch._C...
sajastu/transformers-sent-curr
GroupedLinearLayer
false
4,239
[ "Apache-2.0" ]
0
6dc41545c4ac298a010090fbca4b454c2eaf3dbb
https://github.com/sajastu/transformers-sent-curr/tree/6dc41545c4ac298a010090fbca4b454c2eaf3dbb
GumbelQuantize
# 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....
baudm/deep-vector-quantization
GumbelQuantize
false
1,547
[ "MIT" ]
0
211bda99a6c750c1e65aff082aa865fed8677b8a
https://github.com/baudm/deep-vector-quantization/tree/211bda99a6c750c1e65aff082aa865fed8677b8a
Coxnnet
# 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 numpy as np ...
menggerSherry/SAVAE-Cox
Coxnnet
false
7,222
[ "Apache-2.0" ]
1
c087ab4f267da28db7eb497c844bea59e65ed125
https://github.com/menggerSherry/SAVAE-Cox/tree/c087ab4f267da28db7eb497c844bea59e65ed125
ResidualBlock
import torch import torch.utils.data import torch.nn as nn class ResidualBlock(nn.Module): def __init__(self, in_channels, out_channels, hidden_dim): super().__init__() self.fc_0 = nn.Conv1d(in_channels, hidden_dim, 1) self.fc_1 = nn.Conv1d(hidden_dim, out_channels, 1) self.activa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
StructuralNeurobiologyLab/LightConvPoint
ResidualBlock
false
14,444
[ "Apache-2.0" ]
58
3f353f45e9e910fa390a74520dfd478e3e88f104
https://github.com/StructuralNeurobiologyLab/LightConvPoint/tree/3f353f45e9e910fa390a74520dfd478e3e88f104
InverseSqrt
# 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_...
fmhoward/pysurvival
InverseSqrt
false
12,374
[ "Apache-2.0" ]
0
3fea55f09477e9f0844845e09d6ea60434436e2e
https://github.com/fmhoward/pysurvival/tree/3fea55f09477e9f0844845e09d6ea60434436e2e
GRU2D
import math import torch from torch import nn class GRU2D(nn.Module): """2D GRU Cell""" def __init__(self, in_dim, hidden_dim, bias=True): super(GRU2D, self).__init__() self.x_to_intermediate = nn.Linear(in_dim, 3 * hidden_dim, bias=bias) self.h_to_intermediate = nn.Linear(in_dim, 3 *...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math from to...
GSK-AI/meta-learning-qsar
GRU2D
false
8,135
[ "MIT" ]
20
e0fcad57a5616b4828d9b14d18cfb2dc4c8eba89
https://github.com/GSK-AI/meta-learning-qsar/tree/e0fcad57a5616b4828d9b14d18cfb2dc4c8eba89
Pooler
import torch import torch.nn as nn import torch.utils.data import torch.utils.data.distributed class Pooler(nn.Module): """ Do pooling, possibly with a projection beforehand """ def __init__(self, d_inp, project=True, d_proj=512, pool_type='max'): super(Pooler, self).__init__() self.project =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
cjmay/jiant
Pooler
false
12,224
[ "MIT" ]
0
46e6fa9d0fc73883468646cbd0f36f4166720911
https://github.com/cjmay/jiant/tree/46e6fa9d0fc73883468646cbd0f36f4166720911
DilatedNet
import torch import torchvision.transforms.functional as F from torch.nn import functional as F from torch import nn class DilatedNet(nn.Module): def __init__(self, filters): super().__init__() self.filters = filters self.conv1 = nn.Conv2d(self.filters[-1], self.filters[-1], 3, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
tilacyn/dsb2018_topcoders
DilatedNet
false
16,589
[ "MIT" ]
413
e0f95ef70bc062d4dea321d2aa73231a9538cd63
https://github.com/tilacyn/dsb2018_topcoders/tree/e0f95ef70bc062d4dea321d2aa73231a9538cd63
Correct
import torch from torch import nn import torch.utils.data.distributed class Correct(nn.Module): def forward(self, classifier, target): return classifier.max(dim=1)[1] == target def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.utils.data.distributed assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda ...
amitport/grace
Correct
false
12,088
[ "BSD-2-Clause" ]
0
b0e442057d2f36f09cd1817a4acb966c6b0b780f
https://github.com/amitport/grace/tree/b0e442057d2f36f09cd1817a4acb966c6b0b780f
LossEnergy
import torch from torch import nn class WaveFunctionLoss(nn.Module): """Base class for all wave function loss functions. Any such loss must be derived from the local energy and wave function values, :math:`L(\\{E_\\text{loc}[\\psi],\\ln|\\psi|,w\\})`, using also importance-sampling weights *w*. ...
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...
MikeEntwistle/deepqmc
LossEnergy
false
17,715
[ "MIT" ]
4
b5c20bf1768f04227becd5079c6b40aefc97d26c
https://github.com/MikeEntwistle/deepqmc/tree/b5c20bf1768f04227becd5079c6b40aefc97d26c
MSEWithLogitsLoss
import torch from torch import nn from torch.nn import MSELoss class MSEWithLogitsLoss(MSELoss): """ This loss combines a `Sigmoid` layer and the `MSELoss` in one single class. """ def __init__(self): super(MSEWithLogitsLoss, self).__init__() self.sigmoid = nn.Sigmoid() def forwa...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn from torch.nn import MSELoss assert_size_stride = torch._C._dynamo.g...
WdBlink/AugMix-3DOCUNet-Brats2019
MSEWithLogitsLoss
false
5,961
[ "MIT" ]
1
125c6c8682b51a550eeac9173d13d0a211576abc
https://github.com/WdBlink/AugMix-3DOCUNet-Brats2019/tree/125c6c8682b51a550eeac9173d13d0a211576abc
generator
import torch import torch.nn as nn class generator(nn.Module): def __init__(self, p_dim, c_dim): super(generator, self).__init__() self.p_dim = p_dim self.c_dim = c_dim convex_layer_weights = torch.zeros((self.p_dim, self.c_dim)) self.convex_layer_weights = nn.Parameter(co...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
trisct/BSP-NET-pytorch
generator
false
13,048
[ "MIT" ]
0
31f148aa3d7321bac854bc3de6c88f676236b7e4
https://github.com/trisct/BSP-NET-pytorch/tree/31f148aa3d7321bac854bc3de6c88f676236b7e4
AttentionLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
jhbed/fairmotion
AttentionLayer
false
10,310
[ "BSD-3-Clause" ]
0
949683d628b389a1e4f241b21e88f5d57f3a488e
https://github.com/jhbed/fairmotion/tree/949683d628b389a1e4f241b21e88f5d57f3a488e
MLP
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
heheda12345/nnfusion
MLP
false
12,495
[ "MIT" ]
0
8cf153c1adae094fa891021bd6da70aeeee112ba
https://github.com/heheda12345/nnfusion/tree/8cf153c1adae094fa891021bd6da70aeeee112ba
PatchEmbed
import torch from itertools import chain as chain import torch.utils.data import torch.nn as nn class PatchEmbed(nn.Module): """ PatchEmbed. """ def __init__(self, dim_in=3, dim_out=768, kernel=(1, 16, 16), stride=(1, 4, 4), padding=(1, 7, 7), conv_2d=False): 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 itertools import chain as chain import torch.utils.data import torch.nn as ...
billcai/SlowFast
PatchEmbed
false
1,562
[ "Apache-2.0" ]
0
778888e63351e55861801996b37c7ff9a3746587
https://github.com/billcai/SlowFast/tree/778888e63351e55861801996b37c7ff9a3746587
Route
# 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...
CV-YYDS/YOLOv3
Route
false
11,275
[ "MIT" ]
0
a433064721dfc932509aaed6cb44a785b24bc768
https://github.com/CV-YYDS/YOLOv3/tree/a433064721dfc932509aaed6cb44a785b24bc768
SPoC
import torch import torch.nn as nn import torch.nn.functional as F class SPoC(nn.Module): def __init__(self): super(SPoC, self).__init__() def forward(self, x): return F.avg_pool2d(x, (x.size(-2), x.size(-1))) def __repr__(self): return self.__class__.__name__ + '()' def get_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.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
RetrainIt/Perfect-Half-Million-Beauty-Product-Image-Recognition-Challenge
SPoC
false
8,684
[ "Apache-2.0" ]
15
080aa5ae2f2755c6dc10b7cdc910ec0f76bc82c3
https://github.com/RetrainIt/Perfect-Half-Million-Beauty-Product-Image-Recognition-Challenge/tree/080aa5ae2f2755c6dc10b7cdc910ec0f76bc82c3
PositionwiseFeedForward
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.init class PositionwiseFeedForward(nn.Module): """ A two-feed-forward-layer module """ def __init__(self, d_in, d_hid, dropout=0.1): super().__init__() self.w_1 = nn.Linear(d_in, d_hid) self.w_2 = 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 from torch._inductor.runtime....
LiJiaBei-7/rivrl
PositionwiseFeedForward
false
5,525
[ "Apache-2.0" ]
1
f6078e4826c788704bb338d7a695ef879ff969f4
https://github.com/LiJiaBei-7/rivrl/tree/f6078e4826c788704bb338d7a695ef879ff969f4
SAB
import math import torch import torch.nn as nn import torch.nn.functional as F 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....
Behrouz-Babaki/NCG4CVRP
SAB
false
4,902
[ "MIT" ]
1
87d63366c0b461f44ce8e982159a1e207af77b44
https://github.com/Behrouz-Babaki/NCG4CVRP/tree/87d63366c0b461f44ce8e982159a1e207af77b44
MultiHeadedLinerAttention
# 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....
Shengqiang-Li/LAC
MultiHeadedLinerAttention
false
9,473
[ "Apache-2.0" ]
0
6b549cd89e03be2fafa4ce4378e70538744b9aa3
https://github.com/Shengqiang-Li/LAC/tree/6b549cd89e03be2fafa4ce4378e70538744b9aa3
CrossEntropy
# 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 ...
coolservices/rock-fracture-identification
CrossEntropy
false
3,310
[ "Apache-2.0" ]
0
3e7349be7e76dc87800c630f53f8d1ad5673d28b
https://github.com/coolservices/rock-fracture-identification/tree/3e7349be7e76dc87800c630f53f8d1ad5673d28b
Conv2d_GN_ReLUx2
# 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....
FANG-Xiaolin/uois
Conv2d_GN_ReLUx2
false
2,246
[ "MIT" ]
0
7489e69d1513faf2f3f030a441abdd33ca22304c
https://github.com/FANG-Xiaolin/uois/tree/7489e69d1513faf2f3f030a441abdd33ca22304c
SelfAttentionPooling
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
RayTzeng/s3m-membership-inference
SelfAttentionPooling
false
17,848
[ "MIT" ]
9
ec1ed9438afc4fd3d7a55fd10e6065d2ecc861c4
https://github.com/RayTzeng/s3m-membership-inference/tree/ec1ed9438afc4fd3d7a55fd10e6065d2ecc861c4
ConvLSTMCls
import torch import torch.nn as nn class ConvLSTMCls(nn.Module): def __init__(self, in_channels, out_channels): """ Convolutional LSTM block for generation network Args: - in_channels: Int. Number of channels of the input of Conv2D - out_channels: Int. Number of 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.triton_helpers import libdevice import torch.nn as ...
DveloperY0115/torch-gqn
ConvLSTMCls
false
17,235
[ "Apache-2.0" ]
3
3d1be9d73522e3d52f15076e0e9cb485dcab638b
https://github.com/DveloperY0115/torch-gqn/tree/3d1be9d73522e3d52f15076e0e9cb485dcab638b
Custom_dropout
import torch import torch.nn as nn import torch.nn.parallel class Custom_dropout(nn.Module): """ An implementation for few , Given a task perform a rowise sum of 2-d matrix , you get a zero out the contribution of few of rows in the matrix Given, X a 2-d matrix consisting of row vectors (1-d) x1 , x2 ,..xn....
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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C...
QMrpy/deepchem
Custom_dropout
false
2,738
[ "MIT" ]
0
f38a21c71e7bc4fd1fa59601be2b79ce7d744bd6
https://github.com/QMrpy/deepchem/tree/f38a21c71e7bc4fd1fa59601be2b79ce7d744bd6
SpatialAttention
# 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.triton_helpers import libdevice, math as tl_math fr...
Steffen-Wolf/vit-pytorch
SpatialAttention
false
9,610
[ "MIT" ]
0
4f590b9bd570091d9070a039ad33301516caa341
https://github.com/Steffen-Wolf/vit-pytorch/tree/4f590b9bd570091d9070a039ad33301516caa341
AlignEA
# 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.functional as F assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards...
weihangzhang/EAkit
AlignEA
false
16,700
[ "MIT" ]
102
dde8e914480cd1a3585271f70db11d567d9c2a04
https://github.com/weihangzhang/EAkit/tree/dde8e914480cd1a3585271f70db11d567d9c2a04
SequenceClassifier
import torch from collections import OrderedDict import torch.nn as nn class SequenceClassifier(nn.Module): """ Given a sequence of image vectors, intelligently weight the importance of each member of the sequence and use it to predict presence/absence of a class. """ def __init__(self, s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from collections import Order...
NaimKabir/hakuna-madata
SequenceClassifier
false
9,371
[ "MIT" ]
0
b7672fe8e50267adf9d3c65cc31c268364133e9c
https://github.com/NaimKabir/hakuna-madata/tree/b7672fe8e50267adf9d3c65cc31c268364133e9c
AttLayer
import torch import torch.nn as nn import torch.nn.functional as fn class AttLayer(nn.Module): """Calculate the attention signal(weight) according the input tensor. Args: infeatures (torch.FloatTensor): A 3D input tensor with shape of[batch_size, M, embed_dim]. Returns: torch.FloatTensor...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
MIracleyin/RecBole-notebook
AttLayer
false
9,569
[ "MIT" ]
0
ef32b3e57a297ff4889dec1f63c7984f8f901a23
https://github.com/MIracleyin/RecBole-notebook/tree/ef32b3e57a297ff4889dec1f63c7984f8f901a23
ConditionalBottleNeck
# 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...
Daupler/CA-MTL
ConditionalBottleNeck
false
4,141
[ "MIT" ]
0
d417b039dee973e32f42ba5c1c346738cd29ab3c
https://github.com/Daupler/CA-MTL/tree/d417b039dee973e32f42ba5c1c346738cd29ab3c
FixupResidualChain
# 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 numpy as np import tor...
sutkarsh/ttools
FixupResidualChain
false
10,939
[ "MIT" ]
0
a2e5fbf308566c0c54ab9d6ad1d9f8bc63f8fe99
https://github.com/sutkarsh/ttools/tree/a2e5fbf308566c0c54ab9d6ad1d9f8bc63f8fe99
TripletLoss
import torch from torch import nn import torch.nn.functional as F from torch.nn import * from torch.optim.lr_scheduler import * def _batch_hard(mat_distance, mat_similarity, indice=False): sorted_mat_distance, positive_indices = torch.sort(mat_distance + - 9999999.0 * (1 - mat_similarity), dim=1, descendi...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ChienHsuan/MMT
TripletLoss
false
13,482
[ "MIT" ]
425
fe4a559b8af3ec93242b24acb4c8e962a00a1248
https://github.com/ChienHsuan/MMT/tree/fe4a559b8af3ec93242b24acb4c8e962a00a1248
Project3D
import torch from torch import nn from functools import * class Project3D(nn.Module): """Layer which projects 3D points into a camera with intrinsics K and at position T """ def __init__(self, batch_size, height, width, eps=1e-07): super(Project3D, self).__init__() self.batch_size = batch...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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 functools import * assert_size_stride = torch._C._dyna...
JaviBite/TFG
Project3D
false
2,407
[ "MIT" ]
0
e406580697132f53b63a7c983daaa098af45b52c
https://github.com/JaviBite/TFG/tree/e406580697132f53b63a7c983daaa098af45b52c
spatial_attn_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 import torch.nn as nn import ...
Ganzooo/soil_segmentation
spatial_attn_layer
false
2,296
[ "MIT" ]
0
56f410e3e184f24e52dd4b542ea309f0d203ca00
https://github.com/Ganzooo/soil_segmentation/tree/56f410e3e184f24e52dd4b542ea309f0d203ca00
AddPositionEmbed
import torch import torch.nn as nn from functools import partial import torch.utils.cpp_extension class AddPositionEmbed(nn.Module): def __init__(self, size, init_func=partial(nn.init.normal_, std=0.02)): super().__init__() self.pe = nn.Parameter(torch.zeros(size)) init_func(self.pe) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from functools import partial import torch.utils.cpp_extension assert_size_stride = torch._C._dynamo.guards.assert_siz...
STomoya/animeface
AddPositionEmbed
false
14,367
[ "MIT" ]
61
37b3cd26097d7874559d4c152e41e5712b7a1a42
https://github.com/STomoya/animeface/tree/37b3cd26097d7874559d4c152e41e5712b7a1a42
PredictionLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
Holldean/pytorch-models
PredictionLayer
false
2,347
[ "MIT" ]
0
9509d0d462b1a98164b266d49ada199071a855ac
https://github.com/Holldean/pytorch-models/tree/9509d0d462b1a98164b266d49ada199071a855ac
ConvertPointsFromHomogeneous
# 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...
LucaswasTaken/frankmocap
ConvertPointsFromHomogeneous
false
783
[ "BSD-3-Clause" ]
0
17c1761326991d0faab58bd10888e9043abf6bd5
https://github.com/LucaswasTaken/frankmocap/tree/17c1761326991d0faab58bd10888e9043abf6bd5
AT
import torch import torch.nn.functional as F import torch.nn as nn import torch._utils from itertools import product as product import torch.utils.data.distributed class AT(nn.Module): """ Paying More Attention to Attention: Improving the Performance of Convolutional Neural Netkworks wia Attention Transfer htt...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torch.nn as nn import torch._utils from itertools impor...
Capetian/FaceX-Zoo
AT
false
4,959
[ "Apache-2.0" ]
1
029786c40d8aba15d891d33973de25fcd7e5399a
https://github.com/Capetian/FaceX-Zoo/tree/029786c40d8aba15d891d33973de25fcd7e5399a
_Transition
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class _Transition(nn.Module): def __init__(self, in_channels, args): super(_Transition, self).__init__() self.pool = nn.Conv2d(in_channels, in_channels, kernel_size=2, stride=2, groups=in_channels) d...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
yifanpu001/PytorchToCaffe
_Transition
false
4,720
[ "MIT" ]
0
37c1ebfc3547e93b1c174721036d03c831c60e48
https://github.com/yifanpu001/PytorchToCaffe/tree/37c1ebfc3547e93b1c174721036d03c831c60e48
SVDBilinear
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn import torch.nn.init as init assert_size_strid...
Yindong-Zhang/myGAT
SVDBilinear
false
18,156
[ "MIT" ]
6
f69132f21785d3a6bf1ec014890adeb124c89e8d
https://github.com/Yindong-Zhang/myGAT/tree/f69132f21785d3a6bf1ec014890adeb124c89e8d
RMulFloat
import torch class RMulFloat(torch.nn.Module): def __init__(self): super(RMulFloat, self).__init__() def forward(self, x): return 10.0 * x def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
ahangchen/torch2trt
RMulFloat
false
6,094
[ "MIT" ]
1
53c663f0e0570ef7ffd6771354ae3478f63bd328
https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328
SoftCrossEntropyLoss2d
import torch import torch.nn as nn import torch.nn.functional as F class SoftCrossEntropyLoss2d(nn.Module): def __init__(self): super(SoftCrossEntropyLoss2d, self).__init__() def forward(self, inputs, targets): loss = 0 inputs = -F.log_softmax(inputs, dim=1) for index in rang...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
hainguyen15/GLNet
SoftCrossEntropyLoss2d
false
12,484
[ "MIT" ]
0
dc5d2d000a37e9415f742ed04b7e99973a068279
https://github.com/hainguyen15/GLNet/tree/dc5d2d000a37e9415f742ed04b7e99973a068279
Norm
import torch import torch.nn as nn class Norm(nn.Module): def __init__(self, d_model, eps=1e-06): super().__init__() self.size = d_model self.alpha = nn.Parameter(torch.ones(self.size)) self.bias = nn.Parameter(torch.zeros(self.size)) self.eps = eps def forward(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 from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
Hyunseung-Kim/molGCT
Norm
false
8,236
[ "Apache-2.0" ]
10
5a2604337cf0a9d3c725295ccb7c8ea4b0144636
https://github.com/Hyunseung-Kim/molGCT/tree/5a2604337cf0a9d3c725295ccb7c8ea4b0144636
GlobalpoolFC
# 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...
blackcow/pytorch-cifar-master
GlobalpoolFC
false
3,218
[ "MIT" ]
0
c571c8fd7fe521907755ca2eacb6aa877abe3493
https://github.com/blackcow/pytorch-cifar-master/tree/c571c8fd7fe521907755ca2eacb6aa877abe3493
SpatialRescaler
import torch from functools import partial import torch.nn as nn class SpatialRescaler(nn.Module): def __init__(self, n_stages=1, method='bilinear', multiplier=0.5, in_channels=3, out_channels=None, bias=False): super().__init__() self.n_stages = n_stages assert self.n_stages >= 0...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from functools import partial import torch.nn as nn assert_size_stride = torch._C._dynamo...
poliver269/latent-diffusion
SpatialRescaler
false
12,898
[ "MIT" ]
0
08e7c987ad423e3f93125b49980c36302ffe3d82
https://github.com/poliver269/latent-diffusion/tree/08e7c987ad423e3f93125b49980c36302ffe3d82