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
EuclideanComparator_1
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from dataclasses import data...
lavis-nlp/irtm
EuclideanComparator_1
false
10,407
[ "MIT" ]
0
e6c96519918795cfaa0c09ef2d4164f451265518
https://github.com/lavis-nlp/irtm/tree/e6c96519918795cfaa0c09ef2d4164f451265518
RegLoss
# 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 ...
leobean/CenterNet_simple
RegLoss
false
3,967
[ "MIT" ]
0
13e2eab2c049563afde5defdf90434a310a32d02
https://github.com/leobean/CenterNet_simple/tree/13e2eab2c049563afde5defdf90434a310a32d02
OutputTransition
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
WdBlink/AugMix-3DOCUNet-Brats2019
OutputTransition
false
5,966
[ "MIT" ]
1
125c6c8682b51a550eeac9173d13d0a211576abc
https://github.com/WdBlink/AugMix-3DOCUNet-Brats2019/tree/125c6c8682b51a550eeac9173d13d0a211576abc
CuboidPoseHead
# 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...
ALISCIFP/mmpose
CuboidPoseHead
false
2,037
[ "Apache-2.0" ]
0
2433e3dbcc44baa2253e2a7c748ba0216937933e
https://github.com/ALISCIFP/mmpose/tree/2433e3dbcc44baa2253e2a7c748ba0216937933e
HSigmoid
import torch import torch.nn as nn import torch.nn.functional import torch.nn.parallel import torch.utils.data.distributed class HSigmoid(nn.Module): """ Applies the Hard-Sigmoid function element-wise. `"Searching for MobileNetV3" <https://arxiv.org/pdf/1905.02244.pdf>`_ Examples: >>> m = Mish()...
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.nn.functional import torch.nn.parallel import torch.ut...
ardianumam/Vanilla-GAN
HSigmoid
false
12,104
[ "Apache-2.0" ]
0
3fce9b60dca4609aad1d4e5eb834a2cc72cf07b3
https://github.com/ardianumam/Vanilla-GAN/tree/3fce9b60dca4609aad1d4e5eb834a2cc72cf07b3
MulScalarNegative
# 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 from torch.quantization import QuantStub from torch.quantization import DeQuantStub assert_size_stride = torch._C._dyn...
Leslie-Fang/incubator-tvm
MulScalarNegative
false
9,290
[ "Apache-2.0" ]
0
aa035f4650926f5e714b02cbab6d974f0a17352f
https://github.com/Leslie-Fang/incubator-tvm/tree/aa035f4650926f5e714b02cbab6d974f0a17352f
SeparableConv2d_same
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.functional as F assert_size_stride = torch...
lutbook/pytorch-segmentation-pipeline
SeparableConv2d_same
false
10,587
[ "MIT" ]
0
eb29d1bf240c158c64d81177e9be93cd958c0026
https://github.com/lutbook/pytorch-segmentation-pipeline/tree/eb29d1bf240c158c64d81177e9be93cd958c0026
InnerProductDecoder
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.modules.loss class InnerProductDecoder(nn.Module): """Decoder for using inner product for prediction.""" def __init__(self, dropout, act=torch.sigmoid): super(InnerProductDecoder, self).__init__() self.dropout ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.modules.loss assert_size_stride = torch._C...
HongyiZhu/EHI
InnerProductDecoder
false
540
[ "MIT" ]
0
9fbbc6046546dd7fc6de5d831b4c941bc4404e02
https://github.com/HongyiZhu/EHI/tree/9fbbc6046546dd7fc6de5d831b4c941bc4404e02
MegatronGelu
import torch import torch.nn import torch.onnx class MegatronGelu(torch.nn.Module): def forward(self, x): return x * 0.5 * (torch.erf(x / 1.41421) + 1.0) 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.nn import torch.onnx assert_size_stride = torch._C._dynamo.guards....
carefreekk/onnxruntime
MegatronGelu
false
3,255
[ "MIT" ]
0
484e9de55c109dadbeb552cd6ede21bbdd63b830
https://github.com/carefreekk/onnxruntime/tree/484e9de55c109dadbeb552cd6ede21bbdd63b830
GramMatrix
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
andreweskeclarke/style-transfer
GramMatrix
false
1,462
[ "MIT" ]
0
e4b18f4cdb3f473bf946f12cc39447b2f6bb15ca
https://github.com/andreweskeclarke/style-transfer/tree/e4b18f4cdb3f473bf946f12cc39447b2f6bb15ca
CrossEntropyLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
AtticusJohnson/mmdetection
CrossEntropyLoss
false
11,211
[ "Apache-2.0" ]
0
d8d89bafcce13d3b32b1fb3366be3bb9830546c2
https://github.com/AtticusJohnson/mmdetection/tree/d8d89bafcce13d3b32b1fb3366be3bb9830546c2
GCN
from torch.nn import Module import math import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter from torch.nn.modules.module import Module class GraphConvolution(Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907 """ def __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 from torch._inductor.runtime....
d222nguy/gcn_research
GCN
false
3,372
[ "MIT" ]
0
83ced4f7d9f7840e48900e62c1eabec0444c5fa2
https://github.com/d222nguy/gcn_research/tree/83ced4f7d9f7840e48900e62c1eabec0444c5fa2
FCLayer
import torch import torch.nn as nn class FCLayer(nn.Module): def __init__(self, input_dim, output_dim, dropout_rate=0.0, use_activation=True): super(FCLayer, self).__init__() self.use_activation = use_activation self.dropout = nn.Dropout(dropout_rate) self.linear = nn.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 from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Raiselimit/TorchBlocks
FCLayer
false
5,730
[ "MIT" ]
1
a5baecb9a2470ff175087475630f2b7db3f7ef51
https://github.com/Raiselimit/TorchBlocks/tree/a5baecb9a2470ff175087475630f2b7db3f7ef51
EntropyLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
NYCU-MLLab/Strategic-Optimization-for-Worst-case-Augmentation
EntropyLoss
false
17,737
[ "MIT" ]
3
fd0feab42151c0bae60712480301ea26f627a81d
https://github.com/NYCU-MLLab/Strategic-Optimization-for-Worst-case-Augmentation/tree/fd0feab42151c0bae60712480301ea26f627a81d
Bilinear
import torch import torch.nn as nn class Bilinear(nn.Module): def __init__(self, size): super(Bilinear, self).__init__() self.size = size self.mat = nn.Parameter(torch.FloatTensor(self.size, self.size)) self.reset_parameters() def reset_parameters(self): params = [p f...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
jalshr21/diora-1
Bilinear
false
6,914
[ "Apache-2.0" ]
1
a9b680fde6a840707340e9e8232643b0f0e637bd
https://github.com/jalshr21/diora-1/tree/a9b680fde6a840707340e9e8232643b0f0e637bd
EqualConv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn from math import sqrt assert_size_stride = torch._C._dynamo...
AaltoVision/balanced-pioneer
EqualConv2d
false
16,869
[ "MIT" ]
5
51f58080fd2db3159de3e1ccb47f38e03220faf0
https://github.com/AaltoVision/balanced-pioneer/tree/51f58080fd2db3159de3e1ccb47f38e03220faf0
ResidualBlock
import torch import torch.nn as nn from functools import partial def ncsn_conv3x3(in_planes, out_planes, stride=1, bias=True, dilation=1, init_scale=1.0, padding=1): """3x3 convolution with PyTorch initialization. Same as NCSNv1/NCSNv2.""" init_scale = 1e-10 if init_scale == 0 else init_scale conv = n...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
henryaddison/score_sde_pytorch
ResidualBlock
false
12,507
[ "Apache-2.0" ]
0
be07c3a3346bf8ceadabf6a3b436db5d5c3d0252
https://github.com/henryaddison/score_sde_pytorch/tree/be07c3a3346bf8ceadabf6a3b436db5d5c3d0252
RMSLELoss
import torch import torch.nn as nn class RMSLELoss(nn.Module): def __init__(self): super().__init__() self.mse = nn.MSELoss() def forward(self, pred, actual): return torch.sqrt(self.mse(torch.log(pred + 1), torch.log(actual + 1))) 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 import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
RosarioAndolina/psychXRF
RMSLELoss
false
988
[ "MIT" ]
0
e2adadbd17664d7f74c10304f84b3751c571226e
https://github.com/RosarioAndolina/psychXRF/tree/e2adadbd17664d7f74c10304f84b3751c571226e
TinyCnn
import torch import torch.nn as nn class TinyCnn(nn.Module): def __init__(self, feature_extraction=False) ->None: super().__init__() self.feature_extraction = feature_extraction self.conv1 = nn.Conv2d(3, 3, 5) self.relu1 = nn.ReLU() self.pool1 = nn.MaxPool2d(2, 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 import torch.nn as nn assert_...
YNNEKUW/captum
TinyCnn
false
12,003
[ "BSD-3-Clause" ]
0
c8b5357b21f2ddf440e5f0ce25635977292aa5d1
https://github.com/YNNEKUW/captum/tree/c8b5357b21f2ddf440e5f0ce25635977292aa5d1
LayerNorm
# 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_...
BaiYuhaoSpiceeYJ/SEGAN_denoise
LayerNorm
false
2,011
[ "MIT" ]
0
5bf65ae72b9f0a996ae338c53c68c4967e08cd59
https://github.com/BaiYuhaoSpiceeYJ/SEGAN_denoise/tree/5bf65ae72b9f0a996ae338c53c68c4967e08cd59
LinearAttention
# 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 from torch.nn impor...
francescodisalvo05/LoFTR
LinearAttention
false
12,406
[ "Apache-2.0" ]
0
66372ebbe1ea97d57fe6cb8b5acf5cd92a87ef8d
https://github.com/francescodisalvo05/LoFTR/tree/66372ebbe1ea97d57fe6cb8b5acf5cd92a87ef8d
ConvGRUCell
# 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...
openclimatefix/MetNet
ConvGRUCell
false
7,388
[ "MIT" ]
1
06eed550e93da6325641958b0d36c15adde1d928
https://github.com/openclimatefix/MetNet/tree/06eed550e93da6325641958b0d36c15adde1d928
Foo
import torch import torch.nn.parallel import torch.utils.data import torch.onnx import torch.fx import torch.optim import torch.utils.data.distributed def add_lowp(a: 'torch.Tensor', b: 'torch.Tensor'): a, b = a.float(), b.float() c = a + b return c.half() def sigmoid_lowp(x: 'torch.Tensor'): x = x....
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn.parallel import torch.utils.data import torch.onnx import torch.fx import torch.optim import torch.utils.data.distributed as...
goytoom/examples
Foo
false
12,460
[ "BSD-3-Clause" ]
0
50b2a74dba897a1a98c8276043a3f5c6910c453a
https://github.com/goytoom/examples/tree/50b2a74dba897a1a98c8276043a3f5c6910c453a
ImageLinearAttention
import torch import torch.nn as nn import torch.utils.data import torch.onnx.operators import torch.optim import torch.optim.lr_scheduler class ImageLinearAttention(nn.Module): def __init__(self, chan, chan_out=None, kernel_size=1, padding=0, stride=1, key_dim=64, value_dim=64, heads=8): super()....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
CUMLSec/stateformer
ImageLinearAttention
false
7,916
[ "MIT" ]
41
87cb3c906c43fcff42b2ca820eb6e7fd918d0a1c
https://github.com/CUMLSec/stateformer/tree/87cb3c906c43fcff42b2ca820eb6e7fd918d0a1c
SyntacticGCN
# 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_...
NLP-Discourse-SoochowU/TDDiscourseParser
SyntacticGCN
false
17,732
[ "Apache-2.0" ]
9
2f9c7cef85c564c47b368ee4935caf1fad7c598d
https://github.com/NLP-Discourse-SoochowU/TDDiscourseParser/tree/2f9c7cef85c564c47b368ee4935caf1fad7c598d
AvgReducePool1d
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
atif93/texar-pytorch
AvgReducePool1d
false
6,256
[ "Apache-2.0" ]
1
88163619ec69382e1bbe57fa8bce06260bfc76a2
https://github.com/atif93/texar-pytorch/tree/88163619ec69382e1bbe57fa8bce06260bfc76a2
Pow
import torch import torch.nn as nn class Pow(nn.Module): def __init__(self): super(Pow, self).__init__() def forward(self, x): x = torch.pow(x, 2) return 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
yifanpu001/PytorchToCaffe
Pow
false
4,706
[ "MIT" ]
0
37c1ebfc3547e93b1c174721036d03c831c60e48
https://github.com/yifanpu001/PytorchToCaffe/tree/37c1ebfc3547e93b1c174721036d03c831c60e48
FFN
# 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 as nn as...
FFTYYY/RoR_relation_extraction
FFN
false
8,077
[ "MIT" ]
25
a099e98f3708a39debeed4dc522ff57c4f6b960d
https://github.com/FFTYYY/RoR_relation_extraction/tree/a099e98f3708a39debeed4dc522ff57c4f6b960d
TorchFloorDiv
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
Ilyabasharov/torch2trt
TorchFloorDiv
false
2,558
[ "MIT" ]
0
76bf298b3da408509665e23e2494922b131afb10
https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10
InformedSender
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.utils.data import torch.distributions class InformedSender(nn.Module): def __init__(self, game_size, feat_size, embedding_size, hidden_size, vocab_size=100, temp=1.0): super(InformedSender, se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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
InformedSender
false
17,968
[ "MIT" ]
5
5b94c47559f8202bca99c26fc1bcb078dd0509a6
https://github.com/Slowika/GameBias-EmeCom2020/tree/5b94c47559f8202bca99c26fc1bcb078dd0509a6
DiceCELoss
import torch import warnings from typing import Callable from typing import Union from typing import Optional from enum import Enum import torch.nn as nn from torch.nn.modules.loss import _Loss import torch.multiprocessing class LossReduction(Enum): """ See also: - :py:class:`monai.losses.dice.DiceLos...
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 warnings from t...
elitap/classimbalance
DiceCELoss
false
6,669
[ "Apache-2.0" ]
1
ae807ec533da5eef18f4180b29383399bc57696a
https://github.com/elitap/classimbalance/tree/ae807ec533da5eef18f4180b29383399bc57696a
Sub
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
NVIDIA-AI-IOT-private/torch2trt
Sub
false
10,541
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
ResBlock
import torch import torch.nn as nn class ResBlock(nn.Module): def __init__(self, in_c): super(ResBlock, self).__init__() self.conv1 = nn.Conv2d(in_c, in_c, kernel_size=3, stride=1, padding =1, bias=True) self.relu = nn.ReLU(inplace=True) self.conv2 = nn.Conv2d(in_c, 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_...
MohitLamba94/LLPackNet
ResBlock
false
8,561
[ "MIT" ]
15
440e20ac48aed0beca5f473358ec85d24d477575
https://github.com/MohitLamba94/LLPackNet/tree/440e20ac48aed0beca5f473358ec85d24d477575
L2LossWithLogit
import torch import torch.utils.data import torch from torch import nn class L2LossWithLogit(nn.Module): def __init__(self): super(L2LossWithLogit, self).__init__() self.mse = nn.MSELoss(reduction='sum') def forward(self, logits, targets): p = torch.sigmoid(logits) return sel...
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 from torch import nn assert_size_stride = torch._C._...
ucas-vg/TinyBenchmark
L2LossWithLogit
false
16,638
[ "MIT" ]
495
36436df3716d842b6148fb6f6bc7715a2fbdfd92
https://github.com/ucas-vg/TinyBenchmark/tree/36436df3716d842b6148fb6f6bc7715a2fbdfd92
SoftArgmax
# 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 as t impo...
analvikingur/RGAN
SoftArgmax
false
18,313
[ "MIT" ]
8
b1893c2f53d11c9173c7a30f63f6d93d72232493
https://github.com/analvikingur/RGAN/tree/b1893c2f53d11c9173c7a30f63f6d93d72232493
GaussianSmoothing
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn import torch.nn.parallel assert_size_stride = ...
rakshithShetty/SemanticAdversary
GaussianSmoothing
false
7,528
[ "MIT" ]
1
e6d50f00af6f7d847cba4210613afea4be773254
https://github.com/rakshithShetty/SemanticAdversary/tree/e6d50f00af6f7d847cba4210613afea4be773254
BERTNextSentence
import torch import torch.nn as nn class BERTNextSentence(nn.Module): def __init__(self, hidden): super().__init__() self.linear = nn.Linear(hidden, 2) self.softmax = nn.LogSoftmax(dim=-1) def forward(self, x): return self.softmax(self.linear(x[:, 0])) def get_inputs(): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Moymix/BERT-pytorch
BERTNextSentence
false
5,616
[ "Apache-2.0" ]
1
f0b9c3ae53e05c00adcc761e0422e4222d8b5619
https://github.com/Moymix/BERT-pytorch/tree/f0b9c3ae53e05c00adcc761e0422e4222d8b5619
NegativeScaledDotProduct
import torch import torch.utils.data.dataloader import torch.nn def dot_product(a: 'torch.Tensor', b: 'torch.Tensor', normalize=False): """ Computes dot product for pairs of vectors. :param normalize: Vectors are normalized (leads to cosine similarity) :return: Matrix with res[i][j] = dot_product(a[i...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.dataloader import torch.nn assert_size_stride = torch._C...
adriensas/flair
NegativeScaledDotProduct
false
9,742
[ "MIT" ]
0
f01b0e7ff9a87d3862acae50aeaffdc8e8b8ac21
https://github.com/adriensas/flair/tree/f01b0e7ff9a87d3862acae50aeaffdc8e8b8ac21
HLoss
import torch from torch.autograd.gradcheck import * import torch.nn as nn import torch.nn class HLoss(nn.Module): def __init__(self): super(HLoss, self).__init__() def forward(self, x, spacing): volumeElement = spacing.prod() b = x * torch.log(x) b = -1.0 * b.sum() * volumeEl...
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.autograd.gr...
HastingsGreer/mermaid
HLoss
false
13,760
[ "Apache-2.0" ]
120
bd13c5fc427eb8cd9054973a8eaaeb302078182d
https://github.com/HastingsGreer/mermaid/tree/bd13c5fc427eb8cd9054973a8eaaeb302078182d
outconv
import torch import torch.nn as nn class outconv(nn.Module): def __init__(self, in_ch, out_ch): super(outconv, self).__init__() self.conv = nn.Conv2d(in_ch, out_ch, 1) self.sig = nn.Sigmoid() def forward(self, x): x_conv = self.conv(x) x = self.sig(x_conv) ret...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
allen-q/pytorch
outconv
false
3,085
[ "MIT" ]
0
76947f8d6f0bcee04425ad69f93b9a5e3a5060ae
https://github.com/allen-q/pytorch/tree/76947f8d6f0bcee04425ad69f93b9a5e3a5060ae
Tanh2
import torch import torch.utils.data import torch.nn as nn import torch.nn.parallel import torch.optim class Tanh2(nn.Module): def __init__(self): super(Tanh2, self).__init__() self.tanh = nn.Tanh() def forward(self, x): return (self.tanh(x) + 1) / 2 def get_inputs(): return [t...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.utils.data import torch.nn as nn import torch.nn.parallel import t...
csyxwei/FFWM
Tanh2
false
15,077
[ "MIT" ]
83
d42c578cabe1b81c6b1bb0c3cb707b190fca3c68
https://github.com/csyxwei/FFWM/tree/d42c578cabe1b81c6b1bb0c3cb707b190fca3c68
Sine
# 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...
chris-price19/ocp
Sine
false
1,699
[ "MIT", "BSD-3-Clause" ]
0
0175c5a11dd3aaccd4f4780c8cb559401f1ca15e
https://github.com/chris-price19/ocp/tree/0175c5a11dd3aaccd4f4780c8cb559401f1ca15e
Network
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
gregmbi/polyaxon
Network
false
3,559
[ "Apache-2.0" ]
0
8f24089fa9cb5df28fc7b70aec27d6d23ee81e8d
https://github.com/gregmbi/polyaxon/tree/8f24089fa9cb5df28fc7b70aec27d6d23ee81e8d
TransformerDecoderLayer
# 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....
cimeister/neural-transducer
TransformerDecoderLayer
false
1,746
[ "MIT" ]
0
e4dfc718bbcf93254ce23750e5428c5131ddfb98
https://github.com/cimeister/neural-transducer/tree/e4dfc718bbcf93254ce23750e5428c5131ddfb98
MultiHeadAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
francismontalbo/attention-is-all-you-need-paper
MultiHeadAttention
false
15,377
[ "MIT" ]
167
21ba3e48917da0c6808126d183bece6a9969cfd2
https://github.com/francismontalbo/attention-is-all-you-need-paper/tree/21ba3e48917da0c6808126d183bece6a9969cfd2
OneMinusCosThetaByThetaSq
import torch from torch import cos from torch import sin def get_small_and_large_angle_inds(theta: 'torch.Tensor', eps: 'float'=0.001): """Returns the indices of small and non-small (large) angles, given a tensor of angles, and the threshold below (exclusive) which angles are considered 'small'. Args...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch import cos from torch import sin assert_size_stride = torch._C...
darkmatter08/dfa-scales-to-modern-deep-learning
OneMinusCosThetaByThetaSq
false
6,522
[ "MIT" ]
1
72bf8a045b4bb7eb81736d8ec1d671c4949fb01e
https://github.com/darkmatter08/dfa-scales-to-modern-deep-learning/tree/72bf8a045b4bb7eb81736d8ec1d671c4949fb01e
AttDot
import torch import torch.nn.functional as F class AttDot(torch.nn.Module): """ AttDot: Dot attention that can be used by the Alignment module. """ def __init__(self, softmax=True): super().__init__() self.softmax = softmax def forward(self, query, y): att = torch.bmm(que...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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/NISQA
AttDot
false
15,615
[ "MIT" ]
223
2c8917f30c4e4bbca3a48e9852301f1e2480a741
https://github.com/ishine/NISQA/tree/2c8917f30c4e4bbca3a48e9852301f1e2480a741
FourierFeatures
# 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 from torch im...
DeepTitan/v-diffusion-pytorch
FourierFeatures
false
9,032
[ "MIT" ]
0
857b6f2a4519973f9a8dc0b6c93f0134cebc3a8d
https://github.com/DeepTitan/v-diffusion-pytorch/tree/857b6f2a4519973f9a8dc0b6c93f0134cebc3a8d
MultiheadSimilarity
import torch import torch.utils.data from torch import nn class MultiheadSimilarity(nn.Module): def __init__(self, d_model, num_head, seq_len, in_proj=True): super().__init__() self.num_head = num_head self.seq_len = seq_len self.d_head = d_model // num_head self.in_proj =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data from torch import nn assert_size_stride = torch._C._dyna...
bladewaltz1/clipvid-tmp
MultiheadSimilarity
false
1,564
[ "MIT" ]
0
8a4a990c318fdfbf6dac443abd3bc16637abba3d
https://github.com/bladewaltz1/clipvid-tmp/tree/8a4a990c318fdfbf6dac443abd3bc16637abba3d
PredictionHead
import torch import torch.nn as nn from torchvision.models.quantization import * class PredictionHead(nn.Module): def __init__(self, in_channels, num_classes, num_anchors): super(PredictionHead, self).__init__() self.classification = nn.Conv2d(in_channels, num_classes * num_anchors, k...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 torchvision.models.quantization import * assert_size_...
CaoZhongZ/inference
PredictionHead
false
13,859
[ "Apache-2.0" ]
388
58025f8fde679ea864d34f96ecc9f14bf70ece53
https://github.com/CaoZhongZ/inference/tree/58025f8fde679ea864d34f96ecc9f14bf70ece53
encoder3
import torch import torch.nn as nn class encoder3(nn.Module): def __init__(self): super(encoder3, self).__init__() self.conv1 = nn.Conv2d(3, 3, 1, 1, 0) self.reflecPad1 = nn.ReflectionPad2d((1, 1, 1, 1)) self.conv2 = nn.Conv2d(3, 64, 3, 1, 0) self.relu2 = nn.ReLU(inplace=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._inductor.runtime....
guswl8033/ARtists
encoder3
false
3,570
[ "Apache-2.0" ]
0
d353195872c1ef1a1aa68659a32fb47779a416fc
https://github.com/guswl8033/ARtists/tree/d353195872c1ef1a1aa68659a32fb47779a416fc
SelfAttention
import torch import torch.nn as nn class SelfAttention(nn.Module): """A simple self-attention solution.""" def __init__(self, data_dim, dim_q): super(SelfAttention, self).__init__() self._layers = [] self._fc_q = nn.Linear(data_dim, dim_q) self._layers.append(self._fc_q) ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
daia99/brain-tokyo-workshop
SelfAttention
false
15,111
[ "Apache-2.0" ]
1,097
cd470255230afddba2b80d99a9641b682f4d0762
https://github.com/daia99/brain-tokyo-workshop/tree/cd470255230afddba2b80d99a9641b682f4d0762
Conv_Blocks
import torch import torch.nn as nn class Conv_Blocks(nn.Module): def __init__(self, input_dim, output_dim, filter_size=3, batch_norm= False, non_lin='tanh', dropout=0.0, first_block=False, last_block= False, skip_connection=False): super(Conv_Blocks, self).__init__() self.skip_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....
HRHLALALA/GoalGAN
Conv_Blocks
false
9,098
[ "MIT" ]
0
01443f2a578333a0d5ab3a449bc7da69f5023190
https://github.com/HRHLALALA/GoalGAN/tree/01443f2a578333a0d5ab3a449bc7da69f5023190
ReduceMax
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
carlogrisetti/ludwig
ReduceMax
false
1,632
[ "Apache-2.0" ]
0
5c0887f14867e1577e0ddc3806c5cf7a781fb665
https://github.com/carlogrisetti/ludwig/tree/5c0887f14867e1577e0ddc3806c5cf7a781fb665
Encoder
# 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_...
JanSoltysik/SimCLR
Encoder
false
11,553
[ "MIT" ]
0
34ea6d17a630382b65a00aa445d82876754ee679
https://github.com/JanSoltysik/SimCLR/tree/34ea6d17a630382b65a00aa445d82876754ee679
RPNHead
# 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...
Jaramies/PyTorch-Simple-MaskRCNN
RPNHead
false
5,371
[ "MIT" ]
1
21e6c6983b34061800280573ebe705ae17212972
https://github.com/Jaramies/PyTorch-Simple-MaskRCNN/tree/21e6c6983b34061800280573ebe705ae17212972
PixelShuffle
# 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.nn.parallel assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C...
LonglifeHyun/GANda_text-to-image
PixelShuffle
false
2,567
[ "MIT" ]
0
095ded617e4df7d7ff7f4954381dde77db6d6883
https://github.com/LonglifeHyun/GANda_text-to-image/tree/095ded617e4df7d7ff7f4954381dde77db6d6883
ResidualBlock
import torch import torch.nn as nn class ResidualBlock(nn.Module): def __init__(self, in_channels, out_channels): super().__init__() self.in_channels, self.out_channels = in_channels, out_channels self.blocks = nn.Identity() self.shortcut = nn.Identity() 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride @triton.jit def triton_poi_fused_add_0(in_ptr0, out_...
Rachneet/amc-app
ResidualBlock
false
11,796
[ "MIT" ]
0
20b586608d454a3033333e285f0dbc91e5c6e07f
https://github.com/Rachneet/amc-app/tree/20b586608d454a3033333e285f0dbc91e5c6e07f
PairwiseCrossCorrelation
import torch from torch import nn class PairwiseCrossCorrelation(nn.Module): def __init__(self, lambd=1): super().__init__() self.lambd = lambd def off_diagonal(self, x): n, m = x.shape assert n == m return x.flatten()[:-1].view(n - 1, n + 1)[:, 1:].flatten() def...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
vzinche/inferno
PairwiseCrossCorrelation
false
4,512
[ "Apache-2.0" ]
0
91b22dfcd1b6a9ec415f0bbb6ae66caea42f4034
https://github.com/vzinche/inferno/tree/91b22dfcd1b6a9ec415f0bbb6ae66caea42f4034
SVIGlobalMaxPool2D
import torch import torch.nn as nn class SVIGlobalMaxPool2D(nn.Module): """ Expects :param x: [examples, samples, channels, H, W] :return: [examples, samples, channels] """ def __init__(self): super(SVIGlobalMaxPool2D, self).__init__() def forward(self, x): x = x.max(4)[0...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
RomanShen/radial-bnn
SVIGlobalMaxPool2D
false
992
[ "Apache-2.0" ]
0
7c8bc85397c1461a6fd5ea9adf0631f9ade27f6c
https://github.com/RomanShen/radial-bnn/tree/7c8bc85397c1461a6fd5ea9adf0631f9ade27f6c
OneTupleModule
import torch import torch.jit import torch.onnx import torch.nn class OneTupleModule(torch.nn.Module): def __init__(self): super(OneTupleModule, self).__init__() def forward(self, x): y = 2 * x return y, def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
opti-mix/glow
OneTupleModule
false
7,386
[ "Apache-2.0" ]
1
4ba074df5da9822986a23a6679ab592c22660f6d
https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d
SSD300
import torch import torchvision import torch.nn as nn import torch.nn.functional as F from math import sqrt from itertools import product as product def decimate(tensor, m): """ Decimate a tensor by a factor 'm', i.e. downsample by keeping every 'm'th value. This is used when we convert FC layers to equi...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
ildoonet/ai-starthon-2019
SSD300
false
15,742
[ "MIT" ]
69
148855adcb731741938a86545a2d3282287f0a50
https://github.com/ildoonet/ai-starthon-2019/tree/148855adcb731741938a86545a2d3282287f0a50
PositionwiseFeedForward
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math import ...
RowitZou/CG-nAR
PositionwiseFeedForward
false
17,879
[ "MIT" ]
8
8e2debeb3170045592b3b674ea6f9b56251e71f4
https://github.com/RowitZou/CG-nAR/tree/8e2debeb3170045592b3b674ea6f9b56251e71f4
ResidualDenseBlock
import torch import torch.nn as nn class ResidualDenseBlock(nn.Module): def __init__(self, channels=64, kernel_size=3, growth=32): super().__init__() self.conv2d_1 = self.conv2d(channels, growth, kernel_size, growth, 0) self.conv2d_2 = self.conv2d(channels, growth, kernel_size, growth, 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Frognar/Super-Resolution
ResidualDenseBlock
false
5,187
[ "MIT" ]
1
406b909d71e156aa11ee589698744e3ad9abfee7
https://github.com/Frognar/Super-Resolution/tree/406b909d71e156aa11ee589698744e3ad9abfee7
PropMaxPool
from _paritybench_helpers import _mock_config import torch import torch.nn.parallel import torch.nn as nn import torch.utils.data import torch.backends.cudnn class PropMaxPool(nn.Module): def __init__(self, cfg): super(PropMaxPool, self).__init__() num_layers = cfg.NUM_LAYERS self.layers ...
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.parallel import torch.nn as nn import torch.utils.data import torch.backe...
EGO4D/episodic-memory
PropMaxPool
false
8,812
[ "MIT" ]
27
2a3464882cd4f665c358c1b05a6397339e33c2e1
https://github.com/EGO4D/episodic-memory/tree/2a3464882cd4f665c358c1b05a6397339e33c2e1
Conv2dZeroInit
# 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....
lingzenan/invertible-resnet
Conv2dZeroInit
false
7,092
[ "MIT" ]
1
57b1c0de51a885aed074b77628f3b0c85c548e70
https://github.com/lingzenan/invertible-resnet/tree/57b1c0de51a885aed074b77628f3b0c85c548e70
IoULoss
import torch import torch.nn as nn class IoULoss(nn.Module): def __init__(self, weight=None, size_average=True): super().__init__() def forward(self, inputs, targets): smooth = 1.0 num = targets.size(0) m1 = inputs.view(num, -1) m2 = targets.view(num, -1) inte...
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...
Luoxd1996/Rank2nuclearSegmentation
IoULoss
false
17,617
[ "MIT" ]
5
bd85ac13eec7ce18c286efd521a27486483da904
https://github.com/Luoxd1996/Rank2nuclearSegmentation/tree/bd85ac13eec7ce18c286efd521a27486483da904
IrisClassifier
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data class IrisClassifier(nn.Module): def __init__(self): super(IrisClassifier, self).__init__() self.fc1 = nn.Linear(4, 100) self.fc2 = nn.Linear(100, 100) self.fc3 = nn.Linear(100, 3) 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....
dbinoy/pytorch-iris-sagemaker
IrisClassifier
false
9,974
[ "MIT-0" ]
0
afc5bd95f6dd0431338708bc179029fa08724a2f
https://github.com/dbinoy/pytorch-iris-sagemaker/tree/afc5bd95f6dd0431338708bc179029fa08724a2f
SoftCrossEntropyLossWithOHEM
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
ForrestPi/semanticSegmentation
SoftCrossEntropyLossWithOHEM
false
17,345
[ "MIT" ]
7
1e5519279e2a9574f09eaf91439138b74b0f860c
https://github.com/ForrestPi/semanticSegmentation/tree/1e5519279e2a9574f09eaf91439138b74b0f860c
Normalize
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.utils.data import torch import torch.nn as nn assert_size_stride =...
a11isonliu/contrastive-unpaired-translation
Normalize
false
9,850
[ "BSD-3-Clause" ]
0
67651ed9877cae121d9398f46094ce8dbc678802
https://github.com/a11isonliu/contrastive-unpaired-translation/tree/67651ed9877cae121d9398f46094ce8dbc678802
PredictionConvolutions
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
HFAiLab/ffrecord
PredictionConvolutions
false
14,023
[ "MIT" ]
47
e916dc715ffa38a304a673ade7c5aa1efff5936d
https://github.com/HFAiLab/ffrecord/tree/e916dc715ffa38a304a673ade7c5aa1efff5936d
AttentionSeq2Vec
from torch.nn import Module import torch from torch.nn import Linear from typing import Optional from torch.nn import Tanh def masked_softmax(vector: 'torch.FloatTensor', mask: 'torch.ByteTensor'): """ 计算带有 masked 的 softmax :param vector: shape: (B, seq_len) :param mask: shape: (B, seq_len), :retu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
Tiffany-HONG/easytext
AttentionSeq2Vec
false
5,901
[ "MIT" ]
1
9c717d11240d96fab98b0532084ebb5c093d55bd
https://github.com/Tiffany-HONG/easytext/tree/9c717d11240d96fab98b0532084ebb5c093d55bd
MAXATTN
import torch import torch.nn as nn class MAXATTN(nn.Module): def __init__(self, embed_dim, num_heads, dropout=0.0, bias=True, add_bias_kv=False, add_zero_attn=False, kdim=None, vdim=None): super(MAXATTN, self).__init__() self.attention_layer = nn.MultiheadAttention(embed_dim, num_heads) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Hritikbansal/RNNs_SVA_OOD
MAXATTN
false
17,392
[ "MIT" ]
4
a1c73955342d9d35c49da5fcb7b315e37b0f75d1
https://github.com/Hritikbansal/RNNs_SVA_OOD/tree/a1c73955342d9d35c49da5fcb7b315e37b0f75d1
Conv2d
import torch import torch.nn as nn from torch.nn import functional as F class Conv2d(nn.Conv2d): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True): super(Conv2d, self).__init__(in_channels, out_channels, kernel_size, strid...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
ChuanqiTan/DeepLabv3.pytorch
Conv2d
false
11,316
[ "BSD-3-Clause" ]
0
260db5812ae3c85f0aacd5ec9bc0e3d8c5d2d067
https://github.com/ChuanqiTan/DeepLabv3.pytorch/tree/260db5812ae3c85f0aacd5ec9bc0e3d8c5d2d067
FractionProposalModel
# 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....
alirezakazemipour/Distributional-RL
FractionProposalModel
false
1,424
[ "MIT" ]
0
a3de3a1707bdd57a420f85c6d64a3fb84fb075af
https://github.com/alirezakazemipour/Distributional-RL/tree/a3de3a1707bdd57a420f85c6d64a3fb84fb075af
SelfAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ahmedelhodaiby/HandMesh
SelfAttention
false
9,902
[ "MIT" ]
0
d86ec322b7627c5756bd9ae9e152bcd4f2debfa6
https://github.com/ahmedelhodaiby/HandMesh/tree/d86ec322b7627c5756bd9ae9e152bcd4f2debfa6
MeanMaxPooling
import torch from torch import nn class MeanMaxPooling(nn.Module): def __init__(self): super(MeanMaxPooling, self).__init__() def forward(self, doc_state, entity_mapping, entity_lens): """ :param doc_state: N x L x d :param entity_mapping: N x E x L :param entity_le...
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...
jennybae1024/DFGN-pytorch
MeanMaxPooling
false
15,681
[ "MIT" ]
191
056d9317f772cd10bdd215bfafdbac5cbd330026
https://github.com/jennybae1024/DFGN-pytorch/tree/056d9317f772cd10bdd215bfafdbac5cbd330026
EmbeddingsInteraction
# 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...
SUSTechBruce/RL_CTR
EmbeddingsInteraction
false
2,789
[ "Apache-2.0" ]
0
817398dc1c117e22f41281830ae3c33bba8062d3
https://github.com/SUSTechBruce/RL_CTR/tree/817398dc1c117e22f41281830ae3c33bba8062d3
InverseDepthSmoothnessLoss
# 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...
JoanFM/kornia
InverseDepthSmoothnessLoss
false
11,551
[ "ECL-2.0", "Apache-2.0" ]
0
808898887cde69074ca3e3df9b24dea9682aad90
https://github.com/JoanFM/kornia/tree/808898887cde69074ca3e3df9b24dea9682aad90
PolicyNetwork
import torch import torch.nn as nn import torch.nn.functional as F class PolicyNetwork(nn.Module): def __init__(self, num_inputs, num_actions, hidden_size=256): super(PolicyNetwork, self).__init__() self.num_actions = num_actions self.linear1 = nn.Linear(num_inputs, hidden_size) 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....
bluebibi/rl_book_codes
PolicyNetwork
false
3,228
[ "MIT" ]
0
ef7fc9993eb66618e4b4e80e59cc2879a8db3522
https://github.com/bluebibi/rl_book_codes/tree/ef7fc9993eb66618e4b4e80e59cc2879a8db3522
SemiNorm
import torch import torch.nn as nn from torch.nn.utils import spectral_norm import torch.jit import torch.nn from torch.nn.utils.spectral_norm import spectral_norm class SemiNorm(nn.Module): def __init__(self, in_size, normalization=None): super().__init__() normalization = normalization or spect...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
ankmathur96/torchsupport
SemiNorm
false
3,170
[ "MIT" ]
0
77bf4a90b8770a408665e2604428808c3ed2f979
https://github.com/ankmathur96/torchsupport/tree/77bf4a90b8770a408665e2604428808c3ed2f979
Head
import torch import torch.nn as nn class Conv(nn.Module): def __init__(self, filters0, filters1, kernel_size, bn, bias=True): super().__init__() if bn: bias = False self.conv = nn.Conv2d(filters0, filters1, kernel_size, stride=1, padding=kernel_size // 2, bias=bias...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
IMOKURI/Hungry-Geese
Head
false
9,336
[ "MIT" ]
0
5e770b3278452c2ba4006c18a43a16d572c636ac
https://github.com/IMOKURI/Hungry-Geese/tree/5e770b3278452c2ba4006c18a43a16d572c636ac
DilatedGatedConv1D
# 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...
shinoyuki222/torch-light
DilatedGatedConv1D
false
16,429
[ "MIT" ]
310
4799805d9bcae82a9f12a574dcf9fdd838c92ee9
https://github.com/shinoyuki222/torch-light/tree/4799805d9bcae82a9f12a574dcf9fdd838c92ee9
Envelope
import torch import torch.utils.data class Envelope(torch.nn.Module): def __init__(self, exponent): super(Envelope, self).__init__() self.p = exponent + 1 self.a = -(self.p + 1) * (self.p + 2) / 2 self.b = self.p * (self.p + 2) self.c = -self.p * (self.p + 1) / 2 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 import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_...
EricAlcaide/pytorch_geometric
Envelope
false
2,191
[ "MIT" ]
0
31cef566cfe22602459155fdf91e9b6ce398bfe7
https://github.com/EricAlcaide/pytorch_geometric/tree/31cef566cfe22602459155fdf91e9b6ce398bfe7
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 from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
BloodAxe/segmentation-networks-benchmark
ConvRelu
false
7,856
[ "MIT" ]
34
2e3feb560102230be9369ab442b4a59cc86dff61
https://github.com/BloodAxe/segmentation-networks-benchmark/tree/2e3feb560102230be9369ab442b4a59cc86dff61
PosLinear
import torch from torch import Tensor from torch.utils.data import Dataset as Dataset import torch.nn as nn import torch.utils.data class PosLinear(torch.nn.Linear): def forward(self, x: 'Tensor') ->Tensor: gain = 1 / x.size(1) return nn.functional.linear(x, torch.nn.functional.softplus(self. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math fr...
JunLi-Galios/CP-Flow
PosLinear
false
11,595
[ "MIT" ]
0
69272636c8c644ce3c96bbc4d610591756b8e3ff
https://github.com/JunLi-Galios/CP-Flow/tree/69272636c8c644ce3c96bbc4d610591756b8e3ff
GlobalAttentionGeneral
# 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....
JoonHong-Kim/T2I_CL
GlobalAttentionGeneral
false
8,369
[ "MIT" ]
35
c52aa73da903d6e4174eeef2663e5bc1163785b1
https://github.com/JoonHong-Kim/T2I_CL/tree/c52aa73da903d6e4174eeef2663e5bc1163785b1
L2Norm
import torch import torch.nn as nn class L2Norm(nn.Module): def __init__(self, n_dims, scale=20.0, eps=1e-10): super(L2Norm, self).__init__() self.n_dims = n_dims self.weight = nn.Parameter(torch.Tensor(self.n_dims)) self.eps = eps self.scale = scale 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_...
CK-er/mmdet
L2Norm
false
2,056
[ "Apache-2.0" ]
0
9bea4068efbcf7bf739dbe41917a68d525c29868
https://github.com/CK-er/mmdet/tree/9bea4068efbcf7bf739dbe41917a68d525c29868
ActorCritic
# 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....
shinoyuki222/torch-light
ActorCritic
false
16,425
[ "MIT" ]
310
4799805d9bcae82a9f12a574dcf9fdd838c92ee9
https://github.com/shinoyuki222/torch-light/tree/4799805d9bcae82a9f12a574dcf9fdd838c92ee9
Scale
import torch import torch.nn as nn import torch.utils.data class Scale(nn.Module): """A learnable scale parameter. This layer scales the input by a learnable factor. It multiplies a learnable scale parameter of shape (1,) with input of any shape. Args: scale (float): Initial value of scale f...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
AIpakchoi/visualDet3D
Scale
false
4,755
[ "Apache-2.0" ]
1
920f6f8ea44eac4c1896b7d157c015e039ac39f9
https://github.com/AIpakchoi/visualDet3D/tree/920f6f8ea44eac4c1896b7d157c015e039ac39f9
unrotate
import torch import torch.nn as nn class unrotate(nn.Module): def __init__(self): super().__init__() def forward(self, x): x0, x90, x180, x270 = torch.chunk(x, 4, dim=0) x90 = x90.transpose(2, 3).flip(2) x180 = x180.flip(2).flip(3) x270 = x270.transpose(2, 3).flip(3) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
amonod/udvd
unrotate
false
1,425
[ "MIT" ]
0
a1ccb777d205255ac68c40efb93dd3996f562c45
https://github.com/amonod/udvd/tree/a1ccb777d205255ac68c40efb93dd3996f562c45
FrameAvgPool
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class FrameAvgPool(nn.Module): def __init__(self, cfg): super(FrameAvgPool, self).__init__() input_size = cfg.INPUT_SIZE hidden_size = cfg.HIDDEN_SIZE kernel_size = cfg.KERNEL_SIZE stride = cf...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
CFM-MSG/Code_LEORN
FrameAvgPool
false
7,616
[ "MIT" ]
1
fabea1e1ded973a4db692e51e2df442bde55f626
https://github.com/CFM-MSG/Code_LEORN/tree/fabea1e1ded973a4db692e51e2df442bde55f626
Sinc
# 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
Sinc
false
12,379
[ "Apache-2.0" ]
0
3fea55f09477e9f0844845e09d6ea60434436e2e
https://github.com/fmhoward/pysurvival/tree/3fea55f09477e9f0844845e09d6ea60434436e2e
SPHead
import torch import torch.utils.data import torch.nn as nn import torch.nn.functional as F from inspect import isfunction def get_activation_layer(activation): """ Create activation layer from string/function. Parameters: ---------- activation : function, or str, or nn.Module Activation f...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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
SPHead
false
17,687
[ "MIT" ]
9
88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
ToSEG
# 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 import torch.nn as nn import tor...
MargauxMasson/semanticGAN_code
ToSEG
false
2,642
[ "BSD-2-Clause", "MIT" ]
0
a5b7fbbc505f8ae08c8aab8e199aa6406fffdb07
https://github.com/MargauxMasson/semanticGAN_code/tree/a5b7fbbc505f8ae08c8aab8e199aa6406fffdb07
NBLoss
import torch import numpy as np def _nan2inf(x): return torch.where(torch.isnan(x), torch.zeros_like(x) + np.inf, x) class NBLoss(torch.nn.Module): def __init__(self): super(NBLoss, self).__init__() def forward(self, yhat, y, eps=1e-08): """Negative binomial log-likelihood loss. It ass...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import numpy as np assert_size_stride = torch._C._dynamo.guard...
scottgigante-immunai/CPA
NBLoss
false
16,367
[ "MIT" ]
132
9338ede503d36c6163a521bee904aa93d896ef92
https://github.com/scottgigante-immunai/CPA/tree/9338ede503d36c6163a521bee904aa93d896ef92
VNet
import torch import torch.nn as nn class VNet(nn.Module): def __init__(self, input_size, hidden_size, output_size=1): super(VNet, self).__init__() self.linear1 = nn.Linear(input_size, hidden_size) self.relu1 = nn.ReLU(inplace=True) self.linear2 = nn.Linear(hidden_size, output_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 import torch.nn as nn assert_...
Stranger469/wrench
VNet
false
5,863
[ "Apache-2.0" ]
1
ab717ac26a76649c8fdb946a28dffe7e682c80ba
https://github.com/Stranger469/wrench/tree/ab717ac26a76649c8fdb946a28dffe7e682c80ba
AmdimNCELoss
import torch from torch import nn def tanh_clip(x, clip_val=10.0): """soft clip values to the range [-clip_val, +clip_val]""" if clip_val is not None: x_clip = clip_val * torch.tanh(1.0 / clip_val * x) else: x_clip = x return x_clip class AmdimNCELoss(nn.Module): """Compute the N...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Benjamin-Etheredge/lightning-bolts
AmdimNCELoss
false
138
[ "Apache-2.0" ]
0
1971d6a924729940b98793aa7751bdf769350aca
https://github.com/Benjamin-Etheredge/lightning-bolts/tree/1971d6a924729940b98793aa7751bdf769350aca
MultiHeadDenseLayer
import torch import tensorflow as tf import torch.nn as nn import torch.nn.functional as F def get_activation(activ): if callable(activ): return activ if activ is None: return lambda x: x if activ == 'tanh': return F.tanh elif activ == 'relu': return F.relu elif act...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 tensorflow as tf import torch.nn as nn import torch.nn.functional as F as...
ishine/neurst
MultiHeadDenseLayer
false
16,691
[ "Apache-2.0" ]
208
2ba322393fcfed4261b33f4a657e12bbe321baaa
https://github.com/ishine/neurst/tree/2ba322393fcfed4261b33f4a657e12bbe321baaa
FactorizedReduce
import torch import torch.nn as nn import torch.utils.data import torch.utils from matplotlib import cm as cm from torch.nn.parallel import * from torchvision.models import * from torchvision.datasets import * def get_norm_layer(norm, C): if norm in [None, '', 'none']: norm_layer = nn.Identity() elif ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
evdcush/ppuda
FactorizedReduce
false
15,335
[ "MIT" ]
262
22783ac92207da6730ee618c953af230c5c39f28
https://github.com/evdcush/ppuda/tree/22783ac92207da6730ee618c953af230c5c39f28