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
CausalConv1d
import torch import torch.nn as nn import torch.utils.data import torch class CausalConv1d(nn.Module): """A 1D causal convolution layer. Input: (B, D_in, T), where B is the minibatch size, D_in is the number of dimensions per step, and T is the number of steps. Output: (B, D_out, T), where B is t...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data import torch assert_size_stride = ...
sagelywizard/snail
CausalConv1d
false
16,350
[ "MIT" ]
100
1c64787aa970c82f65c3c9d253531d1c2b1bee08
https://github.com/sagelywizard/snail/tree/1c64787aa970c82f65c3c9d253531d1c2b1bee08
SpatialAttentionGate
import torch import torch.nn.functional as F import torch.nn as nn class SpatialAttentionGate(nn.Module): def __init__(self, channel, reduction=16): super(SpatialAttentionGate, self).__init__() self.fc1 = nn.Conv2d(channel, reduction, kernel_size=1, padding=0) self.fc2 = nn.Conv2d(reducti...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
lawwu/nni
SpatialAttentionGate
false
10,606
[ "MIT" ]
0
b869dd48dfe36392e7b78c70ea35eb6d4b4779dc
https://github.com/lawwu/nni/tree/b869dd48dfe36392e7b78c70ea35eb6d4b4779dc
LeakyReLU
# 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...
altescy/xtorch
LeakyReLU
false
9,708
[ "MIT" ]
0
bcbbbe645f4d62c211af5b3555c526cc60792c32
https://github.com/altescy/xtorch/tree/bcbbbe645f4d62c211af5b3555c526cc60792c32
ShakeResNeXt
# 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...
ang421/dda
ShakeResNeXt
false
9,913
[ "MIT" ]
0
391ad696ec8479ce41a0d7d6bfbfae06edaddf67
https://github.com/ang421/dda/tree/391ad696ec8479ce41a0d7d6bfbfae06edaddf67
Block
import torch import torch.nn as nn import torch.nn.functional as F import torch._C import torch.serialization class LayerNorm(nn.Module): """ LayerNorm that supports two data formats: channels_last (default) or channels_first. The ordering of the dimensions in the inputs. channels_last corresponds to 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.triton_helpers import libdevice import torch.nn as ...
CarnoZhao/mmsegmentation
Block
false
7,855
[ "Apache-2.0" ]
18
bdaf3d93c4d33c3f0c15f95879fdd7ab78290c1c
https://github.com/CarnoZhao/mmsegmentation/tree/bdaf3d93c4d33c3f0c15f95879fdd7ab78290c1c
SinusoidPositionalEmbedding
import torch import torch.nn as nn class SinusoidPositionalEmbedding(nn.Module): def forward(self, x): seq_len, n_model = x[0].shape pos = x.new_tensor(range(seq_len)).unsqueeze(-1) / 10000 ** (x. new_tensor(range(n_model)) // 2 * 2 / n_model) pos[:, 0::2], pos[:, 1::2] = pos[...
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...
yzhangcs/parser
SinusoidPositionalEmbedding
false
16,789
[ "MIT" ]
439
3abebde1c9fe0bf2e99adce845aaf2a04b194f8a
https://github.com/yzhangcs/parser/tree/3abebde1c9fe0bf2e99adce845aaf2a04b194f8a
NN_softmax
import torch from torch import nn import torch.nn.functional as F class NN_logsoftmax(nn.Module): """Build a new class for the network you want to run, returning log softmax""" def set_parameters(self, initializers): """Set the parameter values obtained from vanilla NN as initializers""" ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
laravomfell/tvd_loss
NN_softmax
false
7,076
[ "MIT" ]
1
b30a925f95985a03ff70bfa40a6ec3662432779d
https://github.com/laravomfell/tvd_loss/tree/b30a925f95985a03ff70bfa40a6ec3662432779d
GlobalMaxPooling
# 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...
numb3r33/toxic_comments_classification
GlobalMaxPooling
false
10,596
[ "MIT" ]
0
c5de56751aee29b6dee6e330237a4fd0bcd7fd51
https://github.com/numb3r33/toxic_comments_classification/tree/c5de56751aee29b6dee6e330237a4fd0bcd7fd51
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....
FrankVerhoef/Persona-Dialogue-Generation
TransformerEncoderLayer
false
5,186
[ "MIT" ]
1
ffd8413c2e8b6446097902dd1c496aeb24b852b4
https://github.com/FrankVerhoef/Persona-Dialogue-Generation/tree/ffd8413c2e8b6446097902dd1c496aeb24b852b4
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....
marcinwitkowski/icefall
TransformerEncoderLayer
false
10,499
[ "Apache-2.0" ]
0
73e917f689fa2ebfcfe5d484a34a262e74b77581
https://github.com/marcinwitkowski/icefall/tree/73e917f689fa2ebfcfe5d484a34a262e74b77581
LayerNorm
import torch import torch.nn as nn class LayerNorm(nn.Module): """Construct a layernorm module in the OpenAI style (epsilon inside the square root).""" def __init__(self, n_state, e=1e-05): super(LayerNorm, self).__init__() self.g = nn.Parameter(torch.ones(n_state)) self.b = nn.Parame...
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_...
NickSchoelkopf/SummerTime
LayerNorm
false
891
[ "Apache-2.0" ]
0
9a89aab8e1544e3c52c043b9c47ab325e665e11e
https://github.com/NickSchoelkopf/SummerTime/tree/9a89aab8e1544e3c52c043b9c47ab325e665e11e
GlobalPooling2D
import torch from torch import nn from typing import * class GlobalPooling2D(nn.Module): def __init__(self): super(GlobalPooling2D, self).__init__() def forward(self, x): x = x.view(x.size(0), x.size(1), -1) x = torch.mean(x, 2) x = x.view(x.size(0), -1) return x de...
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 from typing import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dyn...
HughMun/MultiBench
GlobalPooling2D
false
13,797
[ "MIT" ]
148
d5712a0815a9486b0e0c76b54cd63c880188fc8e
https://github.com/HughMun/MultiBench/tree/d5712a0815a9486b0e0c76b54cd63c880188fc8e
ComplexConvTranspose2d
# 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.nn import Module from torch.nn import ConvTranspose2d assert_size_str...
drydenwiebe/complexPyTorch
ComplexConvTranspose2d
false
12,328
[ "MIT" ]
0
cea88ba7ee5692dfa1b40f0ba609ef14160d5073
https://github.com/drydenwiebe/complexPyTorch/tree/cea88ba7ee5692dfa1b40f0ba609ef14160d5073
FeatureMatchingLoss
# 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.utils.data import torch from torch import nn assert_size_str...
alexander-telepov/RGB2MSI
FeatureMatchingLoss
false
6,164
[ "BSD-3-Clause" ]
1
99f81f5547d40d0c92cfde39994a8c53629bd0f7
https://github.com/alexander-telepov/RGB2MSI/tree/99f81f5547d40d0c92cfde39994a8c53629bd0f7
ScaledDotProductAttention
import torch import torch.optim.lr_scheduler import torch.nn as nn class ScaledDotProductAttention(nn.Module): def __init__(self, d_model, attention_dropout=0.1): super(ScaledDotProductAttention, self).__init__() self.temper = d_model ** 0.5 self.dropout = nn.Dropout(attention_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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
interrogator/self-attentive-parser
ScaledDotProductAttention
false
15,593
[ "MIT" ]
88
660d0161cb6ec6455d1525d029ff09362dcf7faf
https://github.com/interrogator/self-attentive-parser/tree/660d0161cb6ec6455d1525d029ff09362dcf7faf
BoundNot
from _paritybench_helpers import _mock_config import math import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from torch.nn import MSELoss def isnan(x): if isinstance(x, Patches): return False return torch.isnan(x).any() class Perturbation: def __init__(self): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import numpy as np import torch.nn as nn import torch.nn.functional as F assert_size_stride = torch._C._dynamo.guards.assert_siz...
mnmueller/auto_LiRPA
BoundNot
false
7,281
[ "BSD-3-Clause" ]
1
55cb270b0b99f07b74541d55706c69fbb9daff66
https://github.com/mnmueller/auto_LiRPA/tree/55cb270b0b99f07b74541d55706c69fbb9daff66
MLP
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
f2010126/DL_Labs
MLP
false
3,484
[ "BSD-3-Clause" ]
0
ee81d8aa6027846fc32c98feb9079211c59aa0e9
https://github.com/f2010126/DL_Labs/tree/ee81d8aa6027846fc32c98feb9079211c59aa0e9
DotProd
# 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...
mrernst/rl_robotics_research
DotProd
false
10,612
[ "MIT" ]
0
0bc446cfb69591cb4ee3ce8d39815c463090a5f6
https://github.com/mrernst/rl_robotics_research/tree/0bc446cfb69591cb4ee3ce8d39815c463090a5f6
ViTStemPatchify
# 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.nn import Module import torch.nn as nn import torch.utils.data assert...
MAC-AutoML/XCompression
ViTStemPatchify
false
5,567
[ "MIT" ]
1
9f76eb3ccfb3057110ecf12aa48dec00a4667a25
https://github.com/MAC-AutoML/XCompression/tree/9f76eb3ccfb3057110ecf12aa48dec00a4667a25
BertPooler
# 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...
Adoni/pytorch-pretrained-BERT
BertPooler
false
3,485
[ "Apache-2.0" ]
0
845c33f00e933626dcfc96e0923ecf034295ef75
https://github.com/Adoni/pytorch-pretrained-BERT/tree/845c33f00e933626dcfc96e0923ecf034295ef75
DilatedBasicBlock
# 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....
Galaxies99/alpha-protein
DilatedBasicBlock
false
17,319
[ "MIT" ]
4
db4b77ab48d5905ade5d4a66004f8387773718fa
https://github.com/Galaxies99/alpha-protein/tree/db4b77ab48d5905ade5d4a66004f8387773718fa
GumbelSoftmax
import torch import torch.utils.data from torch import nn from torch.nn import functional as F class GumbelSoftmax(nn.Module): def __init__(self, f_dim, c_dim): super(GumbelSoftmax, self).__init__() self.logits = nn.Linear(f_dim, c_dim) self.f_dim = f_dim self.c_dim = c_dim d...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Kaya176/GMVAE
GumbelSoftmax
false
9,252
[ "MIT" ]
0
6369be52dbac796e2f836f51b16aaa5c61247350
https://github.com/Kaya176/GMVAE/tree/6369be52dbac796e2f836f51b16aaa5c61247350
CausalConv2d
import torch import torch.utils.data import torch from torch import nn class WNConv2d(nn.Module): def __init__(self, in_channel, out_channel, kernel_size, stride=1, padding=0, bias=True, activation=None): super().__init__() self.conv = nn.utils.weight_norm(nn.Conv2d(in_channel, out_channe...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.utils....
KouheiFurukawa/vq-vae-2-pytorch
CausalConv2d
false
9,296
[ "MIT" ]
0
ad8a4d8409c2e99e1db790a0e215b346b56b1e1f
https://github.com/KouheiFurukawa/vq-vae-2-pytorch/tree/ad8a4d8409c2e99e1db790a0e215b346b56b1e1f
ResidualBlock
import torch import torch.utils.data from torch import nn class ResidualBlock(nn.Module): def __init__(self, in_channels, hidden, out_channels): super().__init__() self.conv1 = nn.Conv2d(in_channels=in_channels, out_channels=hidden, kernel_size=3, stride=1, padding=1) self.rel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 from ...
YigitGunduc/self-driving-car
ResidualBlock
false
2,978
[ "MIT" ]
0
2be31f6473c911cf004236ce0874cb2da8fe8ad1
https://github.com/YigitGunduc/self-driving-car/tree/2be31f6473c911cf004236ce0874cb2da8fe8ad1
BiInteractionPooling
# 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 sklearn.metrics import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = tor...
Fanxingye/DeepRS
BiInteractionPooling
false
13,836
[ "Apache-2.0" ]
1,770
06b98cf2cb2781656805eafc577fbd088f37d17d
https://github.com/Fanxingye/DeepRS/tree/06b98cf2cb2781656805eafc577fbd088f37d17d
DWT
# 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.fft assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo...
directgroup/direct
DWT
false
15,187
[ "Apache-2.0" ]
55
78cdd530b3c93e31c11d8963880e6329f0989243
https://github.com/directgroup/direct/tree/78cdd530b3c93e31c11d8963880e6329f0989243
RelativeThreshold_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.triton_helpers import math as tl_math import torch.nn as nn import torch.nn.init assert_size_stride = torch._C....
andry900/NN-Project
RelativeThreshold_RegLoss
false
1,453
[ "MIT" ]
0
e04a83029f5990d9b65216ab0648a8826a8ebca7
https://github.com/andry900/NN-Project/tree/e04a83029f5990d9b65216ab0648a8826a8ebca7
Beta2
import torch import numpy as np import torch.nn as nn class BoundedBeta(torch.distributions.Beta): def log_prob(self, x): return super().log_prob((x + 1) / 2) class Beta2(nn.Module): def __init__(self, action_dim, init_std=0.25, learn_std=False): super(Beta2, self).__init__() asser...
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 numpy as np import torch.nn as nn assert_size_stride = torch._C._d...
RohanPankaj/apex
Beta2
false
998
[ "MIT" ]
0
74e96386bf9446d1179106d6d65ea0368c1b5b27
https://github.com/RohanPankaj/apex/tree/74e96386bf9446d1179106d6d65ea0368c1b5b27
ConvLayer
# 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 math as tl_math from typing import * i...
code-backdoor/code-backdoor
ConvLayer
false
15,055
[ "MIT" ]
71
1eeb3d79aa8a54c8f08e8d0156b569de5edd974e
https://github.com/code-backdoor/code-backdoor/tree/1eeb3d79aa8a54c8f08e8d0156b569de5edd974e
SeqFC1
import torch import torch.nn as nn import torch.nn.functional as F class SeqFC1(nn.Module): """ Neural network definition """ def __init__(self, size): super(SeqFC1, self).__init__() self.size = size self.fc1 = nn.Linear(in_features=self.size, out_features=16) self.fc2 = 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 import torch.nn as nn assert_...
Thibaud-Ardoin/Dial-a-Ride
SeqFC1
false
5,873
[ "MIT" ]
1
7d9b3cd904d3194dccad31fec2533e2cf58cad0c
https://github.com/Thibaud-Ardoin/Dial-a-Ride/tree/7d9b3cd904d3194dccad31fec2533e2cf58cad0c
DQN_mlp
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
CoAxLab/azad
DQN_mlp
false
17,194
[ "MIT" ]
6
d1498069dd8856e93ae077b34dd7c9f1c7ce80e6
https://github.com/CoAxLab/azad/tree/d1498069dd8856e93ae077b34dd7c9f1c7ce80e6
MultiheadAttention
import math import torch import torch.nn as nn import torch as t class MultiheadAttention(nn.Module): """ Multihead attention mechanism (dot attention) """ def __init__(self, num_hidden_k): """ :param num_hidden_k: dimension of hidden """ super(MultiheadAttention, sel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
Munna-Manoj/Team7_TTS
MultiheadAttention
false
11,733
[ "MIT" ]
0
5e2d473a2afe429023876bcc51c2ac966a4938b8
https://github.com/Munna-Manoj/Team7_TTS/tree/5e2d473a2afe429023876bcc51c2ac966a4938b8
SVM
# 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...
XIAOYEJIAYOU/GSAN
SVM
false
18,076
[ "MIT" ]
6
8ca4fdf4c3d615af9cc10e1f9f22ceb7e27fe196
https://github.com/XIAOYEJIAYOU/GSAN/tree/8ca4fdf4c3d615af9cc10e1f9f22ceb7e27fe196
GroupedLinearLayer
import torch from torch import nn import torch.utils.checkpoint class GroupedLinearLayer(nn.Module): def __init__(self, input_size, output_size, num_groups): super().__init__() self.input_size = input_size self.output_size = output_size self.num_groups = num_groups self.gr...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.utils.checkpoint assert_size_stride = torch._C...
Clemens123/transformers
GroupedLinearLayer
false
11,498
[ "Apache-2.0" ]
0
22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
https://github.com/Clemens123/transformers/tree/22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
Policy
# 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....
caimingxue/Reinforcement-Learning
Policy
false
6,376
[ "MIT" ]
1
5ccb8a6a25b41526f4d6195e69964245abc46d38
https://github.com/caimingxue/Reinforcement-Learning/tree/5ccb8a6a25b41526f4d6195e69964245abc46d38
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....
Hcnaeg/DI-engine
MultiHeadAttention
false
2,402
[ "Apache-2.0" ]
0
aba0c629f87649854091e9e59d948f83962e3e1e
https://github.com/Hcnaeg/DI-engine/tree/aba0c629f87649854091e9e59d948f83962e3e1e
MAB
# 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....
OpenXAIProject/dac
MAB
false
8,647
[ "MIT" ]
17
652776e21b56dcb68839363bb077d5c5ea28d81e
https://github.com/OpenXAIProject/dac/tree/652776e21b56dcb68839363bb077d5c5ea28d81e
UpBlock
# 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 torchvision.transforms import * assert_size_stride = torch._C._dynamo.guard...
EvgeneyZ/RBPN
UpBlock
false
9,561
[ "MIT" ]
0
acfe636cc48a4fbfea78f934a251c32e53367659
https://github.com/EvgeneyZ/RBPN/tree/acfe636cc48a4fbfea78f934a251c32e53367659
Scaled_Dot_Product_Attention
import torch import torch.nn as nn import torch.nn.functional as F class Scaled_Dot_Product_Attention(nn.Module): """Scaled Dot-Product Attention """ def __init__(self): super(Scaled_Dot_Product_Attention, self).__init__() def forward(self, Q, K, V, scale=None): """ Args: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
tianjiansmile/Chinese-Text-Classification-Pytorch
Scaled_Dot_Product_Attention
false
10,875
[ "MIT" ]
0
05cc211b161f61e6bb32ab185dadcffec2f5b5de
https://github.com/tianjiansmile/Chinese-Text-Classification-Pytorch/tree/05cc211b161f61e6bb32ab185dadcffec2f5b5de
ZeroCenter
# 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 @triton.jit def triton_per_fused_mean_sub_0(in_ptr0,...
vinnamkim/segmentation_models.pytorch
ZeroCenter
false
4,486
[ "MIT" ]
0
f967ded34df6fb536e8e8cba9b6491ae63b939f5
https://github.com/vinnamkim/segmentation_models.pytorch/tree/f967ded34df6fb536e8e8cba9b6491ae63b939f5
VAE
import torch import torch.utils.data import torch.nn as nn import torch.nn.functional as F class Decoder(nn.Module): """ VAE decoder """ def __init__(self, img_channels, latent_size): super(Decoder, self).__init__() self.latent_size = latent_size self.img_channels = img_channels ...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from...
susanwe/world-models
VAE
false
10,907
[ "MIT" ]
0
0f246a430683e6ab741726df0a97f35830044356
https://github.com/susanwe/world-models/tree/0f246a430683e6ab741726df0a97f35830044356
Scaled_Dot_Product_Attention
# 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....
Ch4ndelier/Transformer_Zero_Velocity_classification
Scaled_Dot_Product_Attention
false
17,076
[ "MIT" ]
6
857efb66189c503e983c11bd7dde16ad19c51ada
https://github.com/Ch4ndelier/Transformer_Zero_Velocity_classification/tree/857efb66189c503e983c11bd7dde16ad19c51ada
PolicyNet
# 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_...
Alfo5123/ConcreteDropout
PolicyNet
false
16,878
[ "MIT" ]
7
c442871553e20a2de078c0fbac7fa52302d50abf
https://github.com/Alfo5123/ConcreteDropout/tree/c442871553e20a2de078c0fbac7fa52302d50abf
M1Criterion
import torch import torch.nn as nn import torch.nn.functional as F class M1Criterion(nn.Module): def __init__(self, x_sigma=1, bce_reconstruction=True): super(M1Criterion, self).__init__() self.x_sigma = x_sigma self.bce_reconstruction = bce_reconstruction def forward(self, x, x_reco...
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...
PaperCodeSubmission/ICML2020-697
M1Criterion
false
8,658
[ "MIT" ]
12
00f7732c236b9c6234e76a47dfebe5de314d5c01
https://github.com/PaperCodeSubmission/ICML2020-697/tree/00f7732c236b9c6234e76a47dfebe5de314d5c01
Rot180
import torch import torch.nn as nn def rot180(input: 'torch.Tensor') ->torch.Tensor: """Rotate a tensor image or a batch of tensor images 180 degrees. Input must be a tensor of shape (C, H, W) or a batch of tensors :math:`(*, C, H, W)`. Args: input (torch.Tensor): input tensor Returns: ...
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...
IEM-Computer-Vision/kornia
Rot180
false
9,255
[ "ECL-2.0", "Apache-2.0" ]
0
f98bd9a2158a6e59cda076d55d476acf13f4e0af
https://github.com/IEM-Computer-Vision/kornia/tree/f98bd9a2158a6e59cda076d55d476acf13f4e0af
ConfidentMSELoss
from torch.nn import Module import torch class ConfidentMSELoss(Module): def __init__(self, threshold=0.96): self.threshold = threshold super().__init__() def forward(self, input, target): n = input.size(0) conf_mask = torch.gt(target, self.threshold).float() input_fl...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch.nn import Module assert_size_stride = torch._C._dynamo.guards.assert_size_stri...
neuropoly/medicaltorch
ConfidentMSELoss
false
7,327
[ "Apache-2.0" ]
1
ac129fe894cb1906285dfe380ba4f0aa3bdec787
https://github.com/neuropoly/medicaltorch/tree/ac129fe894cb1906285dfe380ba4f0aa3bdec787
rec_attention
from _paritybench_helpers import _mock_config import torch import torch.nn as nn def batch_product(iput, mat2): result = None for i in range(iput.size()[0]): op = torch.mm(iput[i], mat2) op = op.unsqueeze(0) if result is None: result = op else: result = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
Luma-1994/lama
rec_attention
false
14,405
[ "MIT" ]
137
60d802e2e4cce789f03eea11b038212ba5f7fd1b
https://github.com/Luma-1994/lama/tree/60d802e2e4cce789f03eea11b038212ba5f7fd1b
Conv3x3
import torch import torch.nn as nn class Conv3x3(nn.Module): """Layer to pad and convolve input """ def __init__(self, in_channels, out_channels, use_refl=True): super(Conv3x3, self).__init__() if use_refl: self.pad = nn.ReflectionPad2d(1) else: self.pad = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
aliasghar53/packnet-sfm
Conv3x3
false
9,778
[ "MIT" ]
0
d07dcbf026194b618a2bd9fc05b599563611f9a3
https://github.com/aliasghar53/packnet-sfm/tree/d07dcbf026194b618a2bd9fc05b599563611f9a3
AconC
import torch import torch.nn as nn class AconC(nn.Module): """ ACON activation (activate or not). # AconC: (p1*x-p2*x) * sigmoid(beta*(p1*x-p2*x)) + p2*x, beta is a learnable parameter # according to "Activate or Not: Learning Customized Activation" <https://arxiv.org/pdf/2009.04759.pdf>. """ 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.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
nmaac/acon
AconC
false
16,178
[ "MIT" ]
163
99fd67928a6ffb0543b54614303caada96c756f5
https://github.com/nmaac/acon/tree/99fd67928a6ffb0543b54614303caada96c756f5
OfstMapL1Loss
import torch import torch.nn as nn class OfstMapL1Loss(nn.Module): def __init__(self, eps=1e-05): super().__init__() self.eps = eps def forward(self, rgb_labels, pred, gt, normalize=True, reduce=True): wgt = (rgb_labels > 1e-08).float() bs, n_kpts, c, h, w = pred.size() ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
StannisZhou/FFB6D
OfstMapL1Loss
false
11,898
[ "MIT" ]
0
5e7534805cd2e397427886d9a2a8ecfbb4f6cdfe
https://github.com/StannisZhou/FFB6D/tree/5e7534805cd2e397427886d9a2a8ecfbb4f6cdfe
ConvSwishInplace
import torch from torch import nn import torch.cuda import torch.backends.cudnn import torch.backends.mkl import torch.backends.cuda import torch.backends.quantized class ConvSwishInplace(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, image_size): super(ConvSwishInplace, self).__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 from torch import nn import torch.cuda import torch.backends.cudnn import torch....
Observer007/intel-extension-for-pytorch
ConvSwishInplace
false
5,662
[ "Apache-2.0" ]
1
f8ab25c305c89d5aaf06190a4fec0727aeb4dcd7
https://github.com/Observer007/intel-extension-for-pytorch/tree/f8ab25c305c89d5aaf06190a4fec0727aeb4dcd7
DiceLoss
import functools import torch import numpy as np import torch.nn as nn import torch.nn.functional as F import torch._C import torch.serialization def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import functools impor...
CarnoZhao/mmsegmentation
DiceLoss
false
7,860
[ "Apache-2.0" ]
18
bdaf3d93c4d33c3f0c15f95879fdd7ab78290c1c
https://github.com/CarnoZhao/mmsegmentation/tree/bdaf3d93c4d33c3f0c15f95879fdd7ab78290c1c
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....
xu94-nlp/Code-for-MAMO
Attention
false
11,029
[ "Apache-2.0" ]
0
d9c6655e0660976c90c07fa096a1f5dc8328a60b
https://github.com/xu94-nlp/Code-for-MAMO/tree/d9c6655e0660976c90c07fa096a1f5dc8328a60b
AveragePooling
# 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...
GingerNg/SDNet
AveragePooling
false
13,728
[ "MIT" ]
112
48ad8cc57c9a02aaad10e34d0c91a174ac68f056
https://github.com/GingerNg/SDNet/tree/48ad8cc57c9a02aaad10e34d0c91a174ac68f056
ConvLayer
# 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...
kj21choi/LATAD
ConvLayer
false
7,037
[ "MIT" ]
1
80d91e0f251ad0225342ee30e2461a39fa9cca97
https://github.com/kj21choi/LATAD/tree/80d91e0f251ad0225342ee30e2461a39fa9cca97
Norm
# 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
msank00/miniTransformer
Norm
false
12,802
[ "MIT" ]
0
a264f30982d9e2dbf8c796d495f7a237c0dd53ef
https://github.com/msank00/miniTransformer/tree/a264f30982d9e2dbf8c796d495f7a237c0dd53ef
Net
import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(3, 16, 3, padding=1) self.conv2 = nn.Conv2d(16, 32, 3, padding=1) self.conv3 = nn.Conv2d(32, 64, 3, padding=1) 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 import torch.nn as nn assert_...
LSaldyt/laser-dog
Net
false
9,516
[ "MIT" ]
0
168c8bfea95dcd27a499f00f191232d67ae63c1c
https://github.com/LSaldyt/laser-dog/tree/168c8bfea95dcd27a499f00f191232d67ae63c1c
Minibatch_stddev_layer
# 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_...
Iceland-Leo/StyleGAN2_PyTorch
Minibatch_stddev_layer
false
5,322
[ "MIT" ]
1
3621f5e4ba1c7fde7e2fae1f4700d050656a0b02
https://github.com/Iceland-Leo/StyleGAN2_PyTorch/tree/3621f5e4ba1c7fde7e2fae1f4700d050656a0b02
NTM
# 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....
WuDiDaBinGe/TAKG
NTM
false
1,899
[ "MIT" ]
0
83e608e677a4ee74722d18cb5ef430f4f6c6ad31
https://github.com/WuDiDaBinGe/TAKG/tree/83e608e677a4ee74722d18cb5ef430f4f6c6ad31
CompositeActivation
import torch class CompositeActivation(torch.nn.Module): def forward(self, x): x = torch.atan(x) return torch.cat([x / 0.67, x * x / 0.6], 1) 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
ndey96/lucent
CompositeActivation
false
10,602
[ "Apache-2.0" ]
0
d868d8ca52520bd245c1e5fcf3b026782f77e561
https://github.com/ndey96/lucent/tree/d868d8ca52520bd245c1e5fcf3b026782f77e561
MaxPoolPad
# 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.utils.data import torch.nn as nn from torch import optim as optim import tor...
Exir-lxr/crldr-prune-pytorch
MaxPoolPad
false
2,286
[ "Apache-2.0" ]
0
adeb5e0b24ce66ff9531d4d947f72412c1b5c033
https://github.com/Exir-lxr/crldr-prune-pytorch/tree/adeb5e0b24ce66ff9531d4d947f72412c1b5c033
SmoothL1Loss
# 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 functools impor...
BUPT-PRIV/BalancedGroupSoftmax
SmoothL1Loss
false
13,374
[ "Apache-2.0" ]
333
90e04fd8ccecd2bc61bbe6053a741ae708da2794
https://github.com/BUPT-PRIV/BalancedGroupSoftmax/tree/90e04fd8ccecd2bc61bbe6053a741ae708da2794
CustomBatchNormAutograd
import torch import torch.nn as nn class CustomBatchNormAutograd(nn.Module): """ This nn.module implements a custom version of the batch norm operation for MLPs. The operations called in self.forward track the history if the input tensors have the flag requires_grad set to True. The backward pass does not n...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
askliar/deep_learning
CustomBatchNormAutograd
false
1,488
[ "MIT" ]
0
e61b2391a3258d18719bf12d9ed1404620ce6c02
https://github.com/askliar/deep_learning/tree/e61b2391a3258d18719bf12d9ed1404620ce6c02
UNet
# 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 ...
Aoi-hosizora/UNet-pytorch
UNet
false
9,244
[ "MIT" ]
0
96951d5d1fdc6c6266a11e1bd97fbf72010bc87d
https://github.com/Aoi-hosizora/UNet-pytorch/tree/96951d5d1fdc6c6266a11e1bd97fbf72010bc87d
SelfAttention
import torch import torch.nn.functional as F from torch import nn class SelfAttention(nn.Module): def __init__(self, embedding_dimension, num_heads): super().__init__() assert embedding_dimension % num_heads == 0, f'embedding dimension must be divisible by number of heads, got embedding_dimension...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
dimitrios-ebi/gene_symbol_classifier
SelfAttention
false
12,289
[ "Apache-2.0" ]
0
fe415f719fda4619041b9fe0639996c92e0f12a8
https://github.com/dimitrios-ebi/gene_symbol_classifier/tree/fe415f719fda4619041b9fe0639996c92e0f12a8
SAModule_Head
import torch import torch.nn as nn import torch.nn.functional as F class BasicConv(nn.Module): def __init__(self, in_channels, out_channels, use_bn=False, **kwargs): super(BasicConv, self).__init__() self.use_bn = use_bn self.conv = nn.Conv2d(in_channels, out_channels, bias=not self. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
vghost2008/C-3-Framework
SAModule_Head
false
11,100
[ "MIT" ]
0
dc6f1f67e403aff4dbb60f8ed06461c843407501
https://github.com/vghost2008/C-3-Framework/tree/dc6f1f67e403aff4dbb60f8ed06461c843407501
InverseSqrt
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
awlange/pysurvival
InverseSqrt
false
14,917
[ "Apache-2.0" ]
242
841b9bc6ce700ba8898d2a1488aa9cd25ee7a8e6
https://github.com/awlange/pysurvival/tree/841b9bc6ce700ba8898d2a1488aa9cd25ee7a8e6
Embedder
# 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...
Zonglin-Li6565/FaceKoob
Embedder
false
6,066
[ "MIT" ]
1
d72da10330ec313308a16116b7d2abd8ecfcdbcf
https://github.com/Zonglin-Li6565/FaceKoob/tree/d72da10330ec313308a16116b7d2abd8ecfcdbcf
ClassifierEnd
# 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....
EadCat/Road-Extraction
ClassifierEnd
false
17,246
[ "MIT" ]
4
9d4831b6c3a5ef07676cbe1c79b03045fda427ea
https://github.com/EadCat/Road-Extraction/tree/9d4831b6c3a5ef07676cbe1c79b03045fda427ea
OnnxHardSigmoid
# 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...
ENOT-AutoDL/onnx2torch
OnnxHardSigmoid
false
13,617
[ "Apache-2.0" ]
144
2391987b3349bed1670ac3c1bc9062a37323abe3
https://github.com/ENOT-AutoDL/onnx2torch/tree/2391987b3349bed1670ac3c1bc9062a37323abe3
Affine
# 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 math from torch import nn import torch.autograd from torch.nn import init assert_size_stride = torch._C._dynamo.guards.assert_size_st...
Goschjann/ssltsc
Affine
false
17,309
[ "MIT" ]
5
08d6b1bf711bb1c8f19f9bfb66a98d4e423e932e
https://github.com/Goschjann/ssltsc/tree/08d6b1bf711bb1c8f19f9bfb66a98d4e423e932e
DeConv2dBlock
# 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...
scaomath/galerkin-transformer
DeConv2dBlock
false
16,370
[ "MIT" ]
106
a9c2dc4427bfaba051d7e0154f110e460050c1df
https://github.com/scaomath/galerkin-transformer/tree/a9c2dc4427bfaba051d7e0154f110e460050c1df
SPPblock
# 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_...
zxg3017/CUSE-Net
SPPblock
false
13,207
[ "MIT" ]
0
ea1d07027f89130a8a40465de94528f23eb9f5d1
https://github.com/zxg3017/CUSE-Net/tree/ea1d07027f89130a8a40465de94528f23eb9f5d1
PerfectProd
import torch import torch.utils.data from torch import nn class PerfectProd(nn.Module): def __init__(self, in_features, out_features): super().__init__() def reset_parameters(self): pass def forward(self, x): return torch.prod(2 * x[:, :-1], dim=-1, keepdim=True) def get_input...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._...
hoedt/stable-nalu
PerfectProd
false
3,597
[ "MIT" ]
0
64b3d240db8bff4da857d955f213ef3c7e38e035
https://github.com/hoedt/stable-nalu/tree/64b3d240db8bff4da857d955f213ef3c7e38e035
TracedModule
# 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.quantization import torch.onnx import torch.nn.parallel import tor...
MartinRenaudin/tutorials
TracedModule
false
2,755
[ "BSD-3-Clause" ]
0
035d6827d77c52fed2a927f105e39fd73516f093
https://github.com/MartinRenaudin/tutorials/tree/035d6827d77c52fed2a927f105e39fd73516f093
ConvBlock
import torch import torch.nn as nn class Block(nn.Module): def __init__(self): """Initialisation for a lower-level DeepLPF conv block :returns: N/A :rtype: N/A """ super(Block, self).__init__() def conv3x3(self, in_channels, out_channels, stride=1): """Repre...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
ZombaSY/DeepLPF
ConvBlock
false
1,325
[ "BSD-3-Clause" ]
0
adce64ae01bc9e32f465a354cb1f6534f0d13597
https://github.com/ZombaSY/DeepLPF/tree/adce64ae01bc9e32f465a354cb1f6534f0d13597
MaxPoolStride1
import torch import torch.nn as nn import torch.nn.functional as F class MaxPoolStride1(nn.Module): def __init__(self, kernel_size): super(MaxPoolStride1, self).__init__() self.kernel_size = kernel_size self.pad = kernel_size - 1 def forward(self, x): padded_x = F.pad(x, (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...
HongBeenKim/pams-skku
MaxPoolStride1
false
17,376
[ "MIT" ]
8
0a12b132e4bf42570b000f60b9a1fc2c65382174
https://github.com/HongBeenKim/pams-skku/tree/0a12b132e4bf42570b000f60b9a1fc2c65382174
MatchModule
import torch import torch.nn.functional as F from torch import nn class MatchModule(nn.Module): """ Computing the match representation for Match LSTM. :param hidden_size: Size of hidden vectors. :param dropout_rate: Dropout rate of the projection layer. Defaults to 0. Examples: >>> impor...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
amberhuang01/LearningFromFactCheckers
MatchModule
false
18,319
[ "MIT" ]
9
3c21684709bf5e331c4585c7d62596960dd44732
https://github.com/amberhuang01/LearningFromFactCheckers/tree/3c21684709bf5e331c4585c7d62596960dd44732
ScaleNorm
import math import torch import torch.nn as nn import torch.nn.parallel class ScaleNorm(nn.Module): """Apply Scale Normalization to input. The ScaleNorm layer first computes the square root of the scale, then computes the matrix/vector norm of the input tensor. The norm value is calculated as `sqrt(scale) / ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import math import torch.nn ...
JoseAntonioSiguenza/deepchem
ScaleNorm
false
9,206
[ "MIT" ]
0
05fe1b186ec154e18de9aa1b110e9258dc484e21
https://github.com/JoseAntonioSiguenza/deepchem/tree/05fe1b186ec154e18de9aa1b110e9258dc484e21
AconC
import torch import torch.nn as nn class AconC(nn.Module): """ ACON activation (activate or not). AconC: (p1*x-p2*x) * sigmoid(beta*(p1*x-p2*x)) + p2*x, beta is a learnable parameter according to "Activate or Not: Learning Customized Activation" <https://arxiv.org/pdf/2009.04759.pdf>. """ def __i...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
IanVzs/labelImg
AconC
false
11,505
[ "MIT" ]
0
3d3dfbf9cf385f38c60376826fdce1f178f563a6
https://github.com/IanVzs/labelImg/tree/3d3dfbf9cf385f38c60376826fdce1f178f563a6
Conv2dLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
autocomic/https-github.com-autocomic-DeepFillv2_Pytorch
Conv2dLayer
false
3,149
[ "MIT" ]
0
7f6712a9b42dfd827879271f13856f1da5d6a032
https://github.com/autocomic/https-github.com-autocomic-DeepFillv2_Pytorch/tree/7f6712a9b42dfd827879271f13856f1da5d6a032
SinglePITF_Loss
import torch import torch as t import torch.nn as nn class SinglePITF_Loss(nn.Module): """ 定义PITF的loss function """ def __init__(self): super(SinglePITF_Loss, self).__init__() None def forward(self, r): return t.sum(-t.log(t.sigmoid(r))) def get_inputs(): return [to...
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 ...
SamHaoYuan/pitf
SinglePITF_Loss
false
1,007
[ "MIT" ]
0
5fdebc3b44c6462126876101b052a3980804da79
https://github.com/SamHaoYuan/pitf/tree/5fdebc3b44c6462126876101b052a3980804da79
ScaleNorm
import math import torch import torch.nn as nn import torch.nn.parallel class ScaleNorm(nn.Module): """Apply Scale Normalization to input. The ScaleNorm layer first computes the square root of the scale, then computes the matrix/vector norm of the input tensor. The norm value is calculated as `sqrt(scale) / ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import math import torch.nn ...
Chahalprincy/deepchem
ScaleNorm
false
228
[ "MIT" ]
0
9d1a6a879cc74b065694b3ddb763d52151d57b7a
https://github.com/Chahalprincy/deepchem/tree/9d1a6a879cc74b065694b3ddb763d52151d57b7a
MLP
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
openmynet/tract
MLP
false
12,860
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
0
a9aba6edcfeacd34f781f08717ae374bfbaba80e
https://github.com/openmynet/tract/tree/a9aba6edcfeacd34f781f08717ae374bfbaba80e
Attention
import torch import torch.nn as nn import torch.nn.functional as F class Attention(nn.Module): """ Applies an attention mechanism on the output features from the decoder. .. math:: \\begin{array}{ll} x = context*output \\\\ attn = exp(x_i) / sum_j exp(x_j) \\\\ ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
JunhoKim94/speech_hackathon_2019
Attention
false
687
[ "Apache-2.0" ]
0
1cb8de873d48e94f58bd1103c32b977a27d34951
https://github.com/JunhoKim94/speech_hackathon_2019/tree/1cb8de873d48e94f58bd1103c32b977a27d34951
EnsembleModel
# 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...
si0wang/transfer_dmc
EnsembleModel
false
12,988
[ "MIT" ]
0
6bda773244e0b709b3c13add2597f5f1cd01bfd7
https://github.com/si0wang/transfer_dmc/tree/6bda773244e0b709b3c13add2597f5f1cd01bfd7
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 import triton_helpers from torch._inductor.runtime....
JinYAnGHe/openvino_training_extensions
PositionwiseFeedForward
false
2,724
[ "Apache-2.0" ]
0
a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee
https://github.com/JinYAnGHe/openvino_training_extensions/tree/a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee
Value
# 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...
zwc662/disentangling-vae
Value
false
11,085
[ "MIT" ]
0
7eeace2a30f8034e222be6a906f53748b3b2bb6e
https://github.com/zwc662/disentangling-vae/tree/7eeace2a30f8034e222be6a906f53748b3b2bb6e
AdaptiveCos
import torch from torch.nn.parameter import Parameter class AdaptiveCos(torch.nn.Module): """ Implementation of soft exponential activation. Shape: - Input: (N, *) where * means, any number of additional dimensions - Output: (N, *), same shape as the input Parameters: ...
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.nn.parameter import Parameter assert_size_stride = torch._C._d...
ndem0/PINA
AdaptiveCos
false
10,717
[ "MIT" ]
0
1812ddb8d96a9c8aeb80ce35002dbd115e7d7931
https://github.com/ndem0/PINA/tree/1812ddb8d96a9c8aeb80ce35002dbd115e7d7931
IDiv
import torch class IDiv(torch.nn.Module): def __init__(self): super(IDiv, self).__init__() def forward(self, x, y): x /= y return x 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 @triton.jit def triton_poi_fused_div_0(in_ptr0, in_ptr1, out_ptr1, xnumel,...
NVIDIA-AI-IOT-private/torch2trt
IDiv
false
10,512
[ "MIT" ]
0
953d60039e0c81e90eea467c3df2e6e3f7040242
https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242
EpeLoss
import torch import torch.nn as nn class EpeLoss(nn.Module): def __init__(self, eps=0): super(EpeLoss, self).__init__() self.eps = eps def forward(self, pred, label): loss = ((pred - label).pow(2).sum(1) + self.eps).sqrt() return loss.view(loss.shape[0], -1).mean(1) def get...
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_...
brightvioletlight/MaskFlownet-Pytorch
EpeLoss
false
14,977
[ "MIT" ]
75
4158bac3b2fe50bfdf4216b4890ce24a8011227a
https://github.com/brightvioletlight/MaskFlownet-Pytorch/tree/4158bac3b2fe50bfdf4216b4890ce24a8011227a
SimpleAndModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleAndModule(torch.nn.Module): def __init__(self): super(SimpleAndModule, self).__init__() def forward(self, a, b): c = torch.logical_and(a, b) return torch.logical_and(c, c) def get_inputs(): return [torc...
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
SimpleAndModule
false
7,389
[ "Apache-2.0" ]
1
4ba074df5da9822986a23a6679ab592c22660f6d
https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d
SIMSE
import torch import torch.nn as nn import torch.utils.checkpoint class SIMSE(nn.Module): def __init__(self): super(SIMSE, self).__init__() def forward(self, pred, real): diffs = torch.add(real, -pred) n = torch.numel(diffs.data) simse = torch.sum(diffs).pow(2) / n ** 2 ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.checkpoint assert_size_stride = torch._C._dynamo...
byamao1/MMSA
SIMSE
false
14,986
[ "MIT" ]
198
1a894d042144c9ac75b3465d38871ce8c2987251
https://github.com/byamao1/MMSA/tree/1a894d042144c9ac75b3465d38871ce8c2987251
FCLayer
import torch from torch import nn class FCLayer(nn.Module): def __init__(self, input_dim, output_dim, dropout_rate=0.1, is_active= True, is_dropout=True, active_type='mish'): """ FC-Layer, mostly last output of model args: input_dim: input dimension, 输入维度, eg. 768 ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
dumpmemory/Pytorch-NLU
FCLayer
false
15,260
[ "Apache-2.0" ]
115
864fb9acc7751fc51abd3d05d24b5a9a7eab7110
https://github.com/dumpmemory/Pytorch-NLU/tree/864fb9acc7751fc51abd3d05d24b5a9a7eab7110
GaussianGenerator
import torch import numpy as np import torch.nn as nn class GaussianGenerator(nn.Module): def __init__(self, dims): super(GaussianGenerator, self).__init__() self.z_dim = dims[0] self.linear_var = nn.Parameter(1.0 * torch.ones([self.z_dim])) self.bias = nn.Parameter(torch.zeros([s...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import 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
BertSelfAttention
from _paritybench_helpers import _mock_config import math import torch from torch import nn class BertSelfAttention(nn.Module): def __init__(self, model_config): super().__init__() if model_config.hidden_size % model_config.num_attention_heads != 0: raise ValueError( '...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
HS-YN/PanoAVQA
BertSelfAttention
false
18,376
[ "MIT" ]
3
657b83421ce64ea18b3e79fb580afc7034403ccc
https://github.com/HS-YN/PanoAVQA/tree/657b83421ce64ea18b3e79fb580afc7034403ccc
FusedDownsample
import torch import torch.nn as nn import torch.nn.functional as F from math import sqrt class FusedDownsample(nn.Module): def __init__(self, in_channel, out_channel, kernel_size, padding=0): super().__init__() weight = torch.randn(out_channel, in_channel, kernel_size, kernel_size) 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 from math import sqrt assert_size_stride = torch._C._dynam...
KwonGihyun/DiagonalGAN
FusedDownsample
false
8,443
[ "MIT" ]
13
9e401c00e741d700f85df2c715ee11c1e66e1d1c
https://github.com/KwonGihyun/DiagonalGAN/tree/9e401c00e741d700f85df2c715ee11c1e66e1d1c
Conv1dWeightNorm
import torch import torch.nn as nn class Conv1dWeightNorm(nn.Module): """ Conv1d with weight normalization """ def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True): super(Conv1dWeightNorm, self).__init__() self.conv =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
juheeuu/flowseq
Conv1dWeightNorm
false
12,657
[ "Apache-2.0" ]
0
e6e50406656335ff7a2f9ed4bd81d7cc7d1195fb
https://github.com/juheeuu/flowseq/tree/e6e50406656335ff7a2f9ed4bd81d7cc7d1195fb
make_dilation_dense
# 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 ...
cestcedric/TSSR-GAN
make_dilation_dense
false
1,661
[ "BSD-2-Clause", "MIT" ]
0
d6e1b50409e0f0591660552993e6d5b70d41e766
https://github.com/cestcedric/TSSR-GAN/tree/d6e1b50409e0f0591660552993e6d5b70d41e766
SphericalBesselBasis
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import math import numpy as np assert_size_stride = torch._C._dynamo.guar...
krylea/ocp
SphericalBesselBasis
false
10,497
[ "MIT" ]
0
00fc1df29731d70ff1b5cf8e9323d1d2f1f8e540
https://github.com/krylea/ocp/tree/00fc1df29731d70ff1b5cf8e9323d1d2f1f8e540