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
Attn
# 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....
erytheis/HDSA-Dialog
Attn
false
10,095
[ "MIT" ]
0
08fa6c583e51989f45201e232864ccb495fa823c
https://github.com/erytheis/HDSA-Dialog/tree/08fa6c583e51989f45201e232864ccb495fa823c
ExpectedShortfall
# 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.nn import Module from torch import Tensor from typing import Callable from typing import Union from typing import Optional from a...
vishalbelsare/pfhedge
ExpectedShortfall
false
16,690
[ "MIT" ]
81
4d7ff173995e0795942bc6ec55f3fdc5bfb7a5f1
https://github.com/vishalbelsare/pfhedge/tree/4d7ff173995e0795942bc6ec55f3fdc5bfb7a5f1
SimpleAttention
# 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....
filkar/CASTLE
SimpleAttention
false
3,499
[ "MIT" ]
0
128b316d24503875bcc298301c17b003e6d4599d
https://github.com/filkar/CASTLE/tree/128b316d24503875bcc298301c17b003e6d4599d
MultiHeadAttentionLayer
# 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....
rigvedsah000/PAN-
MultiHeadAttentionLayer
false
12,952
[ "Apache-2.0" ]
0
16f8482886c5eccecf29fe072025ba54c64e4b9d
https://github.com/rigvedsah000/PAN-/tree/16f8482886c5eccecf29fe072025ba54c64e4b9d
HardMGUCellNUA
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import math import torch.nn a...
pan185/UnarySim
HardMGUCellNUA
false
7,457
[ "MIT" ]
1
c03386efdbb8151f3c33f34b44d1d6a6fc960434
https://github.com/pan185/UnarySim/tree/c03386efdbb8151f3c33f34b44d1d6a6fc960434
CMMD
import torch import torch.nn as nn import torch.nn.functional as F class CMMD(nn.Module): def __init__(self, num_pos): super(CMMD, self).__init__() self.num_pos = num_pos def forward(self, feat_v, feat_t): feat_v = feat_v.view(feat_v.size(0), -1) feat_v = F.normalize(feat_v, ...
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...
JDAI-CV/CM-NAS
CMMD
false
8,302
[ "Apache-2.0" ]
31
bbc77f427b2c8afb9f3865f5a04e86079d33dd28
https://github.com/JDAI-CV/CM-NAS/tree/bbc77f427b2c8afb9f3865f5a04e86079d33dd28
WSDiceLoss
import torch import torch.utils.data import torch.nn as nn import torch.nn.parallel class WSDiceLoss(nn.Module): def __init__(self, smooth=100.0, power=2.0, v2=0.85, v1=0.15): super().__init__() self.smooth = smooth self.power = power self.v2 = v2 self.v1 = v1 def dic...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch.nn as nn import torch.nn.parallel assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty...
HarshSulakhe/pytorch_connectomics
WSDiceLoss
false
9,859
[ "MIT" ]
0
73402e654afde69a43a5836cc90a32ef75c75dc2
https://github.com/HarshSulakhe/pytorch_connectomics/tree/73402e654afde69a43a5836cc90a32ef75c75dc2
LowRankConv2d
import math import torch from torch import nn import torch.nn.functional as F import torch.cuda import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class LowRankConv2d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padd...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 from torch import nn import torch.cuda import torch.nn.parallel impo...
sfox14/butterfly
LowRankConv2d
false
16,388
[ "Apache-2.0" ]
52
13cc15cee5bdb7adaf376219aaf20fab0459e9ef
https://github.com/sfox14/butterfly/tree/13cc15cee5bdb7adaf376219aaf20fab0459e9ef
FFN
import torch import torch.nn as nn class FFN(nn.Module): """Feed Forward Network.""" def __init__(self, num_features: 'int', ffn_dim_1: 'int', ffn_dim_2: 'int' ) ->None: """Initialize the class.""" super().__init__() self.gemm1 = nn.Linear(num_features, ffn_dim_1, bias=False) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
BruceRayWilson/sambanova_starter
FFN
false
8,887
[ "MIT" ]
0
be1b01369b040d00f174a0ee1fdb22e89ef40062
https://github.com/BruceRayWilson/sambanova_starter/tree/be1b01369b040d00f174a0ee1fdb22e89ef40062
DepthwiseSeparableConvolution
# 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...
LiChengChen666/DetectDee
DepthwiseSeparableConvolution
false
9,807
[ "Apache-2.0" ]
0
1e6aaa0d15b1fc12d1342d8a922004e372b5f437
https://github.com/LiChengChen666/DetectDee/tree/1e6aaa0d15b1fc12d1342d8a922004e372b5f437
TensorMax
# 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...
Minyus/pipelinex
TensorMax
false
14,037
[ "Apache-2.0" ]
188
f35c524ec9c50751ee27d9a42d98317e16f1c544
https://github.com/Minyus/pipelinex/tree/f35c524ec9c50751ee27d9a42d98317e16f1c544
BertSelfAttention
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed class BertSelfAttention(nn.Module): def __init__(self, config): super(BertSe...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Neo9061/amazon-sagemaker-examples
BertSelfAttention
false
11,140
[ "Apache-2.0" ]
0
da58c2950286a2e40bd53a5d5135b1e23fd79e63
https://github.com/Neo9061/amazon-sagemaker-examples/tree/da58c2950286a2e40bd53a5d5135b1e23fd79e63
ELUPlus
# 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 from torch import nn import torch.nn assert_size_stride = torch._C._dynamo.guar...
KailinLi/nflows
ELUPlus
false
8,381
[ "MIT" ]
13
7c07a1d5e510beb681d1b11d6ffda95a086a8153
https://github.com/KailinLi/nflows/tree/7c07a1d5e510beb681d1b11d6ffda95a086a8153
MAE
# 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...
anglixjtu/MSG_CHN_WACV20
MAE
false
14,846
[ "Apache-2.0" ]
61
6910894cf3caed2ffde27586f96b132b0c1d1a98
https://github.com/anglixjtu/MSG_CHN_WACV20/tree/6910894cf3caed2ffde27586f96b132b0c1d1a98
SSARDecoder
import torch from torch import nn class SSARDecoder(nn.Module): def __init__(self): super(SSARDecoder, self).__init__() self.deconv0 = nn.ConvTranspose2d(256, 64, 4, 2, 1) self.deconv1 = nn.ConvTranspose2d(64, 32, 4, 2, 1) self.deconv2 = nn.ConvTranspose2d(32, 16, 4, 2, 1) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
LEChaney/Real-time-SSAR
SSARDecoder
false
17,604
[ "MIT" ]
4
b4ad8c2356b0ec4237bb9f62394e7169ea5aca50
https://github.com/LEChaney/Real-time-SSAR/tree/b4ad8c2356b0ec4237bb9f62394e7169ea5aca50
Attention
# 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....
skasai5296/image_captioning
Attention
false
10,777
[ "MIT" ]
0
b4bb2c015a2bdce2040ab14fe2a53e9b79aa3c30
https://github.com/skasai5296/image_captioning/tree/b4bb2c015a2bdce2040ab14fe2a53e9b79aa3c30
PixelwiseNorm
# 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...
SashaMatsun/torch-GAN
PixelwiseNorm
false
1,016
[ "MIT" ]
0
534a634530548d3f8b3a102c3e43e1cc64d8506d
https://github.com/SashaMatsun/torch-GAN/tree/534a634530548d3f8b3a102c3e43e1cc64d8506d
Reorg
import torch from torch import nn import torch.utils.data class Reorg(nn.Module): def forward(self, x): return torch.cat([x[..., ::2, ::2], x[..., 1::2, ::2], x[..., ::2, 1::2], x[..., 1::2, 1::2]], 1) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): ret...
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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._...
bruceli-rw0/rob535-perception
Reorg
false
9,826
[ "MIT" ]
0
b800b48aea888b0959b19fe13c637e1f257417e6
https://github.com/bruceli-rw0/rob535-perception/tree/b800b48aea888b0959b19fe13c637e1f257417e6
CustomGruCell
import torch import numpy as np from torch import nn class CustomGruCell(nn.Module): """ A forward only GRU cell. Input should be: (sequence length x batch size x input_size). The output is the output of the final forward call. It's not clear if it would be possible to use the output from each cel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
kouohhashi/PySyft
CustomGruCell
false
10,355
[ "Apache-2.0" ]
0
7415961b459f1d25f762467b346b7b94c1d6943f
https://github.com/kouohhashi/PySyft/tree/7415961b459f1d25f762467b346b7b94c1d6943f
UpsamplingBlock
# 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_...
Jay2020-01/TextureGAN--Flask
UpsamplingBlock
false
17,484
[ "MIT" ]
5
cddea505b0d66b58d58fb24435f8bae42fd5a852
https://github.com/Jay2020-01/TextureGAN--Flask/tree/cddea505b0d66b58d58fb24435f8bae42fd5a852
IIDIsotropicGaussianUVLoss
# 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 math...
JHMeusener/detectron2-ResNeSt
IIDIsotropicGaussianUVLoss
false
581
[ "Apache-2.0" ]
0
6abab6fb9496a528f6aa2d4e1e27f3e7ceb42685
https://github.com/JHMeusener/detectron2-ResNeSt/tree/6abab6fb9496a528f6aa2d4e1e27f3e7ceb42685
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 torch.nn as nn assert_...
NeuralFlux/rl-analysis
Critic
false
5,653
[ "MIT" ]
1
bb45e1f8bb9da4683cce4bd0a5e687770a4005e2
https://github.com/NeuralFlux/rl-analysis/tree/bb45e1f8bb9da4683cce4bd0a5e687770a4005e2
MaskedAveragePooling
import torch from torch import nn class MaskedAveragePooling(nn.Module): def __init__(self): super(MaskedAveragePooling, self).__init__() def forward(self, embedding_matrix): sum_pooling_matrix = torch.sum(embedding_matrix, dim=1) non_padding_length = (embedding_matrix.sum(dim=-1) !=...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
byzhang/OpenMatch
MaskedAveragePooling
false
10,010
[ "Apache-2.0" ]
0
28b2d49a5eec2e1dc3934767c747ff0ca6c93d96
https://github.com/byzhang/OpenMatch/tree/28b2d49a5eec2e1dc3934767c747ff0ca6c93d96
Norm
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data class Norm(nn.Module): def __init__(self, dims): super(Norm, self).__init__() self.dims = dims def forward(self, x): z2 = torch.norm(x, p=2) out = z2 - self.dims out = out * out ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
doudoulaile/RL-GAN-Net
Norm
false
15,212
[ "MIT" ]
112
9c221223d1878bc24f0f39ad34928c1bb2974ae3
https://github.com/doudoulaile/RL-GAN-Net/tree/9c221223d1878bc24f0f39ad34928c1bb2974ae3
NodeAdaptiveEncoder
# 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.utils.data import torch.nn as nn assert_size_stride = torch._C._dyn...
ChengzhiPiao/cogdl
NodeAdaptiveEncoder
false
4,980
[ "MIT" ]
1
182e0b95b3dfbe771570037c58aacd8f677b6500
https://github.com/ChengzhiPiao/cogdl/tree/182e0b95b3dfbe771570037c58aacd8f677b6500
L1_Charbonnier_loss
import torch import torch.nn as nn class L1_Charbonnier_loss(nn.Module): """L1 Charbonnierloss.""" def __init__(self): super(L1_Charbonnier_loss, self).__init__() self.eps = 1e-06 def forward(self, X, Y): diff = torch.add(X, -Y) error = torch.sqrt(diff * diff + self.eps) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
AnimatedRNG/pytorch-LapSRN
L1_Charbonnier_loss
false
13,261
[ "MIT" ]
270
1b7737abe6ccaef2d14b673d301edbace3414c02
https://github.com/AnimatedRNG/pytorch-LapSRN/tree/1b7737abe6ccaef2d14b673d301edbace3414c02
Clamp
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
kgreif24/mlhep-aka
Clamp
false
10,331
[ "Apache-2.0" ]
0
41e120eb3e7049a01ffdb22c4e00b3aaca94b541
https://github.com/kgreif24/mlhep-aka/tree/41e120eb3e7049a01ffdb22c4e00b3aaca94b541
GCN
import torch import torch.nn as nn class SwishImplementation(torch.autograd.Function): @staticmethod def forward(ctx, i): result = i * torch.sigmoid(i) ctx.save_for_backward(i) return result @staticmethod def backward(ctx, grad_output): i = ctx.saved_variables[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...
RuijieJ/pren
GCN
false
14,337
[ "Apache-2.0" ]
64
529d4d3366eb1885001200491d3d171d58028f6c
https://github.com/RuijieJ/pren/tree/529d4d3366eb1885001200491d3d171d58028f6c
Expand
import torch import torch.nn as nn class Expand(nn.Module): def __init__(self, gain=2): super().__init__() self.gain = gain def forward(self, x): b, c, h, w = x.size() s = self.gain x = x.view(b, s, s, c // s ** 2, h, w) x = x.permute(0, 3, 4, 1, 5, 2).contigu...
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...
HarryPham0123/FPT_data_centric_competition
Expand
false
5,304
[ "Apache-2.0" ]
1
3fa1e0ac48fdae2649b639229d9a74f75e461878
https://github.com/HarryPham0123/FPT_data_centric_competition/tree/3fa1e0ac48fdae2649b639229d9a74f75e461878
GRelu
import torch import torch.nn as nn import torch.nn.functional as F class GRelu(nn.Module): """Generic ReLU.""" def __init__(self, leak=0.0, max=float('inf'), sub=0.0): super().__init__() self.leak = leak self.max = max self.sub = sub def forward(self, x): """Check...
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...
hdmamin/ml_htools
GRelu
false
12,489
[ "MIT" ]
0
9b8e8fbb561c4ae7c6ee282c8b5fc7876935dd50
https://github.com/hdmamin/ml_htools/tree/9b8e8fbb561c4ae7c6ee282c8b5fc7876935dd50
MultiHeadAttention
import torch import torch.nn as nn import torch.utils.checkpoint import torch.nn.functional as F from torch.cuda.amp import autocast class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temp...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
bahducoup/factorized_training
MultiHeadAttention
false
12,157
[ "MIT" ]
0
0af38f16338a9bcfcc11091b1a6b75befd67f234
https://github.com/bahducoup/factorized_training/tree/0af38f16338a9bcfcc11091b1a6b75befd67f234
Joiner
# 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...
thangdepzai/icefall
Joiner
false
13,028
[ "Apache-2.0" ]
0
8c7995d493c4309c3d09bdabfa1ab12b4eec2657
https://github.com/thangdepzai/icefall/tree/8c7995d493c4309c3d09bdabfa1ab12b4eec2657
ConvLayer
import torch class ConvLayer(torch.nn.Module): def __init__(self, in_features, out_features, kernel_size=1, stride=1): super().__init__() padding = kernel_size // 2 self.refpadding = torch.nn.ReflectionPad2d(padding) self.conv = torch.nn.Conv2d(in_features, out_features, kernel_si...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_s...
bruchano/GTAVSelfDriving
ConvLayer
false
1,631
[ "MIT" ]
0
c5f929f793b48e47725dbdb8f0991e04e3c43eba
https://github.com/bruchano/GTAVSelfDriving/tree/c5f929f793b48e47725dbdb8f0991e04e3c43eba
AttMSEloss
# 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.functional import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
HelenGuohx/cv-ferattn-code
AttMSEloss
false
5,288
[ "MIT" ]
1
faa9b7850fe2a0f8c08193bb129b5fec4639d616
https://github.com/HelenGuohx/cv-ferattn-code/tree/faa9b7850fe2a0f8c08193bb129b5fec4639d616
AllocatingLayer
from torch.nn import Module import torch from torch.nn.modules.module import Module class AllocatingLayer(Module): """The actor NN base its output for the case of full CSI on a continuous relaxation of the problem. Specifically it gives a value for every user. This layer will start allocating to the most val...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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 from torch.nn.modules.module import Module assert_si...
avranasa/DRL_Scheduling_Communications
AllocatingLayer
false
6,284
[ "MIT" ]
1
2e6cb3a9599e43b73547f4281d82b1e5999271b7
https://github.com/avranasa/DRL_Scheduling_Communications/tree/2e6cb3a9599e43b73547f4281d82b1e5999271b7
ResidualConvUnit
import torch import torch.nn as nn class ResidualConvUnit(nn.Module): """Residual convolution module. """ def __init__(self, features): """Init. Args: features (int): number of features """ super().__init__() self.conv1 = nn.Conv2d(features, features, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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_...
anlok/depthmap-loktev
ResidualConvUnit
false
1,475
[ "MIT" ]
0
c5af9156985524063c5e49c52bc28aab3290da71
https://github.com/anlok/depthmap-loktev/tree/c5af9156985524063c5e49c52bc28aab3290da71
Block
import math import torch import torch.nn as nn class MLP(nn.Module): def __init__(self, embedding_size): super(MLP, self).__init__() self.dense_h_to_4h = nn.Linear(embedding_size, embedding_size * 4) self.dense_4h_to_h = nn.Linear(embedding_size * 4, embedding_size) self.act = nn....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
AeroXi/CPM-Generate-Pytorch
Block
false
8,949
[ "Apache-2.0" ]
0
a1530ad2848a690c6e1557f996fe58538fe86884
https://github.com/AeroXi/CPM-Generate-Pytorch/tree/a1530ad2848a690c6e1557f996fe58538fe86884
CAModel
import torch import torch.nn as nn import torch.nn.functional as F class CAModel(nn.Module): def __init__(self, env_d): super(CAModel, self).__init__() self.conv1 = nn.Conv2d(env_d * 3, 232, 1) self.conv2 = nn.Conv2d(232, env_d, 1) nn.init.zeros_(self.conv2.weight) nn.init...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
PWhiddy/Growing-Neural-Cellular-Automata-Pytorch
CAModel
false
14,148
[ "Apache-2.0" ]
47
73a68e9a9cd0c3c14e590238f098937dc0f5c888
https://github.com/PWhiddy/Growing-Neural-Cellular-Automata-Pytorch/tree/73a68e9a9cd0c3c14e590238f098937dc0f5c888
GatedResidualNetwork
# 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...
dqawami/openvino_training_extensions
GatedResidualNetwork
false
15,217
[ "Apache-2.0" ]
256
dddda1dfd651eaae2d59cecda84275b1b03bd0ad
https://github.com/dqawami/openvino_training_extensions/tree/dddda1dfd651eaae2d59cecda84275b1b03bd0ad
GAT
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
wjurayj/commonsense-rl
GAT
false
16,727
[ "Apache-2.0" ]
55
fbbe4fa4a21865095783845fce2f0c4f4346e40f
https://github.com/wjurayj/commonsense-rl/tree/fbbe4fa4a21865095783845fce2f0c4f4346e40f
AttentionPool2d
import math import numpy import torch import numpy as np import torch.nn as nn import torch.utils.model_zoo import torch as th import numpy.matlib def conv_nd(dims, *args, **kwargs): """ Create a 1D, 2D, or 3D convolution module. """ if dims == 1: return nn.Conv1d(*args, **kwargs) elif 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....
KamilDeja/guided-diffusion
AttentionPool2d
false
2,493
[ "MIT" ]
0
d0eeeb4637379a3ece40c4dd38ccdf5d8ed5e837
https://github.com/KamilDeja/guided-diffusion/tree/d0eeeb4637379a3ece40c4dd38ccdf5d8ed5e837
Autoencoder
import torch import torch.nn as nn import torch.nn.functional as F def Conv(in_channels, out_channels): return nn.Conv2d(in_channels, out_channels, 3, padding=1) def concat(a, b): return torch.cat((a, b), 1) def pool(x): return F.max_pool2d(x, 2, 2) def relu(x): return F.relu(x, inplace=True) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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 ...
LongerVision/oidn
Autoencoder
false
5,629
[ "Apache-2.0" ]
1
2f9e59f8b747b217f78c5c274f4f2bff347a03a7
https://github.com/LongerVision/oidn/tree/2f9e59f8b747b217f78c5c274f4f2bff347a03a7
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....
LQNew/LWDRL
Actor
false
8,697
[ "MIT" ]
11
0e4fab077a0cfbd27590b840557f4fda033c74ff
https://github.com/LQNew/LWDRL/tree/0e4fab077a0cfbd27590b840557f4fda033c74ff
CircleLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
TxuanYu/Person_reID_baseline_pytorch
CircleLoss
false
14,523
[ "MIT" ]
3,358
10574b17cc8fd1fc8ade88f134679e281fdb01cc
https://github.com/TxuanYu/Person_reID_baseline_pytorch/tree/10574b17cc8fd1fc8ade88f134679e281fdb01cc
NsKlCriterion
import torch import torch.nn.functional as F from torch.nn.modules.loss import _Loss from torch.optim.lr_scheduler import * def stable_kl(logit, target, epsilon=1e-06, reduce=True): logit = logit.view(-1, logit.size(-1)).float() target = target.view(-1, target.size(-1)).float() bs = logit.size(0) p = ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn.functi...
anlewy/mt-dnn
NsKlCriterion
false
14,865
[ "MIT" ]
2,075
eeb6f01ce0630e61a52b8c9c6f7537cd34978e45
https://github.com/anlewy/mt-dnn/tree/eeb6f01ce0630e61a52b8c9c6f7537cd34978e45
LastLevelMaxPool
# 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 from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._...
CV-Rookie/EmbedMask
LastLevelMaxPool
false
5,191
[ "MIT" ]
1
3b4d9fb4e0b6112dc501708184ff684dfb45f3f0
https://github.com/CV-Rookie/EmbedMask/tree/3b4d9fb4e0b6112dc501708184ff684dfb45f3f0
ShakeResNeXt
import math import torch from torch import nn from numpy import int64 as int64 import torch.nn.functional as F from torch.autograd import Variable class ShakeShake(torch.autograd.Function): @staticmethod def forward(ctx, x1, x2, training=True): if training: alpha = torch.FloatTensor(x1.si...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import math from torch import...
cdtalley/AutoML
ShakeResNeXt
false
6,406
[ "MIT" ]
1
918cda6bb1bd55b4ca974bdcdd59e32b2e28399d
https://github.com/cdtalley/AutoML/tree/918cda6bb1bd55b4ca974bdcdd59e32b2e28399d
self_conv
# 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....
GakkiChen/TWB-Net
self_conv
false
2,281
[ "MIT" ]
0
bb4917c697c09585bb3fe163a8b429b6dd250f18
https://github.com/GakkiChen/TWB-Net/tree/bb4917c697c09585bb3fe163a8b429b6dd250f18
BiAttention
# 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....
zhanwenchen/Scene-Graph-Benchmark.pytorch
BiAttention
false
4,666
[ "MIT" ]
0
c86475bcbdaefcc1656a2890194355c2b32aa694
https://github.com/zhanwenchen/Scene-Graph-Benchmark.pytorch/tree/c86475bcbdaefcc1656a2890194355c2b32aa694
Attention
# 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....
YinTaiChen/NeuralBabyTalk
Attention
false
14,693
[ "MIT" ]
554
2915ca702657866dc5b6b44614d0f6333c72bd3b
https://github.com/YinTaiChen/NeuralBabyTalk/tree/2915ca702657866dc5b6b44614d0f6333c72bd3b
CenterNessNet
# 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....
ZCDu/CenternessNet
CenterNessNet
false
9,685
[ "MIT" ]
0
03f5d01999a4e1595eaceef9f62b4450ed017843
https://github.com/ZCDu/CenternessNet/tree/03f5d01999a4e1595eaceef9f62b4450ed017843
MultiHeadAttention
import torch import torch.nn as nn class MultiHeadAttention(nn.Module): def __init__(self, num_q_channels: 'int', num_kv_channels: 'int', num_heads: 'int', dropout: 'float'): super().__init__() self.attention = nn.MultiheadAttention(embed_dim=num_q_channels, num_heads=num_head...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
krasserm/perceiver-io
MultiHeadAttention
false
15,853
[ "Apache-2.0" ]
133
16e1029300304b617c0b0ae8eb06129ec103c755
https://github.com/krasserm/perceiver-io/tree/16e1029300304b617c0b0ae8eb06129ec103c755
SLinear
# 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 assert_size_stride = torch._C._dynamo.guards.a...
sergkuzn148/stg
SLinear
false
16,386
[ "MIT" ]
96
84d9f53ae3665c423836a4d0176dc3b22de62b19
https://github.com/sergkuzn148/stg/tree/84d9f53ae3665c423836a4d0176dc3b22de62b19
DistanceNetwork
import torch import torch.nn as nn class DistanceNetwork(nn.Module): def __init__(self): super(DistanceNetwork, self).__init__() def forward(self, support_set, input_image): """ Produces pdfs over the support set classes for the target set image. :param support_set: The embed...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
stamatiad/MatchingNetworks
DistanceNetwork
false
16,495
[ "MIT" ]
316
07c4567c15578664a550903c222c7eaa2abfe113
https://github.com/stamatiad/MatchingNetworks/tree/07c4567c15578664a550903c222c7eaa2abfe113
down
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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Thomasedv/AI_Interpolation
down
false
5,885
[ "MIT" ]
1
cee51d92185a43a60797785554ee1ae924e5da0d
https://github.com/Thomasedv/AI_Interpolation/tree/cee51d92185a43a60797785554ee1ae924e5da0d
WassersteinDiscriminatorLoss
# 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.autograd import torch.utils.data assert_size_stride = ...
kayuksel/torchgan
WassersteinDiscriminatorLoss
false
10,554
[ "MIT" ]
0
739d97cef4c49fb80155de84e609471efafab107
https://github.com/kayuksel/torchgan/tree/739d97cef4c49fb80155de84e609471efafab107
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....
Maxi-0902/DRAN
MultiHeadAttention
false
862
[ "MIT" ]
0
c3dbfcbc018446544150dc4e151442d6a9fcd4d9
https://github.com/Maxi-0902/DRAN/tree/c3dbfcbc018446544150dc4e151442d6a9fcd4d9
GlobalAvgPool2dResNext
# 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 torchvision import datasets as datasets import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data.distr...
Alibaba-MIIL/ZS_SDL
GlobalAvgPool2dResNext
false
7,988
[ "MIT" ]
20
769fe4f57d2d458a7c4b5468a6395c9b296b1dad
https://github.com/Alibaba-MIIL/ZS_SDL/tree/769fe4f57d2d458a7c4b5468a6395c9b296b1dad
StableLayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_...
ryok/nuwa-pytorch
StableLayerNorm
false
10,747
[ "MIT" ]
0
6bde90ee6d87bdce8c9aa52c6bbb2ad15a1f5f54
https://github.com/ryok/nuwa-pytorch/tree/6bde90ee6d87bdce8c9aa52c6bbb2ad15a1f5f54
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....
MartrixG/transformer
SelfAttention
false
829
[ "MIT" ]
0
8cd1e31d11aff6059fad28d4cfe27e936d611c8c
https://github.com/MartrixG/transformer/tree/8cd1e31d11aff6059fad28d4cfe27e936d611c8c
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....
Guaguago/Persona-Dialogue-Generation
TransformerEncoderLayer
false
13,736
[ "MIT" ]
258
0d4526ec8eddff62751a70666e14d72103906f44
https://github.com/Guaguago/Persona-Dialogue-Generation/tree/0d4526ec8eddff62751a70666e14d72103906f44
Model
# 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...
y-kamiya/devnet
Model
false
4,602
[ "MIT" ]
0
f9562c97e1025949b48d433bd9f2114e56ac67e4
https://github.com/y-kamiya/devnet/tree/f9562c97e1025949b48d433bd9f2114e56ac67e4
TFSamepaddingLayer
import torch import torch.utils.data import torch.multiprocessing import torch.nn as nn import torch.nn.functional as F class TFSamepaddingLayer(nn.Module): """To align with tf `same` padding. Putting this before any conv layer that need padding Assuming kernel has Height == Width for simplicity ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch.multiprocessing import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride e...
essential2189/Cell-Based-Model
TFSamepaddingLayer
false
3,474
[ "MIT" ]
0
f01c3fcb45e69baa4dc8216b8b5a092f56cfa38e
https://github.com/essential2189/Cell-Based-Model/tree/f01c3fcb45e69baa4dc8216b8b5a092f56cfa38e
DenseSAGEConv
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import math from torch.nn imp...
HenrryBryant/pytorch_geometric
DenseSAGEConv
false
5,307
[ "MIT" ]
1
3c4466a3f38a2eba92073c730a09953ab5082c3d
https://github.com/HenrryBryant/pytorch_geometric/tree/3c4466a3f38a2eba92073c730a09953ab5082c3d
IMDModule_speed
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.model_zoo assert_size_stride = torch._C...
Liang-ZX/EDSR-PyTorch
IMDModule_speed
false
785
[ "MIT" ]
0
a245d02fa1c3d799402aeadf7320f1c8a116e86a
https://github.com/Liang-ZX/EDSR-PyTorch/tree/a245d02fa1c3d799402aeadf7320f1c8a116e86a
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 math import ...
Sense-GVT/BigPretrain
FeedForward
false
17,917
[ "Apache-2.0" ]
8
d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e
https://github.com/Sense-GVT/BigPretrain/tree/d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e
PANNsLoss
# 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...
botkop/lark
PANNsLoss
false
1,574
[ "Apache-2.0" ]
0
edb2defdb514213fc121418578b0d9006a55f3a0
https://github.com/botkop/lark/tree/edb2defdb514213fc121418578b0d9006a55f3a0
LayerScale_Block
import torch import torch.nn as nn def drop_path(x, drop_prob: 'float'=0.0, training: 'bool'=False): if drop_prob == 0.0 or not training: return x keep_prob = 1 - drop_prob shape = (x.shape[0],) + (1,) * (x.ndim - 1) random_tensor = keep_prob + torch.rand(shape, dtype=x.dtype, device=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....
WangFeng18/deit
LayerScale_Block
false
11,980
[ "Apache-2.0" ]
0
62a2c54faf683af8316fbec2e99f666879949cb4
https://github.com/WangFeng18/deit/tree/62a2c54faf683af8316fbec2e99f666879949cb4
ConvBlock
import torch import torch.nn as nn class ConvBlock(nn.Module): def __init__(self, in_channels, out_channels, groups=3): super(ConvBlock, self).__init__() self.in_channels = in_channels self.out_channels = out_channels self.groups = groups def wn(x): return tor...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
wwjfsfs/wwjyyds
ConvBlock
false
13,124
[ "MIT" ]
0
80cd6267fde7cd98838078a0d5178a557ceb7414
https://github.com/wwjfsfs/wwjyyds/tree/80cd6267fde7cd98838078a0d5178a557ceb7414
Conv2dZeros
import torch import torch.nn as nn class _ActNorm(nn.Module): """ Activation Normalization Initialize the bias and scale with a given minibatch, so that the output per-channel have zero mean and unit variance for that. After initialization, `bias` and `logs` will be trained as parameters. """...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
BQZic/glow-pytorch
Conv2dZeros
false
13,383
[ "MIT" ]
479
4b43042326bbe644ccfda3c81a138375321808ed
https://github.com/BQZic/glow-pytorch/tree/4b43042326bbe644ccfda3c81a138375321808ed
Tanh
# 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.nn as nn import torch._utils from torch im...
lovelinability/pytorch_image_models
Tanh
false
7,146
[ "Apache-2.0" ]
1
7c54200f3de7611ab1222a37088eb7f66ae2858f
https://github.com/lovelinability/pytorch_image_models/tree/7c54200f3de7611ab1222a37088eb7f66ae2858f
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 import nn import torch.nn.functional as F import torch.nn.parallel as...
hav4ik/AdelaiDet
GCN
false
3,716
[ "BSD-2-Clause" ]
0
6ed9c1e1a25a3e25dddfa858ce0f219a30593ce2
https://github.com/hav4ik/AdelaiDet/tree/6ed9c1e1a25a3e25dddfa858ce0f219a30593ce2
imq
# 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...
pierreglaser/MMD-gradient-flow
imq
false
10,698
[ "BSD-3-Clause" ]
0
43591137e1d04bed5153887a364fae72621b01ae
https://github.com/pierreglaser/MMD-gradient-flow/tree/43591137e1d04bed5153887a364fae72621b01ae
FullSort
# 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...
hologerry/residual-flows
FullSort
false
10,296
[ "MIT" ]
0
33a3639150490279c2e13238dd6244b80c52adf7
https://github.com/hologerry/residual-flows/tree/33a3639150490279c2e13238dd6244b80c52adf7
CAM_Module
from torch.nn import Module import torch from torch.nn import Parameter from torch.nn import Softmax class CAM_Module(Module): """ Channel attention module""" def __init__(self, in_dim): super(CAM_Module, self).__init__() self.chanel_in = in_dim self.gamma = Parameter(torch.zeros(1)) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
KonarkPaul/COVID_Adv_attack_vulnerability_study
CAM_Module
false
5,456
[ "MIT" ]
1
f0d1256d0d57a933dd86ccd5fe12d83f9f79ca9c
https://github.com/KonarkPaul/COVID_Adv_attack_vulnerability_study/tree/f0d1256d0d57a933dd86ccd5fe12d83f9f79ca9c
GEGLU
import torch import torch.nn.functional as F from torch import nn class GEGLU(nn.Module): def forward(self, x): x, gates = x.chunk(2, dim=-1) return F.gelu(gates) * x def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
idolumbantobing/vit-pytorch
GEGLU
false
15,573
[ "MIT" ]
9,373
eb70d8dca041cc387b3e1f72d965d8814eeab29a
https://github.com/idolumbantobing/vit-pytorch/tree/eb70d8dca041cc387b3e1f72d965d8814eeab29a
ACLoss
# 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...
ELEKTRONN/elektronn3
ACLoss
false
13,593
[ "MIT" ]
124
19c751855dffc67b744cd43e757aa4a5bd577d9b
https://github.com/ELEKTRONN/elektronn3/tree/19c751855dffc67b744cd43e757aa4a5bd577d9b
AttentionMatrix
import torch from torch import nn class AttentionMatrix(nn.Module): """ Attention Matrix (unnormalized) """ def __init__(self, hidden_size): """ Create a module for attention matrices. The input is a pair of matrices, the output is a matrix containing similarity scores between...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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...
abhinonymous/MSMARCO-Question-Answering
AttentionMatrix
false
14,744
[ "MIT" ]
127
bfdd802d20b63322adca23f1da1f6a5931593920
https://github.com/abhinonymous/MSMARCO-Question-Answering/tree/bfdd802d20b63322adca23f1da1f6a5931593920
Mul
import torch class Mul(torch.nn.Module): def __init__(self): super(Mul, self).__init__() def forward(self, x, y): return x * y def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
Akababa/torch2trt
Mul
false
18,409
[ "MIT" ]
2
03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7
PixelNorm
import torch import torch.nn as nn class PixelNorm(nn.Module): def __init__(self, epsilon=1e-08): """ @notice: avoid in-place ops. https://discuss.pytorch.org/t/encounter-the-runtimeerror-one-of-the-variables-needed-for-gradient-computation-has-been-modified-by-an-inplace-operatio...
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_...
Iceland-Leo/StyleGAN2_PyTorch
PixelNorm
false
5,318
[ "MIT" ]
1
3621f5e4ba1c7fde7e2fae1f4700d050656a0b02
https://github.com/Iceland-Leo/StyleGAN2_PyTorch/tree/3621f5e4ba1c7fde7e2fae1f4700d050656a0b02
AvgPoolPadding
# 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...
citelab/fastsync
AvgPoolPadding
false
1,708
[ "Apache-2.0" ]
0
8e2166f87fc53479b57fef536a971c3a2e6e4309
https://github.com/citelab/fastsync/tree/8e2166f87fc53479b57fef536a971c3a2e6e4309
BaseFactorizationMachine
import torch import torch.nn as nn class BaseFactorizationMachine(nn.Module): """Calculate FM result over the embeddings Args: reduce_sum: bool, whether to sum the result, default is True. Input: input_x: tensor, A 3D tensor with shape:``(batch_size,field_size,embed_dim)``. Output ...
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...
BELIEVEfxy/LightSANs
BaseFactorizationMachine
false
7,777
[ "MIT" ]
17
94ce7e59d144dbc787153b8c486cad334790ec6e
https://github.com/BELIEVEfxy/LightSANs/tree/94ce7e59d144dbc787153b8c486cad334790ec6e
Conv1d
import torch import torch.nn as nn import torch.nn.functional as F class Conv1d(nn.Conv1d): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding='same', dilation=1, groups=1, bias=True): super(Conv1d, self).__init__(in_channels=in_channels, out_channels= out_ch...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
gheyret/EfficientConformer
Conv1d
false
15,429
[ "Apache-2.0" ]
101
b28a0aaa3b182f72abaccbeb12df0402adf96097
https://github.com/gheyret/EfficientConformer/tree/b28a0aaa3b182f72abaccbeb12df0402adf96097
MinibatchDiscrimination1d
import torch import torch.nn as nn class MinibatchDiscrimination1d(nn.Module): """1D Minibatch Discrimination Module as proposed in the paper `"Improved Techniques for Training GANs by Salimans et. al." <https://arxiv.org/abs/1805.08318>`_ Allows the Discriminator to easily detect mode collapse by augmen...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
shi-weili/torchgan
MinibatchDiscrimination1d
false
12,974
[ "MIT" ]
0
28ffd4026b8c0db2217b667d30a222d6758bfc41
https://github.com/shi-weili/torchgan/tree/28ffd4026b8c0db2217b667d30a222d6758bfc41
AdaIN2d
import torch import torch.nn as nn class AdaIN2d(nn.Module): def __init__(self, in_channels, in_features): super(AdaIN2d, self).__init__() self.norm = nn.InstanceNorm2d(in_channels, affine=False, track_running_stats=False) self.net = nn.Linear(in_features, 2 * in_channels) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
andrecianflone/wolf
AdaIN2d
false
14,837
[ "Apache-2.0" ]
75
826bbedc58d4d29871110349356868066a3108e6
https://github.com/andrecianflone/wolf/tree/826bbedc58d4d29871110349356868066a3108e6
TVLoss
import torch from torch import nn class TVLoss(nn.Module): """ Total variation loss. """ def __init__(self): super(TVLoss, self).__init__() def forward(self, yhat, y): _bsize, _chan, height, width = y.size() dyh = torch.abs(y[:, :, 1:, :] - y[:, :, :-1, :]) dyhath...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_...
TiagoCortinhal/SR_GAN
TVLoss
false
18,026
[ "MIT" ]
4
9ccceaa25e87e404d20825dbb552fa6a2ef3af47
https://github.com/TiagoCortinhal/SR_GAN/tree/9ccceaa25e87e404d20825dbb552fa6a2ef3af47
AddSubNet
# 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...
fivetran-VitaliyMalkin/server
AddSubNet
false
10,037
[ "BSD-3-Clause" ]
0
643840a61038aa090c37e1544826264925d0b483
https://github.com/fivetran-VitaliyMalkin/server/tree/643840a61038aa090c37e1544826264925d0b483
UniformBatchMiner
import torch import torch.nn as nn import torch.utils.data from typing import Any from typing import Dict from typing import List from typing import Tuple from abc import ABC from abc import abstractmethod class BaseMiner(nn.Module, ABC): def __init__(self, *args: List[Any], **kwargs: Dict[str, Any]): su...
import torch from torch import device import 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 from typing import Any from typing import Dict from typing import Lis...
p768lwy3/torecsys
UniformBatchMiner
false
16,219
[ "MIT" ]
92
2251366268b4fbe6f8c3ab1628fa72a0db043dcd
https://github.com/p768lwy3/torecsys/tree/2251366268b4fbe6f8c3ab1628fa72a0db043dcd
BCELoss2d
# 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...
cmarasinou/carvana-challenge
BCELoss2d
false
15,049
[ "MIT" ]
93
4e1c43f306cfbef1df267acfce59bdcf19504850
https://github.com/cmarasinou/carvana-challenge/tree/4e1c43f306cfbef1df267acfce59bdcf19504850
GeometryFeature
# 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 import torch.optim import torch.utils.data assert_size_stride = torch._C._dynamo.guards.asser...
Anonymous1234321/GuideFormer
GeometryFeature
false
55
[ "MIT" ]
0
cccee1c5305977a1bc8d0b8df3f1b6ff66bd1736
https://github.com/Anonymous1234321/GuideFormer/tree/cccee1c5305977a1bc8d0b8df3f1b6ff66bd1736
GaussianGenerator
# 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 numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dyna...
MichaelArbel/GeneralizedEBM
GaussianGenerator
false
8,560
[ "BSD-3-Clause" ]
40
b2fb244bacef23a7347aecc0e8ff4863153f94f0
https://github.com/MichaelArbel/GeneralizedEBM/tree/b2fb244bacef23a7347aecc0e8ff4863153f94f0
LabelBilinear
# 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 import torch.utils.data assert_size_stride = torch._C._dyna...
FengZiYjun/fastNLP
LabelBilinear
false
5,162
[ "Apache-2.0" ]
1
3ae73ab0a05d1ceef4a5181516891a8057d7f719
https://github.com/FengZiYjun/fastNLP/tree/3ae73ab0a05d1ceef4a5181516891a8057d7f719
PositiveLinear
# 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, math as tl_math fr...
DavidRuhe/simple-variational-diffusion-models
PositiveLinear
false
17,225
[ "MIT" ]
4
a32355bf052a8f08e9c1919080588d0b22c8de4e
https://github.com/DavidRuhe/simple-variational-diffusion-models/tree/a32355bf052a8f08e9c1919080588d0b22c8de4e
ActNorm2D
import torch import torch.nn as nn import torch.utils.data from torch.nn import Parameter class ActNorm2D(nn.Module): def __init__(self, num_channels, eps=1e-05): super(ActNorm2D, self).__init__() self.eps = eps self.num_channels = num_channels self._log_scale = Parameter(torch.Te...
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 import torch.utils.data from torch.nn import Parame...
XinZhang525/fGAIL
ActNorm2D
false
18,134
[ "MIT" ]
4
682d70286685612558e072d9a1668779b8ae325b
https://github.com/XinZhang525/fGAIL/tree/682d70286685612558e072d9a1668779b8ae325b
CustomGroupNorm
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
vuamitom/shapenet
CustomGroupNorm
false
4,507
[ "BSD-2-Clause" ]
0
9eb3dadc91801756cb3460707c37146c8176643e
https://github.com/vuamitom/shapenet/tree/9eb3dadc91801756cb3460707c37146c8176643e
ShapePriorLoss
import torch import torch.nn as nn import torch.cuda.comm class ShapePriorLoss(nn.Module): """Prior loss for body shape parameters. Args: reduction (str, optional): The method that reduces the loss to a scalar. Options are "none", "mean" and "sum". loss_weight (float, optional): 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 import triton_helpers import torch.nn as nn import torch.cuda.comm assert_size_stride = torch._C._dynamo.guards...
JasonBoy1/mmhuman3d
ShapePriorLoss
false
5,373
[ "Apache-2.0" ]
1
79b2665191115f3ed905e6afdf09990a8d484362
https://github.com/JasonBoy1/mmhuman3d/tree/79b2665191115f3ed905e6afdf09990a8d484362
FC2LayersShortcut
# 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 ...
ZhiangChen/vca
FC2LayersShortcut
false
1,316
[ "MIT" ]
0
22b7568ac1894a56e7e64443565f7e44e096d778
https://github.com/ZhiangChen/vca/tree/22b7568ac1894a56e7e64443565f7e44e096d778
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.nn import Module i...
jarvis08/gpackage-gcn-torch
GCN
false
12,634
[ "MIT" ]
0
5e483ea3012dfd0f23b194519c1295e3efcbdc35
https://github.com/jarvis08/gpackage-gcn-torch/tree/5e483ea3012dfd0f23b194519c1295e3efcbdc35
DDPG
import torch from torch import nn from torch.nn import functional as F class Value_Net(nn.Module): def __init__(self, observation_dim, action_dim): super(Value_Net, self).__init__() self.fc1 = nn.Linear(observation_dim + action_dim, 256) self.fc2 = nn.Linear(256, 256) self.fc3 = 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....
BLUECARVIN/RL_baseline
DDPG
false
130
[ "MIT" ]
0
436538f49ee505e14672a67ba3c1f60886cbbea8
https://github.com/BLUECARVIN/RL_baseline/tree/436538f49ee505e14672a67ba3c1f60886cbbea8
Attention
# 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....
choderalab/pisco
Attention
false
6,446
[ "MIT" ]
1
dccb36edf49960929cfb823f885d38cb84d444d1
https://github.com/choderalab/pisco/tree/dccb36edf49960929cfb823f885d38cb84d444d1