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
Encoder
import torch import torch.nn as nn class Encoder(nn.Module): def __init__(self, input_dim, hidden_dim, latent_dim): super(Encoder, self).__init__() self.FC_input = nn.Linear(input_dim, hidden_dim) self.FC_mean = nn.Linear(hidden_dim, latent_dim) self.FC_var = nn.Linear(hidden_dim,...
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...
CsekM8/dtu_mlops
Encoder
false
11,329
[ "Apache-2.0" ]
0
5c96a9afac0298fab57b7d47e4c08497f4a5d8d9
https://github.com/CsekM8/dtu_mlops/tree/5c96a9afac0298fab57b7d47e4c08497f4a5d8d9
AvgReadout
import torch import torch.nn as nn class AvgReadout(nn.Module): """ Considering the efficiency of the method, we simply employ average pooling, computing the average of the set of embedding matrices .. math:: \\begin{equation} \\mathbf{H}=\\mathcal{Q}\\left(\\left\\{\\mathbf{H}^{(r)} \\mid ...
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...
BUPTlfq/OpenHGNN
AvgReadout
false
1,997
[ "Apache-2.0" ]
0
77041e68c33a8a42a2c187c6e42d85b81cbb25d3
https://github.com/BUPTlfq/OpenHGNN/tree/77041e68c33a8a42a2c187c6e42d85b81cbb25d3
TokenEmbedding
import torch import torch.nn as nn class TokenEmbedding(nn.Module): def __init__(self, c_in, d_model): super(TokenEmbedding, self).__init__() padding = 1 if torch.__version__ >= '1.5.0' else 2 self.tokenConv = nn.Conv1d(in_channels=c_in, out_channels=d_model, kernel_size=3, pa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Xianchao-Wu/informer
TokenEmbedding
false
5,986
[ "Apache-2.0" ]
1
bb9cb3c6ff9e7e76c8dbbf3bcc7924df1f18982d
https://github.com/Xianchao-Wu/informer/tree/bb9cb3c6ff9e7e76c8dbbf3bcc7924df1f18982d
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....
Anshul044/Project-NN
Attention
false
71
[ "MIT" ]
0
ef080846715a95b735f0381e4f60742e40791630
https://github.com/Anshul044/Project-NN/tree/ef080846715a95b735f0381e4f60742e40791630
HierarchicalPolicy
# 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....
hanhanAnderson/LSF-SAC
HierarchicalPolicy
false
6,780
[ "MIT" ]
1
3e2daf0da23b0ea08e92948c87f7e583f3fb1ed9
https://github.com/hanhanAnderson/LSF-SAC/tree/3e2daf0da23b0ea08e92948c87f7e583f3fb1ed9
GCN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn.functional as F from torch import nn import torch.nn.parallel as...
gist-ailab/uoais
GCN
false
15,430
[ "BSD-2-Clause" ]
52
fb42d9a96cd54daad61c956d8d9d65dd0ebef4c7
https://github.com/gist-ailab/uoais/tree/fb42d9a96cd54daad61c956d8d9d65dd0ebef4c7
SoftArgMax
import torch import torch.nn as nn import torch.nn.functional as F class SoftArgMax(nn.Module): def __init__(self): super().__init__() def forward(self, x, labels, kernel_size=0): """ Args x: [B, C, Nd] labels: [Nd] Returns [B, C] "...
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...
hcyz33/PlaneSweepPose
SoftArgMax
false
3,579
[ "MIT" ]
0
4ae3a4e7e939fa74c060eb1b354c34ea0fb55248
https://github.com/hcyz33/PlaneSweepPose/tree/4ae3a4e7e939fa74c060eb1b354c34ea0fb55248
MemoryEfficientSwish
# 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 import torch.utils.data.distributed assert_size_st...
BradleyBrown19/CustomObjectDetector
MemoryEfficientSwish
false
2,078
[ "Apache-2.0" ]
0
11c14ec6127c553ac365703c768b75dde33d9a4d
https://github.com/BradleyBrown19/CustomObjectDetector/tree/11c14ec6127c553ac365703c768b75dde33d9a4d
ReRegualizedLinearMNACLayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import collections import math import torch.utils.data assert_size_stride = torch._C._dyn...
wlm2019/Neural-Arithmetic-Units
ReRegualizedLinearMNACLayer
false
16,720
[ "MIT" ]
147
f9de9d004bb2dc2ee28577cd1760d0a00c185836
https://github.com/wlm2019/Neural-Arithmetic-Units/tree/f9de9d004bb2dc2ee28577cd1760d0a00c185836
DownsampleB
import torch import torch.nn as nn class DownsampleB(nn.Module): def __init__(self, nIn, nOut, stride): super(DownsampleB, self).__init__() self.avg = nn.AvgPool2d(stride) self.expand_ratio = nOut // nIn def forward(self, x): x = self.avg(x) return torch.cat([x] + [x....
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
andyqmongo/InstAParam
DownsampleB
false
18,332
[ "MIT" ]
3
00494d5367ec32b4ce90d01778cba9d4f1166833
https://github.com/andyqmongo/InstAParam/tree/00494d5367ec32b4ce90d01778cba9d4f1166833
Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
linsats/GRAC2.0
Critic
false
3,919
[ "MIT" ]
0
2fde25103b2316a3435ef0ebdbf471ec4e204fbe
https://github.com/linsats/GRAC2.0/tree/2fde25103b2316a3435ef0ebdbf471ec4e204fbe
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....
KaiQiangSong/joint_parse_summ
Attention
false
8,799
[ "BSD-3-Clause" ]
29
5d4a40d9a681bc8b06c847643d810846f3867216
https://github.com/KaiQiangSong/joint_parse_summ/tree/5d4a40d9a681bc8b06c847643d810846f3867216
TripletSoftmaxLoss
# 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 ...
Lm0079/MetricLearningIdentification
TripletSoftmaxLoss
false
2,526
[ "MIT" ]
0
3c2c0512fe2fbbb6aacb958106d5f6a03baedc35
https://github.com/Lm0079/MetricLearningIdentification/tree/3c2c0512fe2fbbb6aacb958106d5f6a03baedc35
BertAttention
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn import torch.utils.data class BertLayerNorm(nn.Module): def __init__(self, hidden_size, eps=1e-05): """Construct a layernorm module in the TF style (epsilon inside the square root).""" super(BertLayerNorm...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
shubham-gupta-iitr/mmmlX
BertAttention
false
4,339
[ "Apache-2.0" ]
0
3485e6191e0e45bf1c8168e4e928a36ab9264d22
https://github.com/shubham-gupta-iitr/mmmlX/tree/3485e6191e0e45bf1c8168e4e928a36ab9264d22
Temporal_Attention_layer
import torch from torch import nn import torch.nn.functional as F class Temporal_Attention_layer(nn.Module): def __init__(self, DEVICE, in_channels, num_of_vertices, num_of_timesteps): super(Temporal_Attention_layer, self).__init__() self.U1 = nn.Parameter(torch.FloatTensor(num_of_vertices)) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
abcdefg-dev-dd/asxdcvfg
Temporal_Attention_layer
false
6,065
[ "Apache-2.0" ]
1
83421d4a133810968d6e04b256a9312895452941
https://github.com/abcdefg-dev-dd/asxdcvfg/tree/83421d4a133810968d6e04b256a9312895452941
MixedLoss
# 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...
xkp793003821/kaggle-tgs-salt
MixedLoss
false
4,586
[ "MIT" ]
0
4acd7f8b6aff914e2c8558677d6dac8b5ddc1f30
https://github.com/xkp793003821/kaggle-tgs-salt/tree/4acd7f8b6aff914e2c8558677d6dac8b5ddc1f30
DiceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
phenixcxz/DeepGlobe-Road-Extraction-Challenge
DiceLoss
false
10,667
[ "MIT" ]
0
4dee0f0866ff6f06b888afd28a60940b75a8eadd
https://github.com/phenixcxz/DeepGlobe-Road-Extraction-Challenge/tree/4dee0f0866ff6f06b888afd28a60940b75a8eadd
node_encoder
import torch import torch.nn as nn import torch.nn.functional as F class node_encoder(nn.Module): def __init__(self, num_in_node, num_hidden, dropout, act=F.tanh): super(node_encoder, self).__init__() self.num_in_node = num_in_node self.num_hidden = num_hidden self.dropout = dropo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
iMoonLab/HHDTI
node_encoder
false
6,841
[ "MIT" ]
1
b2dd0e78818888e676afc91af1425dada5b3258a
https://github.com/iMoonLab/HHDTI/tree/b2dd0e78818888e676afc91af1425dada5b3258a
MaxPoolWithMask
import torch import torch.nn as nn class MaxPoolWithMask(nn.Module): """ 带mask矩阵的max pooling。在做max-pooling的时候不会考虑mask值为0的位置。 """ def __init__(self): super(MaxPoolWithMask, self).__init__() self.inf = 10000000000000.0 def forward(self, tensor, mask, dim=1): """ :pa...
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...
lonePatient/TorchBlocks
MaxPoolWithMask
false
15,958
[ "MIT" ]
82
4a65d746cc8a396cb7df73ed4644d97ddf843e29
https://github.com/lonePatient/TorchBlocks/tree/4a65d746cc8a396cb7df73ed4644d97ddf843e29
get_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...
ChunhuiChen97/RetinalVesselSegmentation
get_loss
false
8,930
[ "MIT" ]
0
d291e23b1ad9814070897ef850d0117d67331d70
https://github.com/ChunhuiChen97/RetinalVesselSegmentation/tree/d291e23b1ad9814070897ef850d0117d67331d70
cal_L2Norm
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
RiyaoDong/HGSL
cal_L2Norm
false
2,765
[ "Apache-2.0" ]
0
19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
https://github.com/RiyaoDong/HGSL/tree/19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
CrossEntropyLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
AlphaLFC/mmdetection
CrossEntropyLoss
false
4,834
[ "Apache-2.0" ]
1
45619c5b8aca0ca3e6ddc211210a8946c94694d8
https://github.com/AlphaLFC/mmdetection/tree/45619c5b8aca0ca3e6ddc211210a8946c94694d8
LxmertAttentionOutput
import torch import torch.utils.data import torch.nn as nn import torch import torch.nn.parallel class LxmertAttentionOutput(nn.Module): def __init__(self, hidden_size, hidden_dropout_prob): super().__init__() self.dense = nn.Linear(hidden_size, hidden_size) self.LayerNorm = nn.LayerNorm(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
IsmaelElsharkawi/new_pororo_repo
LxmertAttentionOutput
false
8,335
[ "MIT" ]
19
4617083b420615b8a3eb0f44d02e4e91a8f407f7
https://github.com/IsmaelElsharkawi/new_pororo_repo/tree/4617083b420615b8a3eb0f44d02e4e91a8f407f7
RewardCriterion
import torch import torch.nn as nn from torch.autograd import * class RewardCriterion(nn.Module): def __init__(self): super(RewardCriterion, self).__init__() def forward(self, input, seq, reward): input = input.gather(2, seq.unsqueeze(2)).squeeze(2) input = input.reshape(-1) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.autograd import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
linzhlalala/self-critical.pytorch
RewardCriterion
false
7,109
[ "MIT" ]
1
b856250ac52ba63656b1b03cdc3d7e830ed43f68
https://github.com/linzhlalala/self-critical.pytorch/tree/b856250ac52ba63656b1b03cdc3d7e830ed43f68
SigmoidFocalClassificationLoss
import torch import torch.nn as nn class SigmoidFocalClassificationLoss(nn.Module): """ Sigmoid focal cross entropy loss. """ def __init__(self, gamma: 'float'=2.0, alpha: 'float'=0.25): """ Args: gamma: Weighting parameter to balance loss for hard and easy examples. ...
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...
AbangLZU/OpenPCDet
SigmoidFocalClassificationLoss
false
7,642
[ "Apache-2.0" ]
29
eeea3f24d392f692228c1ad4e28c0dc9d0e25665
https://github.com/AbangLZU/OpenPCDet/tree/eeea3f24d392f692228c1ad4e28c0dc9d0e25665
Actor
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
saman-aghazadeh/distiller
Actor
false
4,255
[ "Apache-2.0" ]
0
7e8d3e6193c807f7c55d8453f64e1bc3c02eee30
https://github.com/saman-aghazadeh/distiller/tree/7e8d3e6193c807f7c55d8453f64e1bc3c02eee30
CrossEntropy
# 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.functi...
SHI-Labs/Semi-Supervised-Transfer-Learning
CrossEntropy
false
14,349
[ "MIT" ]
81
f206750824ffe10f88a2b418b2b671da61b999f6
https://github.com/SHI-Labs/Semi-Supervised-Transfer-Learning/tree/f206750824ffe10f88a2b418b2b671da61b999f6
Decoder
import torch import torch.nn as nn class Decoder(nn.Module): def __init__(self, latent_size, m): super(Decoder, self).__init__() self.latent_size = latent_size self.fc = nn.Linear(latent_size, m) self.deconv1 = nn.ConvTranspose2d(m, 128, 5, stride=2) self.deconv2 = nn.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 import triton_helpers import torch.nn as nn assert_...
lshoek/creative-evo-controller
Decoder
false
10,454
[ "MIT" ]
0
a5f1742c172255cca2338b76ae1c5b4db277bb0d
https://github.com/lshoek/creative-evo-controller/tree/a5f1742c172255cca2338b76ae1c5b4db277bb0d
CameraPriorLoss
# 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.cuda.comm assert_size_stride = torch._...
JasonBoy1/mmhuman3d
CameraPriorLoss
false
5,376
[ "Apache-2.0" ]
1
79b2665191115f3ed905e6afdf09990a8d484362
https://github.com/JasonBoy1/mmhuman3d/tree/79b2665191115f3ed905e6afdf09990a8d484362
IOU
import torch def _iou(pred, target, size_average=True): b = pred.shape[0] IoU = 0.0 for i in range(0, b): Iand1 = torch.sum(target[i, :, :, :] * pred[i, :, :, :]) Ior1 = torch.sum(target[i, :, :, :]) + torch.sum(pred[i, :, :, :] ) - Iand1 IoU1 = Iand1 / Ior1 IoU...
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...
DoJing/BASNet
IOU
false
2,162
[ "MIT" ]
0
46bd3462326e6c7a02c90273c15da6fa71cec0e2
https://github.com/DoJing/BASNet/tree/46bd3462326e6c7a02c90273c15da6fa71cec0e2
Conv2dTime
# 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...
BeeQC/ANODE-reproducibility
Conv2dTime
false
146
[ "MIT" ]
0
9d6b5a297302cdaa0bbc3908de1a94f3c28c0606
https://github.com/BeeQC/ANODE-reproducibility/tree/9d6b5a297302cdaa0bbc3908de1a94f3c28c0606
Gradient
# 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 ...
RunqiuBao/Event_ESTRNN
Gradient
false
14,339
[ "MIT" ]
180
6d156cc42a3a33bd0b4b7c4c4be98f943ff53acb
https://github.com/RunqiuBao/Event_ESTRNN/tree/6d156cc42a3a33bd0b4b7c4c4be98f943ff53acb
KeypointsMSESmoothLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cud...
yihui-he2020/epipolar-transformers
KeypointsMSESmoothLoss
false
16,762
[ "MIT" ]
360
6824f4345b2998500fbacd0f4e30f67f8e3da7b8
https://github.com/yihui-he2020/epipolar-transformers/tree/6824f4345b2998500fbacd0f4e30f67f8e3da7b8
Copy
# 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...
ChansongJo/DAMD
Copy
false
7,863
[ "Apache-2.0" ]
39
9b0456d7e590fb5de77ec81e967e8010487eeb56
https://github.com/ChansongJo/DAMD/tree/9b0456d7e590fb5de77ec81e967e8010487eeb56
GAT
import torch import torch.nn as nn import torch.nn.functional as F class GraphAttentionLayer(nn.Module): """ Simple GAT layer, similar to https://arxiv.org/abs/1710.10903 """ def __init__(self, in_features, out_features, dropout, alpha, concat=True): super(GraphAttentionLayer, self).__init__(...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
markheimann/fgc
GAT
false
12,773
[ "MIT" ]
0
909d4f0a84c9b61a8030f9f3f50b17f143576007
https://github.com/markheimann/fgc/tree/909d4f0a84c9b61a8030f9f3f50b17f143576007
AveragePooling
import torch import torch.nn as nn class AveragePooling(nn.Module): def __init__(self): super(AveragePooling, self).__init__() """ (item, subitem) can be (word, characters), or (sentence, words) x: num_items x max_subitem_size x input_size x_mask: num_items x max_subitem_size retu...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
mpandeydev/SDnetmod
AveragePooling
false
7,272
[ "MIT" ]
1
c8cdf6150e3cd28330359a7d81df236729522a69
https://github.com/mpandeydev/SDnetmod/tree/c8cdf6150e3cd28330359a7d81df236729522a69
decoderVH
# 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....
Miles629/TransparentShapeRealData
decoderVH
false
14,077
[ "MIT" ]
91
b81098a2d1882f5fd33fba6167d7258dbe02d6d2
https://github.com/Miles629/TransparentShapeRealData/tree/b81098a2d1882f5fd33fba6167d7258dbe02d6d2
ProjectionInputPose
# 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_...
aliyun/dro-sfm
ProjectionInputPose
false
14,818
[ "MIT" ]
147
8707e2e0ef799d7d47418a018060f503ef449fe3
https://github.com/aliyun/dro-sfm/tree/8707e2e0ef799d7d47418a018060f503ef449fe3
BellMembFunc
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
samxu0823/anfis-pytorch
BellMembFunc
false
4,265
[ "MIT" ]
0
b4ec3f0e8259963800e9e0a2904a580d1e56cc1c
https://github.com/samxu0823/anfis-pytorch/tree/b4ec3f0e8259963800e9e0a2904a580d1e56cc1c
SineODE
# 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 math assert_size_stride = torch._C._dynamo.guards.assert_size_stri...
navaro1/parking_prediction
SineODE
false
12,888
[ "MIT" ]
0
c532a2f75155abc9c0d4be9c955eabe368591932
https://github.com/navaro1/parking_prediction/tree/c532a2f75155abc9c0d4be9c955eabe368591932
MLP
import torch import torch.nn as nn class MLP(nn.Module): """ Create a multilayer perceptron model with variable hidden layers. The network will have the specified number of layers and neurons, with each layer using the leaky ReLU activation function. Parameters ---------- input_dim : int...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
wfondrie/wefpy
MLP
false
13,094
[ "Apache-2.0" ]
0
00691d453048203e1e3b1daea53879067ee4a395
https://github.com/wfondrie/wefpy/tree/00691d453048203e1e3b1daea53879067ee4a395
DRRN
import torch import torch.nn as nn from math import sqrt class DRRN(nn.Module): def __init__(self): super(DRRN, self).__init__() self.input = nn.Conv2d(in_channels=1, out_channels=128, kernel_size =3, stride=1, padding=1, bias=False) self.conv1 = nn.Conv2d(in_channels=128, out...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 from ma...
loyo1990/DRRN-pytorch
DRRN
false
10,425
[ "MIT" ]
0
63d7dfd4c6bcb4f7b668fc2f5b4e2031cbba6619
https://github.com/loyo1990/DRRN-pytorch/tree/63d7dfd4c6bcb4f7b668fc2f5b4e2031cbba6619
Permute
import torch import torch.nn as nn class Permute(nn.Module): def __init__(self, permutation=[2, 1, 0]): super().__init__() self.permutation = permutation def forward(self, input): return input[:, self.permutation] def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_in...
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...
beibuwandeluori/Attack-ImageNet-tianchi
Permute
false
3,196
[ "MIT" ]
0
85294952ac1a190c26bba5e8f141b1c68e72668a
https://github.com/beibuwandeluori/Attack-ImageNet-tianchi/tree/85294952ac1a190c26bba5e8f141b1c68e72668a
CrossEntropy
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn i...
uncharted-distil/d3m-primitives
CrossEntropy
false
13,057
[ "Apache-2.0" ]
0
e8d37dbe302c0f2bae4e7f7fa241a46faebc9b79
https://github.com/uncharted-distil/d3m-primitives/tree/e8d37dbe302c0f2bae4e7f7fa241a46faebc9b79
Lambda
import torch import torch.nn as nn class Lambda(nn.Module): def forward(self, t, y): t = t.unsqueeze(0) equation = -1000 * y + 3000 - 2000 * torch.exp(-t) return equation def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): retur...
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...
arnabgho/torchdiffeq
Lambda
false
3,192
[ "MIT" ]
0
d4f73440d0e714b87ea133610e61eefbd673e5f5
https://github.com/arnabgho/torchdiffeq/tree/d4f73440d0e714b87ea133610e61eefbd673e5f5
DRRN
# 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 from ma...
loyo1990/DRRN-pytorch
DRRN
false
10,425
[ "MIT" ]
0
63d7dfd4c6bcb4f7b668fc2f5b4e2031cbba6619
https://github.com/loyo1990/DRRN-pytorch/tree/63d7dfd4c6bcb4f7b668fc2f5b4e2031cbba6619
ReOrgLayer
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data import torch.utils.data.distributed import torch._utils assert_size_stride = torch._C._dynamo....
Humoon/motion_reconstruction
ReOrgLayer
false
2,351
[ "BSD-3-Clause" ]
0
9f0d0af3aeafa97455ec19dc4988f1577005c294
https://github.com/Humoon/motion_reconstruction/tree/9f0d0af3aeafa97455ec19dc4988f1577005c294
BertSelfAttention
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn import torch.nn.functional as F class BertSelfAttention(nn.Module): def __init__(self, config): super().__init__() self.num_attention_heads = config.num_attention_heads self.attention_head_size = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
sleepope/cs769-assignments
BertSelfAttention
false
13,000
[ "MIT" ]
0
36c7a75d39507b7fe7b2b1bf1de6b8033b110da5
https://github.com/sleepope/cs769-assignments/tree/36c7a75d39507b7fe7b2b1bf1de6b8033b110da5
BilinearClassifyBlock
# 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....
caijh33/I3D_CTC
BilinearClassifyBlock
false
9,920
[ "Apache-2.0" ]
0
dd73ece2b810eed775fc847b7017080902e9c260
https://github.com/caijh33/I3D_CTC/tree/dd73ece2b810eed775fc847b7017080902e9c260
VAE
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math...
Hassan-Lee/FusionModelingOfUser-GeneratedReviewDataOfComplexHeterogeneousTypes
VAE
false
5,280
[ "MIT" ]
1
b863e3fbf8058ecb06246a843e3fd2568bbbf260
https://github.com/Hassan-Lee/FusionModelingOfUser-GeneratedReviewDataOfComplexHeterogeneousTypes/tree/b863e3fbf8058ecb06246a843e3fd2568bbbf260
InteractingLayer
# 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....
dulvqingyunLT/DeepCTR-Torch
InteractingLayer
false
10,427
[ "Apache-2.0" ]
0
f40cf08f3469aa471f9ca69e44c5de51180341cc
https://github.com/dulvqingyunLT/DeepCTR-Torch/tree/f40cf08f3469aa471f9ca69e44c5de51180341cc
GlobalAvgPool2d
import torch import torch.nn as nn import torch.nn.functional as F class GlobalAvgPool2d(nn.Module): def __init__(self): super(GlobalAvgPool2d, self).__init__() def forward(self, x): N = x.data.size(0) C = x.data.size(1) H = x.data.size(2) W = x.data.size(3) x...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
CoDaS-Lab/Contextual-Adversarial-Patches
GlobalAvgPool2d
false
2,100
[ "MIT" ]
0
ffbd897174fc381ba7c3ba1e6f827b84ccb30fd4
https://github.com/CoDaS-Lab/Contextual-Adversarial-Patches/tree/ffbd897174fc381ba7c3ba1e6f827b84ccb30fd4
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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cu...
igorvlnascimento/open-nre
MultiHeadAttention
false
12,521
[ "MIT" ]
0
a6e42ef074d62be4d3ceb571f412d5be8c0502d7
https://github.com/igorvlnascimento/open-nre/tree/a6e42ef074d62be4d3ceb571f412d5be8c0502d7
Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
gntoni/pytorch-ddpg-naf
Critic
false
12,466
[ "MIT" ]
0
d208d0c0c38a9d2d2041f1e7e95695359eba430e
https://github.com/gntoni/pytorch-ddpg-naf/tree/d208d0c0c38a9d2d2041f1e7e95695359eba430e
SFT_torch
# 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....
CoinCheung/SFT-ReID
SFT_torch
false
8,186
[ "MIT" ]
22
2df67554732393df5a231b7281e12fc3435f1e8c
https://github.com/CoinCheung/SFT-ReID/tree/2df67554732393df5a231b7281e12fc3435f1e8c
L2Distance
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn import torch.autograd assert_size_stride = torch._C._dynam...
cassidylaidlaw/perceptual-advex
L2Distance
false
15,010
[ "MIT" ]
45
d39136eb5b5e950442456ddade6b4f4fba3dd8f6
https://github.com/cassidylaidlaw/perceptual-advex/tree/d39136eb5b5e950442456ddade6b4f4fba3dd8f6
GRULRCell
import torch import torch.nn as nn import torch.onnx from itertools import product as product def gen_nonlinearity(A, nonlinearity): """ Returns required activation for a tensor based on the inputs nonlinearity is either a callable or a value in ['tanh', 'sigmoid', 'relu', 'quantTanh', 'quantSigm...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
ShishirPatil/EdgeML-1
GRULRCell
false
1,073
[ "MIT" ]
0
cbba9f8b989e545788427c004eb8450e7e4c1a21
https://github.com/ShishirPatil/EdgeML-1/tree/cbba9f8b989e545788427c004eb8450e7e4c1a21
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 import math from torch import Tensor from torch.nn import Parameter import torch...
pwycl/pytorch_geometric
Linear
false
10,774
[ "MIT" ]
0
ef7b1add2bb5a36a3a68cae7639c42000f629cac
https://github.com/pwycl/pytorch_geometric/tree/ef7b1add2bb5a36a3a68cae7639c42000f629cac
ValueNetwork
import torch import torch.nn as nn import torch.nn.functional as F class ValueNetwork(nn.Module): def __init__(self, state_dim, hidden_dim, init_w=0.003): super(ValueNetwork, self).__init__() self.linear1 = nn.Linear(state_dim, hidden_dim) self.linear2 = nn.Linear(hidden_dim, hidden_dim) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
FTC-8856/SAC
ValueNetwork
false
9,042
[ "MIT" ]
0
98898d2c4b2ae99b74a8b5a6934d5d3cb91fe5f4
https://github.com/FTC-8856/SAC/tree/98898d2c4b2ae99b74a8b5a6934d5d3cb91fe5f4
Hardsigmoid
import torch from torch import Tensor from torch import nn class Hardsigmoid(nn.Module): def __init__(self) ->None: super().__init__() def forward(self, x: 'Tensor') ->Tensor: x = (0.2 * x + 0.5).clamp(min=0.0, max=1.0) return x def get_inputs(): return [torch.rand([4, 4, 4, 4]...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empt...
Jo951128/2021-2-MIP
Hardsigmoid
false
2,429
[ "MIT" ]
0
511e0a38816d16fdba9631f76cf913ba51c43138
https://github.com/Jo951128/2021-2-MIP/tree/511e0a38816d16fdba9631f76cf913ba51c43138
LocallyConnected
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.a...
FrankTianTT/notears
LocallyConnected
false
9,028
[ "Apache-2.0" ]
0
ead1e4fa966e29343a393d637320f98ee0cada7c
https://github.com/FrankTianTT/notears/tree/ead1e4fa966e29343a393d637320f98ee0cada7c
ScaledLeakyReLU
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
BinahHu/stylegan2-pytorch
ScaledLeakyReLU
false
155
[ "MIT", "BSD-2-Clause", "Apache-2.0" ]
0
9975707ffd93872fce02f7e3654eb588a09e23e4
https://github.com/BinahHu/stylegan2-pytorch/tree/9975707ffd93872fce02f7e3654eb588a09e23e4
InnerProductDecoder
# 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 import nn import torch.nn.modules.loss from scipy.sparse import * ass...
IBM/graph4nlp
InnerProductDecoder
false
8,338
[ "Apache-2.0" ]
18
a9bf20b23fa1ec368d9bd40cc8c557f86a9f8297
https://github.com/IBM/graph4nlp/tree/a9bf20b23fa1ec368d9bd40cc8c557f86a9f8297
_DualSpanningAvgPool
import torch from torch import nn from typing import * class _DualSpanningAvgPool(nn.Module): """Module with two average pools: one that spans the full height of the image and another the spans the full width. Outputs are flattened and concatenated. Args: rows (int): Number of rows in image. ...
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
_DualSpanningAvgPool
false
13,799
[ "MIT" ]
148
d5712a0815a9486b0e0c76b54cd63c880188fc8e
https://github.com/HughMun/MultiBench/tree/d5712a0815a9486b0e0c76b54cd63c880188fc8e
CecaModule
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn import torch.nn.parallel assert_size_stride = ...
Fanzhongjie/ARFE
CecaModule
false
459
[ "Apache-2.0" ]
0
4b96b8c5bc0895d3d30acec2a490f81a860fe860
https://github.com/Fanzhongjie/ARFE/tree/4b96b8c5bc0895d3d30acec2a490f81a860fe860
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
arcada-uas/intro-to-dl
Net
false
1,481
[ "MIT" ]
0
675741ad123e88158ecab88f887ea31113c99e7a
https://github.com/arcada-uas/intro-to-dl/tree/675741ad123e88158ecab88f887ea31113c99e7a
ResidualBlock
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guard...
Weiyuhong-1998/DI-engine
ResidualBlock
false
14,573
[ "Apache-2.0" ]
464
88658ea358298c6e61e95a454284b8853a3e9484
https://github.com/Weiyuhong-1998/DI-engine/tree/88658ea358298c6e61e95a454284b8853a3e9484
Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
jordiriu/MP-DQN
Critic
false
15,774
[ "MIT" ]
75
eec13eb9b4e2c0099649e0639f2a8b93d7d0d5be
https://github.com/jordiriu/MP-DQN/tree/eec13eb9b4e2c0099649e0639f2a8b93d7d0d5be
Mul
import torch import torch as ch class Mul(ch.nn.Module): def __init__(self, weight): super(Mul, self).__init__() self.weight = weight def forward(self, x): return x * self.weight def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {'weig...
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 as ch assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strid...
njwfish/ffcv
Mul
false
10,598
[ "Apache-2.0" ]
0
3c219787da2fb8dbdaab24e75f34b3398ad7b7d1
https://github.com/njwfish/ffcv/tree/3c219787da2fb8dbdaab24e75f34b3398ad7b7d1
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.triton_helpers import libdevice import torch.nn as ...
star14ms/transformer-evolution
PoswiseFeedForwardNet
false
4,409
[ "Apache-2.0" ]
0
95b57485f59a0cee4528af62e5010002e6a3448a
https://github.com/star14ms/transformer-evolution/tree/95b57485f59a0cee4528af62e5010002e6a3448a
BertOutput
from _paritybench_helpers import _mock_config import torch import torch.nn as nn import torch.utils.checkpoint class BertOutput(nn.Module): def __init__(self, config): super().__init__() self.dense = nn.Linear(config.intermediate_size, config.hidden_size) self.LayerNorm = nn.LayerNorm(con...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
MikeWangWZHL/BLIP
BertOutput
false
1,883
[ "BSD-3-Clause" ]
0
b82134f1892a54c8f63b0f4b51bdcb8684e1dc6d
https://github.com/MikeWangWZHL/BLIP/tree/b82134f1892a54c8f63b0f4b51bdcb8684e1dc6d
DQN
# 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_...
Ourdin/Phantom-of-the-Opera
DQN
false
5,715
[ "MIT" ]
1
c1ade346fadd40f6ca79033b8c6f3f74ce949d08
https://github.com/Ourdin/Phantom-of-the-Opera/tree/c1ade346fadd40f6ca79033b8c6f3f74ce949d08
FeedForward
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn assert_s...
aim-uofa/DyCo3D
FeedForward
false
14,777
[ "BSD-2-Clause" ]
100
17d22c2d839c0a1043fb72df301e3935af5ca0e9
https://github.com/aim-uofa/DyCo3D/tree/17d22c2d839c0a1043fb72df301e3935af5ca0e9
Fusion3_FCLayer
# 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...
RUCAIBox/WSDM2022-C2CRS
Fusion3_FCLayer
false
17,845
[ "MIT" ]
4
8ef2fa7c44bdba1799ab79f379ae7394bd468c02
https://github.com/RUCAIBox/WSDM2022-C2CRS/tree/8ef2fa7c44bdba1799ab79f379ae7394bd468c02
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....
ppujol76/-Pere_Transformers
Attention
false
12,916
[ "MIT" ]
0
e267bcc6559c998accaed647cacbff253031f8b0
https://github.com/ppujol76/-Pere_Transformers/tree/e267bcc6559c998accaed647cacbff253031f8b0
BridgeConnection
# 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....
Harbar-Inbound/BMT
BridgeConnection
false
11,861
[ "MIT" ]
0
ec8826f0633db754c7ea8d206672aa0b6b6048fd
https://github.com/Harbar-Inbound/BMT/tree/ec8826f0633db754c7ea8d206672aa0b6b6048fd
TwoMLPHead
import torch import torch.utils.data from torch import nn from torchvision.transforms import functional as F import torch.nn.functional as F class TwoMLPHead(nn.Module): """ Heads for FPN for classification """ def __init__(self, in_channels, representation_size): super(TwoMLPHead, 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 import triton_helpers import torch.utils.data from ...
billchenxi/vision
TwoMLPHead
false
1,548
[ "BSD-3-Clause" ]
0
5608b06a6fbc9c84284dad9f07a16df61da10f85
https://github.com/billchenxi/vision/tree/5608b06a6fbc9c84284dad9f07a16df61da10f85
SelfAttention
import torch import torch.nn as nn from torch.nn import functional as F def mask_fn(x, mask_diagonal=False): _b, h, w = x.size() indices = torch.triu_indices(h, w, offset=0 if mask_diagonal else 1) mask = torch.zeros_like(x) mask[:, indices[0], indices[1]] = 1 final_mask = (mask == 1) & (x == 0) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
MukundhMurthy/viral-mutation
SelfAttention
false
9,335
[ "MIT" ]
0
371422e418e8adc1ab9e68d2f09bd2f8aa5f00f0
https://github.com/MukundhMurthy/viral-mutation/tree/371422e418e8adc1ab9e68d2f09bd2f8aa5f00f0
CPUForgetMult
# 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.init assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
FurKan7/resim_renklendirme-colorizing-of-picture-
CPUForgetMult
false
17,290
[ "MIT" ]
8
a431a42cd00a60f85948795bc872a272897fbc76
https://github.com/FurKan7/resim_renklendirme-colorizing-of-picture-/tree/a431a42cd00a60f85948795bc872a272897fbc76
ArcMarginProduct_subcenter
# 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....
Fkaneko/kaggle-hpa-single-cell-image-classification
ArcMarginProduct_subcenter
false
5,170
[ "MIT" ]
1
52000cbf5c7eec6ace29274d9e85b5b24fac281b
https://github.com/Fkaneko/kaggle-hpa-single-cell-image-classification/tree/52000cbf5c7eec6ace29274d9e85b5b24fac281b
RSoftmax
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
Bo396543018/Picodet_Pytorch
RSoftmax
false
7,791
[ "Apache-2.0" ]
16
276ecbf6f4f7eefbf046d1bccc25293acf28ba25
https://github.com/Bo396543018/Picodet_Pytorch/tree/276ecbf6f4f7eefbf046d1bccc25293acf28ba25
GaussianMixtureReconstructionLoss
import torch import numpy as np import torch as th def gaussian_pdfs(dx, dy, params): """Returns the pdf at (dx, dy) for each Gaussian in the mixture. """ dx = dx.unsqueeze(-1) dy = dy.unsqueeze(-1) mu_x = params[..., 0] mu_y = params[..., 1] sigma_x = params[..., 2].exp() sigma_y = pa...
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 nump...
v-a-s-a/diffvg
GaussianMixtureReconstructionLoss
false
4,479
[ "Apache-2.0" ]
0
3685f3d47a5a4e5c76c68643ebf383f809ba59ed
https://github.com/v-a-s-a/diffvg/tree/3685f3d47a5a4e5c76c68643ebf383f809ba59ed
UNet
import torch import torch.nn as nn import torch.nn.functional as F def Conv(in_channels, out_channels): return nn.Conv2d(in_channels, out_channels, 3, padding=1) def concat(a, b): return torch.cat((a, b), 1) def pool(x): return F.max_pool2d(x, 2, 2) def relu(x): return F.relu(x, inplace=True) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
arpan-dhatt/oidn
UNet
false
14,956
[ "Apache-2.0" ]
1,206
9419411ba4b343b475b53587cadd44c83d68dc2a
https://github.com/arpan-dhatt/oidn/tree/9419411ba4b343b475b53587cadd44c83d68dc2a
AngleError
# 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....
ai-in-motion/moai
AngleError
false
18,328
[ "Apache-2.0" ]
10
e38cac046c059d2e2331ef4883bbabc5a500a5cf
https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf
HardSigmoid
import torch import torch.nn as nn class HardSigmoid(nn.Module): def __init__(self, bias=1.0, divisor=2.0, min_value=0.0, max_value=1.0): super(HardSigmoid, self).__init__() assert divisor != 0, 'divisor is not allowed to be equal to zero' self.bias = bias self.divisor = divisor ...
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...
CharlesPikachu/mcibi
HardSigmoid
false
7,885
[ "MIT" ]
41
6ce453504741c2eed1d290306055258a377a4094
https://github.com/CharlesPikachu/mcibi/tree/6ce453504741c2eed1d290306055258a377a4094
BertSelfAttention
from _paritybench_helpers import _mock_config import math import torch import torch.optim 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: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
DengBoCong/text-sim
BertSelfAttention
false
8,779
[ "MIT" ]
21
2c6c323649aa259a7b3d5c6d3714bd1860114826
https://github.com/DengBoCong/text-sim/tree/2c6c323649aa259a7b3d5c6d3714bd1860114826
Add
# 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...
yifanpu001/PytorchToCaffe
Add
false
4,704
[ "MIT" ]
0
37c1ebfc3547e93b1c174721036d03c831c60e48
https://github.com/yifanpu001/PytorchToCaffe/tree/37c1ebfc3547e93b1c174721036d03c831c60e48
BertAttention
from _paritybench_helpers import _mock_config import math import torch import torch.utils.data import torch.nn as nn import torch.nn import torch as torch import torch.sparse class BertSelfAttention(nn.Module): def __init__(self, config): super(BertSelfAttention, self).__init__() if config.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 import triton_helpers from torch._inductor.runtime....
Somefive/cogdl
BertAttention
false
5,848
[ "MIT" ]
1
1c5ab88aafc27529495d0d22f781055619e27cb2
https://github.com/Somefive/cogdl/tree/1c5ab88aafc27529495d0d22f781055619e27cb2
GlobalAvgPool2d
import torch from torch import nn from torch.nn import functional as F class GlobalAvgPool2d(nn.Module): def __init__(self): """ Global Average pooling module """ super(GlobalAvgPool2d, self).__init__() def forward(self, x): """ The forward function of the Glo...
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...
UniSerj/ai-research
GlobalAvgPool2d
false
14,521
[ "Apache-2.0" ]
46
79f0093c93408cc5dd7d3f56aafd7dc1f901421c
https://github.com/UniSerj/ai-research/tree/79f0093c93408cc5dd7d3f56aafd7dc1f901421c
Normalize
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Alan-Paul/ECN
Normalize
false
11,147
[ "Apache-2.0" ]
0
5e9a9081ff0c1e36cc0381df3ce9038a79a537e9
https://github.com/Alan-Paul/ECN/tree/5e9a9081ff0c1e36cc0381df3ce9038a79a537e9
ExpMSE
import torch from torch import nn def _assert_no_grad(tensor): assert not tensor.requires_grad class ExpMSE(nn.Module): def __init__(self, lam): super().__init__() self.lam = lam def forward(self, output, target): _assert_no_grad(target) loss = (output - target).pow(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 from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
dattientran/attorch
ExpMSE
false
12,384
[ "MIT" ]
0
469b225846c6d8a7d833ebac19d040c7a407a0ff
https://github.com/dattientran/attorch/tree/469b225846c6d8a7d833ebac19d040c7a407a0ff
GELU
import torch import numpy as np import torch.nn as nn class GELU(nn.Module): """Gaussian Error Linear Unit. Dan Hendrycks∗, Kevin Gimpel GAUSSIAN ERROR LINEAR UNITS (GELUS), 2016 Args: x: float Tensor to perform activation. Returns: `x` with the GELU activation applied. """ ...
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_...
joeization/CycleGAN
GELU
false
3,748
[ "MIT" ]
0
9635c8e3a7b1634b2e2eb5b5299f03a4e0786868
https://github.com/joeization/CycleGAN/tree/9635c8e3a7b1634b2e2eb5b5299f03a4e0786868
LayerNorm
import torch import torch.utils.data import torch.nn as nn class LayerNorm(nn.Module): """ Construct a layernorm module (See citation for details). """ def __init__(self, features, eps=1e-06): super(LayerNorm, self).__init__() self.a_2 = nn.Parameter(torch.ones(features)) self...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.utils.data import torch.nn as nn assert_size_stride = torch._C._dy...
Akhil-Raj/Trajectory-Transformer
LayerNorm
false
4
[ "MIT" ]
0
dd09fda99443f6afb59d962026573162219ea6a9
https://github.com/Akhil-Raj/Trajectory-Transformer/tree/dd09fda99443f6afb59d962026573162219ea6a9
ShiftedSoftplus
import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.tensorboard class ShiftedSoftplus(nn.Module): def __init__(self): super().__init__() self.shift = torch.log(torch.tensor(2.0)).item() def forward(self, x): return F.softplus(x) - self.shift def ge...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torch.nn as nn import torch.utils.tensorboard assert_si...
Dieg0Alejandr0/3D-Generative-SBDD
ShiftedSoftplus
false
1,220
[ "MIT" ]
0
51ffd36a6cf5048eeff6e68186a4608048feea4c
https://github.com/Dieg0Alejandr0/3D-Generative-SBDD/tree/51ffd36a6cf5048eeff6e68186a4608048feea4c
MaxRotationPoolP4
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
claudio-unipv/groupcnn
MaxRotationPoolP4
false
12,229
[ "MIT" ]
0
2b1514f5a0fb9a78c6f646e1c075e5c3d5af9c0c
https://github.com/claudio-unipv/groupcnn/tree/2b1514f5a0fb9a78c6f646e1c075e5c3d5af9c0c
SoftDetectionModule
import torch import torch.nn.functional as F import torch.nn as nn class SoftDetectionModule(nn.Module): def __init__(self, soft_local_max_size=3): super(SoftDetectionModule, self).__init__() self.soft_local_max_size = soft_local_max_size self.pad = self.soft_local_max_size // 2 def ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
liuyuzhenn/d2-net
SoftDetectionModule
false
15,925
[ "BSD-3-Clause-Clear" ]
603
bc3394934c87cba232144756b1fece4c8ed3aba1
https://github.com/liuyuzhenn/d2-net/tree/bc3394934c87cba232144756b1fece4c8ed3aba1
VdConv1D
import math import torch import torch.nn as nn import torch.nn.functional as F def calculate_kl(log_alpha): return 0.5 * torch.sum(torch.log1p(torch.exp(-log_alpha))) class VdConv1D(nn.Module): """ Conv1D Layer variational dropout """ def __init__(self, in_channels, out_channels, kernel_size, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
Neronjust2017/pytorch-classification-project
VdConv1D
false
886
[ "MIT" ]
0
fc5f4d7c46d071765f682ce20e6580646d4e5c76
https://github.com/Neronjust2017/pytorch-classification-project/tree/fc5f4d7c46d071765f682ce20e6580646d4e5c76
Block
import torch import torch.nn as nn from functools import partial class Mlp(nn.Module): def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.0): super().__init__() out_features = out_features or in_features hidden_features = hidden_feat...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
xuewengeophysics/Conformer
Block
false
13,141
[ "Apache-2.0" ]
0
e769a1ac9ab110dae2a356a4de1e06ccd0e95041
https://github.com/xuewengeophysics/Conformer/tree/e769a1ac9ab110dae2a356a4de1e06ccd0e95041
QNetwork
import torch import torch.nn as nn import torch.nn.functional as F class QNetwork(nn.Module): """Actor (Policy) Model. Deep Net function approximator for q(s,a)""" def __init__(self, state_size, action_size, seed): """Initialize parameters and build model. Parameters: ========== ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
andreaspts/DRL_LUNAR_LANDER
QNetwork
false
3,111
[ "MIT" ]
0
61f19b294ba7ed069795c70a3ceca4d9f7ff8a66
https://github.com/andreaspts/DRL_LUNAR_LANDER/tree/61f19b294ba7ed069795c70a3ceca4d9f7ff8a66
AttNet
# 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....
SionHu/LP-MOT
AttNet
false
1,080
[ "MIT" ]
0
90e6a1d51ebe1a948ac5c018a5ee560654e824f1
https://github.com/SionHu/LP-MOT/tree/90e6a1d51ebe1a948ac5c018a5ee560654e824f1