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
ChanNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Rexiome/lightweight-gan
ChanNorm
false
2,745
[ "MIT" ]
0
4e5c18046fc105129c33995e0bffeb5f14963f4c
https://github.com/Rexiome/lightweight-gan/tree/4e5c18046fc105129c33995e0bffeb5f14963f4c
TimeIntervalMultiHeadAttention
# 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....
nmrenyi/ReChorus
TimeIntervalMultiHeadAttention
false
16,197
[ "MIT" ]
314
9ab632579d0464b0aaf365539f87b04866920b66
https://github.com/nmrenyi/ReChorus/tree/9ab632579d0464b0aaf365539f87b04866920b66
KLDivLoss
import torch import torch.nn as nn class KLDivLoss(nn.Module): """ ## KL-Divergence loss This calculates the KL divergence between a given normal distribution and $\\mathcal{N}(0, 1)$ """ def forward(self, sigma_hat, mu): return -0.5 * torch.mean(1 + sigma_hat - mu ** 2 - torch.exp(sigma...
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 ...
chrissarmstrong/PL-Sketch-RNN
KLDivLoss
false
9,895
[ "MIT" ]
0
82a34718b10f7a2a1458dbad41ba85f0036267c0
https://github.com/chrissarmstrong/PL-Sketch-RNN/tree/82a34718b10f7a2a1458dbad41ba85f0036267c0
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
ReyhaneAskari/pytorch_experiments
Net
false
14,425
[ "MIT" ]
60
43d2efbc08c9dd6275530c4bf49c68772f8afb75
https://github.com/ReyhaneAskari/pytorch_experiments/tree/43d2efbc08c9dd6275530c4bf49c68772f8afb75
FeedForward
# 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 ...
ModelTC/EOD
FeedForward
false
14,061
[ "Apache-2.0" ]
196
164bff80486e9ae6a095a97667b365c46ceabd86
https://github.com/ModelTC/EOD/tree/164bff80486e9ae6a095a97667b365c46ceabd86
ConvWS2d
# 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.fun...
CityU-AIM-Group/HTD
ConvWS2d
false
17,117
[ "MIT" ]
5
0be9fd844118c275abc6053b3cbd5ffb589e62ee
https://github.com/CityU-AIM-Group/HTD/tree/0be9fd844118c275abc6053b3cbd5ffb589e62ee
maxPool23DUinit
import torch from torch import nn import torch.utils.data import torch.nn.init class maxPool23DUinit(nn.Module): def __init__(self, kernel_size, stride, padding=1, dilation=1, nd=2): super(maxPool23DUinit, self).__init__() assert nd == 1 or nd == 2 or nd == 3, 'nd is not correctly specified!!!!, ...
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.utils.data import torch.nn.init assert_size_stride = to...
ForrestPi/Unsupervised-Defect-Segmentation
maxPool23DUinit
false
8,199
[ "MIT" ]
17
e366ac7c757bb1b45f38ebbc502dfee7ccb72398
https://github.com/ForrestPi/Unsupervised-Defect-Segmentation/tree/e366ac7c757bb1b45f38ebbc502dfee7ccb72398
SimpleAvgPool2dModule
import torch import torch.nn.functional as F import torch.jit import torch.onnx import torch.nn class SimpleAvgPool2dModule(torch.nn.Module): def __init__(self, kernel_size, stride=None, padding=0): super(SimpleAvgPool2dModule, self).__init__() self.kernel_size = kernel_size self.padding ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
andreas-hommel/glow
SimpleAvgPool2dModule
false
3,320
[ "Apache-2.0" ]
0
2bbbf8188a2a941e85677c83f2146bbd076a262e
https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e
DepthwiseSeperableConv1d
import torch import torch.nn as nn class DepthwiseSeperableConv1d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size): super(DepthwiseSeperableConv1d, self).__init__() self.depthwise_conv1d = nn.Conv1d(in_channels, in_channels, kernel_size, groups=in_channels, paddi...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
allenye0119/pytorch-modules
DepthwiseSeperableConv1d
false
12,074
[ "MIT" ]
0
c7683ef63478becca3b79a7498840450da33f468
https://github.com/allenye0119/pytorch-modules/tree/c7683ef63478becca3b79a7498840450da33f468
Regression
# 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 ...
BEOKS/Windows-Machine-Learning
Regression
false
2,055
[ "MIT" ]
0
e227909baa5ef604d45afa976dc04598f09d76bd
https://github.com/BEOKS/Windows-Machine-Learning/tree/e227909baa5ef604d45afa976dc04598f09d76bd
CustomKLLoss
import torch from torch.nn.modules.loss import _Loss class CustomKLLoss(_Loss): """ KL_Loss = (|dot(mean , mean)| + |dot(std, std)| - |log(dot(std, std))| - 1) / N N is the total number of image voxels """ def __init__(self, *args, **kwargs): super(CustomKLLoss, self).__init__() def ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn.modules....
WdBlink/AugMix-3DOCUNet-Brats2019
CustomKLLoss
false
5,954
[ "MIT" ]
1
125c6c8682b51a550eeac9173d13d0a211576abc
https://github.com/WdBlink/AugMix-3DOCUNet-Brats2019/tree/125c6c8682b51a550eeac9173d13d0a211576abc
PatchEmbed3D
# 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...
acewjh/Video-Swin-Transformer
PatchEmbed3D
false
12,054
[ "Apache-2.0" ]
0
bfbc8dde12e991455b34b921ca45a978b4dbfdbc
https://github.com/acewjh/Video-Swin-Transformer/tree/bfbc8dde12e991455b34b921ca45a978b4dbfdbc
ProjectionHead
# 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...
jianzhnie/MultimodalTransformer
ProjectionHead
false
6,963
[ "Apache-2.0" ]
1
6cd4ca8034a53da361149745aecead68fbe304a0
https://github.com/jianzhnie/MultimodalTransformer/tree/6cd4ca8034a53da361149745aecead68fbe304a0
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....
albertvillanova/s3prl
SelfAttentionPooling
false
6,162
[ "MIT" ]
1
b127ade4ed2f80a1027901bbd2f204b4fb1aaf03
https://github.com/albertvillanova/s3prl/tree/b127ade4ed2f80a1027901bbd2f204b4fb1aaf03
LinearVarianceUnif
# 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 from torch.nn import Parameter assert_size_str...
AlliedToasters/elko_den
LinearVarianceUnif
false
7,675
[ "Apache-2.0" ]
38
4e69f7f5c0dc7ffad54c7e190a2b75aba2eab7d2
https://github.com/AlliedToasters/elko_den/tree/4e69f7f5c0dc7ffad54c7e190a2b75aba2eab7d2
ToRGB
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.autograd import Function import math from torch import nn from torch....
jchetboun/anycost-gan
ToRGB
false
10,395
[ "MIT" ]
0
7e0005e50b915e2dfeb90fe7a9846c5df38d7c06
https://github.com/jchetboun/anycost-gan/tree/7e0005e50b915e2dfeb90fe7a9846c5df38d7c06
Upsample_
import torch from torch import nn class Upsample_(nn.Module): def __init__(self, scale=2): super(Upsample_, self).__init__() self.upsample = nn.Upsample(mode='bilinear', scale_factor=scale) def forward(self, x): return self.upsample(x) def get_inputs(): return [torch.rand([4, 4...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
Dauriel/weather4cast2021
Upsample_
false
360
[ "Apache-2.0" ]
0
29e818c4bcd488ec84b51558bf5392e4a887db70
https://github.com/Dauriel/weather4cast2021/tree/29e818c4bcd488ec84b51558bf5392e4a887db70
AffineTransform
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
jaketae/res-mlp
AffineTransform
false
12,592
[ "MIT" ]
0
6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd
https://github.com/jaketae/res-mlp/tree/6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd
LinearEmbedding
import math import torch import torch.utils.data import torch.nn as nn class LinearEmbedding(nn.Module): def __init__(self, inp_size, d_model): super(LinearEmbedding, self).__init__() self.lut = nn.Linear(inp_size, d_model) self.d_model = d_model def forward(self, x): return ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 assert_size_stride = torch._C._dyn...
swift88-clone/Trajectory-Transformer
LinearEmbedding
false
13,011
[ "MIT" ]
0
62983b645ec88d8972bc2c2af1b7b4a299d3feb0
https://github.com/swift88-clone/Trajectory-Transformer/tree/62983b645ec88d8972bc2c2af1b7b4a299d3feb0
SimpleCNN
import torch import torch.nn as nn import torch.nn.functional as F class SimpleCNN(nn.Module): def __init__(self, num_channels, num_classes): super(SimpleCNN, self).__init__() C = num_channels self.conv1 = nn.Conv2d(in_channels=C, out_channels=C * 8, kernel_size=3, stride=2, 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 import triton_helpers import torch.nn as nn assert_...
diogo149/doo
SimpleCNN
false
6,579
[ "MIT" ]
1
d83a1715fb9d4e5eac9f5d3d384a45cfc26fec2f
https://github.com/diogo149/doo/tree/d83a1715fb9d4e5eac9f5d3d384a45cfc26fec2f
FFNLayer
# 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 ...
NExTplusplus/tat-qa
FFNLayer
false
8,596
[ "MIT" ]
23
4ce5d8e637b80143de0d2492ecd4b861d6ba9a89
https://github.com/NExTplusplus/tat-qa/tree/4ce5d8e637b80143de0d2492ecd4b861d6ba9a89
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 from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
DIAL-RPI/PIPO-FAN
DiceLoss
false
13,540
[ "MIT" ]
53
126c17fbdc4c62806a9d249be355542f3990f305
https://github.com/DIAL-RPI/PIPO-FAN/tree/126c17fbdc4c62806a9d249be355542f3990f305
Attention
import math import torch import torch.nn.functional as F import torch.utils.data def restricted_softmax(src, dim: 'int'=-1, margin: 'float'=0.0): src_max = torch.clamp(src.max(dim=dim, keepdim=True)[0], min=0.0) out = (src - src_max).exp() out = out / (out.sum(dim=dim, keepdim=True) + (margin - src_max).e...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
MINATILO/pytroch-geometric
Attention
false
9,414
[ "MIT" ]
0
706aba3b4a6477a83a1fb73eb3cf0ee9661b70e4
https://github.com/MINATILO/pytroch-geometric/tree/706aba3b4a6477a83a1fb73eb3cf0ee9661b70e4
_final_conv_block
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
Minsoo2022/Pose-Transfer
_final_conv_block
false
14,050
[ "MIT" ]
692
10a60bb33d51a06e1200f5726f2367b5be4a6b79
https://github.com/Minsoo2022/Pose-Transfer/tree/10a60bb33d51a06e1200f5726f2367b5be4a6b79
SPP
import torch import torch.nn as nn class SPP(nn.Module): """ Spatial pyramid pooling layer used in YOLOv3-SPP """ def __init__(self, kernels=[5, 9, 13]): super(SPP, self).__init__() self.maxpool_layers = nn.ModuleList([nn.MaxPool2d(kernel_size= kernel, stride=1, padding=ke...
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...
LANCEREN/simpleAICV-pytorch-ImageNet-COCO-training
SPP
false
13,976
[ "MIT" ]
154
86c1b38df3cdcb195ec5b6229c343f07a52aeb7b
https://github.com/LANCEREN/simpleAICV-pytorch-ImageNet-COCO-training/tree/86c1b38df3cdcb195ec5b6229c343f07a52aeb7b
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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
rosebin/gymlab
QNet
false
4,200
[ "BSD-3-Clause" ]
0
de97fc24e0ddf5e328a2aa732cc339b2371d92d1
https://github.com/rosebin/gymlab/tree/de97fc24e0ddf5e328a2aa732cc339b2371d92d1
SimpleStackModel
# 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.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guar...
mlupon/glow
SimpleStackModel
false
4,018
[ "Apache-2.0" ]
0
aedaa7b98617f1a2db651608e7f7c916a7d2c766
https://github.com/mlupon/glow/tree/aedaa7b98617f1a2db651608e7f7c916a7d2c766
KLD
# 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...
UMBCvision/CompReSS
KLD
false
14,526
[ "MIT" ]
61
c5e57edce75da96482fd36eac484c5aca9676945
https://github.com/UMBCvision/CompReSS/tree/c5e57edce75da96482fd36eac484c5aca9676945
srcEncoder
import torch import torch.nn as nn class srcEncoder(nn.Module): def __init__(self, in_ch, hid_ch): super(srcEncoder, self).__init__() self.act = nn.ReLU() self.conv1 = nn.Conv2d(in_ch, hid_ch, kernel_size=3, padding=1) self.conv2 = nn.Conv2d(hid_ch, hid_ch, kernel_size=3, padding=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
qbhan/pathembed
srcEncoder
false
7,504
[ "MIT" ]
1
c21823529840593bf606e10696f5879e5adb51b2
https://github.com/qbhan/pathembed/tree/c21823529840593bf606e10696f5879e5adb51b2
SEModule
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
ChangeTheWorld20191008/query2labels
SEModule
false
2,145
[ "MIT" ]
0
cdca1f3519f75cc91ef2aa166c2534691016f04f
https://github.com/ChangeTheWorld20191008/query2labels/tree/cdca1f3519f75cc91ef2aa166c2534691016f04f
activation_quantize_fn
# AOT ID: ['1_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_...
heymesut/SJTU_microe
activation_quantize_fn
false
6,803
[ "BSD-3-Clause" ]
1
7a862d03b4d8fe4c8608173a16082f44001f3f13
https://github.com/heymesut/SJTU_microe/tree/7a862d03b4d8fe4c8608173a16082f44001f3f13
MultiHeadAttentionLayer
import math import torch import torch.nn as nn class MultiHeadAttentionLayer(nn.Module): def __init__(self, hidden_dim, n_heads, dropout=0.1): super().__init__() assert hidden_dim % n_heads == 0 self.hidden_dim = hidden_dim self.n_heads = n_heads self.head_dim = hidden_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....
wenjunyoung/PAN_PLUS
MultiHeadAttentionLayer
false
11,027
[ "Apache-2.0" ]
0
c893ff4775c8ff137a21c15d34fb93b9394dbfe5
https://github.com/wenjunyoung/PAN_PLUS/tree/c893ff4775c8ff137a21c15d34fb93b9394dbfe5
SEModule
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
dercaft/XNAS
SEModule
false
6,571
[ "MIT" ]
1
d6d0fde0d4475210a41607181939188b177e44b1
https://github.com/dercaft/XNAS/tree/d6d0fde0d4475210a41607181939188b177e44b1
ChannelSELayer3D
import torch import torch.nn as nn class ChannelSELayer3D(nn.Module): """ 3D implementation of Squeeze-and-Excitation (SE) block described in: *Hu et al., Squeeze-and-Excitation Networks, arXiv:1709.01507* """ def __init__(self, num_channels, reduction_ratio=2): """ :param num...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
HiLab-git/PyMIC
ChannelSELayer3D
false
13,788
[ "Apache-2.0" ]
147
abf5c43de43668b85f4c049c95a8f1b7cf1d9f16
https://github.com/HiLab-git/PyMIC/tree/abf5c43de43668b85f4c049c95a8f1b7cf1d9f16
PositionalEncoding1d
import math import torch import torch.nn as nn class PositionalEncoding1d(nn.Module): """ Learning positional embeddings. Args: shape: Iterable, the shape of the input. embedding_dim: int, the size of each embedding vector. """ def __init__(self, size, embedding_dim): sup...
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 math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guar...
Nintorac/survae_experiments
PositionalEncoding1d
false
901
[ "MIT" ]
0
d68cc25e2604aab08b53617c1f3ffe4716f166c4
https://github.com/Nintorac/survae_experiments/tree/d68cc25e2604aab08b53617c1f3ffe4716f166c4
NonpositiveLinear
# 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...
GlenHGHUANG/STRODE
NonpositiveLinear
false
8,142
[ "MIT" ]
11
91565275dffd4f08738c8a0e5b6c9ad89344623e
https://github.com/GlenHGHUANG/STRODE/tree/91565275dffd4f08738c8a0e5b6c9ad89344623e
Gaussian
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
fmhoward/pysurvival
Gaussian
false
12,375
[ "Apache-2.0" ]
0
3fea55f09477e9f0844845e09d6ea60434436e2e
https://github.com/fmhoward/pysurvival/tree/3fea55f09477e9f0844845e09d6ea60434436e2e
CosineClassifier
import torch import numpy as np from torch import nn import torch.nn.functional as F def cosine_fully_connected_layer(x_in, weight, scale=None, bias=None, normalize_x=True, normalize_w=True): assert x_in.dim() == 2 assert weight.dim() == 2 assert x_in.size(1) == weight.size(0) if normalize_x: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
zheang01/FACT
CosineClassifier
false
16,811
[ "MIT" ]
65
a877cc86acc4d29fb7589c8ac571c8aef09e5fd8
https://github.com/zheang01/FACT/tree/a877cc86acc4d29fb7589c8ac571c8aef09e5fd8
attentionLayer
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import MultiheadAttention from itertools import product as product class attentionLayer(nn.Module): def __init__(self, d_model, nhead, dropout=0.1): super(attentionLayer, self).__init__() self.self_attn = MultiheadAt...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
TaoRuijie/TalkNet_ASD
attentionLayer
false
14,460
[ "MIT" ]
79
4a2bc4859ee192ab450eaf63937a799212f2b021
https://github.com/TaoRuijie/TalkNet_ASD/tree/4a2bc4859ee192ab450eaf63937a799212f2b021
LearnablePositionalEncoding
import torch import torch.nn as nn class LearnablePositionalEncoding(nn.Module): def __init__(self, d_model, dropout=0.1, max_len=1024): super(LearnablePositionalEncoding, self).__init__() self.dropout = nn.Dropout(p=dropout) self.pe = nn.Parameter(torch.empty(max_len, 1, d_model)) ...
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...
saverymax/mvts_transformer
LearnablePositionalEncoding
false
10,785
[ "MIT" ]
0
22796d6977b78d5636f6aad3f7efeb49f2991808
https://github.com/saverymax/mvts_transformer/tree/22796d6977b78d5636f6aad3f7efeb49f2991808
AdjEncoder
import torch from torch import nn import torch.utils.data class AdjEncoder(nn.Module): def __init__(self, feature_size, hidden_size): super(AdjEncoder, self).__init__() self.left = nn.Linear(feature_size, hidden_size) self.right = nn.Linear(feature_size, hidden_size, bias=False) 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.triton_helpers import libdevice from torch import n...
kevin-kaixu/grass_pytorch
AdjEncoder
false
15,816
[ "Apache-2.0" ]
85
1d8dc6dcc0ab3ca029e449f57c37ba3910a4f90a
https://github.com/kevin-kaixu/grass_pytorch/tree/1d8dc6dcc0ab3ca029e449f57c37ba3910a4f90a
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 from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
kant/open-solution-ship-detection
DiceLoss
false
12,655
[ "MIT" ]
0
94fa14fc461d6088d884930cbd8e2a2b99a338b5
https://github.com/kant/open-solution-ship-detection/tree/94fa14fc461d6088d884930cbd8e2a2b99a338b5
ModelBasic
# 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 ...
HeikoSchuett/hard-inference
ModelBasic
false
9,086
[ "MIT" ]
0
eb850d97458dbbf8a5c434df71c802065c8e348f
https://github.com/HeikoSchuett/hard-inference/tree/eb850d97458dbbf8a5c434df71c802065c8e348f
ConvKernel
# AOT ID: ['1_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import math from torch.nn.modules.utils import _pair...
JannerM/spatial-reasoning
ConvKernel
false
13,868
[ "MIT" ]
54
e163003a33177e41ca02d5feefee3fdfca5ba154
https://github.com/JannerM/spatial-reasoning/tree/e163003a33177e41ca02d5feefee3fdfca5ba154
SoftTargetCrossEntropy
# 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 ...
xuewengeophysics/volo
SoftTargetCrossEntropy
false
10,953
[ "Apache-2.0" ]
0
411f367c617b556fd0df450e7844e57541695c4d
https://github.com/xuewengeophysics/volo/tree/411f367c617b556fd0df450e7844e57541695c4d
FFB
import torch import torch.nn as nn from math import sqrt as sqrt from itertools import product as product class FFB(nn.Module): def __init__(self, c1, c2, size): super(FFB, self).__init__() self.conv_y1 = nn.Conv2d(c1, c1, kernel_size=1) self.act1 = nn.ReLU(inplace=True) self.conv...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from math import sqrt as sqrt from itertools import produc...
chickenshawama/CFEnet2
FFB
false
1,689
[ "MIT" ]
0
f20dda7ad2923bed4af5d63e705b6849a48e73df
https://github.com/chickenshawama/CFEnet2/tree/f20dda7ad2923bed4af5d63e705b6849a48e73df
Net
import torch from torch.nn import functional as F from torch import nn from torchvision import models as models import torch.onnx import torch.nn class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(3, 10, kernel_size=3) self.conv2 = nn.Conv2d(10, 2...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
dqawami/openvino_training_extensions
Net
false
15,223
[ "Apache-2.0" ]
256
dddda1dfd651eaae2d59cecda84275b1b03bd0ad
https://github.com/dqawami/openvino_training_extensions/tree/dddda1dfd651eaae2d59cecda84275b1b03bd0ad
PPReLU
# 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...
CuongNguyen218/ObjectDetection-OneStageDet
PPReLU
false
347
[ "MIT" ]
0
60efe8b0ee6782b2aea20a32264b2ce1fc21901f
https://github.com/CuongNguyen218/ObjectDetection-OneStageDet/tree/60efe8b0ee6782b2aea20a32264b2ce1fc21901f
Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import numpy as np import tor...
davidhtf/drlnd
Critic
false
6,537
[ "MIT" ]
1
221601f38659055824763ce41c6d9edd3d476fd4
https://github.com/davidhtf/drlnd/tree/221601f38659055824763ce41c6d9edd3d476fd4
BNMLoss
# 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 assert_size_stride = t...
KevinMusgrave/pytorch-adapt
BNMLoss
false
13,950
[ "MIT" ]
131
ff1491e1bfcc586afb8ee619712c8816ddf10358
https://github.com/KevinMusgrave/pytorch-adapt/tree/ff1491e1bfcc586afb8ee619712c8816ddf10358
MultiHeadAttention
import torch from typing import Tuple from torch import nn from typing import Optional class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention Parameters ---------- scale : float Scale factor (sqrt(d_k)) dropout : float Dropout """ def __init__(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 torch._inductor.runtime....
Renovamen/Text-Classification
MultiHeadAttention
false
14,302
[ "MIT" ]
72
4a4aa4001c402ed4371ebaabe1393b27794e5992
https://github.com/Renovamen/Text-Classification/tree/4a4aa4001c402ed4371ebaabe1393b27794e5992
LSGanLoss
# 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 import nn import torch.optim assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynam...
ForrestPi/faceSwapProjects
LSGanLoss
false
17,286
[ "MIT" ]
5
daf2649a2791a25aa541c4d6d3b7e1d6552be5d7
https://github.com/ForrestPi/faceSwapProjects/tree/daf2649a2791a25aa541c4d6d3b7e1d6552be5d7
Block_cls
# 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....
TencentYoutuResearch/BaseArchitecture-EAT
Block_cls
false
18,034
[ "BSD-3-Clause" ]
9
b916738ef9b1314f5fdad780a0839cb4e010a208
https://github.com/TencentYoutuResearch/BaseArchitecture-EAT/tree/b916738ef9b1314f5fdad780a0839cb4e010a208
MAPE
import torch import torch.nn as nn class MAPE(nn.Module): def __init__(self): super().__init__() self.l1 = nn.L1Loss(reduction='none') def forward(self, pred, actual): mape = 100 * self.l1(pred, actual) / torch.max(pred, actual) return mape.mean() def get_inputs(): 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 import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
RosarioAndolina/psychXRF
MAPE
false
990
[ "MIT" ]
0
e2adadbd17664d7f74c10304f84b3751c571226e
https://github.com/RosarioAndolina/psychXRF/tree/e2adadbd17664d7f74c10304f84b3751c571226e
ClassicalConv2
# 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....
mit-han-lab/pytorch-quantum
ClassicalConv2
false
16,103
[ "MIT" ]
98
05cf000d689307f6b1fe02d12744ad455685935b
https://github.com/mit-han-lab/pytorch-quantum/tree/05cf000d689307f6b1fe02d12744ad455685935b
CosLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards...
PatrickGui/Face_Pytorch
CosLoss
false
971
[ "Apache-2.0" ]
0
ff5b820ca3978883f7cf95f0209fba3ee958c939
https://github.com/PatrickGui/Face_Pytorch/tree/ff5b820ca3978883f7cf95f0209fba3ee958c939
SinActv
import torch import torch.nn as nn class SinActv(nn.Module): """The sin activation function. """ def __init__(self): """Initializer method. """ super().__init__() def forward(self, input_): return torch.sin(input_) def get_inputs(): return [torch.rand([4, 4, 4, ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
DiffEqML/neurodiffeq
SinActv
false
5,065
[ "MIT" ]
1
c5e7404c47a4729578ee2149f289be0a8909d775
https://github.com/DiffEqML/neurodiffeq/tree/c5e7404c47a4729578ee2149f289be0a8909d775
TransformerEncoder
import torch class TransformerEncoder(torch.nn.Module): def __init__(self, embed_dim, num_heads, dropout, feedforward_dim): super().__init__() self.attn = torch.nn.MultiheadAttention(embed_dim, num_heads, dropout=dropout) self.linear_1 = torch.nn.Linear(embed_dim, feedforward_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
mamuncseru/Denoise-Transformer-AutoEncoder
TransformerEncoder
false
16,006
[ "MIT" ]
265
56b3ff8b252ad24a4ed769158e3f0648090e1ffd
https://github.com/mamuncseru/Denoise-Transformer-AutoEncoder/tree/56b3ff8b252ad24a4ed769158e3f0648090e1ffd
Envelope
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_...
beneisner/pytorch_geometric
Envelope
false
6,321
[ "MIT" ]
1
53d44a96bd2de2753b1ab1d7153c026c92606a81
https://github.com/beneisner/pytorch_geometric/tree/53d44a96bd2de2753b1ab1d7153c026c92606a81
MetaCurvatureTransform
# 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 numpy as np assert_size_stride = torch._C._dynamo.guards.assert_size_stri...
OliverWang-Au/learn2learn
MetaCurvatureTransform
false
5,694
[ "MIT" ]
1
df3c3291b4681440a80a69a7815090a4bd3cd661
https://github.com/OliverWang-Au/learn2learn/tree/df3c3291b4681440a80a69a7815090a4bd3cd661
TransformerEncoderLayer
# 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....
Slowika/GameBias-EmeCom2020
TransformerEncoderLayer
false
17,980
[ "MIT" ]
5
5b94c47559f8202bca99c26fc1bcb078dd0509a6
https://github.com/Slowika/GameBias-EmeCom2020/tree/5b94c47559f8202bca99c26fc1bcb078dd0509a6
ActorNN
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F def init_hidden(layer): """ Initialize NN layers """ input_size = layer.weight.data.size()[0] lim = 1.0 / np.sqrt(input_size) return -lim, lim class ActorNN(nn.Module): """ Actor Class """ ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
kaustav1987/Tennis-Collaboration-and-Competition-Continuous-Control
ActorNN
false
3,821
[ "MIT" ]
0
d724e09d7a5948e2023fb86bf977455f3c507054
https://github.com/kaustav1987/Tennis-Collaboration-and-Competition-Continuous-Control/tree/d724e09d7a5948e2023fb86bf977455f3c507054
MAB
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....
ernoult/set_transformer
MAB
false
12,359
[ "MIT" ]
0
4b380106e1f43b7eb6315624c57d4d1d38737b78
https://github.com/ernoult/set_transformer/tree/4b380106e1f43b7eb6315624c57d4d1d38737b78
StatsPool
# 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...
penguinwang96825/Umigame
StatsPool
false
10,683
[ "Apache-2.0" ]
0
98d647ab6f40df08fe31d6b3bc444afe229a914e
https://github.com/penguinwang96825/Umigame/tree/98d647ab6f40df08fe31d6b3bc444afe229a914e
Conv2dWithConstraint
import torch import torch.nn as nn class Conv2dWithConstraint(nn.Conv2d): def __init__(self, *args, max_norm=1, **kwargs): self.max_norm = max_norm super(Conv2dWithConstraint, self).__init__(*args, **kwargs) def forward(self, x): self.weight.data = torch.renorm(self.weight.data, p=2,...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
jiuney/XAI606-EEGNet
Conv2dWithConstraint
false
6,952
[ "MIT" ]
1
45ff28630ed1b09d0853f2cfb148a5dd2693e5ab
https://github.com/jiuney/XAI606-EEGNet/tree/45ff28630ed1b09d0853f2cfb148a5dd2693e5ab
IOULoss
# 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...
ZiyunClaudeWang/e3d
IOULoss
false
18,207
[ "MIT" ]
9
2efd01167350c29423babb6233907fa54156268f
https://github.com/ZiyunClaudeWang/e3d/tree/2efd01167350c29423babb6233907fa54156268f
IdentityPadding
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data.distributed assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda...
Crisescode/Distributed-DL-Example
IdentityPadding
false
7,908
[ "Apache-2.0" ]
19
a7ff2b4a6c07a126c30eaa886cc6e8cd02a83949
https://github.com/Crisescode/Distributed-DL-Example/tree/a7ff2b4a6c07a126c30eaa886cc6e8cd02a83949
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
pippinhio/image-recognition
Net
false
7,482
[ "MIT" ]
1
89569a0d66ae144d2f6e6f2d73a8577ef8b2272b
https://github.com/pippinhio/image-recognition/tree/89569a0d66ae144d2f6e6f2d73a8577ef8b2272b
ResnetBlockFC
import torch import torch.nn as nn class ResnetBlockFC(nn.Module): def __init__(self, size_in, size_out=None, size_h=None): super().__init__() if size_out is None: size_out = size_in if size_h is None: size_h = min(size_in, size_out) self.size_in = size_in ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
DveloperY0115/texture_fields
ResnetBlockFC
false
13,618
[ "MIT" ]
78
28c277696e0a658ffff3496892810d5a0ef03f65
https://github.com/DveloperY0115/texture_fields/tree/28c277696e0a658ffff3496892810d5a0ef03f65
UNet
import torch from torch.functional import F import torch.nn as nn import torch.nn.functional as F class down(nn.Module): """ A class for creating neural network blocks containing layers: Average Pooling --> Convlution + Leaky ReLU --> Convolution + Leaky ReLU This is used in the UNet Class 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 import triton_helpers from torch.functional import ...
Thomasedv/AI_Interpolation
UNet
false
6,045
[ "MIT" ]
1
cee51d92185a43a60797785554ee1ae924e5da0d
https://github.com/Thomasedv/AI_Interpolation/tree/cee51d92185a43a60797785554ee1ae924e5da0d
BCEDiceLoss
import torch import torch.nn as nn class DiceLoss(nn.Module): def __init__(self, eps: 'float'=1e-09): super(DiceLoss, self).__init__() self.smooth = 1.0 self.eps = eps def forward(self, y_pred, y_true): num = y_true.size(0) probability = torch.sigmoid(y_pred) ...
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...
Yukei7/Multimodal-Segmentation-Network
BCEDiceLoss
false
1,289
[ "MIT" ]
0
0a38aa8bbd2eb87e28209c810438248c0464a240
https://github.com/Yukei7/Multimodal-Segmentation-Network/tree/0a38aa8bbd2eb87e28209c810438248c0464a240
GCN
# 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....
d222nguy/gcn_research
GCN
false
3,372
[ "MIT" ]
0
83ced4f7d9f7840e48900e62c1eabec0444c5fa2
https://github.com/d222nguy/gcn_research/tree/83ced4f7d9f7840e48900e62c1eabec0444c5fa2
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 ...
VinodS7/sota-music-tagging-models
BertIntermediate
false
14,584
[ "MIT" ]
199
6232abe693ebe6a99ea64a3ea1fe65c34d0a9dd0
https://github.com/VinodS7/sota-music-tagging-models/tree/6232abe693ebe6a99ea64a3ea1fe65c34d0a9dd0
Fusion
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guard...
TranTony/DFAF-for-VQA.pytorch
Fusion
false
11,939
[ "MIT" ]
0
eba1a893e8e5d3d8bf85078611b0bcf4d56eea86
https://github.com/TranTony/DFAF-for-VQA.pytorch/tree/eba1a893e8e5d3d8bf85078611b0bcf4d56eea86
ScaledDotProductAttention
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
mcoavoux/self-attentive-parser
ScaledDotProductAttention
false
7,185
[ "MIT" ]
1
fa5814ecfdbf4fde329ea725e1d2ddaa55f247d6
https://github.com/mcoavoux/self-attentive-parser/tree/fa5814ecfdbf4fde329ea725e1d2ddaa55f247d6
MultiplicationInverse
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_...
ClashLuke/memcnn
MultiplicationInverse
false
301
[ "MIT" ]
0
1d48132282c02506ca3d35540f819c4c9130eab4
https://github.com/ClashLuke/memcnn/tree/1d48132282c02506ca3d35540f819c4c9130eab4
NormedLinear
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.nn.functional as F from torch.nn import Parameter class NormedLinear(nn.Module): def __init__(self, in_features, out_features): super(NormedLinear, self).__init__() self.weight = Pa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
raman32/LDAM-DRW
NormedLinear
false
7,534
[ "MIT" ]
1
7ce2251c01b94c7259108a1e188457f0b720651d
https://github.com/raman32/LDAM-DRW/tree/7ce2251c01b94c7259108a1e188457f0b720651d
CGD
import torch import torch.nn as nn import torch.utils.model_zoo class CGD(nn.Module): def __init__(self, in_channels, bias=True, nonlinear=True): super(CGD, self).__init__() self.avg_pool = nn.AdaptiveAvgPool2d(1) self.max_pool = nn.AdaptiveMaxPool2d(1) self.softmax = nn.Softmax(d...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
HolmesShuan/AIM2020-Real-Super-Resolution
CGD
false
8,272
[ "BSD-2-Clause" ]
19
0ea4d7db0f4f7ed488cc162b90bb08fc02082106
https://github.com/HolmesShuan/AIM2020-Real-Super-Resolution/tree/0ea4d7db0f4f7ed488cc162b90bb08fc02082106
SimpleMLP
import torch from torch import nn import torch.nn.functional as F import torch.utils.data class SimpleMLP(nn.Module): def __init__(self, n_inputs, n_outputs, dropout_probability): super(SimpleMLP, self).__init__() self.n_inputs = n_inputs self.n_outputs = n_outputs self.dropout_pr...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn import t...
AlexandreGuilbault/CS294-Hws
SimpleMLP
false
34
[ "MIT" ]
0
2810323c1560949707b71843039ff7c88ae7e596
https://github.com/AlexandreGuilbault/CS294-Hws/tree/2810323c1560949707b71843039ff7c88ae7e596
GateLayer
import torch import torch.nn as nn import torch.nn.functional as F from torch.optim.lr_scheduler import * class GateLayer(nn.Module): def __init__(self, dim, target_dim=None, dropout=None): super(GateLayer, self).__init__() if target_dim is None: target_dim = dim self.line...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.optim.lr_scheduler import * assert_size_stride ...
xycforgithub/MultiTask-MRC
GateLayer
false
16,753
[ "BSD-3-Clause" ]
105
6e5fe8b3cbc40058784cecad73219390e3c2a922
https://github.com/xycforgithub/MultiTask-MRC/tree/6e5fe8b3cbc40058784cecad73219390e3c2a922
XOR
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.utils....
Infi-zc/horovod
XOR
false
13,828
[ "Apache-2.0" ]
5,089
94cd8561a21d449fc8c80c8fef422025b84dfc22
https://github.com/Infi-zc/horovod/tree/94cd8561a21d449fc8c80c8fef422025b84dfc22
CVAE
# 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...
ekrell/learn-planning-space
CVAE
false
3,473
[ "MIT" ]
0
730e448bffa4996b2b1ef3a5b00500dc172962ec
https://github.com/ekrell/learn-planning-space/tree/730e448bffa4996b2b1ef3a5b00500dc172962ec
NIN4d
# 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 ...
XuezheMax/macow
NIN4d
false
14,612
[ "Apache-2.0" ]
60
6de247c09b590a037c9eec2d6b1248845f6efb31
https://github.com/XuezheMax/macow/tree/6de247c09b590a037c9eec2d6b1248845f6efb31
Block
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Vegetebird/MHFormer
Block
false
14,562
[ "MIT" ]
83
68d793414e13c256249431a45ac49949930c8e7f
https://github.com/Vegetebird/MHFormer/tree/68d793414e13c256249431a45ac49949930c8e7f
ConditionalLayerNorm
import torch from sklearn.metrics import * from torch import nn class ConditionalLayerNorm(nn.Module): def __init__(self, hidden_size, eps=1e-06): super(ConditionalLayerNorm, self).__init__() self.eps = eps self.gamma_dense = nn.Linear(hidden_size, hidden_size, bias=False) self.be...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 sklearn.metric...
JiaweiSheng/CasEE
ConditionalLayerNorm
false
8,408
[ "MIT" ]
44
af69432baf34d150f4721a4b4119002555758601
https://github.com/JiaweiSheng/CasEE/tree/af69432baf34d150f4721a4b4119002555758601
resnet_block
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
lwkobe/NMC
resnet_block
false
15,974
[ "MIT" ]
74
a59c187d35b2f929ea3a94fc2b434061d7f7993a
https://github.com/lwkobe/NMC/tree/a59c187d35b2f929ea3a94fc2b434061d7f7993a
BPRLoss
import torch from torch import nn from torch.nn.modules.loss import * from torch.nn.modules import * from torch.optim import * from torch.optim.lr_scheduler import * import torch.backends class PairwiseLoss(nn.Module): """Base class for pairwise loss functions. Pairwise approached looks at a pair of document...
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 f...
gavrin-s/catalyst
BPRLoss
false
12,407
[ "Apache-2.0" ]
0
81087d8348b359e501d899f7a8350e0bedfc2b7d
https://github.com/gavrin-s/catalyst/tree/81087d8348b359e501d899f7a8350e0bedfc2b7d
QNet
import torch import torch as t import torch.nn as nn class QNet(nn.Module): def __init__(self, state_dim, action_num, atom_num=10): super().__init__() self.fc1 = nn.Linear(state_dim, 16) self.fc2 = nn.Linear(16, 16) self.fc3 = nn.Linear(16, action_num * atom_num) self.acti...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ikamensh/machin
QNet
false
6,862
[ "MIT" ]
1
af7b423c47bc1412530cf6c96c11bd3af9b3e239
https://github.com/ikamensh/machin/tree/af7b423c47bc1412530cf6c96c11bd3af9b3e239
NotEqualConst
import torch class NotEqualConst(torch.nn.Module): def __init__(self): super(NotEqualConst, self).__init__() def forward(self, x): return x != 13.62 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...
Ilyabasharov/torch2trt
NotEqualConst
false
2,556
[ "MIT" ]
0
76bf298b3da408509665e23e2494922b131afb10
https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10
CombineSlices
# 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 import nn import torch.utils.data import torch.utils.data.distributed import torch.optim assert_size_stride = torch._C._dynamo.gu...
kapoor1992/fastMRI
CombineSlices
false
10,495
[ "MIT" ]
0
6b0af94663faa55a2dd901a6a5cbb7d7b5f4cf6d
https://github.com/kapoor1992/fastMRI/tree/6b0af94663faa55a2dd901a6a5cbb7d7b5f4cf6d
UpsampleConvLayer
import torch import torch.nn.parallel import torch.utils.data import torch.onnx import torch.optim import torch.utils.data.distributed class UpsampleConvLayer(torch.nn.Module): """UpsampleConvLayer Upsamples the input and then does a convolution. This method gives better results compared to ConvTranspose2...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
Arjuna197/examples
UpsampleConvLayer
false
11,372
[ "BSD-3-Clause" ]
0
f504ea2aafc8a8baa5effb659fc1c20a70aabdda
https://github.com/Arjuna197/examples/tree/f504ea2aafc8a8baa5effb659fc1c20a70aabdda
_MLP_C
# 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...
GaelKBertrand/Meliora_DeepLearning
_MLP_C
false
5,185
[ "MIT" ]
1
5618e01066d4d0afcd7dfe074dda91af22b5857c
https://github.com/GaelKBertrand/Meliora_DeepLearning/tree/5618e01066d4d0afcd7dfe074dda91af22b5857c
CoordLoss
import torch import torch.optim import torch.nn as nn class CoordLoss(nn.Module): def __init__(self): super(CoordLoss, self).__init__() def forward(self, coord_out, coord_gt, valid, is_3D=None): loss = torch.abs(coord_out - coord_gt) * valid if is_3D is not None: loss_z =...
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.optim import torch.nn as nn assert_size_stride = torch._C._d...
Alan-delete/I2L-MeshNet_RELEASE
CoordLoss
false
13,253
[ "MIT" ]
544
22d63becc6f6e558e5180a8718dbaa8dde1cc6e5
https://github.com/Alan-delete/I2L-MeshNet_RELEASE/tree/22d63becc6f6e558e5180a8718dbaa8dde1cc6e5
CELoss
# 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 ...
PARMAGroup/UNet-Instance-Cell-Segmentation
CELoss
false
8,620
[ "MIT" ]
30
79655a2c5781d2e20c7d5760f631fbb0be392292
https://github.com/PARMAGroup/UNet-Instance-Cell-Segmentation/tree/79655a2c5781d2e20c7d5760f631fbb0be392292
Actor
# 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....
pkj415/CityLearn
Actor
false
10,636
[ "MIT" ]
0
912d1e28270fba2d11a713dc7f0445d59d620511
https://github.com/pkj415/CityLearn/tree/912d1e28270fba2d11a713dc7f0445d59d620511
ShuffleBlock
# 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...
Fede112/pytorch-cifar
ShuffleBlock
false
452
[ "MIT" ]
0
2e89028e9aaabb22dd944f0002d29548059c24df
https://github.com/Fede112/pytorch-cifar/tree/2e89028e9aaabb22dd944f0002d29548059c24df
Downsample
import torch import torch.nn as nn class Downsample(nn.Module): def __init__(self, in_channels, with_conv): super().__init__() self.with_conv = with_conv if self.with_conv: self.conv = torch.nn.Conv2d(in_channels, in_channels, kernel_size=3, stride=2, padding=0...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
Rm1n90/SDEdit
Downsample
false
9,442
[ "MIT" ]
0
16bfa4f5d37cd32680359db3405af4ea40a9cd1b
https://github.com/Rm1n90/SDEdit/tree/16bfa4f5d37cd32680359db3405af4ea40a9cd1b
SpatialGroupEnhance
import torch from torch import nn from torch.nn import init class SpatialGroupEnhance(nn.Module): def __init__(self, groups): super().__init__() self.groups = groups self.avg_pool = nn.AdaptiveAvgPool2d(1) self.weight = nn.Parameter(torch.zeros(1, groups, 1, 1)) self.bias ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn from torch.nn import init assert_size_stride = torch._C._d...
rushirajsherlocked/External-Attention-pytorch
SpatialGroupEnhance
false
4,225
[ "MIT" ]
0
7d6814b2d90909adf81c62f3f8a89e30a59d6481
https://github.com/rushirajsherlocked/External-Attention-pytorch/tree/7d6814b2d90909adf81c62f3f8a89e30a59d6481
ConvRelu
# 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...
Bovbene/WSCCSN
ConvRelu
false
172
[ "Apache-2.0" ]
0
7f454050218e7f2162b0bdc1cdff938d876efc0b
https://github.com/Bovbene/WSCCSN/tree/7f454050218e7f2162b0bdc1cdff938d876efc0b
MaskedLinear
# 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.cuda from torch.nn.functional import * assert_size_stride = torch._...
bratao/DeepSpeed
MaskedLinear
false
6,355
[ "MIT" ]
1
c50d8955e942e5e26cf81835d59ec3f20ef8540d
https://github.com/bratao/DeepSpeed/tree/c50d8955e942e5e26cf81835d59ec3f20ef8540d