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
conv_head_pooling
# 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...
yasarniyazoglu/d2go
conv_head_pooling
false
11,032
[ "Apache-2.0" ]
0
308c2700c51c70a7a928d99a477b64e856d1ed5e
https://github.com/yasarniyazoglu/d2go/tree/308c2700c51c70a7a928d99a477b64e856d1ed5e
ConvWS2d
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed def conv_ws_2d(input, weight, bias=None, stride=1, padding=0, dilation=1, groups=1, eps=1e-05): c_in = weight.size(0) weight_flat = wei...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
BradleyBrown19/CustomObjectDetector
ConvWS2d
false
2,090
[ "Apache-2.0" ]
0
11c14ec6127c553ac365703c768b75dde33d9a4d
https://github.com/BradleyBrown19/CustomObjectDetector/tree/11c14ec6127c553ac365703c768b75dde33d9a4d
SE
import torch from itertools import chain as chain import torch.utils.data import torch.nn as nn class SwishEfficient(torch.autograd.Function): """Swish activation function: x * sigmoid(x).""" @staticmethod def forward(ctx, x): result = x * torch.sigmoid(x) ctx.save_for_backward(x) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from itertools import chain a...
SheldongChen/SlowFast
SE
false
5,832
[ "Apache-2.0" ]
1
298cd1648bcaaafa7d436bf286a2c7f243f36416
https://github.com/SheldongChen/SlowFast/tree/298cd1648bcaaafa7d436bf286a2c7f243f36416
MultiHeadedAttention
# 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....
eschmidbauer/wenet
MultiHeadedAttention
false
12,365
[ "Apache-2.0" ]
0
f0bbf6af16fa92d26a7f68ac21e0354a7500a025
https://github.com/eschmidbauer/wenet/tree/f0bbf6af16fa92d26a7f68ac21e0354a7500a025
ContrastiveLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
DanIulian/minigrid_rl
ContrastiveLoss
false
340
[ "MIT" ]
0
d7b59fd1d1e62fc99d5134c89f59c6ad16246cfa
https://github.com/DanIulian/minigrid_rl/tree/d7b59fd1d1e62fc99d5134c89f59c6ad16246cfa
PositionalEncoder
import math import torch import torch.nn as nn class PositionalEncoder(nn.Module): """Generate positional encoding for a vector Args: length (int): length of the input sentence to be encoded d_model (int): dimention of the word vector Returns: torch.Tensor: positionaly encoded vect...
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 torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guar...
abhirajtiwari/QANet
PositionalEncoder
false
18,211
[ "MIT" ]
4
85e1db4edf0710169268a091e7d7959e524f1ceb
https://github.com/abhirajtiwari/QANet/tree/85e1db4edf0710169268a091e7d7959e524f1ceb
SimpleNotModule
import torch import torch.jit import torch.onnx import torch.nn class SimpleNotModule(torch.nn.Module): def __init__(self): super(SimpleNotModule, self).__init__() def forward(self, a): b = torch.logical_not(a) return torch.logical_not(b) def get_inputs(): return [torch.rand([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 import torch.jit import torch.onnx import torch.nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
briancoutinho/glow
SimpleNotModule
false
12,571
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
LayerNorm
import torch import torch.nn as nn class LayerNorm(nn.Module): def __init__(self, d_model, eps=1e-05): super(LayerNorm, self).__init__() self.a_2 = nn.Parameter(torch.ones(d_model)) self.b_2 = nn.Parameter(torch.zeros(d_model)) self.eps = eps def forward(self, x): mea...
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_...
wukevin/RoseTTAFold
LayerNorm
false
4,555
[ "MIT" ]
0
e3c15dbf4bc1e4f8726e26c63aca1625188da803
https://github.com/wukevin/RoseTTAFold/tree/e3c15dbf4bc1e4f8726e26c63aca1625188da803
Minimum
# 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 from torch import optim as optim assert_size_stride = torch._C._dyn...
pgruening/ConvNeXt
Minimum
false
12,878
[ "MIT" ]
0
e9a1beaf312f3a724f0c21d098efbe7db872b049
https://github.com/pgruening/ConvNeXt/tree/e9a1beaf312f3a724f0c21d098efbe7db872b049
Conv2dTime
import torch import torch.nn as nn class Conv2dTime(nn.Conv2d): """ Implements time dependent 2d convolutions, by appending the time variable as an extra channel. """ def __init__(self, in_channels, *args, **kwargs): super(Conv2dTime, self).__init__(in_channels + 1, *args, **kwargs) ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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
Successor
# 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...
lindagaw/Kadara
Successor
false
10,474
[ "MIT" ]
0
f1059b69a581344ca460c8df02ac3f73f3fbcba1
https://github.com/lindagaw/Kadara/tree/f1059b69a581344ca460c8df02ac3f73f3fbcba1
PixelDynamicsLoss
import torch from torch import nn class PixelDynamicsLoss(nn.Module): def __init__(self, diff_pp=False): super().__init__() self.diff_pp = diff_pp def forward(self, target_t, target_tk, pred_t, pred_tk): if self.diff_pp: loss = ((target_t - target_tk).abs() - (pred_t.deta...
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...
CompVis/interactive-image2video-synthesis
PixelDynamicsLoss
false
7,921
[ "MIT" ]
20
05ea449d3a2704b6d79a5f08683035220d615576
https://github.com/CompVis/interactive-image2video-synthesis/tree/05ea449d3a2704b6d79a5f08683035220d615576
HubertFeatureProjection
from _paritybench_helpers import _mock_config import torch from torch import nn import torch.utils.checkpoint class HubertFeatureProjection(nn.Module): def __init__(self, config): super().__init__() self.layer_norm = nn.LayerNorm(config.conv_dim[-1], eps=config. layer_norm_eps) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
jxhe/unify-parameter-efficient-tuning
HubertFeatureProjection
false
15,765
[ "Apache-2.0" ]
101
3222ce2c0079566a28043e22380eb4ab6ad14389
https://github.com/jxhe/unify-parameter-efficient-tuning/tree/3222ce2c0079566a28043e22380eb4ab6ad14389
SiLU
import torch import torch.nn as nn class SiLU(nn.Module): """export-friendly version of nn.SiLU()""" @staticmethod def forward(x): return x * torch.sigmoid(x) def get_inputs(): return [torch.rand([4, 4, 4, 4])] def get_init_inputs(): return [[], {}]
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
Arui66/YOLOX
SiLU
false
7,750
[ "Apache-2.0" ]
16
7ee17936db849600817d7de05269bfdfb1a0eb48
https://github.com/Arui66/YOLOX/tree/7ee17936db849600817d7de05269bfdfb1a0eb48
CNN_Net
import torch from torch import nn import torch.nn.functional as F class CNN_Net(nn.Module): def __init__(self, device=None): super(CNN_Net, self).__init__() self.conv1 = nn.Conv2d(1, 64, 3, 1) self.conv2 = nn.Conv2d(64, 16, 7, 1) self.fc1 = nn.Linear(4 * 4 * 16, 200) self....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Koukyosyumei/NAIST-Experiments
CNN_Net
false
17,551
[ "Apache-2.0" ]
4
2795f6d7f59e7881ba4fe08a37881b8c2b7b4498
https://github.com/Koukyosyumei/NAIST-Experiments/tree/2795f6d7f59e7881ba4fe08a37881b8c2b7b4498
dense_warp
import torch import torch.nn as nn class dense_warp(nn.Module): def __init__(self): super().__init__() def forward(self, h1, cost): g2 = torch.zeros_like(h1) clone_h1 = h1.detach() if h1.device.type == 'cuda': g2 = g2 clone_h1 = clone_h1 for 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
fqhank/HESIC
dense_warp
false
6,699
[ "Apache-2.0" ]
1
f15cb8e6822af45f0022ea4887fce915e250ed75
https://github.com/fqhank/HESIC/tree/f15cb8e6822af45f0022ea4887fce915e250ed75
MemoryEfficientMish
import torch import torch.nn as nn import torch.nn.functional as F class MemoryEfficientMish(nn.Module): class F(torch.autograd.Function): @staticmethod def forward(ctx, x): ctx.save_for_backward(x) return x.mul(torch.tanh(F.softplus(x))) @staticmethod 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 import torch.nn.functional as F assert_s...
Alex-Beh/hand_tracking
MemoryEfficientMish
false
11,166
[ "Apache-2.0" ]
0
40ac39e10ed5815d9400d6a87149015ad6ab9686
https://github.com/Alex-Beh/hand_tracking/tree/40ac39e10ed5815d9400d6a87149015ad6ab9686
FCN
# 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...
JulianYu123456/icnn
FCN
false
13,973
[ "Apache-2.0" ]
258
0aaf4b5cd13d71d98b0d05f367e1f71657ea6eb8
https://github.com/JulianYu123456/icnn/tree/0aaf4b5cd13d71d98b0d05f367e1f71657ea6eb8
Decoder
from _paritybench_helpers import _mock_config import torch import torch.nn as nn class Decoder(nn.Module): def __init__(self, config): super(Decoder, self).__init__() self.linear = nn.Linear(config.hidden_size, 2) def forward(self, x, encoder_output): y = self.linear(encoder_output) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
XIAOYEJIAYOU/GSAN
Decoder
false
18,090
[ "MIT" ]
6
8ca4fdf4c3d615af9cc10e1f9f22ceb7e27fe196
https://github.com/XIAOYEJIAYOU/GSAN/tree/8ca4fdf4c3d615af9cc10e1f9f22ceb7e27fe196
MaxPoolPad
import torch import torch.nn as nn class MaxPoolPad(nn.Module): def __init__(self): super(MaxPoolPad, self).__init__() self.pad = nn.ZeroPad2d((1, 0, 1, 0)) self.pool = nn.MaxPool2d(3, stride=2, padding=1) def forward(self, x): x = self.pad(x) x = self.pool(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 from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
GoalballAnalysis/GUI
MaxPoolPad
false
2,301
[ "MIT" ]
0
c7f1cc27f4fd7f861c3ca09f5ca25d1a3f19a8a7
https://github.com/GoalballAnalysis/GUI/tree/c7f1cc27f4fd7f861c3ca09f5ca25d1a3f19a8a7
GELU
import math import torch import torch.nn as nn def gelu(x): """Implementation of the gelu activation function. For information: OpenAI GPT's gelu is slightly different (and gives slightly different results): 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 * torch.pow(x, 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 from torch._inductor.runtime.triton_helpers import libdevice import math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards....
DQiaole/ZITS
GELU
false
7,950
[ "Apache-2.0" ]
40
5f7a060167790789d5e29a3d14d3c2ef8a34e765
https://github.com/DQiaole/ZITS/tree/5f7a060167790789d5e29a3d14d3c2ef8a34e765
L2_DistanceAttention
import torch import torch.nn as nn import torch.utils.data class L2_DistanceAttention(nn.Module): def __init__(self): super(L2_DistanceAttention, self).__init__() def forward(self, input_hidden_traces, target_hidden_traces): standard_size = input_hidden_traces.size(0), input_hidden_traces.si...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
hk19960522/2018-DL-Final
L2_DistanceAttention
false
3,596
[ "MIT" ]
0
cbc70260aa22d7df366a1d28bee472f1fc5b82c7
https://github.com/hk19960522/2018-DL-Final/tree/cbc70260aa22d7df366a1d28bee472f1fc5b82c7
GroupNorm32
import torch import torch.nn as nn import torch.nn.functional as F class GroupNorm32(nn.GroupNorm): def __init__(self, num_groups, num_channels, swish, eps=1e-05): super().__init__(num_groups=num_groups, num_channels=num_channels, eps=eps) self.swish = swish 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 from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
dbanys/glide-text2im
GroupNorm32
false
3,396
[ "MIT" ]
0
5177545ec62f1fddc3075a8a69b63df3eb2256a5
https://github.com/dbanys/glide-text2im/tree/5177545ec62f1fddc3075a8a69b63df3eb2256a5
HighwayLayer
# 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 ...
kayburns/craftassist
HighwayLayer
false
3,811
[ "MIT" ]
0
07909493d320afc2c9ff428d0891bc3acd4dc68f
https://github.com/kayburns/craftassist/tree/07909493d320afc2c9ff428d0891bc3acd4dc68f
ChamferLoss
import torch import torch.nn as nn def batch_pairwise_dist(x, y): _bs, num_points_x, _points_dim = x.size() _, num_points_y, _ = y.size() xx = torch.bmm(x, x.transpose(2, 1)) yy = torch.bmm(y, y.transpose(2, 1)) zz = torch.bmm(x, y.transpose(2, 1)) diag_ind_x = torch.arange(0, num_points_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_...
AnTao97/UnsupervisedPointCloudSegmentation
ChamferLoss
false
7,757
[ "MIT" ]
13
9bcf0bdf3b1ae62421d9202eb7c0b014d6a69c02
https://github.com/AnTao97/UnsupervisedPointCloudSegmentation/tree/9bcf0bdf3b1ae62421d9202eb7c0b014d6a69c02
Actor
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from math import * def hidden_init(layer): fan_in = layer.weight.data.size()[0] lim = 1.0 / np.sqrt(fan_in) return -lim, lim class Actor(nn.Module): """Actor (Policy) Model.""" def __init__(self, state_size, a...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
albimc/deep-reinforcement-learning
Actor
false
1,401
[ "MIT" ]
0
e11a6c9d4c8991cf229e686b645ae22ec4cff4f5
https://github.com/albimc/deep-reinforcement-learning/tree/e11a6c9d4c8991cf229e686b645ae22ec4cff4f5
SplAtConv2d
import logging import torch from torch import nn import torch.nn.functional as F from torch.nn import ReLU from torch.nn import Conv2d from torch.nn.modules.utils import _pair from torch.optim.lr_scheduler import * from torch.optim import * def get_norm(norm, out_channels, **kwargs): """ Args: norm (s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Challyfilio/NAIC2021
SplAtConv2d
false
274
[ "MIT" ]
0
11b38a920dcc902f9b798dc43ae360062862e6e4
https://github.com/Challyfilio/NAIC2021/tree/11b38a920dcc902f9b798dc43ae360062862e6e4
L1_Charbonnier_loss_color
import torch import torch.utils.data from torch.nn.modules.loss import _Loss class L1_Charbonnier_loss_color(_Loss): """ L1 Charbonnierloss color """ def __init__(self, para): super(L1_Charbonnier_loss_color, self).__init__() self.eps = 0.001 def forward(self, X, Y): diff...
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 from torch.nn.modules.loss import _Loss assert_size_str...
YDDDDG/3D2Unet
L1_Charbonnier_loss_color
false
6,001
[ "MIT" ]
1
daca056958fb2ae319dc18a350e04b3cefe0d99f
https://github.com/YDDDDG/3D2Unet/tree/daca056958fb2ae319dc18a350e04b3cefe0d99f
MultiHeadedAttention
import math import torch from typing import Optional from typing import Tuple from torch import nn class MultiHeadedAttention(nn.Module): """Multi-Head Attention layer. Args: n_head (int): The number of heads. n_feat (int): The number of features. dropout_rate (float): Dropout rate. ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
JJoving/wenet
MultiHeadedAttention
false
9,166
[ "Apache-2.0" ]
0
4a2195744dba43fe4fb9ad8d46a2b90a80dbdc4e
https://github.com/JJoving/wenet/tree/4a2195744dba43fe4fb9ad8d46a2b90a80dbdc4e
UNet
import torch import torch.nn as nn import torch.nn.functional as F class down(nn.Module): def __init__(self, inChannels, outChannels, filterSize): super(down, self).__init__() self.conv1 = nn.Conv2d(inChannels, outChannels, filterSize, stride= 1, padding=int((filterSize - 1) / 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 import torch.nn as nn import ...
brainma/ASRNet
UNet
false
9,998
[ "MIT" ]
0
b88edbcfbcee2cc77f7f4b2a8d139ced303a4f14
https://github.com/brainma/ASRNet/tree/b88edbcfbcee2cc77f7f4b2a8d139ced303a4f14
AvgPoolHead
import torch import torch.nn as nn import torch.optim class AvgPoolHead(nn.Module): def __init__(self, in_channels, out_channels, fea_map_size): super(AvgPoolHead, self).__init__() self.avgpool = nn.AvgPool2d(fea_map_size, stride=1) self.fc = nn.Linear(in_channels, out_channels) def ...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 assert_size_stride = torch._C._dynamo.g...
harshitbansal05/integral-human-pose
AvgPoolHead
false
10,152
[ "MIT" ]
0
50c32b59d765afe3ab2c3873068d3adfb8fd9b13
https://github.com/harshitbansal05/integral-human-pose/tree/50c32b59d765afe3ab2c3873068d3adfb8fd9b13
Unet
import torch from torch import nn import torch.nn.functional as F class ConvBlock(nn.Module): def __init__(self, in_channels, out_channels, dropout=False, norm=None, residual=True, activation='leakyrelu', in_place_activation=True, transpose=False, reflectpad=True): super(ConvBlock, self)....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
royerloic/aydin
Unet
false
16,515
[ "BSD-3-Clause" ]
78
f9c61a24030891d008c318b250da5faec69fcd7d
https://github.com/royerloic/aydin/tree/f9c61a24030891d008c318b250da5faec69fcd7d
AdaptiveConcatPool2d
import torch from typing import * from typing import Optional from torch import nn class AdaptiveConcatPool2d(nn.Module): """Layer that concats `AdaptiveAvgPool2d` and `AdaptiveMaxPool2d`.""" def __init__(self, sz: 'Optional[int]'=None): super(AdaptiveConcatPool2d, self).__init__() """Output ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from typing import * from typing import Optional from torch import nn assert_size_stride ...
JacobARose/image-utils
AdaptiveConcatPool2d
false
592
[ "MIT" ]
0
aa0e005c0b4df5198d188b074f4e21f8d8f97962
https://github.com/JacobARose/image-utils/tree/aa0e005c0b4df5198d188b074f4e21f8d8f97962
MSELoss
# 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.nn.functional as F assert_size_stride = torch._C._dyna...
ALISCIFP/mmpose
MSELoss
false
2,049
[ "Apache-2.0" ]
0
2433e3dbcc44baa2253e2a7c748ba0216937933e
https://github.com/ALISCIFP/mmpose/tree/2433e3dbcc44baa2253e2a7c748ba0216937933e
L_TV
# 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.optim assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dyna...
farhantandia/Applied-CV-Zero-DCE-master
L_TV
false
6,687
[ "MIT" ]
1
56a0f8aec799eb5d125f5d9f44f692b9a9a3c990
https://github.com/farhantandia/Applied-CV-Zero-DCE-master/tree/56a0f8aec799eb5d125f5d9f44f692b9a9a3c990
SimpleBlock
import math import torch import torch.nn as nn import torch.utils.data import torch.nn.parallel import torch.optim import torch.utils.data.distributed def init_layer(L): if isinstance(L, nn.Conv2d): n = L.kernel_size[0] * L.kernel_size[1] * L.out_channels L.weight.data.normal_(0, math.sqrt(2.0 / f...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import math import torch.nn a...
Aamer98/FeatureNorm
SimpleBlock
false
12
[ "MIT" ]
0
fbf3d3b4cef81b3351347d272eb51b6cdd9f0cc5
https://github.com/Aamer98/FeatureNorm/tree/fbf3d3b4cef81b3351347d272eb51b6cdd9f0cc5
InformedSender
# 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....
IA3005/NLP_ens
InformedSender
false
11,583
[ "MIT" ]
0
794ebbff46d5e6d5476f29b577b40bbb52991246
https://github.com/IA3005/NLP_ens/tree/794ebbff46d5e6d5476f29b577b40bbb52991246
ArcMarginProduct
import math import torch import torch.nn as nn from torch.nn import functional as F import torch.nn.parallel from torch.nn import Parameter class ArcMarginProduct(nn.Module): """Implement of large margin arc distance: : Args: in_features: size of each input sample out_features: siz...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
HotaekHan/classification_uncertainty
ArcMarginProduct
false
17,386
[ "MIT" ]
5
f0f119b93a84f7b041baf4eddf835dd99013e6a3
https://github.com/HotaekHan/classification_uncertainty/tree/f0f119b93a84f7b041baf4eddf835dd99013e6a3
SLP
# 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....
Pandinosaurus/KungFu
SLP
false
14,144
[ "Apache-2.0" ]
291
80dfa463450330e920b413f65cc49d8e013b84a9
https://github.com/Pandinosaurus/KungFu/tree/80dfa463450330e920b413f65cc49d8e013b84a9
Model
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
mntalha/U-NET_Iplementation
Model
false
4,062
[ "MIT" ]
0
7fc2a34352f02a4989659053a6dd8717134913a0
https://github.com/mntalha/U-NET_Iplementation/tree/7fc2a34352f02a4989659053a6dd8717134913a0
Attention
import torch import torch.nn as nn import torch.nn.functional as F class Attention(nn.Module): def __init__(self, hidden_size): super(Attention, self).__init__() self.hidden_size = hidden_size self.linear_in = nn.Linear(hidden_size, hidden_size, bias=False) def score(self, hidden_sta...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
michiyasunaga/DrRepair
Attention
false
16,066
[ "MIT" ]
139
fb447594149ac4f80fef8ba091373184120019c7
https://github.com/michiyasunaga/DrRepair/tree/fb447594149ac4f80fef8ba091373184120019c7
penalty_bce_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 math as tl_math import torch.nn as nn ...
manuel-rdz/SGL-Retinal-Vessel-Segmentation
penalty_bce_loss
false
16,014
[ "MIT" ]
45
7897d977e77aa0b5d3acb86e0aa74c6829d67415
https://github.com/manuel-rdz/SGL-Retinal-Vessel-Segmentation/tree/7897d977e77aa0b5d3acb86e0aa74c6829d67415
AttentionConditioningLayer
import torch import torch.utils.data from torch import nn class ConvNorm(torch.nn.Module): def __init__(self, in_channels, out_channels, kernel_size=1, stride=1, padding=None, dilation=1, bias=True, w_init_gain='linear'): super(ConvNorm, self).__init__() if padding is None: as...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
zachwe/flowtron
AttentionConditioningLayer
false
13,171
[ "Apache-2.0" ]
0
28da7fbdb8c2851c835a355ae5cce45cc30bbc84
https://github.com/zachwe/flowtron/tree/28da7fbdb8c2851c835a355ae5cce45cc30bbc84
SeqAttendImgResAttOnlyFusion
# 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....
Asichurter/MalFusionFSL
SeqAttendImgResAttOnlyFusion
false
16,996
[ "MIT" ]
4
713bf64cc07a3489f42941fd2299837075575ac0
https://github.com/Asichurter/MalFusionFSL/tree/713bf64cc07a3489f42941fd2299837075575ac0
SLinear
import math import torch import torch.nn as nn def quick_scale(module, name='weight'): ScaleW.apply(module, name) return module class ScaleW: """ Constructor: name - name of attribute to be scaled """ def __init__(self, name): self.name = name def scale(self, module): w...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.a...
sergkuzn148/stg
SLinear
false
16,386
[ "MIT" ]
96
84d9f53ae3665c423836a4d0176dc3b22de62b19
https://github.com/sergkuzn148/stg/tree/84d9f53ae3665c423836a4d0176dc3b22de62b19
Conv2
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math import ...
aperquin/Extended_VQVAE
Conv2
false
14,888
[ "MIT" ]
55
46d309643c3fe3663e6fbd2fd6dd6b768341863b
https://github.com/aperquin/Extended_VQVAE/tree/46d309643c3fe3663e6fbd2fd6dd6b768341863b
ThreeNet
# 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...
Jennifer-Rigdon/fvcore
ThreeNet
false
5,404
[ "Apache-2.0" ]
1
7e800a86f2df93da017e07380543b4060ab88c94
https://github.com/Jennifer-Rigdon/fvcore/tree/7e800a86f2df93da017e07380543b4060ab88c94
NSELoss
import torch class NSELoss(torch.nn.Module): """Calculate (batch-wise) NSE Loss. Each sample i is weighted by 1 / (std_i + eps)^2, where std_i is the standard deviation of the discharge from the basin, to which the sample belongs. Parameters: ----------- eps : float Constant, added ...
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...
bernharl/CamelsML
NSELoss
false
3,211
[ "Apache-2.0" ]
0
4ec3ea231ba6ed8c9db68f0aa61aba8da32652b8
https://github.com/bernharl/CamelsML/tree/4ec3ea231ba6ed8c9db68f0aa61aba8da32652b8
L2Part
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.nn.parallel import torch.optim import torch.u...
EddieMG/LateTemporalModeling3DCNN
L2Part
false
2,363
[ "MIT" ]
0
94c87dc1d31d09bc310d0e735a2e55453976cb0d
https://github.com/EddieMG/LateTemporalModeling3DCNN/tree/94c87dc1d31d09bc310d0e735a2e55453976cb0d
BertAttention
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn class BertSelfAttention(nn.Module): def __init__(self, config): super(BertSelfAttention, self).__init__() if config.hidden_size % config.num_attention_heads != 0: raise ValueError( ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
IsaacChanghau/ReLoCLNet
BertAttention
false
8,797
[ "MIT" ]
31
56cb666ce516cce9acbcfce78fb4e95d81e11e54
https://github.com/IsaacChanghau/ReLoCLNet/tree/56cb666ce516cce9acbcfce78fb4e95d81e11e54
MatrixVectorScaledDotProductAttention
import torch import numpy as np import torch.nn as nn class MatrixVectorScaledDotProductAttention(nn.Module): def __init__(self, temperature, attn_dropout=0.1): super().__init__() self.temperature = temperature self.dropout = nn.Dropout(attn_dropout) self.softmax = nn.Softmax(dim=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
immrz/qagnn
MatrixVectorScaledDotProductAttention
false
3,743
[ "MIT" ]
0
0e695c6fcbefcf25da25c056c0bea1940b3e0f2b
https://github.com/immrz/qagnn/tree/0e695c6fcbefcf25da25c056c0bea1940b3e0f2b
PrimaryCapsules
# 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 ...
jjcao/capsule-network
PrimaryCapsules
false
15,708
[ "MIT" ]
171
0c2d9976b25d64720a90d3db71e5869d2592ab71
https://github.com/jjcao/capsule-network/tree/0c2d9976b25d64720a90d3db71e5869d2592ab71
QMaxPooling2d
from torch.autograd import Function import torch import torch.nn as nn import torch.nn.functional as F def calcScaleZeroPoint(min_val, max_val, num_bits=8): qmin = 0.0 qmax = 2.0 ** num_bits - 1.0 scale = float((max_val - min_val) / (qmax - qmin)) zero_point = qmax - max_val / scale if zero_point ...
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.autograd import Function import torch.nn as nn import torch.nn.functional as F...
NeekHua/quantization_pytorch_demo
QMaxPooling2d
false
5,646
[ "Apache-2.0" ]
1
930b03de977e48c0652d3801c710510ffc40aa38
https://github.com/NeekHua/quantization_pytorch_demo/tree/930b03de977e48c0652d3801c710510ffc40aa38
BahdanauAttention
import math import torch import torch.nn.functional as F import torch.nn as nn from torch.nn import Parameter import torch.optim.lr_scheduler import torch.utils.data import torch.onnx.operators import torch.optim class BaseAttention(nn.Module): """Base class for attention layers.""" def __init__(self, query_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
entn-at/espresso
BahdanauAttention
false
10,047
[ "MIT" ]
0
754b69a316429446a5602e13e644142310b7980b
https://github.com/entn-at/espresso/tree/754b69a316429446a5602e13e644142310b7980b
SamePadConvTranspose3d
import torch import torch.nn as nn import torch.nn.functional as F class SamePadConvTranspose3d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, bias=True): super().__init__() if isinstance(kernel_size, int): kernel_size = (kernel_size,) * 3 ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
AshBT/VideoGPT
SamePadConvTranspose3d
false
13,312
[ "MIT" ]
396
a823bc734af3387129f3bd624caad3db270707f2
https://github.com/AshBT/VideoGPT/tree/a823bc734af3387129f3bd624caad3db270707f2
Conv2dZeros
import torch import torch.nn as nn class _ActNorm(nn.Module): """ Activation Normalization Initialize the bias and scale with a given minibatch, so that the output per-channel have zero mean and unit variance for that. After initialization, `bias` and `logs` will be trained as parameters. """...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch....
GauriJagatap/glow-pytorch
Conv2dZeros
false
2,346
[ "MIT" ]
0
e379f524b7cc0b57a9bc2849f4115f97bda5a1de
https://github.com/GauriJagatap/glow-pytorch/tree/e379f524b7cc0b57a9bc2849f4115f97bda5a1de
TVLoss
import torch from torch import nn from torch.nn import functional as F class TVLoss(nn.Module): def forward(self, input): input = F.pad(input, (0, 1, 0, 1), 'replicate') x_diff = input[..., :-1, 1:] - input[..., :-1, :-1] y_diff = input[..., 1:, :-1] - input[..., :-1, :-1] diff = ...
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...
momo-the-monster/vqgan-clip-app
TVLoss
false
16,102
[ "MIT" ]
63
56cfc0a53928d6d8f90ed8c79439afb4430bc118
https://github.com/momo-the-monster/vqgan-clip-app/tree/56cfc0a53928d6d8f90ed8c79439afb4430bc118
NodeClassifier
import torch from torch import nn import torch.utils.data class NodeClassifier(nn.Module): def __init__(self, featureSize, hiddenSize): super(NodeClassifier, self).__init__() self.first = nn.Linear(featureSize, hiddenSize) self.tanh = nn.Tanh() self.second = nn.Linear(hiddenSize, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
BigkoalaZhu/SCORES
NodeClassifier
false
7,787
[ "MIT" ]
16
8332733c375ee85c02bd34c2adce6a3213aad3c4
https://github.com/BigkoalaZhu/SCORES/tree/8332733c375ee85c02bd34c2adce6a3213aad3c4
ConfidencePenalty
import torch import torch.utils.data from torch import nn class ConfidencePenalty(nn.Module): """Cross entropy loss with label smoothing regularizer. Reference: Szegedy et al. Rethinking the Inception Architecture for Computer Vision. CVPR 2016. Equation: y = (1 - epsilon) * y + epsilon / K. Arg...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils.dat...
Luxios22/Dual_Norm
ConfidencePenalty
false
9,284
[ "MIT" ]
0
b404a03b15fc05749e0c648d9e46ffe70f6b2a80
https://github.com/Luxios22/Dual_Norm/tree/b404a03b15fc05749e0c648d9e46ffe70f6b2a80
ResidualBlock
import torch from torch.optim import * import torch.nn as nn class ResidualBlock(nn.Module): """ Residual block as in "Deep residual learning for image recognition", He et al. 2016. Default: bias, ReLU, no downsampling, no batch norm, ConvLSTM. """ def __init__(self, in_channels, out_channels, st...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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.optim import * imp...
EvilPerfectionist/ssl_e2vid
ResidualBlock
false
8,081
[ "MIT" ]
24
84f7c7e59875f134e97c14ec423f396725e04be7
https://github.com/EvilPerfectionist/ssl_e2vid/tree/84f7c7e59875f134e97c14ec423f396725e04be7
ResidualAttentionBlock
# 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....
dbanys/glide-text2im
ResidualAttentionBlock
false
3,408
[ "MIT" ]
0
5177545ec62f1fddc3075a8a69b63df3eb2256a5
https://github.com/dbanys/glide-text2im/tree/5177545ec62f1fddc3075a8a69b63df3eb2256a5
ATLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import...
NeelayS/KD_Lib
ATLoss
false
2,679
[ "MIT" ]
0
c3f8c7cef76772d14862260e61c1d1c52c58f58e
https://github.com/NeelayS/KD_Lib/tree/c3f8c7cef76772d14862260e61c1d1c52c58f58e
TripletLoss
import torch import torch.nn.functional as F from torch import nn def cosine_dist(x, y): """Computes Cosine Distance.""" x = F.normalize(x, dim=1) y = F.normalize(y, dim=1) dist = 2 - 2 * torch.mm(x, y.t()) return dist def euclidean_dist(x, y): """Computes Euclidean distance.""" m, n = x...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Atharva-Phatak/torchflare
TripletLoss
false
13,348
[ "Apache-2.0" ]
86
945f4bee73a855edd8cb19cd646731155499a27f
https://github.com/Atharva-Phatak/torchflare/tree/945f4bee73a855edd8cb19cd646731155499a27f
ConvWithBatchNorm
# 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...
royerloic/aydin
ConvWithBatchNorm
false
16,344
[ "BSD-3-Clause" ]
78
f9c61a24030891d008c318b250da5faec69fcd7d
https://github.com/royerloic/aydin/tree/f9c61a24030891d008c318b250da5faec69fcd7d
L12Loss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
Daiver/torch_fuze
L12Loss
false
5,042
[ "MIT" ]
1
6b7ad568e2d7549c7f0c0d4c309532ac1b92881d
https://github.com/Daiver/torch_fuze/tree/6b7ad568e2d7549c7f0c0d4c309532ac1b92881d
AdaptiveAvgMaxPool2d
# 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.nn.parallel import torch.utils.data import torchvision...
Hhhhhhao/pytorch-image-models
AdaptiveAvgMaxPool2d
false
5,299
[ "Apache-2.0" ]
1
9cc7dda6e5fcbbc7ac5ba5d2d44050d2a8e3e38d
https://github.com/Hhhhhhao/pytorch-image-models/tree/9cc7dda6e5fcbbc7ac5ba5d2d44050d2a8e3e38d
CustomGruCell
# 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 ...
abogaziah/PySyft
CustomGruCell
false
1,361
[ "Apache-2.0" ]
0
812dc6f350261793c67a928786fc081158f22a76
https://github.com/abogaziah/PySyft/tree/812dc6f350261793c67a928786fc081158f22a76
Attn
import torch from torch import nn class Attn(torch.nn.Module): """ Attention: feature_dim: dimension of feature embedding method: method to calculate attention, (general, dot, concat) input_dim: dimension of input embedding, default is the same as feature_dim; method dot is only available wh...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
HCDM/XRec
Attn
false
521
[ "MIT" ]
0
dae7d3e1237b8e41913656eb33d81e78c61424ea
https://github.com/HCDM/XRec/tree/dae7d3e1237b8e41913656eb33d81e78c61424ea
LSN
# 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 import torch.nn.parallel assert_size_stride...
SindiLab/ACTIVA
LSN
false
17,923
[ "MIT" ]
6
599f57478c5e13868d27879632c54964bf7b02ad
https://github.com/SindiLab/ACTIVA/tree/599f57478c5e13868d27879632c54964bf7b02ad
SelfAttention
import torch import torch.nn as nn import torch.nn.functional as F class SelfAttention(nn.Module): """SelfAttention class""" def __init__(self, input_dim: 'int', da: 'int', r: 'int') ->None: """Instantiating SelfAttention class Args: input_dim (int): dimension of input, eg) (batc...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
aisolab/nlp_implementation
SelfAttention
false
14,766
[ "MIT" ]
181
21ea6e3f5737e7074bdd8dd190e5f5172f86f6bf
https://github.com/aisolab/nlp_implementation/tree/21ea6e3f5737e7074bdd8dd190e5f5172f86f6bf
Gather1D
# 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.onnx import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynam...
mil-tokyo/webdnn
Gather1D
false
16,076
[ "MIT" ]
1,967
38a60fd3e1a4e72bc01108189a3aa51e0752aecd
https://github.com/mil-tokyo/webdnn/tree/38a60fd3e1a4e72bc01108189a3aa51e0752aecd
GlobalAttentionGeneral
# 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....
comtalyst/multi-gan-material-defects
GlobalAttentionGeneral
false
15,079
[ "MIT" ]
112
aa1c9d4b918b5b5ad7f5fe03fdceec91a66e1007
https://github.com/comtalyst/multi-gan-material-defects/tree/aa1c9d4b918b5b5ad7f5fe03fdceec91a66e1007
ForegroundDTConsistency
# 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...
devaansh100/pytorch_connectomics
ForegroundDTConsistency
false
6,562
[ "MIT" ]
1
b1e4b16b0480546ea806d14876208080815ed964
https://github.com/devaansh100/pytorch_connectomics/tree/b1e4b16b0480546ea806d14876208080815ed964
MetricCELoss
# 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....
BigFishMaster/tnt
MetricCELoss
false
17,516
[ "BSD-3-Clause" ]
3
8b80bb3b194eb87ac18924428ef0924c2fb263c5
https://github.com/BigFishMaster/tnt/tree/8b80bb3b194eb87ac18924428ef0924c2fb263c5
AUXModule
# 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_...
Soo95/segmentation_models.pytorch
AUXModule
false
2,844
[ "MIT" ]
0
9131b336d6939dfabbadecd0d56d382283f46803
https://github.com/Soo95/segmentation_models.pytorch/tree/9131b336d6939dfabbadecd0d56d382283f46803
CategoricalPolicyTwoLayer
import torch import torch.nn.functional as F import torch.distributions as td import torch.nn as nn class PolicyNetwork(nn.Module): """Base class for stochastic policy networks.""" def __init__(self): super().__init__() def forward(self, state): """Take state as input, then output the 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 from torch._inductor.runtime import triton_helpers import torch.distributions as...
wessle/costaware
CategoricalPolicyTwoLayer
false
10,989
[ "MIT" ]
0
151502308411528eaa703d353d138fc809e59d8e
https://github.com/wessle/costaware/tree/151502308411528eaa703d353d138fc809e59d8e
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 from torch ...
Thagio/kaggle-aptos
FocalLoss
false
9,534
[ "MIT" ]
0
f565335d34b46b7fa7ca925b7d325397df8e1fee
https://github.com/Thagio/kaggle-aptos/tree/f565335d34b46b7fa7ca925b7d325397df8e1fee
Interpolator
import torch import numpy as np import torch.nn as nn import torch.nn.functional as F def bilinear_kernel(size, normalize=False): """ Make a 2D bilinear kernel suitable for upsampling/downsampling with normalize=False/True. The kernel is size x size square. Take size: kernel size (square) ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
Global19/revolver
Interpolator
false
13,735
[ "BSD-2-Clause" ]
151
200082798d862516de6d9aa18e863a5968127a3f
https://github.com/Global19/revolver/tree/200082798d862516de6d9aa18e863a5968127a3f
WeightedBCE
import torch from torch import nn class WeightedBCE(nn.Module): def __init__(self, weights=None): super().__init__() self.weights = weights def forward(self, inputs, targets): inputs = inputs.view(-1).float() targets = targets.view(-1).float() if self.weights is not N...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_...
sophmrtn/RectAngle
WeightedBCE
false
10,775
[ "MIT" ]
0
941138fb63bdc3f3cb297a94fa057a16b88b00be
https://github.com/sophmrtn/RectAngle/tree/941138fb63bdc3f3cb297a94fa057a16b88b00be
LayerNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
AWilcke/Dissertation
LayerNorm
false
3
[ "MIT" ]
0
b85ad38a7f336ee290d5883f5e942f54e140d0d0
https://github.com/AWilcke/Dissertation/tree/b85ad38a7f336ee290d5883f5e942f54e140d0d0
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 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_...
Rachneet/amc-app
ResidualBlock
false
11,796
[ "MIT" ]
0
20b586608d454a3033333e285f0dbc91e5c6e07f
https://github.com/Rachneet/amc-app/tree/20b586608d454a3033333e285f0dbc91e5c6e07f
ScaledDotProductAttention
import torch import torch.nn as nn import torch.nn.functional as F class ScaledDotProductAttention(nn.Module): """ Scaled Dot-Product Attention """ def __init__(self, scale=None, attn_dropout=0.1): super().__init__() self.scale = scale self.dropout = nn.Dropout(attn_dropout) def ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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....
PINE4PPLE/transformer-lm
ScaledDotProductAttention
false
9,397
[ "MIT" ]
0
da76a4afd29d1fd023ba866ccc21a49901ad46f2
https://github.com/PINE4PPLE/transformer-lm/tree/da76a4afd29d1fd023ba866ccc21a49901ad46f2
my_BinaryCross
# 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 ...
carsault/chord_extraction_prediction_lib
my_BinaryCross
false
3,399
[ "MIT" ]
0
6de09eef9f2852b56b04874d2e42eb504c96d33f
https://github.com/carsault/chord_extraction_prediction_lib/tree/6de09eef9f2852b56b04874d2e42eb504c96d33f
APL
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch import nn from torch.nn.parameter import Parameter assert_size_stride = torch....
Venkateshwar2506/Echo
APL
false
1,185
[ "MIT" ]
0
5d236b25ee4900754f48e0a865e1bf1ae9183875
https://github.com/Venkateshwar2506/Echo/tree/5d236b25ee4900754f48e0a865e1bf1ae9183875
FocalLoss
import torch import torch.nn as nn import torch.nn.functional as F class FocalLoss(nn.Module): def __init__(self, alpha=1, gamma=2): super().__init__() self.alpha = alpha self.gamma = gamma def forward(self, x, y): ce = F.binary_cross_entropy_with_logits(x, y) fc = se...
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...
Nightmare4214/FracNet
FocalLoss
false
2,686
[ "Apache-2.0" ]
0
db397adb50f71387155d9d110302a5968f86f756
https://github.com/Nightmare4214/FracNet/tree/db397adb50f71387155d9d110302a5968f86f756
SimpleLinearModule
# 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.jit import torch.onnx import torch.nn assert_size_stride = torch._C...
briancoutinho/glow
SimpleLinearModule
false
12,580
[ "Apache-2.0" ]
0
4c919d60b3c33296c4109aec8020a1733c98f5b5
https://github.com/briancoutinho/glow/tree/4c919d60b3c33296c4109aec8020a1733c98f5b5
GenerateMask
import torch import torch.nn as nn import torch.nn.functional as F class VectorAttention(nn.Module): """vector attention""" def __init__(self, input_dim, hidden_dim): super(VectorAttention, self).__init__() self.theta = nn.Linear(input_dim, hidden_dim) self.phi = nn.Linear(input_dim, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Crazy-Jack/BigGAN-PyTorch
GenerateMask
false
380
[ "MIT" ]
0
1a5644e9c87cc399580c96cfeb180052076888da
https://github.com/Crazy-Jack/BigGAN-PyTorch/tree/1a5644e9c87cc399580c96cfeb180052076888da
Delta
import torch import torch.nn as nn from torchaudio import transforms class Delta(nn.Module): def __init__(self, order=2, **kwargs): super(Delta, self).__init__() self.order = order self.compute_delta = transforms.ComputeDeltas(**kwargs) def forward(self, x): feats = [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 import torch.nn as nn from torchaudio import transforms assert_size_stride = tor...
AyushExel/s3prl
Delta
false
2,029
[ "MIT" ]
0
6531904e9621a778978b9cfef3ba9f582e56639a
https://github.com/AyushExel/s3prl/tree/6531904e9621a778978b9cfef3ba9f582e56639a
SIG_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 from torch ...
HCDM/XRec
SIG_LOSS
false
501
[ "MIT" ]
0
dae7d3e1237b8e41913656eb33d81e78c61424ea
https://github.com/HCDM/XRec/tree/dae7d3e1237b8e41913656eb33d81e78c61424ea
Conv1dLinear
import torch import torch.nn class Conv1dLinear(torch.nn.Module): """Conv1D + Linear for Transformer block. A variant of MultiLayeredConv1d, which replaces second conv-layer to linear. """ def __init__(self, in_chans, hidden_chans, kernel_size, dropout_rate): """Initialize Conv1dLinear modu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 assert_size_s...
qlindazm/asv-subtools
Conv1dLinear
false
4,250
[ "Apache-2.0" ]
0
fe1d31db9f3268622016babe944201f6ff81ed56
https://github.com/qlindazm/asv-subtools/tree/fe1d31db9f3268622016babe944201f6ff81ed56
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...
Taekyoon/executors
QuickGELU
false
11,956
[ "Apache-2.0" ]
0
567f12c4193bb7be814f84540ea31585cd35b344
https://github.com/Taekyoon/executors/tree/567f12c4193bb7be814f84540ea31585cd35b344
PatchMerging
# 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 ...
rahulmangalampalli/esvit
PatchMerging
false
12,918
[ "MIT" ]
0
5caf6e36b088ae2e7aaa4100b307eec991078e3e
https://github.com/rahulmangalampalli/esvit/tree/5caf6e36b088ae2e7aaa4100b307eec991078e3e
DeepNN_v4
# 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....
SBIlab/NetBio
DeepNN_v4
false
11,838
[ "MIT" ]
0
7abd24b8989cea381147d912f76a72676750b9d2
https://github.com/SBIlab/NetBio/tree/7abd24b8989cea381147d912f76a72676750b9d2
XnorConv
# 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.multiprocessing import torch.nn as nn import torch.nn.parallel impo...
adityakusupati/LLC-2.0
XnorConv
false
18,235
[ "MIT" ]
10
38608bbaa425b15dcf5c971000b7a1b08120fb5c
https://github.com/adityakusupati/LLC-2.0/tree/38608bbaa425b15dcf5c971000b7a1b08120fb5c
ScaleReLU
# 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 torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
IrisDinge/YoloV3_DOTA
ScaleReLU
false
5,355
[ "MIT" ]
1
cdfe6375a2323e9ee162e50a46478d8a66529e6c
https://github.com/IrisDinge/YoloV3_DOTA/tree/cdfe6375a2323e9ee162e50a46478d8a66529e6c
Block
import torch class Block(torch.nn.Module): def __init__(self, in_channels, mid_channel, out_channels, batch_norm=False ): super().__init__() self.conv1 = torch.nn.Conv2d(in_channels=in_channels, out_channels= mid_channel, kernel_size=3, padding=1) self.conv2 = torch.nn...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C...
amrane99/lung-segmentation
Block
false
12,093
[ "MIT" ]
0
ab29db75ac78918da5cbf66b830acaf36cf7b44a
https://github.com/amrane99/lung-segmentation/tree/ab29db75ac78918da5cbf66b830acaf36cf7b44a
CrossEntropyLoss
import torch import torch.nn as nn import torch.nn.functional as F def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". Return: Tensor: Reduced loss tensor. """ 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 from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
CAMP-eXplain-AI/imba-explain
CrossEntropyLoss
false
2,066
[ "MIT" ]
0
e41b4ca5de63955cb0e925aad9599f38c5a3e973
https://github.com/CAMP-eXplain-AI/imba-explain/tree/e41b4ca5de63955cb0e925aad9599f38c5a3e973
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...
loong8888/TextSnake.pytorch
Upsample
false
7,124
[ "MIT" ]
1
49c24f71043c1895b91f8c7379995037fcc644f7
https://github.com/loong8888/TextSnake.pytorch/tree/49c24f71043c1895b91f8c7379995037fcc644f7
Refine
import torch import torch.nn import torch.nn.functional as F import torch.utils.data.dataset class ResBlock(torch.nn.Module): def __init__(self, indim, outdim=None, stride=1): super(ResBlock, self).__init__() if outdim is None: outdim = indim if indim == outdim and stride == 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 import torch.nn import torch....
hzxie/RMNet
Refine
false
15,583
[ "MIT" ]
66
32a16f9c9473463a41dd6e95f72b06dd830fc1eb
https://github.com/hzxie/RMNet/tree/32a16f9c9473463a41dd6e95f72b06dd830fc1eb
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): assert x.data.dim() == 4 B = x.data.size(0) C = x.data.size(1) H = x.data.size(2) W = x.da...
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...
CharlesPikachu/CharlesFace
Reorg
false
7,840
[ "MIT" ]
13
90bfe38c58068228d0069dce43b55b2570acaa16
https://github.com/CharlesPikachu/CharlesFace/tree/90bfe38c58068228d0069dce43b55b2570acaa16