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
FocalLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
Raiselimit/TorchBlocks
FocalLoss
false
5,747
[ "MIT" ]
1
a5baecb9a2470ff175087475630f2b7db3f7ef51
https://github.com/Raiselimit/TorchBlocks/tree/a5baecb9a2470ff175087475630f2b7db3f7ef51
NodeNetwork
# 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....
mbrukman/machine-learning-book
NodeNetwork
false
7,192
[ "MIT" ]
1
f29a0f8aafa63a77081f3bcec68866e33dd41776
https://github.com/mbrukman/machine-learning-book/tree/f29a0f8aafa63a77081f3bcec68866e33dd41776
MultiHeadAttn
# 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....
admariner/NeMo
MultiHeadAttn
false
1,394
[ "Apache-2.0" ]
0
e542d7f9063a40afa4119a3b94de4c2c636a37bb
https://github.com/admariner/NeMo/tree/e542d7f9063a40afa4119a3b94de4c2c636a37bb
SDNE_layer
import torch import torch.utils.data import torch.nn as nn import torch.nn.functional as F class SDNE_layer(nn.Module): def __init__(self, num_node, hidden_size1, hidden_size2, droput, alpha, beta, nu1, nu2): super(SDNE_layer, self).__init__() self.num_node = num_node self.hidden_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
BruceW91/cogdl
SDNE_layer
false
209
[ "MIT" ]
0
1ad524375f5ba062103698a0432fc857572a6933
https://github.com/BruceW91/cogdl/tree/1ad524375f5ba062103698a0432fc857572a6933
CosineClassifier
# 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....
SirRob1997/DomainBed
CosineClassifier
false
5,856
[ "MIT" ]
1
7399a2b0a63df48f4b67755a3f33901223d5c8fb
https://github.com/SirRob1997/DomainBed/tree/7399a2b0a63df48f4b67755a3f33901223d5c8fb
AnyHead
# 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...
DengpanFu/fast-reid-v0
AnyHead
false
9,083
[ "Apache-2.0" ]
0
e444c0187ccb6ef3b8348f8c5f0c5a0814b3683e
https://github.com/DengpanFu/fast-reid-v0/tree/e444c0187ccb6ef3b8348f8c5f0c5a0814b3683e
MultiHeadAttention
import torch import numpy as np from torch import nn import torch.nn.parallel class MultiHeadAttention(nn.Module): def __init__(self, heads_count, d_model, dropout_prob): super().__init__() assert d_model % heads_count == 0, f'model dim {d_model} not divisible by {heads_count} heads' 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....
junchen14/video_language
MultiHeadAttention
false
3,780
[ "Apache-2.0" ]
0
1d6d304b795501d1e0d56351047a259d992fab23
https://github.com/junchen14/video_language/tree/1d6d304b795501d1e0d56351047a259d992fab23
BaselineDiscreteCritic
# 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 ...
greenstar1151/pytorch-benchmark
BaselineDiscreteCritic
false
10,444
[ "BSD-3-Clause" ]
0
8b7808d3be6b7ca1d57f1812e35fd2df5e470f8b
https://github.com/greenstar1151/pytorch-benchmark/tree/8b7808d3be6b7ca1d57f1812e35fd2df5e470f8b
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 import torch.nn as nn import torch._C import torch.serialization assert_size_str...
whu-pzhang/mmsegmentation
Model
false
4,529
[ "Apache-2.0" ]
0
46326f63ce411c794d237e986dd3924590d0e75e
https://github.com/whu-pzhang/mmsegmentation/tree/46326f63ce411c794d237e986dd3924590d0e75e
LinearConvExpansion
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
Jincheng-Sun/Kylearn-pytorch
LinearConvExpansion
false
645
[ "MIT" ]
0
e72f2ab45a3f4724e843a27bec37664d3612fdca
https://github.com/Jincheng-Sun/Kylearn-pytorch/tree/e72f2ab45a3f4724e843a27bec37664d3612fdca
Transformer
import torch import torch as t import torch.nn as nn from torch.distributions.categorical import Categorical from torch.autograd import Variable import torch.nn.functional as F import torch.optim as optim class Transformer(nn.Module): def __init__(self, input_size, num_actions, hidden_size, learning_rate= ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
LucWeber/2048-RLenv
Transformer
false
1,014
[ "MIT" ]
0
6beff54691f0436f0fbca6bdbb9430fd37eab37d
https://github.com/LucWeber/2048-RLenv/tree/6beff54691f0436f0fbca6bdbb9430fd37eab37d
MultiHead
import math import torch from torch import Tensor from torch.nn import Linear import torch.nn.functional as F from torch.nn import Parameter import torch.utils.data def uniform(size, tensor): bound = 1.0 / math.sqrt(size) if tensor is not None: tensor.data.uniform_(-bound, bound) def kaiming_uniform...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
GrumpyZhou/pytorch_geometric
MultiHead
false
5,263
[ "MIT" ]
1
88c54e72d3e26ad48e9ccd99e5696c7f19269d94
https://github.com/GrumpyZhou/pytorch_geometric/tree/88c54e72d3e26ad48e9ccd99e5696c7f19269d94
ExpanderConv2d
# 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...
noonespecial009/resnet-variations
ExpanderConv2d
false
12,837
[ "MIT" ]
0
11ee33d1855c292b15930a2a2c1d757d1ac85699
https://github.com/noonespecial009/resnet-variations/tree/11ee33d1855c292b15930a2a2c1d757d1ac85699
AE_4D
import torch import torch.nn as nn import torch.utils.data class AE_4D(nn.Module): def __init__(self, n_features=4): super(AE_4D, self).__init__() self.en1 = nn.Linear(n_features, 200) self.en2 = nn.Linear(200, 100) self.en3 = nn.Linear(100, 50) self.en4 = nn.Linear(50, 3)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dyn...
Autoencoders-compression-anomaly/Various-AEs-Compression-Tensorflow
AE_4D
false
4,888
[ "Apache-2.0" ]
1
772ba547c2b7d5d90e79382bf4d8a50e4d733210
https://github.com/Autoencoders-compression-anomaly/Various-AEs-Compression-Tensorflow/tree/772ba547c2b7d5d90e79382bf4d8a50e4d733210
MaxLayer
import torch import torch.nn as nn class MaxLayer(nn.Module): def __init__(self): super(MaxLayer, self).__init__() def forward(self, a, b): return torch.max(a, b) def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
DingXiaoH/Centripetal-SGD
MaxLayer
false
7,947
[ "Apache-2.0" ]
35
992dd0fb31ee47a79cb0891f4f231707abd0c5c6
https://github.com/DingXiaoH/Centripetal-SGD/tree/992dd0fb31ee47a79cb0891f4f231707abd0c5c6
CPUReverseForgetMult
import torch class CPUReverseForgetMult(torch.nn.Module): def __init__(self): super(CPUReverseForgetMult, self).__init__() def forward(self, f, x, hidden_init=None): result = [] forgets = f.split(1, dim=0)[::-1] inputs = (f * x).split(1, dim=0)[::-1] prev_h = hidden_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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda reinterpret...
Smerity/pytorch-qrnn
CPUReverseForgetMult
false
17,934
[ "BSD-3-Clause" ]
4
907c8ea53f689136fcc50996b6474de967745202
https://github.com/Smerity/pytorch-qrnn/tree/907c8ea53f689136fcc50996b6474de967745202
RBF_Kernel
import torch import numpy as np def norm_sq(X, Y): XX = X.matmul(X.t()) XY = X.matmul(Y.t()) YY = Y.matmul(Y.t()) return -2 * XY + XX.diag().unsqueeze(1) + YY.diag().unsqueeze(0) class RBF_Kernel(torch.nn.Module): """ RBF kernel :math:`K(x, y) = exp(||x-v||^2 / (2h)) """ ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np assert_size_stride = torch._C._dynamo.guards.assert_size_stri...
JeremyAlain/meta_learning_pacoh
RBF_Kernel
false
5,385
[ "MIT" ]
1
b4c2c37d9715e74542bab556ac1f5d778cc3409c
https://github.com/JeremyAlain/meta_learning_pacoh/tree/b4c2c37d9715e74542bab556ac1f5d778cc3409c
DiffLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Columbine21/TFR-Net
DiffLoss
false
17,106
[ "MIT" ]
7
1da01577542e7f477fdf7323ec0696aebc632357
https://github.com/Columbine21/TFR-Net/tree/1da01577542e7f477fdf7323ec0696aebc632357
SelfAttn
# 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....
RoderickGu/Pretraining_GPT
SelfAttn
false
17,860
[ "Apache-2.0" ]
4
0a3ecd38116dc271e273f57490b9b45b660bf401
https://github.com/RoderickGu/Pretraining_GPT/tree/0a3ecd38116dc271e273f57490b9b45b660bf401
FC_Layer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
loveorchids/omni_torch
FC_Layer
false
7,119
[ "Apache-2.0" ]
1
9bd654387619c0cbc6aee9e91482ecc9200138ef
https://github.com/loveorchids/omni_torch/tree/9bd654387619c0cbc6aee9e91482ecc9200138ef
Decoder_h
import torch import torch.distributions as dist import torch.nn as nn class Decoder_h(nn.Module): def __init__(self, B, H_dim): super().__init__() self.B = B self.H_dim = H_dim self.make_parameters() def make_parameters(self): self.mu = nn.Linear(self.H_dim, self.B, b...
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.distributions as dist import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda ...
shaabhishek/pp_lvm
Decoder_h
false
4,296
[ "Apache-2.0" ]
0
0fcceb7f004ab01da7c5508b576983b9d4af36c8
https://github.com/shaabhishek/pp_lvm/tree/0fcceb7f004ab01da7c5508b576983b9d4af36c8
SimpleConv2dModule
# 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 import torch.jit import torch...
opti-mix/glow
SimpleConv2dModule
false
7,398
[ "Apache-2.0" ]
1
4ba074df5da9822986a23a6679ab592c22660f6d
https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d
LearnedPositionalEncoding
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
JamesNgo3781/vietocr
LearnedPositionalEncoding
false
5,377
[ "Apache-2.0" ]
1
9d311bbeb18c51c8ff90022f07c0463b204407dc
https://github.com/JamesNgo3781/vietocr/tree/9d311bbeb18c51c8ff90022f07c0463b204407dc
UpConv
import torch from collections import OrderedDict import torch.nn as nn class UpConv(nn.Module): def __init__(self, in_channels): super().__init__() self.up_conv = nn.Sequential(OrderedDict([('up', nn.Upsample( scale_factor=2)), ('conv', nn.Conv2d(in_channels, 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 collections import OrderedDict import torch.nn as nn assert_size_stride = t...
HCMUS-ROBOTICS/ssdf-perception
UpConv
false
9,067
[ "MIT" ]
0
c3eb426397a542da49509bb381972c8ff877597b
https://github.com/HCMUS-ROBOTICS/ssdf-perception/tree/c3eb426397a542da49509bb381972c8ff877597b
CNN
import torch from torch import nn import torch.nn.functional as F class CNN(torch.nn.Module): """Basic CNN architecture.""" def __init__(self, in_channels=1): super(CNN, self).__init__() self.conv1 = nn.Conv2d(in_channels, 64, 8, 1) self.conv2 = nn.Conv2d(64, 128, 6, 2) self.c...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
austereantelope/cleverhans
CNN
false
12,143
[ "MIT" ]
0
5d68d538c89257693f9a7491994bb5586d3ec310
https://github.com/austereantelope/cleverhans/tree/5d68d538c89257693f9a7491994bb5586d3ec310
CoxPHLoss
import torch from torch import Tensor def cox_ph_loss_sorted(log_h: 'Tensor', events: 'Tensor', eps: 'float'=1e-07 ) ->Tensor: """Requires the input to be sorted by descending duration time. See DatasetDurationSorted. We calculate the negative log of $( rac{h_i}{\\sum_{j \\in R_i} h_j})^d$, where...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid, split_scan_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 ...
gabrielasuchopar/pycox
CoxPHLoss
false
3,513
[ "BSD-2-Clause" ]
0
e4ea5f0ee26c6d3e3a468f164de2b7c426376e99
https://github.com/gabrielasuchopar/pycox/tree/e4ea5f0ee26c6d3e3a468f164de2b7c426376e99
HuggingfaceFastGelu
import torch import torch.nn import torch.onnx class HuggingfaceFastGelu(torch.nn.Module): def forward(self, x): return 0.5 * x * (1.0 + torch.tanh(x * 0.7978845608 * (1.0 + 0.044715 * x * x))) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[],...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn import torch.onnx assert_size_stride = torch._C._dynamo.guards....
thilow/onnxruntime
HuggingfaceFastGelu
false
11,016
[ "MIT" ]
0
1a3ddf0714e1bdf9b807a342eee5f6e160ad1ec9
https://github.com/thilow/onnxruntime/tree/1a3ddf0714e1bdf9b807a342eee5f6e160ad1ec9
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. """ def __ini...
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_...
RaymondKoopmanschap/DL_assignment_code
CustomBatchNormAutograd
false
973
[ "MIT" ]
0
68b3290be9fbd6c55433a7585e2cfa18e0f35f5c
https://github.com/RaymondKoopmanschap/DL_assignment_code/tree/68b3290be9fbd6c55433a7585e2cfa18e0f35f5c
DropConnect
# 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 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 from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_si...
KelvinYang0320/nas-without-training
DropConnect
false
13,923
[ "MIT" ]
385
5ed77a06726a73233a5a93b8f70a7172ce570029
https://github.com/KelvinYang0320/nas-without-training/tree/5ed77a06726a73233a5a93b8f70a7172ce570029
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.triton_helpers import libdevice import torch.nn as ...
Atten4Vis/DemystifyLocalViT
Mlp
false
13,354
[ "MIT" ]
64
2e2327caec6d56ae2c8aa861b32bb62f3cdb786e
https://github.com/Atten4Vis/DemystifyLocalViT/tree/2e2327caec6d56ae2c8aa861b32bb62f3cdb786e
BinaryActivation
import torch import torch.nn as nn import torch.utils import torch.utils.data.distributed class BinaryActivation(nn.Module): def __init__(self): super(BinaryActivation, self).__init__() def forward(self, x): out_forward = torch.sign(x) mask1 = x < -1 mask2 = x < 0 mas...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils import torch.utils.data.distributed assert_size_stride = torch._C._dynamo.guards.assert_size_stride...
CQUlearningsystemgroup/LearningToBinarize
BinaryActivation
false
4,937
[ "MIT" ]
1
1ecad897145af65ff52323bf2ec64a2154dc87d6
https://github.com/CQUlearningsystemgroup/LearningToBinarize/tree/1ecad897145af65ff52323bf2ec64a2154dc87d6
PoswiseFeedForwardNet
# 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....
alisure-fork/CONTA
PoswiseFeedForwardNet
false
1,418
[ "MIT" ]
0
dde3e5083f45598d859dde889de3ae85c7a416e9
https://github.com/alisure-fork/CONTA/tree/dde3e5083f45598d859dde889de3ae85c7a416e9
ConvNCFBPRLoss
import torch import torch.nn as nn class ConvNCFBPRLoss(nn.Module): """ ConvNCFBPRLoss, based on Bayesian Personalized Ranking, Shape: - Pos_score: (N) - Neg_score: (N), same shape as the Pos_score - Output: scalar. Examples:: >>> loss = ConvNCFBPRLoss() >>> ...
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 ...
BELIEVEfxy/LightSANs
ConvNCFBPRLoss
false
7,769
[ "MIT" ]
17
94ce7e59d144dbc787153b8c486cad334790ec6e
https://github.com/BELIEVEfxy/LightSANs/tree/94ce7e59d144dbc787153b8c486cad334790ec6e
VectorQuantizer
# 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.autograd import Fu...
arampacha/generative_models
VectorQuantizer
false
1,474
[ "Apache-2.0" ]
0
34f5a2fc760bbd7f9f9a956d8d8670c9746e5152
https://github.com/arampacha/generative_models/tree/34f5a2fc760bbd7f9f9a956d8d8670c9746e5152
MaskedCrossEntropyCriterion
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch.nn.modules....
dataJSA/batch7_tomorrow_datascience
MaskedCrossEntropyCriterion
false
9,982
[ "MIT" ]
0
e2dc6bc59c456fa927e0a1f6d12024ba410f520c
https://github.com/dataJSA/batch7_tomorrow_datascience/tree/e2dc6bc59c456fa927e0a1f6d12024ba410f520c
PSNRLoss
import torch import torch.nn as nn from torch.nn.functional import mse_loss def psnr_loss(input: 'torch.Tensor', target: 'torch.Tensor', max_val: 'float' ) ->torch.Tensor: """Function that computes PSNR See :class:`~kornia.losses.PSNR` for details. """ if not torch.is_tensor(input) or not torch.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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn from t...
kshitij12345/kornia
PSNRLoss
false
7,055
[ "Apache-2.0" ]
1
4fcc9a570dfa38f67ec812c8fdfabe434b3e466e
https://github.com/kshitij12345/kornia/tree/4fcc9a570dfa38f67ec812c8fdfabe434b3e466e
Asin
import torch import torch.onnx import torch.nn as nn class Asin(nn.Module): def forward(self, x): return torch.asin(x) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.onnx import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
mil-tokyo/webdnn
Asin
false
16,063
[ "MIT" ]
1,967
38a60fd3e1a4e72bc01108189a3aa51e0752aecd
https://github.com/mil-tokyo/webdnn/tree/38a60fd3e1a4e72bc01108189a3aa51e0752aecd
CombFilter
import torch import torch.nn as nn import torch.nn.functional as F class CombFilter(nn.Module): def __init__(self, ninputs, fmaps, L): super().__init__() self.L = L self.filt = nn.Conv1d(ninputs, fmaps, 2, dilation=L, bias=False) r_init_weight = torch.ones(ninputs * fmaps, 2) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
mansoorcheema/segan_pytorch
CombFilter
false
10,687
[ "MIT" ]
0
8f3b401e42cadfd1f8ad57a8ba0e89c16cc7ee65
https://github.com/mansoorcheema/segan_pytorch/tree/8f3b401e42cadfd1f8ad57a8ba0e89c16cc7ee65
EncoderNO2
import torch import torch.nn as nn class EncoderNO2(nn.Module): def __init__(self, D, H, M): super().__init__() self.D = D self.M = M self.H = H self.enc1 = nn.Linear(in_features=self.D, out_features=self.H) self.enc2 = nn.Linear(in_features=self.H, out_features=se...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
le0x99/deep-generative-modeling
EncoderNO2
false
7,067
[ "MIT" ]
1
40ffd1640dc3e5a6a2b4ba16a1d767034f081475
https://github.com/le0x99/deep-generative-modeling/tree/40ffd1640dc3e5a6a2b4ba16a1d767034f081475
MaxPool2dDynamicSamePadding
# 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...
AustinCai/gmaxup-augmentation
MaxPool2dDynamicSamePadding
false
72
[ "MIT" ]
0
a64ca0a76eb333e5ce6b217c301d27ca04d73bce
https://github.com/AustinCai/gmaxup-augmentation/tree/a64ca0a76eb333e5ce6b217c301d27ca04d73bce
SparseDownSampleClose
# 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
SparseDownSampleClose
false
39
[ "MIT" ]
0
cccee1c5305977a1bc8d0b8df3f1b6ff66bd1736
https://github.com/Anonymous1234321/GuideFormer/tree/cccee1c5305977a1bc8d0b8df3f1b6ff66bd1736
ByteCombine
# 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....
CUMLSec/stateformer
ByteCombine
false
7,932
[ "MIT" ]
41
87cb3c906c43fcff42b2ca820eb6e7fd918d0a1c
https://github.com/CUMLSec/stateformer/tree/87cb3c906c43fcff42b2ca820eb6e7fd918d0a1c
GroupNorm
import torch import torch.nn as nn class GroupNorm(nn.Module): def __init__(self, c_num, group_num=16, eps=1e-10): """ The groupnorm layer from https://arxiv.org/abs/1803.08494 Args: c_num (int): Number of input channels group_num (int): Number of group by which 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.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
EKami/EzeeML
GroupNorm
false
8,034
[ "MIT" ]
35
21753a0ede7cc1dc675a2dcd09b6306cea2cad56
https://github.com/EKami/EzeeML/tree/21753a0ede7cc1dc675a2dcd09b6306cea2cad56
CCCLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
youqingxiaozhua/ABAW3
CCCLoss
false
11,055
[ "Apache-2.0" ]
0
51ab58ab311ecd6603a8485a45af0dcc39880e69
https://github.com/youqingxiaozhua/ABAW3/tree/51ab58ab311ecd6603a8485a45af0dcc39880e69
TransposedConvModel
# 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 import torch....
Rohan-Chaudhury/aimet
TransposedConvModel
false
17,986
[ "BSD-3-Clause" ]
3
1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
https://github.com/Rohan-Chaudhury/aimet/tree/1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
DoubleResolutionLayer
import torch import torch.nn as nn class DoubleResolutionLayer(nn.Module): def forward(self, x): x = nn.functional.interpolate(x, scale_factor=2, mode='nearest') return x def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
AleksiKnuutila/ganspace
DoubleResolutionLayer
false
1,916
[ "Apache-2.0" ]
0
23471a07c8b0d693fa7f1f2dfbb8b34ce22d9d38
https://github.com/AleksiKnuutila/ganspace/tree/23471a07c8b0d693fa7f1f2dfbb8b34ce22d9d38
CMul
import torch import torch.nn import torch.nn as nn import torch.nn.parallel class CMul(nn.Module): """ nn.CMul in Torch7. """ def __init__(self): super(CMul, self).__init__() def forward(self, x): return x[0] * x[1] def __repr__(self): return self.__class__.__name__ ...
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 import torch.nn as nn import torch.nn.parallel assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided...
nhonth/DeLF-pytorch
CMul
false
16,162
[ "MIT" ]
315
5577a447a0330b9e976cff56a10fc91669216b8c
https://github.com/nhonth/DeLF-pytorch/tree/5577a447a0330b9e976cff56a10fc91669216b8c
BertSelfAttention
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn class BertSelfAttention(nn.Module): def __init__(self, config): super(BertSelfAttention, self).__init__() if config.hidden_size % 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....
Worm4047/TVR
BertSelfAttention
false
14,607
[ "MIT" ]
106
2a8ce2edbdc0966aef3b84c28872267039f01700
https://github.com/Worm4047/TVR/tree/2a8ce2edbdc0966aef3b84c28872267039f01700
ToRGB
from torch.autograd import Function import math import torch from torch import nn as nn from torch.nn import functional as F from torch.nn import init as init from torchvision.models import vgg as vgg import torch.utils.data from torch.utils import data as data from torch import autograd as autograd def make_resample...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.autograd import Function import math from torch import nn as nn from ...
Lotayou/BasicSR
ToRGB
false
2,594
[ "Apache-2.0", "MIT" ]
0
6cf9a706dd680d54f7dc26e87318ff79f76c0dbf
https://github.com/Lotayou/BasicSR/tree/6cf9a706dd680d54f7dc26e87318ff79f76c0dbf
SplitAndConcat
import torch import torch.nn as nn import torch.quantization.quantize_fx import torch.utils.data class SplitAndConcat(nn.Module): """Split the data from split_dim and concatenate in concat_dim. @param split_dim from which axis the data will be chunk @param concat_dim to which axis the data will be concat...
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.quantization.quantize_fx import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size...
petoor/d2go
SplitAndConcat
false
10,663
[ "Apache-2.0" ]
0
d0a20d048738f447945d7c948a8d3019a110d2e8
https://github.com/petoor/d2go/tree/d0a20d048738f447945d7c948a8d3019a110d2e8
UnStackDelta
import torch import torch.nn as nn class UnStackDelta(nn.Module): """Reverse of StackDelta""" def __init__(self): super().__init__() def forward(self, x: 'torch.Tensor'): assert x.dim() == 4 if x.requires_grad: out = x.transpose(1, 2).contiguous() else: ...
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...
maxwellzh/CAT
UnStackDelta
false
16,022
[ "Apache-2.0" ]
237
b1a9c3f95e84d968593a05bf8b176b5f77b8055e
https://github.com/maxwellzh/CAT/tree/b1a9c3f95e84d968593a05bf8b176b5f77b8055e
AddReadout
import torch import torch.nn as nn class AddReadout(nn.Module): """Handles readout operation when `readout` parameter is `add`. Removes `cls_token` or `readout_token` from tensor and adds it to the rest of tensor""" def __init__(self, start_index=1): super(AddReadout, self).__init__() self.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 torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
aditya-agrawal-30502/vformer
AddReadout
false
14,738
[ "MIT" ]
90
e1f4950f980238442ff1dc39a8f0791e4fbc9dac
https://github.com/aditya-agrawal-30502/vformer/tree/e1f4950f980238442ff1dc39a8f0791e4fbc9dac
SpatialCrossMapLRN
# 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 import torch.nn.parallel import torch.optim import torch....
Tagussan/pretrained-models.pytorch
SpatialCrossMapLRN
false
1,121
[ "BSD-3-Clause" ]
0
854e6c153c2534dd7cf76a5ec102307ea5171167
https://github.com/Tagussan/pretrained-models.pytorch/tree/854e6c153c2534dd7cf76a5ec102307ea5171167
ConvWS2d
import torch import torch.nn as nn import torch.nn.functional as F def conv_ws_2d(input, weight, bias=None, stride=1, padding=0, dilation=1, groups=1, eps=1e-05): c_in = weight.size(0) weight_flat = weight.view(c_in, -1) mean = weight_flat.mean(dim=1, keepdim=True).view(c_in, 1, 1, 1) std = weight...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
Cynicsss/mmdetection
ConvWS2d
false
8,969
[ "Apache-2.0" ]
0
89e207fc8c8a7ae3663a5cda53d77b2b94cd1ec8
https://github.com/Cynicsss/mmdetection/tree/89e207fc8c8a7ae3663a5cda53d77b2b94cd1ec8
SimpleAvgPool1dModule
import torch import torch.nn.functional as F import torch.jit import torch.onnx import torch.nn class SimpleAvgPool1dModule(torch.nn.Module): def __init__(self, kernel_size, stride=None, padding=0): super(SimpleAvgPool1dModule, self).__init__() self.kernel_size = kernel_size self.padding ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
briancoutinho/glow
SimpleAvgPool1dModule
false
12,561
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
PMA
import math import torch import torch.nn.functional as F import torch.nn as nn class MAB(nn.Module): def __init__(self, dim_Q, dim_K, dim_V, num_heads, ln=False): super(MAB, self).__init__() self.dim_V = dim_V self.num_heads = num_heads self.fc_q = nn.Linear(dim_Q, dim_V) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
AntonValk/BagGraph-Graph-MIL
PMA
false
16,955
[ "MIT" ]
8
1447b52b32995cf6c71e731dd1261104cd66ced0
https://github.com/AntonValk/BagGraph-Graph-MIL/tree/1447b52b32995cf6c71e731dd1261104cd66ced0
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, 6, 5) self.pool = nn.MaxPool2d(2, 2) self.conv2 = nn.Conv2d(6, 16, 5) self.fc1 = nn.Linear(16 * 94 * 94, 120) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
arefmalek/Demographics_Disenfranchisement
Net
false
6,300
[ "MIT" ]
1
f4ae8c0965cf1b1cab9b245c3f5f54d3b5fe9aba
https://github.com/arefmalek/Demographics_Disenfranchisement/tree/f4ae8c0965cf1b1cab9b245c3f5f54d3b5fe9aba
Pad
# 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...
icyda17/very-deep-CNNs
Pad
false
10,219
[ "Apache-2.0" ]
0
c275ef222d50dae90e508345ec3be5adfa5e33ce
https://github.com/icyda17/very-deep-CNNs/tree/c275ef222d50dae90e508345ec3be5adfa5e33ce
ParsingRelationLoss
# 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.modules import torch.nn as nn assert_size_stride = torch....
Glutamat42/Ultra-Fast-Lane-Detection
ParsingRelationLoss
false
492
[ "MIT" ]
0
175448f39574d64a7cc6fd35ec92e3c5539c9837
https://github.com/Glutamat42/Ultra-Fast-Lane-Detection/tree/175448f39574d64a7cc6fd35ec92e3c5539c9837
dce_loss
import torch from torch import nn class dce_loss(nn.Module): def __init__(self, n_classes, feat_dim, init_weight=True): super(dce_loss, self).__init__() self.n_classes = n_classes self.feat_dim = feat_dim self.centers = nn.Parameter(torch.randn(self.feat_dim, self. n_c...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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...
alexalex222/classification_loss
dce_loss
false
6,174
[ "MIT" ]
1
a61617e0c0d5ecf6e0ff388305dd9f3eaa5cbf94
https://github.com/alexalex222/classification_loss/tree/a61617e0c0d5ecf6e0ff388305dd9f3eaa5cbf94
Intensity
# 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 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 from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guar...
alcinos/SPR
Intensity
false
3,075
[ "MIT" ]
0
dec8df83eeaa25a1d75ecff0cf4ce4bfae9cab4c
https://github.com/alcinos/SPR/tree/dec8df83eeaa25a1d75ecff0cf4ce4bfae9cab4c
SimpleMLP
import torch import torch.optim import torch.jit import torch.nn as nn class SimpleMLP(nn.Module): def __init__(self, num_in_features: 'int', num_out_features: 'int', neurons_per_layer: 'int'): super(SimpleMLP, self).__init__() self.act = nn.ELU() self.l_in = nn.Linear(in_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.triton_helpers import libdevice import torch.optim ...
plaveczlambert/nonlinearbubbledynamics
SimpleMLP
false
10,673
[ "MIT" ]
0
190c5170f7ff6068badeee818c01226c55aaec97
https://github.com/plaveczlambert/nonlinearbubbledynamics/tree/190c5170f7ff6068badeee818c01226c55aaec97
LinearLR
import torch import torch.nn as nn class LinearLR(nn.Module): """[u * v + res] version of torch.nn.Linear""" def __init__(self, in_features, out_features, rank_ratio=0.25, bias= True, device=None, dtype=None): super().__init__() sliced_rank = int(min(in_features, out_features) * rank_...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
razered/alternate
LinearLR
false
10,703
[ "MIT" ]
0
18e876aadc76d5f675cf940549b4bcd6e80a0288
https://github.com/razered/alternate/tree/18e876aadc76d5f675cf940549b4bcd6e80a0288
SpanClassifier
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.nn import BCELoss assert_size_stride = torch._C._dynamo.guards.assert_size_stride reinterpret_tensor = torc...
Bhaskers-Blu-Org1/superglue-mtl
SpanClassifier
false
7,771
[ "Apache-2.0" ]
15
1eb3e581c0ef3b4c261e0256ec26116d2b657c40
https://github.com/Bhaskers-Blu-Org1/superglue-mtl/tree/1eb3e581c0ef3b4c261e0256ec26116d2b657c40
ResidualBlock
# 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...
haonguyen1107/style_transfer
ResidualBlock
false
3,574
[ "MIT" ]
0
8df9b20ce8ebc446cf2c0a67393001b3cf318fed
https://github.com/haonguyen1107/style_transfer/tree/8df9b20ce8ebc446cf2c0a67393001b3cf318fed
WeightedMCEloss
import torch import torch.nn.functional import torch.nn as nn import torch.nn.functional as F def centercrop(image, w, h): _nt, _ct, ht, wt = image.size() padw, padh = (wt - w) // 2, (ht - h) // 2 if padw > 0 and padh > 0: image = image[:, :, padh:-padh, padw:-padw] return image class Weight...
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...
HelenGuohx/cv-ferattn-code
WeightedMCEloss
false
5,300
[ "MIT" ]
1
faa9b7850fe2a0f8c08193bb129b5fec4639d616
https://github.com/HelenGuohx/cv-ferattn-code/tree/faa9b7850fe2a0f8c08193bb129b5fec4639d616
InstanceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
ZihaoWang-233/CAMP_iccv19
InstanceLoss
false
14,725
[ "Apache-2.0" ]
116
b0ec07908f479e76f7ebddbcfb2199790305240a
https://github.com/ZihaoWang-233/CAMP_iccv19/tree/b0ec07908f479e76f7ebddbcfb2199790305240a
ShakeResNet
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...
Josie-Li/ZazuML-easy_AutoML
ShakeResNet
false
2,438
[ "MIT" ]
0
e4daabaab9df518c35abdba35a67607d002bee33
https://github.com/Josie-Li/ZazuML-easy_AutoML/tree/e4daabaab9df518c35abdba35a67607d002bee33
hswish
# 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...
Qidian213/NAIC2019
hswish
false
960
[ "MIT" ]
0
23e05a8a096168ccfa4d1743467fdf78ffcaabba
https://github.com/Qidian213/NAIC2019/tree/23e05a8a096168ccfa4d1743467fdf78ffcaabba
EuclideanDistance
import torch from torch import Tensor import torch.utils.data.dataloader from torch import nn import torch.nn def arccosh(x): """Compute the arcosh, numerically stable.""" x = torch.clamp(x, min=1 + EPSILON) a = torch.log(x) b = torch.log1p(torch.sqrt(x * x - 1) / x) return a + b def mdot(x, y):...
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.dataloader from torch import nn import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
chen-yuxuan/flair
EuclideanDistance
false
12,206
[ "MIT" ]
0
480d2c9afd66ab8d3bf40a676917e84dba3c4cee
https://github.com/chen-yuxuan/flair/tree/480d2c9afd66ab8d3bf40a676917e84dba3c4cee
RegressionHead
import abc import torch import torch.nn as nn from torch.nn.functional import * import torch.utils.data.dataset class BaseHead(nn.Module, metaclass=abc.ABCMeta): """Absract class for task heads""" @abc.abstractmethod def __init__(self): super().__init__() class RegressionHead(BaseHead): de...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 abc import t...
mfk3138/jiant
RegressionHead
false
4,171
[ "MIT" ]
0
6e67ff1ecb1bb98533c1019a86af4ad2c04c6a64
https://github.com/mfk3138/jiant/tree/6e67ff1ecb1bb98533c1019a86af4ad2c04c6a64
PowerLaw_Compressed_Loss
# 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...
taylorjdlee/VoiceSplit
PowerLaw_Compressed_Loss
false
13,023
[ "Apache-2.0" ]
0
bd914c42ae065bdda95d81a0ce0c173c29bb040f
https://github.com/taylorjdlee/VoiceSplit/tree/bd914c42ae065bdda95d81a0ce0c173c29bb040f
MaskedL1Loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils.dat...
WeisiX/ITAS3D
MaskedL1Loss
false
18,103
[ "MIT" ]
4
fc861e0cb2d4516905bfadab5e5e880c2b021832
https://github.com/WeisiX/ITAS3D/tree/fc861e0cb2d4516905bfadab5e5e880c2b021832
A2CNetwork
import torch import torch.nn as nn class A2CNetwork(nn.Module): def __init__(self, input_shape, output_shape, n_features, **kwargs): super(A2CNetwork, self).__init__() n_input = input_shape[-1] n_output = output_shape[0] self._h1 = nn.Linear(n_input, n_features) self._h2 =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
jacarvalho/mushroom-rl-benchmark
A2CNetwork
false
12,543
[ "MIT" ]
0
5bc2e9b1a12be33827d6edcd5c5ad49571e11275
https://github.com/jacarvalho/mushroom-rl-benchmark/tree/5bc2e9b1a12be33827d6edcd5c5ad49571e11275
CNormalized_Linear
# 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 ...
edgarvardanyan/CausalDiscoveryToolbox
CNormalized_Linear
false
10,247
[ "MIT" ]
0
5497a400440b49a3af14a0c7512bcdd307c9285d
https://github.com/edgarvardanyan/CausalDiscoveryToolbox/tree/5497a400440b49a3af14a0c7512bcdd307c9285d
GlobalAveragePool
import torch from torch import nn class GlobalAveragePool(nn.Module): """ Average pooling in an equivariant network """ def __init__(self): """ """ super().__init__() def forward(self, x): """ """ avg = torch.mean(x, dim=[-2, -1], keepdim=True) ...
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...
ElisevanderPol/symmetrizer
GlobalAveragePool
false
8,039
[ "MIT" ]
16
8dae02bee2ba7132ae4fb07e07020767d280842c
https://github.com/ElisevanderPol/symmetrizer/tree/8dae02bee2ba7132ae4fb07e07020767d280842c
BoundReciprocal
# 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 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
BoundReciprocal
false
7,287
[ "BSD-3-Clause" ]
1
55cb270b0b99f07b74541d55706c69fbb9daff66
https://github.com/mnmueller/auto_LiRPA/tree/55cb270b0b99f07b74541d55706c69fbb9daff66
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, math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_strid...
gndctrl2mjrtm/BNAF
Tanh
false
12,606
[ "MIT" ]
0
a8ecaa2844b5338f9091e58dd571fdc6a598e2f1
https://github.com/gndctrl2mjrtm/BNAF/tree/a8ecaa2844b5338f9091e58dd571fdc6a598e2f1
MLP
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn def gelu(x): return 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 * torch.pow(x, 3)))) class SharedDropout(torch.nn.Module): def __init__(self, p): super(SharedDropout, self).__in...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math import ...
albertkx/GeDi
MLP
false
12,111
[ "BSD-3-Clause" ]
0
27532eb6ac5dd42d817d25a905401504e916f9fb
https://github.com/albertkx/GeDi/tree/27532eb6ac5dd42d817d25a905401504e916f9fb
GANFeatLoss
import functools import torch from torch import nn as nn from torch.nn import functional as F from torch.nn import init as init from torchvision.models import vgg as vgg import torch.utils.data from torch.utils import data as data from torch import autograd as autograd def reduce_loss(loss, reduction): """Reduce ...
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 functools from torch import nn as nn from torch.nn import function...
hyunobae/BasicSR
GANFeatLoss
false
12,524
[ "Apache-2.0" ]
0
f2c2fc6cf28933658816c808f55c95fa20b16483
https://github.com/hyunobae/BasicSR/tree/f2c2fc6cf28933658816c808f55c95fa20b16483
AttentionPool2d
import torch import torch.nn.functional as F from torch import nn class AttentionPool2d(nn.Module): def __init__(self, spacial_dim: 'int', embed_dim: 'int', num_heads: 'int', output_dim: 'int'=None): super().__init__() self.positional_embedding = nn.Parameter(torch.randn(spacial_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....
graceduansu/CLIP
AttentionPool2d
false
12,492
[ "MIT" ]
0
14605e2118f43312cc00bf549aec388f5ddf802b
https://github.com/graceduansu/CLIP/tree/14605e2118f43312cc00bf549aec388f5ddf802b
Decoder5
# 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....
MingSun-Tse/Collaborative-Distillation
Decoder5
false
14,093
[ "MIT" ]
172
915712674af82ff91d926d922c14988cce0430f3
https://github.com/MingSun-Tse/Collaborative-Distillation/tree/915712674af82ff91d926d922c14988cce0430f3
MatrixTree
import torch import torch.nn as nn import torch.cuda import torch.distributed class MatrixTree(nn.Module): """Implementation of the matrix-tree theorem for computing marginals of non-projective dependency parsing. This attention layer is used in the paper "Learning Structured Text Representations" :ci...
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.cuda import torch.distributed assert_s...
ChenRocks/Distill-BERT-Textgen-ONMT
MatrixTree
false
17,150
[ "MIT" ]
7
d83dd1a95af7513cbfae4a2768f6effc2f3a589f
https://github.com/ChenRocks/Distill-BERT-Textgen-ONMT/tree/d83dd1a95af7513cbfae4a2768f6effc2f3a589f
Encoder
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn.functional as F from torch import nn assert_size_stride = torch....
GewoonMaarten/spherical-dmri-conv
Encoder
false
2,303
[ "MIT" ]
0
6a5bbb31cf70a5f8b839f92e534f49664001ea09
https://github.com/GewoonMaarten/spherical-dmri-conv/tree/6a5bbb31cf70a5f8b839f92e534f49664001ea09
SimpleGeluModule
import torch import torch.nn.functional as F import torch.jit import torch.onnx import torch.nn class SimpleGeluModule(torch.nn.Module): def forward(self, tensor): return F.gelu(tensor + tensor) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._...
briancoutinho/glow
SimpleGeluModule
false
12,574
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
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 import torch.cuda import torch.nn as nn assert_size_stride = torch._C._dynamo.gu...
HalfLemon/kaggle-dstl
UpBlock
false
13,762
[ "MIT" ]
218
b1d3a518bbbd3503bdf07400841183d2386fd158
https://github.com/HalfLemon/kaggle-dstl/tree/b1d3a518bbbd3503bdf07400841183d2386fd158
VisErrorLossV13
import torch import torch.nn.functional as F from torch import nn class VisErrorLossV13(nn.Module): def __init__(self): super(VisErrorLossV13, self).__init__() def compute_l1_weighted_loss(self, hm_targets, hm_preds, vismap, ohem=1.0): """ :param hm_targets: [batch size, keypoint num...
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...
gathierry/FashionAI-KeyPointsDetectionOfApparel
VisErrorLossV13
false
15,462
[ "Apache-2.0" ]
174
2e0942b42b4a9cd974cdddc151675738dc8a8cb4
https://github.com/gathierry/FashionAI-KeyPointsDetectionOfApparel/tree/2e0942b42b4a9cd974cdddc151675738dc8a8cb4
cnn_4layer_LeakyRelu
import torch import torch.nn as nn import torch.nn.functional as F class cnn_4layer_LeakyRelu(nn.Module): def __init__(self, in_ch, in_dim, width=2, linear_size=256, alpha=0.1): super(cnn_4layer_LeakyRelu, self).__init__() self.conv1 = nn.Conv2d(in_ch, 4 * width, 4, stride=2, padding=1) s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
mnmueller/auto_LiRPA
cnn_4layer_LeakyRelu
false
7,264
[ "BSD-3-Clause" ]
1
55cb270b0b99f07b74541d55706c69fbb9daff66
https://github.com/mnmueller/auto_LiRPA/tree/55cb270b0b99f07b74541d55706c69fbb9daff66
ActorDDPGNonConvNetwork
# 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....
ruyueshuo/MaskTrackRCNN
ActorDDPGNonConvNetwork
false
7,585
[ "Apache-2.0" ]
1
3c6ada36be3c2b2df32176349ec5c0ee5b24e724
https://github.com/ruyueshuo/MaskTrackRCNN/tree/3c6ada36be3c2b2df32176349ec5c0ee5b24e724
_DynamicGates
# 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...
rro2q2/transfer-learning-aaai21
_DynamicGates
false
10,813
[ "BSD-3-Clause" ]
0
f1960540d0608ce1e4d1d64bb4abd29d953f250f
https://github.com/rro2q2/transfer-learning-aaai21/tree/f1960540d0608ce1e4d1d64bb4abd29d953f250f
NonSaturatingLoss
import torch import torch.nn.functional as F def non_saturating_loss(logits, targets): probs = logits.softmax(1) log_prob = torch.log(1 - probs + 1e-12) if targets.ndim == 2: return -(targets * log_prob).sum(1).mean() else: return F.nll_loss(log_prob, targets) class NonSaturatingLoss...
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...
DensoITLab/TeachAugment
NonSaturatingLoss
false
7,983
[ "BSD-2-Clause" ]
20
66ec099a0afab99e18531c5437182cfe17dc30c8
https://github.com/DensoITLab/TeachAugment/tree/66ec099a0afab99e18531c5437182cfe17dc30c8
CausalSelfAttention
# 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....
itsdaniele/graphtrans
CausalSelfAttention
false
3,684
[ "Apache-2.0" ]
0
9cdf68af725b258deced4424dbcd5942a481ff8d
https://github.com/itsdaniele/graphtrans/tree/9cdf68af725b258deced4424dbcd5942a481ff8d
Fp32LayerNorm
# 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 import torch.utils.data import torch.onnx.operators impor...
DCMMC/chineseocr
Fp32LayerNorm
false
9,241
[ "MIT" ]
0
0b8772615239ea7f212b1ab5bc75183e7e9f16b0
https://github.com/DCMMC/chineseocr/tree/0b8772615239ea7f212b1ab5bc75183e7e9f16b0
EltwiseProdScoring
# 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...
cacosandon/speaker_follower_with_objects
EltwiseProdScoring
false
12,194
[ "BSD-2-Clause", "MIT" ]
0
f3d454fdbd1c8129887cf4ecc4743d231c7b9555
https://github.com/cacosandon/speaker_follower_with_objects/tree/f3d454fdbd1c8129887cf4ecc4743d231c7b9555
DecoderBlock
# 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.utils.data impor...
CorentinLemaitre/robosat.pink
DecoderBlock
false
5,031
[ "MIT" ]
1
6ec29a4dd4c0cbf953e73818d7338ee68b2451d3
https://github.com/CorentinLemaitre/robosat.pink/tree/6ec29a4dd4c0cbf953e73818d7338ee68b2451d3
VAE
import torch from torch import nn import torch.nn.functional as F class VAE(nn.Module): def __init__(self, n_features): super(VAE, self).__init__() self.fc1 = nn.Linear(n_features, 1000) self.fc2 = nn.Linear(1000, n_features) def encode(self, x): h1 = F.relu(self.fc1(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 import nn import t...
ShengquanChen/stPlus
VAE
false
11,872
[ "MIT" ]
0
b2af43a4fe78230ddf95cab75c114e25527800e1
https://github.com/ShengquanChen/stPlus/tree/b2af43a4fe78230ddf95cab75c114e25527800e1
Network
import torch import torch.nn as nn class Network(nn.Module): def __init__(self, input_shape, output_shape, n_features, **kwargs): super(Network, self).__init__() n_input = input_shape[-1] n_output = output_shape[0] self._h1 = nn.Linear(n_input, n_features) self._h2 = nn.Li...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
TheCamusean/mushroom-rl
Network
false
2,891
[ "MIT" ]
0
48585f883e546ea57224b8d446ecb9b8ba90cf73
https://github.com/TheCamusean/mushroom-rl/tree/48585f883e546ea57224b8d446ecb9b8ba90cf73
DropBlock_Ske
# 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...
Levigty/AimCLR
DropBlock_Ske
false
8,453
[ "MIT" ]
25
6cd73767f17748792508647355fa324fa63e235d
https://github.com/Levigty/AimCLR/tree/6cd73767f17748792508647355fa324fa63e235d
SimpleMLP
import torch import torch.optim import torch.jit import torch.nn as nn class SimpleMLP(nn.Module): def __init__(self, num_in_features: 'int', num_out_features: 'int', neurons_per_layer: 'int'): super(SimpleMLP, self).__init__() self.act = nn.ELU() self.l_in = nn.Linear(in_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.triton_helpers import libdevice import torch.optim ...
plaveczlambert/deep_euler_tests
SimpleMLP
false
7,478
[ "MIT" ]
1
a3ceef98ba76bd7a00ccd3c773cd9850311b3b1a
https://github.com/plaveczlambert/deep_euler_tests/tree/a3ceef98ba76bd7a00ccd3c773cd9850311b3b1a
GlobalAttention
import math import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter from torch.nn import Parameter import torch.cuda import torch.distributed def quantize_weights(W, numbits=8): W = W.clamp(-2 ** (numbits - 1), 2 ** (numbits - 1)) W = W.mu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
csk7/CS550-NLP-McGill-
GlobalAttention
false
9,968
[ "MIT" ]
0
a6f295b88539015d8accdbd410357c42df7c4287
https://github.com/csk7/CS550-NLP-McGill-/tree/a6f295b88539015d8accdbd410357c42df7c4287