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
AddTensors
import torch import torch.nn as nn import torch.hub class AddTensors(nn.Module): """ Adds all its inputs together. """ def forward(self, xs): return sum(xs) 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 import torch.hub assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo...
theoway/raster-vision
AddTensors
false
16,577
[ "Apache-2.0" ]
1,577
dab675517f904771e2ce8c052494f8a6f1ddc026
https://github.com/theoway/raster-vision/tree/dab675517f904771e2ce8c052494f8a6f1ddc026
LearnablePositionalEncoding
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
saverymax/mvts_transformer
LearnablePositionalEncoding
false
10,785
[ "MIT" ]
0
22796d6977b78d5636f6aad3f7efeb49f2991808
https://github.com/saverymax/mvts_transformer/tree/22796d6977b78d5636f6aad3f7efeb49f2991808
LinearCombine
import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.nn.functional as F class LinearCombine(nn.Module): def __init__(self, layers_num, trainable=True, input_aware=False, word_level=False): super(LinearCombine, self).__init__() ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn import torch.nn.parallel import torch.optim import ...
savan77/nni
LinearCombine
false
4,278
[ "MIT" ]
0
510213393d9cae58c5a8cccd21f322f7bba4e0cf
https://github.com/savan77/nni/tree/510213393d9cae58c5a8cccd21f322f7bba4e0cf
linformerAttention
# 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....
MohammadrezaRezvani/performer-pytorch
linformerAttention
false
867
[ "MIT" ]
0
347dd58111f4f79b8991f7609552203609856b4b
https://github.com/MohammadrezaRezvani/performer-pytorch/tree/347dd58111f4f79b8991f7609552203609856b4b
HuberLoss
import torch from torch import nn import torch.utils.data class HuberLoss(nn.Module): def __init__(self, delta=1): super().__init__() self.huber_loss_delta1 = nn.SmoothL1Loss() self.delta = delta def forward(self, x, x_hat): loss = self.huber_loss_delta1(x / self.delta, x_hat...
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...
Haichao-Zhang/leap
HuberLoss
false
8,196
[ "MIT" ]
36
4d75961ff2ff203d4412633cbeb12889de3c79b6
https://github.com/Haichao-Zhang/leap/tree/4d75961ff2ff203d4412633cbeb12889de3c79b6
reg_hw_pos
import torch import torch.nn as nn class reg_hw_pos(nn.Module): def __init__(self): super(reg_hw_pos, self).__init__() self.smoothl1 = nn.SmoothL1Loss(reduction='none') def forward(self, h_pred, h_label): l1_loss = h_label[:, 2, :, :] * self.smoothl1(h_pred[:, 0, :, :] / ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
FrancesC0de/Pedestron
reg_hw_pos
false
9,101
[ "Apache-2.0" ]
0
9ef6a408f97f8c8af98096b7945df18c9d3656ca
https://github.com/FrancesC0de/Pedestron/tree/9ef6a408f97f8c8af98096b7945df18c9d3656ca
SqueezeExcitation
import torch from torch import Tensor import torch.nn.functional as F from torch import nn from torchvision.models.mobilenetv2 import _make_divisible class SqueezeExcitation(nn.Module): def __init__(self, input_channels: 'int', squeeze_factor: 'int'=4): super().__init__() squeeze_channels = _make...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 Tensor impo...
ayrna/ordinal-cnn-ecoc
SqueezeExcitation
false
6,307
[ "BSD-3-Clause" ]
1
2b7909d036612727a45a174c891c4e749c3b60c4
https://github.com/ayrna/ordinal-cnn-ecoc/tree/2b7909d036612727a45a174c891c4e749c3b60c4
Actor
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
DougTrajano/ds_drl_continuous_control
Actor
false
11,385
[ "MIT" ]
0
a160b53f68f9fc30c917038af406367dcaa44dc7
https://github.com/DougTrajano/ds_drl_continuous_control/tree/a160b53f68f9fc30c917038af406367dcaa44dc7
D_concat
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch.nn as nn assert_size_stride = torch._C._dyn...
Bhaskers-Blu-Org1/SIC
D_concat
false
7,790
[ "Apache-2.0" ]
12
c4e45d7736da6e6faabdc56bfc1336445df99204
https://github.com/Bhaskers-Blu-Org1/SIC/tree/c4e45d7736da6e6faabdc56bfc1336445df99204
Norm
import torch import torch.nn as nn import torch.utils.data import torch.nn.parallel class Norm(nn.Module): def __init__(self, dims): super(Norm, self).__init__() self.dims = dims def forward(self, x): z2 = torch.norm(x, p=2) out = z2 - self.dims out = out * out ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
Manojbhat09/Sane-annotation-shape-complete
Norm
false
17,698
[ "Apache-2.0" ]
9
03b298b2c0a187be979ff31ad2a39238b72a6d78
https://github.com/Manojbhat09/Sane-annotation-shape-complete/tree/03b298b2c0a187be979ff31ad2a39238b72a6d78
Attention
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
cshjin/pytorch_geometric
Attention
false
1,753
[ "MIT" ]
0
8dd0e76beb72135949a275edd851f80f7b97648f
https://github.com/cshjin/pytorch_geometric/tree/8dd0e76beb72135949a275edd851f80f7b97648f
ModifiedSmoothedL1
import torch import torch.nn as nn import torch.utils.data class ModifiedSmoothedL1(nn.Module): """ ResultLoss = outside_weights * SmoothL1(inside_weights * (box_pred - box_targets)) SmoothL1(x) = 0.5 * (sigma * x)^2, if |x| < 1 / sigma^2 |x| - 0.5 / sigma^2, otherwise ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn import torch.utils.data assert_size_stride = torch....
AIpakchoi/visualDet3D
ModifiedSmoothedL1
false
4,759
[ "Apache-2.0" ]
1
920f6f8ea44eac4c1896b7d157c015e039ac39f9
https://github.com/AIpakchoi/visualDet3D/tree/920f6f8ea44eac4c1896b7d157c015e039ac39f9
CosineDistance
import torch import torch.utils.data.dataloader import torch.nn def dot_product(a: 'torch.Tensor', b: 'torch.Tensor', normalize=False): """ Computes dot product for pairs of vectors. :param normalize: Vectors are normalized (leads to cosine similarity) :return: Matrix with res[i][j] = dot_product(a[i...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ParikhKadam/flair
CosineDistance
false
14,154
[ "MIT" ]
7,539
a1732bc5ab0b4aeb09d1ed3a630ae2fd8fa095ef
https://github.com/ParikhKadam/flair/tree/a1732bc5ab0b4aeb09d1ed3a630ae2fd8fa095ef
RSubFloat
import torch class RSubFloat(torch.nn.Module): def __init__(self): super(RSubFloat, self).__init__() def forward(self, x): return 1.0 - 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
PogChamper/torch2trt
RSubFloat
false
14,211
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
DownsampleA
import torch import torch.nn as nn import torch.nn.init class DownsampleA(nn.Module): def __init__(self, nIn, nOut, stride): super(DownsampleA, self).__init__() self.avg = nn.AvgPool2d(kernel_size=1, stride=stride) def forward(self, x): return torch.cat((self.avg(x), x.mul(0)), 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 import torch.nn.init assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dy...
OBA9k/Test_dev
DownsampleA
false
17,754
[ "Apache-2.0" ]
4
bfdd337fb56ca160e1d09b6c310d1e6037d55fcd
https://github.com/OBA9k/Test_dev/tree/bfdd337fb56ca160e1d09b6c310d1e6037d55fcd
QuickGELU
import torch from torch import nn class QuickGELU(nn.Module): def forward(self, x: 'torch.Tensor'): return x * torch.sigmoid(1.702 * 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 import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
Jinsu-L/KELIP
QuickGELU
false
5,401
[ "Apache-2.0" ]
1
d3261cbb9ba3c3ad474dd560a5add8b69ed78477
https://github.com/Jinsu-L/KELIP/tree/d3261cbb9ba3c3ad474dd560a5add8b69ed78477
NormedLinear
# 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....
dixit-dude7/LDAM-DRW
NormedLinear
false
12,285
[ "MIT" ]
0
6366f4756d3ac0c6b6db784b7f20e16066967ed4
https://github.com/dixit-dude7/LDAM-DRW/tree/6366f4756d3ac0c6b6db784b7f20e16066967ed4
_GRU_ODE
# 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 assert_size_stride ...
MLforHealth/state_representations_for_RLinHealth
_GRU_ODE
false
8,516
[ "MIT" ]
24
aa8dbb7d56caa95bf4380e3e745e134996291b66
https://github.com/MLforHealth/state_representations_for_RLinHealth/tree/aa8dbb7d56caa95bf4380e3e745e134996291b66
SquadDiscriminator
import torch import torch.nn as nn class SquadDiscriminator(nn.Module): def __init__(self, feature_size): super(SquadDiscriminator, self).__init__() self.bilinear = nn.Bilinear(feature_size, feature_size, 1) for m in self.modules(): self.weights_init(m) def weights_init(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...
MiuLab/QAInfomax
SquadDiscriminator
false
8,558
[ "MIT" ]
19
0985bc1df68d21c93de1bd6038d69f9792a9f62a
https://github.com/MiuLab/QAInfomax/tree/0985bc1df68d21c93de1bd6038d69f9792a9f62a
BoundEqual
from _paritybench_helpers import _mock_config import math import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from numbers import Number from torch.nn import MSELoss def isnan(x): if isinstance(x, Patches): return False return torch.isnan(x).any() class Perturbation...
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 from numbers import Number assert_size_stride = torch._...
Mahoumaru/auto_LiRPA
BoundEqual
false
13,230
[ "BSD-3-Clause" ]
0
b03a6c36eb1b921726778359d6d2b94e0cd7e480
https://github.com/Mahoumaru/auto_LiRPA/tree/b03a6c36eb1b921726778359d6d2b94e0cd7e480
ConvTemporalGraphical
# 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...
ishine/speech2affective_gestures
ConvTemporalGraphical
false
12,541
[ "MIT" ]
0
ea99e3edd82b8ab50a6f63cff301618762b73187
https://github.com/ishine/speech2affective_gestures/tree/ea99e3edd82b8ab50a6f63cff301618762b73187
REINFORCE
import torch import torch.nn.functional as F import torch.nn as nn class REINFORCE(nn.Module): def __init__(self, input_size, num_actions): super(REINFORCE, self).__init__() self.fc = nn.Linear(input_size, 256) self.head = nn.Linear(256, num_actions) self.relu = nn.ReLU() ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
exe1023/GA-final
REINFORCE
false
10,176
[ "MIT" ]
0
dad84cda665ef24e9568a79a2e7ff0a00edf5851
https://github.com/exe1023/GA-final/tree/dad84cda665ef24e9568a79a2e7ff0a00edf5851
PositionEmbedder
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_...
DanBerrebbi/shiba
PositionEmbedder
false
11,333
[ "Apache-2.0" ]
0
3f2793f3e1797be79dd6d491b7ecd2d7de765555
https://github.com/DanBerrebbi/shiba/tree/3f2793f3e1797be79dd6d491b7ecd2d7de765555
DenseAtt
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim import torch.nn.modules.loss class DenseAtt(nn.Module): def __init__(self, in_features, dropout): super(DenseAtt, self).__init__() self.dropout = dropout self.linear = nn.Linear(2 * in_features, 1, bias=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.optim import torch.nn.modules.loss assert_siz...
Dee-chen/scGCN
DenseAtt
false
7,938
[ "MIT" ]
24
604818fbaf32ef2fd6ee7bd601f4fe8eff26ac94
https://github.com/Dee-chen/scGCN/tree/604818fbaf32ef2fd6ee7bd601f4fe8eff26ac94
SpaceToDepth
import torch from torch import nn class SpaceToDepth(nn.Module): def __init__(self, block_size): super().__init__() self.bs = block_size def forward(self, x): N, C, H, W = x.size() x = x.view(N, C, H // self.bs, self.bs, W // self.bs, self.bs) x = x.permute(0, 3, 5, 1...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_str...
Dauriel/weather4cast2021
SpaceToDepth
false
357
[ "Apache-2.0" ]
0
29e818c4bcd488ec84b51558bf5392e4a887db70
https://github.com/Dauriel/weather4cast2021/tree/29e818c4bcd488ec84b51558bf5392e4a887db70
ConvToVector
import torch import torch.nn as nn import torch.nn.functional as F class ConvToVector(nn.Module): def __init__(self, in_channels, padding=1): super(ConvToVector, self).__init__() self.in_channels = in_channels self.conv1 = nn.Conv2d(in_channels, 3, kernel_size=3, padding=padding) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
JannerM/spatial-reasoning
ConvToVector
false
13,887
[ "MIT" ]
54
e163003a33177e41ca02d5feefee3fdfca5ba154
https://github.com/JannerM/spatial-reasoning/tree/e163003a33177e41ca02d5feefee3fdfca5ba154
IDiv
import torch class IDiv(torch.nn.Module): def __init__(self): super(IDiv, self).__init__() def forward(self, x, y): x /= y return x def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride @triton.jit def triton_poi_fused_div_0(in_ptr0, in_ptr1, out_ptr1, xnumel,...
PogChamper/torch2trt
IDiv
false
14,196
[ "MIT" ]
3,363
43b12627ec0de4d212efb6d02b07570205085ccc
https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc
BasicModel_ConvNet_MaxPool3d
# 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....
aravipati12/captum
BasicModel_ConvNet_MaxPool3d
false
10,121
[ "BSD-3-Clause" ]
0
ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
https://github.com/aravipati12/captum/tree/ef3e81d89c8c4404a49c384cf0727f2e7d393f5f
RingLoss
# 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 warnings import torch.nn as nn from torchvision.transforms import * asse...
xijiali/ABD_Net
RingLoss
false
4,579
[ "MIT" ]
0
8d2d9b316b7c181ce441ceb4b1c62fb9a6d53153
https://github.com/xijiali/ABD_Net/tree/8d2d9b316b7c181ce441ceb4b1c62fb9a6d53153
EncoderLayer
import math import torch import torch.nn.functional as F import torch.nn as nn def attention(q, k, v, d_k, mask=None, dropout=None): scores = torch.matmul(q, k.transpose(-2, -1)) / math.sqrt(d_k) if mask is not None: mask = mask.unsqueeze(1) scores = scores.masked_fill(mask == 0, -1000000000.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....
rcasero/Transformer
EncoderLayer
false
4,195
[ "Apache-2.0" ]
0
82f51e04f80634d56b134e0ac87f67d6ba8c736a
https://github.com/rcasero/Transformer/tree/82f51e04f80634d56b134e0ac87f67d6ba8c736a
DiceLoss
import torch import torch.nn as nn class DiceLoss(nn.Module): def __init__(self, smooth=1.0): super(DiceLoss, self).__init__() self.smooth = smooth def forward(self, input, target): n = input.shape[0] input = input.view(n, -1) target = target.view(n, -1) inter...
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...
azxj/BRRNet
DiceLoss
false
6,303
[ "MIT" ]
1
274068efd5453f2c1fb07bfaad448d048b9c793b
https://github.com/azxj/BRRNet/tree/274068efd5453f2c1fb07bfaad448d048b9c793b
NCHWLayerNorm
# 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...
cobypenso/pytorch-generative
NCHWLayerNorm
false
10,005
[ "MIT" ]
0
72d1a3d8045179bd3a83ee3783aa070e74a1e400
https://github.com/cobypenso/pytorch-generative/tree/72d1a3d8045179bd3a83ee3783aa070e74a1e400
MyKernelTorch
import torch import torch.nn as nn class MyKernelTorch(nn.Module): def __init__(self, n_features: 'int'): super().__init__() self.dense1 = nn.Linear(n_features, 20) self.dense2 = nn.Linear(20, 2) def forward(self, x: 'torch.Tensor') ->torch.Tensor: x = nn.ReLU()(self.dense1(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 import torch.nn as nn assert_...
maxpark/alibi-detect
MyKernelTorch
false
7,176
[ "Apache-2.0" ]
1
84384297a85764c18537aa1c8699c4ad040cf7cd
https://github.com/maxpark/alibi-detect/tree/84384297a85764c18537aa1c8699c4ad040cf7cd
LabelSmoothingCrossEntropy
import torch import torch._C import torch.serialization from torch import nn import torch.nn.functional as F class LabelSmoothingCrossEntropy(nn.Module): """ NLL loss with label smoothing. """ def __init__(self, smoothing=0.1, loss_weight=1.0, loss_name='loss_ce'): super(LabelSmoothingCrossEntrop...
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._C import...
Molly6/segmentation_shengteng2021
LabelSmoothingCrossEntropy
false
8,569
[ "Apache-2.0" ]
21
33dfefa80193586f504069793d9e141944549e99
https://github.com/Molly6/segmentation_shengteng2021/tree/33dfefa80193586f504069793d9e141944549e99
SpatialGather_Module
import torch import torch.nn as nn from torch.nn import functional as F import torch._utils import torch.optim class SpatialGather_Module(nn.Module): """ Aggregate the context features according to the initial predicted probability distribution. Employ the soft-weighted method to aggregat...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
SSJIACV/HRNet-Semantic-Segmentation
SpatialGather_Module
false
1,005
[ "MIT" ]
0
7e2840ce7a91ae3845dfb203c992f84affa15e40
https://github.com/SSJIACV/HRNet-Semantic-Segmentation/tree/7e2840ce7a91ae3845dfb203c992f84affa15e40
OptimizedResidualBlock
import torch import torch.nn as nn import torch.nn.utils as utils from torchvision import utils class CustomConv2d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=None, bias=True, spectral_norm=False, residual_init=True): super(CustomConv2d, 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 import torch.nn as nn import ...
takuhirok/rGAN
OptimizedResidualBlock
false
16,602
[ "MIT" ]
103
6f7a092de5814c662fd17224b3d48bebe7e03c2f
https://github.com/takuhirok/rGAN/tree/6f7a092de5814c662fd17224b3d48bebe7e03c2f
EncoderImagePrecomp
# 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 numpy as np ...
Closer1/CARRN
EncoderImagePrecomp
false
11,300
[ "MIT" ]
0
b64588f1f4f6b6f51939ff125e06268d4c294679
https://github.com/Closer1/CARRN/tree/b64588f1f4f6b6f51939ff125e06268d4c294679
LearnableMax
import torch import torch.nn as nn class LearnableMax(nn.Module): def __init__(self, out_chn): super(LearnableMax, self).__init__() self.max1 = nn.Parameter(torch.zeros(1, out_chn, 1, 1), requires_grad=True) self.max2 = nn.Parameter(torch.zeros(1, out_chn, 1, 1), r...
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...
RiyaoDong/HGSL
LearnableMax
false
2,764
[ "Apache-2.0" ]
0
19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
https://github.com/RiyaoDong/HGSL/tree/19fa984b3bfde0e3b7acbce87dd40177cd64f9b0
PositionwiseFeedForward
import torch import torch.nn as nn class LayerNormalization(nn.Module): """ Layer normalization module """ def __init__(self, d_hid, eps=0.001): super(LayerNormalization, self).__init__() self.eps = eps self.a_2 = nn.Parameter(torch.ones(d_hid), requires_grad=True) self.b_2 = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
YunjieJi/attention-is-all-you-need-pytorch
PositionwiseFeedForward
false
12,018
[ "MIT" ]
0
636117b438d584ccba0ae5d6998fc02f3888f46e
https://github.com/YunjieJi/attention-is-all-you-need-pytorch/tree/636117b438d584ccba0ae5d6998fc02f3888f46e
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 from torch import nn f...
tks1998/Pytorch-Face-recongition-state-of-the-art-Qmul-surveface-
FocalLoss
false
4,488
[ "MIT" ]
0
e4068db0c53a4c6b8e81127191687662806af8d8
https://github.com/tks1998/Pytorch-Face-recongition-state-of-the-art-Qmul-surveface-/tree/e4068db0c53a4c6b8e81127191687662806af8d8
Actor
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
david-varela/continuous_control
Actor
false
3,397
[ "MIT" ]
0
2bce9ea958fb21e88ac2f129ba8911e95dd7b1d2
https://github.com/david-varela/continuous_control/tree/2bce9ea958fb21e88ac2f129ba8911e95dd7b1d2
MyNet2
# 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...
LucaZampieri/DL
MyNet2
false
792
[ "MIT" ]
0
e53ade2638ccc3ca368e15c8454845856776e719
https://github.com/LucaZampieri/DL/tree/e53ade2638ccc3ca368e15c8454845856776e719
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 from typing import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dy...
Lleyton-Ariton/landwatch
DiceLoss
false
5,550
[ "MIT" ]
1
21e86e899d33d0ee349cf9bf87c6c13ebdab82fa
https://github.com/Lleyton-Ariton/landwatch/tree/21e86e899d33d0ee349cf9bf87c6c13ebdab82fa
DNNnet
# 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.utils....
BaiYunLiu/newPLC
DNNnet
false
4,896
[ "BSD-3-Clause" ]
1
18245a14648bc28b7269ea1d6e444ca6021ac8d2
https://github.com/BaiYunLiu/newPLC/tree/18245a14648bc28b7269ea1d6e444ca6021ac8d2
BahdanauAttention
# 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....
BhushanMahajan25/image-captioning
BahdanauAttention
false
16,990
[ "MIT" ]
5
c3e1db358267fbb1b8abe723542f7fd8c6b0c966
https://github.com/BhushanMahajan25/image-captioning/tree/c3e1db358267fbb1b8abe723542f7fd8c6b0c966
RobertaClassificationHead
# 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 ...
HeartForNlp/VL-BERT
RobertaClassificationHead
false
1,886
[ "MIT" ]
0
c1a590e2597b592629329db126cf8eae74b49cc0
https://github.com/HeartForNlp/VL-BERT/tree/c1a590e2597b592629329db126cf8eae74b49cc0
Model
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
Archermmt/tvm
Model
false
11,192
[ "Apache-2.0" ]
0
8b900cec1a9c3cb453e159db4d497ebeb26ed289
https://github.com/Archermmt/tvm/tree/8b900cec1a9c3cb453e159db4d497ebeb26ed289
OFLoss
import torch import torch.nn as nn def get_outnorm(x: 'torch.Tensor', out_norm: 'str'='') ->torch.Tensor: """ Common function to get a loss normalization value. Can normalize by either the batch size ('b'), the number of channels ('c'), the image size ('i') or combinations ('bi', 'bci', et...
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 ...
grofit/traiNNer
OFLoss
false
15,472
[ "Apache-2.0" ]
78
12d006fd44ed304e4178839c53b1f3d95ca25dcb
https://github.com/grofit/traiNNer/tree/12d006fd44ed304e4178839c53b1f3d95ca25dcb
PlainRefiner
import torch import torch.nn as nn class PlainRefiner(nn.Module): """Simple refiner from Deep Image Matting. Args: conv_channels (int): Number of channels produced by the three main convolutional layer. loss_refine (dict): Config of the loss of the refiner. Default: None. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
rivergold/mmediting
PlainRefiner
false
7,603
[ "Apache-2.0" ]
1
fd972635c48bb065db29d1b5090592a87c7263d2
https://github.com/rivergold/mmediting/tree/fd972635c48bb065db29d1b5090592a87c7263d2
Discrete
# 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 ...
wandb/cli
Discrete
false
10,901
[ "MIT" ]
0
4a21c2c0c9944734f4c30a8e1453aaf45609e415
https://github.com/wandb/cli/tree/4a21c2c0c9944734f4c30a8e1453aaf45609e415
ILN
import torch from torch import nn import torch.utils.data from torch.nn.parameter import Parameter class ILN(nn.Module): def __init__(self, num_features, eps=1e-05): super(ILN, self).__init__() self.eps = eps self.rho = Parameter(torch.Tensor(1, num_features, 1, 1)) self.gamma = P...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn import torch.utils.data from torch.nn.parameter import Par...
ZAKAUDD/-GEU-Net
ILN
false
18,198
[ "MIT" ]
8
5251d329afb80c74328e72fd2fc21ff691ef3353
https://github.com/ZAKAUDD/-GEU-Net/tree/5251d329afb80c74328e72fd2fc21ff691ef3353
SimpleOrModule
# 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.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
YaronBenAtar/glow
SimpleOrModule
false
14,671
[ "Apache-2.0" ]
2,838
a13706a4239fa7eaf059c670dc573e3eb0768f86
https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86
Upsample
# 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...
Jack000/improved-diffusion
Upsample
false
11,537
[ "MIT" ]
0
e2abfc8072f9007b558b697b79d2affdae0eca3b
https://github.com/Jack000/improved-diffusion/tree/e2abfc8072f9007b558b697b79d2affdae0eca3b
SelfAttentionWide
import torch from torch import nn import torch.nn.functional as F def mask_(matrices, maskval=0.0, mask_diagonal=True): """ Masks out all values in the given batch of matrices where i <= j holds, i < j if mask_diagonal is false In place operation :param tns: :return: """ h, w = matri...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
wjeliot/former
SelfAttentionWide
false
13,106
[ "MIT" ]
0
38bd29b68b110e1e3eddae3106f7db2ffc0e5ce8
https://github.com/wjeliot/former/tree/38bd29b68b110e1e3eddae3106f7db2ffc0e5ce8
Affine
import math import torch from torch import nn import torch.autograd from torch.nn import init class Affine(nn.Module): """ This module implements the affine parameters gamma and beta seen in Eq. 10 in Pezeshki et al. (2016). It differs from the way affine is used in batchnorm out of the box of PyTorch...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import nn import torch.autograd from torch.nn import init assert_size_stride = torch._C._dynamo.guards.assert_size_st...
Goschjann/ssltsc
Affine
false
17,309
[ "MIT" ]
5
08d6b1bf711bb1c8f19f9bfb66a98d4e423e932e
https://github.com/Goschjann/ssltsc/tree/08d6b1bf711bb1c8f19f9bfb66a98d4e423e932e
Mnist_CNN
# 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...
LbsIrving/PyTorch
Mnist_CNN
false
786
[ "MIT" ]
0
314dbe9efc9e0116a7342d4ae3ab168c1c3afa32
https://github.com/LbsIrving/PyTorch/tree/314dbe9efc9e0116a7342d4ae3ab168c1c3afa32
ResidualBlock
import torch import torch.nn as nn class ResidualBlock(nn.Module): def __init__(self, in_channels, out_channels): super().__init__() self.in_channels, self.out_channels = in_channels, out_channels self.blocks = nn.Identity() self.shortcut = nn.Identity() def forward(self, x):...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride @triton.jit def triton_poi_fused_add_0(in_ptr0, out_...
d222nguy/gcn_research
ResidualBlock
false
3,369
[ "MIT" ]
0
83ced4f7d9f7840e48900e62c1eabec0444c5fa2
https://github.com/d222nguy/gcn_research/tree/83ced4f7d9f7840e48900e62c1eabec0444c5fa2
GatedPooling
# 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_...
RicherMans/Dcase2018_pooling
GatedPooling
false
8,699
[ "Apache-2.0" ]
13
10540502bba7215a1ba157614b39fedecb079d9b
https://github.com/RicherMans/Dcase2018_pooling/tree/10540502bba7215a1ba157614b39fedecb079d9b
MyElementwiseModule
# 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.parallel import torch.utils.data import torch.onnx import torch.fx import torch.optim import torch.utils.data.distributed as...
goytoom/examples
MyElementwiseModule
false
12,458
[ "BSD-3-Clause" ]
0
50b2a74dba897a1a98c8276043a3f5c6910c453a
https://github.com/goytoom/examples/tree/50b2a74dba897a1a98c8276043a3f5c6910c453a
RpowInt
# 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...
ahangchen/torch2trt
RpowInt
false
6,106
[ "MIT" ]
1
53c663f0e0570ef7ffd6771354ae3478f63bd328
https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328
AUGRUCell
# 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 ...
MIracleyin/RecBole-notebook
AUGRUCell
false
9,562
[ "MIT" ]
0
ef32b3e57a297ff4889dec1f63c7984f8f901a23
https://github.com/MIracleyin/RecBole-notebook/tree/ef32b3e57a297ff4889dec1f63c7984f8f901a23
SSIM
import torch import torch.nn as nn class SSIM(nn.Module): """Layer to compute the SSIM loss between a pair of images """ def __init__(self): super(SSIM, self).__init__() self.mu_x_pool = nn.AvgPool2d(3, 1) self.mu_y_pool = nn.AvgPool2d(3, 1) self.sig_x_pool = nn.AvgPool2d(...
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 ...
shlomi-amitai/myDIFFNet
SSIM
false
10,881
[ "MIT" ]
0
39dead457f10c82caae2a12ea152f2339188014c
https://github.com/shlomi-amitai/myDIFFNet/tree/39dead457f10c82caae2a12ea152f2339188014c
Attention
import math import torch import torch as t import torch.nn as nn class Linear(nn.Module): """ Linear Module """ def __init__(self, in_dim, out_dim, bias=True, w_init='linear'): """ :param in_dim: dimension of input :param out_dim: dimension of output :param bias: boole...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
pandeydeep9/Attentive-Neural-Process
Attention
false
12,872
[ "Apache-2.0" ]
0
7bbdc46d51ab0c891067e508d00a029c07d04802
https://github.com/pandeydeep9/Attentive-Neural-Process/tree/7bbdc46d51ab0c891067e508d00a029c07d04802
GatedFusion
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.nn.modules.loss from scipy.sparse import * ass...
IBM/graph4nlp
GatedFusion
false
8,349
[ "Apache-2.0" ]
18
a9bf20b23fa1ec368d9bd40cc8c557f86a9f8297
https://github.com/IBM/graph4nlp/tree/a9bf20b23fa1ec368d9bd40cc8c557f86a9f8297
Attention
import torch import torch.nn as nn class Attention(nn.Module): def __init__(self, dims, norm=False): super(Attention, self).__init__() self.norm = norm if self.norm: self.constrain = L2Constrain() else: self.transform = nn.Linear(dims, dims) self.co...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
glee1228/segment_temporal_context_aggregation
Attention
false
6,749
[ "Apache-2.0" ]
1
e5778f848f1cfd89bd1f77beb5e1b38a66a2f13d
https://github.com/glee1228/segment_temporal_context_aggregation/tree/e5778f848f1cfd89bd1f77beb5e1b38a66a2f13d
SoftGate
import torch from torch import nn as nn 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 class SoftGate(nn.Module): COEFF = 12.0 def __init__(self): super(SoftGate, self).__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 import nn as nn from torch.nn import init as init from torchvision.models import vgg as vgg import torch.utils.data from torch.ut...
Lotayou/BasicSR
SoftGate
false
2,646
[ "Apache-2.0", "MIT" ]
0
6cf9a706dd680d54f7dc26e87318ff79f76c0dbf
https://github.com/Lotayou/BasicSR/tree/6cf9a706dd680d54f7dc26e87318ff79f76c0dbf
ResBlock
# 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.nn impor...
CompVis/interactive-image2video-synthesis
ResBlock
false
7,944
[ "MIT" ]
20
05ea449d3a2704b6d79a5f08683035220d615576
https://github.com/CompVis/interactive-image2video-synthesis/tree/05ea449d3a2704b6d79a5f08683035220d615576
GramMatrix
import torch import torch.nn as nn class GramMatrix(nn.Module): def forward(self, y): b, ch, h, w = y.size() features = y.view(b, ch, w * h) features_t = features.transpose(1, 2) gram = features.bmm(features_t) / (ch * h * w) return gram def get_inputs(): return [tor...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
czczup/URST
GramMatrix
false
15,093
[ "Apache-2.0" ]
119
000ec9f7728f12ffad989ec1d07b1dd579514133
https://github.com/czczup/URST/tree/000ec9f7728f12ffad989ec1d07b1dd579514133
Matcher
# 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...
syyunn/pyHGT-1
Matcher
false
13,019
[ "MIT" ]
0
ad0918a48777add1495b80f35b5f2b7a44b74625
https://github.com/syyunn/pyHGT-1/tree/ad0918a48777add1495b80f35b5f2b7a44b74625
AdaptiveAvgMaxPool2d
import torch import torch.nn as nn import torch.utils.data import torchvision.transforms.functional as F import torch.nn.functional as F import torch.nn.parallel from torch import optim as optim def adaptive_avgmax_pool2d(x, output_size=1): x_avg = F.adaptive_avg_pool2d(x, output_size) x_max = F.adaptive_max_...
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 import torchvision.transforms.functional as...
DifferentSC/pytorch-image-models
AdaptiveAvgMaxPool2d
false
11,619
[ "Apache-2.0" ]
0
ccfb5751abc70d80add4f197464190c4a2637c6c
https://github.com/DifferentSC/pytorch-image-models/tree/ccfb5751abc70d80add4f197464190c4a2637c6c
AdjMSELoss
# 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 ...
JDE65/Adjusted-MAE-loss-function
AdjMSELoss
false
11,518
[ "MIT" ]
0
e0b54c41a499f68791b731e29e31b5e0f410ac5c
https://github.com/JDE65/Adjusted-MAE-loss-function/tree/e0b54c41a499f68791b731e29e31b5e0f410ac5c
DivLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice from torch import nn from to...
Luxios22/IDM
DivLoss
false
2,589
[ "MIT" ]
0
8d51103b7c252e6304e2a361976e16ed4b523944
https://github.com/Luxios22/IDM/tree/8d51103b7c252e6304e2a361976e16ed4b523944
ArgsNet
# 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_...
ConstantinHvber/ilf
ArgsNet
false
13,525
[ "Apache-2.0" ]
84
b706f81191508998d443c1c89e8d10028ce4e5d8
https://github.com/ConstantinHvber/ilf/tree/b706f81191508998d443c1c89e8d10028ce4e5d8
DAGNNConv
# 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...
EdisonLeeeee/GraphGallery
DAGNNConv
false
13,640
[ "MIT" ]
300
4eec9c5136bda14809bd22584b26cc346cdb633b
https://github.com/EdisonLeeeee/GraphGallery/tree/4eec9c5136bda14809bd22584b26cc346cdb633b
Scale
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
hilman-dayo/ObjectDetection-OneStageDet
Scale
false
15,525
[ "MIT" ]
331
44054ad335e24e99a98fdad0d18b9bf3a80c941c
https://github.com/hilman-dayo/ObjectDetection-OneStageDet/tree/44054ad335e24e99a98fdad0d18b9bf3a80c941c
Homography
import torch import torch.nn as nn class Homography(nn.Module): """Homography geometric model to be used together with ImageRegistrator module for the optimization-based image registration.""" def __init__(self) ->None: super().__init__() self.model = nn.Parameter(torch.eye(3)) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
EStorm21/kornia
Homography
false
398
[ "ECL-2.0", "Apache-2.0" ]
0
b2bba7950d748ba0b8ce0cc68035a248799a1044
https://github.com/EStorm21/kornia/tree/b2bba7950d748ba0b8ce0cc68035a248799a1044
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 libdevice, math as tl_math import torc...
YangfeiLiu/mmclassification
FocalLoss
false
11,998
[ "Apache-2.0" ]
0
422c757e287a45aae5049b90238fbe038ee766aa
https://github.com/YangfeiLiu/mmclassification/tree/422c757e287a45aae5049b90238fbe038ee766aa
Reorg
import torch import torch.nn as nn class Reorg(nn.Module): def __init__(self, stride=2): super(Reorg, self).__init__() self.stride = stride def forward(self, x): stride = self.stride assert x.data.dim() == 4 B = x.data.size(0) C = x.data.size(1) H = 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...
Hydroxy-OH/deep_sort_pytorch
Reorg
false
11,484
[ "MIT" ]
0
040656566d9f52fefa4ef02ca58f039ff591211b
https://github.com/Hydroxy-OH/deep_sort_pytorch/tree/040656566d9f52fefa4ef02ca58f039ff591211b
BatchMeanCrossEntropyWithLogSoftmax
import torch import torch.nn as nn class BatchMeanCrossEntropyWithLogSoftmax(nn.Module): def forward(self, y_hat, y): return -(y_hat * y).sum(dim=1).mean(dim=0) 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
cadurosar/graph_kd_dense_cifar100
BatchMeanCrossEntropyWithLogSoftmax
false
1,622
[ "MIT" ]
0
84054ab4f8f61c9db3460993661ba7bf1d951b36
https://github.com/cadurosar/graph_kd_dense_cifar100/tree/84054ab4f8f61c9db3460993661ba7bf1d951b36
GramMatrix
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch import torch.nn as nn assert_size_stride = ...
ckxy/1d_expan
GramMatrix
false
6,455
[ "MIT" ]
1
29cc294e0314d738e8e041f34c995fd22f9f980b
https://github.com/ckxy/1d_expan/tree/29cc294e0314d738e8e041f34c995fd22f9f980b
DecoderBlock
import torch from functools import partial import torch.nn.functional as F from torch import nn class DecoderBlock(nn.Module): """ Decoder block class """ def __init__(self, in_channels, middle_channels, out_channels, k_size, pad_size): super(DecoderBlock, self).__init__() sel...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
SVRTK/Segmentation_FetalMRI
DecoderBlock
false
17,894
[ "Apache-2.0" ]
6
9344a2248cbe8e4cccbe05ca98214626dcf62805
https://github.com/SVRTK/Segmentation_FetalMRI/tree/9344a2248cbe8e4cccbe05ca98214626dcf62805
ConvNet2FC
import torch import torch.nn as nn def spectral_norm(module, init=True, std=1, bound=False): if init: nn.init.normal_(module.weight, 0, std) if hasattr(module, 'bias') and module.bias is not None: module.bias.data.zero_() SpectralNorm.apply(module, 'weight', bound=bound) return module ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
Neural-Diffusion-Research/normalized-autoencoders
ConvNet2FC
false
8,639
[ "MIT" ]
30
0c77f7e29289e336c0fe5e941aaec8baa4a4fb82
https://github.com/Neural-Diffusion-Research/normalized-autoencoders/tree/0c77f7e29289e336c0fe5e941aaec8baa4a4fb82
Aggregator
import torch import torchvision.transforms.functional as F from torch.nn import functional as F from torch import nn class Aggregator(nn.Module): def __init__(self, in_channels, mid_channels, upsample_factor): super().__init__() self.upsample = nn.Upsample(scale_factor=2 ** upsample_factor) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
tilacyn/dsb2018_topcoders
Aggregator
false
16,593
[ "MIT" ]
413
e0f95ef70bc062d4dea321d2aa73231a9538cd63
https://github.com/tilacyn/dsb2018_topcoders/tree/e0f95ef70bc062d4dea321d2aa73231a9538cd63
ConstantODE
# 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
MaricelaM/torchdiffeq
ConstantODE
false
14,005
[ "MIT" ]
4,088
4e070fb687167e53082a91f32e102af7f4521058
https://github.com/MaricelaM/torchdiffeq/tree/4e070fb687167e53082a91f32e102af7f4521058
PositiveLinear
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
dfioravanti/copula_vae
PositiveLinear
false
1,838
[ "MIT" ]
0
4fdadfb9ca65a75367d50df4a5848942de20741f
https://github.com/dfioravanti/copula_vae/tree/4fdadfb9ca65a75367d50df4a5848942de20741f
KLLoss
# 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 assert_size...
Tomoya-K-0504/deepSELF
KLLoss
false
5,898
[ "MIT" ]
1
0e5a7d0169b3e9edcb5c8d9802140a84ce5cb69a
https://github.com/Tomoya-K-0504/deepSELF/tree/0e5a7d0169b3e9edcb5c8d9802140a84ce5cb69a
BertTextPooler
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class BertTextPooler(nn.Module): def __init__(self, config): super(BertTextPooler, self).__init__() self.dense = nn.Linear(config.hidden_size, config.bi_hidden_size) self.activation = nn.ReLU() def forwa...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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_...
IMNearth/Curriculum-Learning-For-VLN
BertTextPooler
false
18,368
[ "MIT" ]
8
d2fe1286eb295dc8c63a0c886b35883f32481d85
https://github.com/IMNearth/Curriculum-Learning-For-VLN/tree/d2fe1286eb295dc8c63a0c886b35883f32481d85
EqualConv2d
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math from torch import nn assert_size_stride = torch._C._dynamo.guards.as...
Tiamat-Tech/RetrieveInStyle
EqualConv2d
false
14,479
[ "MIT" ]
53
c5714b9c3c219c9ba463f3e162083458702038c1
https://github.com/Tiamat-Tech/RetrieveInStyle/tree/c5714b9c3c219c9ba463f3e162083458702038c1
BasicModel_MaxPool_ReLU
import torch import torch.nn as nn class BasicModel_MaxPool_ReLU(nn.Module): def __init__(self, inplace=False) ->None: super().__init__() self.maxpool = nn.MaxPool1d(3) self.relu = nn.ReLU(inplace=inplace) def forward(self, x): return self.relu(self.maxpool(x)).sum(dim=1) d...
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...
YNNEKUW/captum
BasicModel_MaxPool_ReLU
false
11,987
[ "BSD-3-Clause" ]
0
c8b5357b21f2ddf440e5f0ce25635977292aa5d1
https://github.com/YNNEKUW/captum/tree/c8b5357b21f2ddf440e5f0ce25635977292aa5d1
StatsPool
import torch import torch.nn as nn class StatsPool(nn.Module): def __init__(self, floor=1e-10, bessel=False): super(StatsPool, self).__init__() self.floor = floor self.bessel = bessel def forward(self, x): means = torch.mean(x, dim=1) _, t, _ = x.shape if 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 import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert...
penguinwang96825/Umigame
StatsPool
false
10,683
[ "Apache-2.0" ]
0
98d647ab6f40df08fe31d6b3bc444afe229a914e
https://github.com/penguinwang96825/Umigame/tree/98d647ab6f40df08fe31d6b3bc444afe229a914e
TensorSum
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda @triton.j...
Minyus/pipelinex
TensorSum
false
14,043
[ "Apache-2.0" ]
188
f35c524ec9c50751ee27d9a42d98317e16f1c544
https://github.com/Minyus/pipelinex/tree/f35c524ec9c50751ee27d9a42d98317e16f1c544
RobertaMaskLeanerHead
import torch import torch.nn.functional as F import torch.nn as nn import torch.utils.data import torch.onnx.operators import torch.optim import torch.optim.lr_scheduler class RobertaMaskLeanerHead(nn.Module): """ Head for mask leaner. input: (batch, src_lens, embed_dim) output: (batch, src_lens,1) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
a1600012888/fairseq
RobertaMaskLeanerHead
false
3,004
[ "MIT" ]
0
dbd2cd08fc396f919d2e737513095fcb966896c0
https://github.com/a1600012888/fairseq/tree/dbd2cd08fc396f919d2e737513095fcb966896c0
ResBlk
# 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 import torch.nn as nn assert_size_stride = torch...
innerverz/CodeTemplate
ResBlk
false
3,670
[ "MIT" ]
0
a20f5d24b0b79871aa39b5cde33e3bb4d2507d13
https://github.com/innerverz/CodeTemplate/tree/a20f5d24b0b79871aa39b5cde33e3bb4d2507d13
Clump
import torch from torch import nn class Clump(nn.Module): """Clipping input tensor.""" def __init__(self, min_v: 'int'=-50, max_v: 'int'=50): """Class for preparing input for DL model with mixed data. Args: min_v: Min value. max_v: Max value. """ supe...
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...
antigab/LightAutoML
Clump
false
14,873
[ "Apache-2.0" ]
766
51a4e2bd0ebffbe0817fb50434280f8e7c40fa4c
https://github.com/antigab/LightAutoML/tree/51a4e2bd0ebffbe0817fb50434280f8e7c40fa4c
PredictionHead
import torch import torch.nn as nn import torch.onnx class PredictionHead(nn.Module): def __init__(self, in_channels, num_classes, num_anchors): super(PredictionHead, self).__init__() self.classification = nn.Conv2d(in_channels, num_classes * num_anchors, kernel_size=1) self.r...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.onnx assert_size_stride = torch._C._dynamo.gu...
ephrem-git/inference
PredictionHead
false
12,350
[ "Apache-2.0" ]
0
bfbda5fc419364c3f71b5b1640f6c00e7675b212
https://github.com/ephrem-git/inference/tree/bfbda5fc419364c3f71b5b1640f6c00e7675b212
Beta
import torch import torch.nn as nn import torch.nn.functional as F class BoundedBeta(torch.distributions.Beta): def log_prob(self, x): return super().log_prob((x + 1) / 2) class Beta(nn.Module): def __init__(self, action_dim): super(Beta, self).__init__() self.action_dim = action_d...
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 assert_size_stride = torch._C._dynamo.gu...
RohanPankaj/apex
Beta
false
986
[ "MIT" ]
0
74e96386bf9446d1179106d6d65ea0368c1b5b27
https://github.com/RohanPankaj/apex/tree/74e96386bf9446d1179106d6d65ea0368c1b5b27
CNormalized_Linear
import math import torch import torch as th class CNormalized_Linear(th.nn.Module): """Linear layer with column-wise normalized input matrix.""" def __init__(self, in_features, out_features, bias=False): """Initialize the layer.""" super(CNormalized_Linear, self).__init__() self.in_fe...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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
InterpolationBlock
import torch import torch.utils.data import torch.nn as nn import torch.nn.functional as F class InterpolationBlock(nn.Module): """ Interpolation block. Parameters: ---------- scale_factor : float Multiplier for spatial size. """ def __init__(self, scale_factor): super(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 from torch._inductor.runtime import triton_helpers import torch.utils.data import torch.nn as nn assert_size_stride = torch._C._dynamo.guard...
HyperGAN/imgclsmob
InterpolationBlock
false
17,680
[ "MIT" ]
9
88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
CrossAttentionBlock
# 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....
abhrac/CrossViT
CrossAttentionBlock
false
14,752
[ "Apache-2.0" ]
93
97a1414ec182c09609ebe141ff6acc350cc352e5
https://github.com/abhrac/CrossViT/tree/97a1414ec182c09609ebe141ff6acc350cc352e5
MNIST_CNN
# 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....
Weixin-Liang/MetaShift
MNIST_CNN
false
14,598
[ "MIT" ]
54
84e090a13652437f8f392065f6bebf938e4c7fa3
https://github.com/Weixin-Liang/MetaShift/tree/84e090a13652437f8f392065f6bebf938e4c7fa3