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 |
|---|---|---|---|---|---|---|---|---|---|---|
AttentionPool2d | # 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.... | LoveEachDay/towhee | AttentionPool2d | false | 11,663 | [
"Apache-2.0"
] | 0 | 513c9c2626676cadaaf0a16ac3c828d96bec91a1 | https://github.com/LoveEachDay/towhee/tree/513c9c2626676cadaaf0a16ac3c828d96bec91a1 |
Policy | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language 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
... | megvii-model/AngleNAS | Policy | false | 16,028 | [
"MIT"
] | 53 | c4cb189f04450db43e2014e178aa8a20ef5b316e | https://github.com/megvii-model/AngleNAS/tree/c4cb189f04450db43e2014e178aa8a20ef5b316e |
MS_Block | import torch
import torch.nn as nn
import torch.multiprocessing
import torch.onnx
class MS_Block(nn.Module):
def __init__(self, input_feature, out_feature, d=[1, 2, 4], group=1):
super(MS_Block, self).__init__()
self.l1 = nn.Conv2d(input_feature, out_feature, 3, padding=d[0],
dilation... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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.multiprocessing
import torch.onnx
assert_size... | cvmlarun/RANet | MS_Block | false | 6,511 | [
"Apache-2.0"
] | 1 | 3f67a3f36aaacd9cc7fb98ec79f77db8f1ebdc60 | https://github.com/cvmlarun/RANet/tree/3f67a3f36aaacd9cc7fb98ec79f77db8f1ebdc60 |
SimpleCNN32Filter | # 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_... | adwaykanhere/df-dn-paper | SimpleCNN32Filter | false | 12,057 | [
"MIT"
] | 0 | 5df413e06ce33c6be5d005e6d1141de9fcd45cb4 | https://github.com/adwaykanhere/df-dn-paper/tree/5df413e06ce33c6be5d005e6d1141de9fcd45cb4 |
L2Norm | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert... | TropComplique/ssd-pytorch | L2Norm | false | 5,914 | [
"MIT"
] | 1 | e91af875c65dc64a21b838a6645fc803ef690dcf | https://github.com/TropComplique/ssd-pytorch/tree/e91af875c65dc64a21b838a6645fc803ef690dcf |
MLPNet | # 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.... | Ledzy/EKFAC_experiment | MLPNet | false | 775 | [
"MIT"
] | 0 | 5fce6859df1bb75645c38e97325dcb25db01e369 | https://github.com/Ledzy/EKFAC_experiment/tree/5fce6859df1bb75645c38e97325dcb25db01e369 |
SpaceToDepth | # 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.optim
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strid... | Dai-z/pytorch-superpoint | SpaceToDepth | false | 13,549 | [
"MIT"
] | 390 | 90e71045238fdcce13f9f0d02bdd0e1126145a10 | https://github.com/Dai-z/pytorch-superpoint/tree/90e71045238fdcce13f9f0d02bdd0e1126145a10 |
ScaledDotProductAttention | import torch
import torch.optim.lr_scheduler
import torch.nn as nn
class ScaledDotProductAttention(nn.Module):
def __init__(self, d_model, attention_dropout=0.1):
super(ScaledDotProductAttention, self).__init__()
self.temper = d_model ** 0.5
self.dropout = nn.Dropout(attention_dropout)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Shengqiang-Zhang/self-attentive-parser | ScaledDotProductAttention | false | 2,826 | [
"MIT"
] | 0 | 493f74c7acab9824d593f55d231754c5ac7cbb26 | https://github.com/Shengqiang-Zhang/self-attentive-parser/tree/493f74c7acab9824d593f55d231754c5ac7cbb26 |
CharbonnierLoss | import functools
import torch
import torch.nn as nn
from torch.nn import 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".
Returns:
Tensor: Reduced lo... | 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 functools
import torc... | Sardhendu/mmediting | CharbonnierLoss | false | 9,888 | [
"Apache-2.0"
] | 0 | 623b59ac758d856abc9fab7e845beeab61074d8f | https://github.com/Sardhendu/mmediting/tree/623b59ac758d856abc9fab7e845beeab61074d8f |
D_DownBlock | import torch
import torch.utils.data
from torchvision.transforms import *
class ConvBlock(torch.nn.Module):
def __init__(self, input_size, output_size, kernel_size=3, stride=1,
padding=1, bias=True, activation='prelu', norm=None):
super(ConvBlock, self).__init__()
self.conv = torch.nn.Con... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
from torchvision.transforms import *
assert_size_stride ... | HamsterBiz/iSeeBetter | D_DownBlock | false | 11,676 | [
"MIT"
] | 0 | a71cee61583bdedab1f3b368e2cb7dc5ad969aed | https://github.com/HamsterBiz/iSeeBetter/tree/a71cee61583bdedab1f3b368e2cb7dc5ad969aed |
SirenLayer | import torch
from torch import nn
from math import sqrt
class Sine(nn.Module):
"""Sine activation with scaling.
Args:
w0 (float): Omega_0 parameter from SIREN paper.
"""
def __init__(self, w0=1.0):
super().__init__()
self.w0 = w0
def forward(self, x):
return torc... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 im... | idgmatrix/coin | SirenLayer | false | 15,575 | [
"MIT"
] | 84 | 2f2df0614ed4fc866d4b7715ee206081e08b9424 | https://github.com/idgmatrix/coin/tree/2f2df0614ed4fc866d4b7715ee206081e08b9424 |
PositionAttentionModule | import torch
import numpy as np
from torch import nn
from torch.nn import init
class ScaledDotProductAttention(nn.Module):
"""
Scaled dot-product attention
"""
def __init__(self, d_model, d_k, d_v, h, dropout=0.1):
"""
:param d_model: Output dimensionality of the model
:param ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | Nitin-Mane/External-Attention-pytorch | PositionAttentionModule | false | 14,157 | [
"MIT"
] | 4,466 | 1ceda306c41063af11c956334747763444a4d83f | https://github.com/Nitin-Mane/External-Attention-pytorch/tree/1ceda306c41063af11c956334747763444a4d83f |
InterpolationBlock | # 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.distributed
assert_size_stride = torch._C._... | Erfun76/insightface | InterpolationBlock | false | 9,277 | [
"MIT"
] | 0 | 148cef36a43a055f68d2b6a475f4aa38625ad8b4 | https://github.com/Erfun76/insightface/tree/148cef36a43a055f68d2b6a475f4aa38625ad8b4 |
SquaredReLU | from torch.nn import Module
import torch
from torch import nn
import torch.utils.data
import torch.nn.functional
import torch.autograd
class SquaredReLU(Module):
"""
## Squared ReLU activation
$$y = {\\max(x, 0)}^2$$
Squared ReLU is used as the activation function in the
[position wise feedforw... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch.nn import Module
from torch import nn
import torch.utils.data
import torch.nn.... | mcx/annotated_deep_learning_paper_implementations | SquaredReLU | false | 7,205 | [
"MIT"
] | 1 | f169f3a71dd2d36eb28ad31062d3475efa367b88 | https://github.com/mcx/annotated_deep_learning_paper_implementations/tree/f169f3a71dd2d36eb28ad31062d3475efa367b88 |
EALSTM | # 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 ... | jdwillard19/lake_conus_surface_temp_2021 | EALSTM | false | 10,306 | [
"MIT"
] | 0 | 88334091dec71ae43fe4256603d65045141936b5 | https://github.com/jdwillard19/lake_conus_surface_temp_2021/tree/88334091dec71ae43fe4256603d65045141936b5 |
FocalLoss | import torch
import torch.nn as nn
class FocalLoss(nn.Module):
def __init__(self, gamma=0, alpha=None, device=None):
super(FocalLoss, self).__init__()
self.gamma = gamma
self.alpha = alpha
if self.alpha is not None:
self.alpha = torch.FloatTensor([1 - alpha, alpha])
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | taconite/PTF | FocalLoss | false | 16,524 | [
"MIT"
] | 62 | a8789c9f752aea2944c2a75e04cc2aa21c7e4a00 | https://github.com/taconite/PTF/tree/a8789c9f752aea2944c2a75e04cc2aa21c7e4a00 |
MP | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | JuliannaChaykina/social-distance | MP | false | 2,427 | [
"Apache-2.0"
] | 0 | 1c8ade043254b78de49a1244d438203ddb38c586 | https://github.com/JuliannaChaykina/social-distance/tree/1c8ade043254b78de49a1244d438203ddb38c586 |
TernaryTanh | import torch
from torch import nn
class TernaryTanh(nn.Module):
def __init__(self, beta=2.0, varying_beta=True):
super(TernaryTanh, self).__init__()
self.beta = beta
self.varying_beta = varying_beta
def forward(self, x):
m = torch.nn.Tanh()
if self.beta >= 1.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.triton_helpers import libdevice
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | SohamMazumder/Federated_Segmentation | TernaryTanh | false | 5,828 | [
"MIT"
] | 1 | d4eb681441003ba20f8b251a42a811c8c436f04e | https://github.com/SohamMazumder/Federated_Segmentation/tree/d4eb681441003ba20f8b251a42a811c8c436f04e |
GraphLevelAttentionLayer | import torch
import torch.nn.functional as F
import torch.nn as nn
class GraphLevelAttentionLayer(nn.Module):
"""
Simple GAT layer, similar to https://arxiv.org/abs/1710.10903
"""
def __init__(self, in_features, out_features):
super(GraphLevelAttentionLayer, self).__init__()
self.in_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
from torch._inductor.runtime.... | Yonggie/HsCTRD | GraphLevelAttentionLayer | false | 2,981 | [
"Apache-2.0"
] | 0 | d4541f13630a6abd0e17b116ad6aeeab74f54f1c | https://github.com/Yonggie/HsCTRD/tree/d4541f13630a6abd0e17b116ad6aeeab74f54f1c |
ADD | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C.... | COEN-390/YOLOv5-Lite | ADD | false | 11,263 | [
"MIT"
] | 0 | 06a53f5d001c5d37729f55f47cbd46cc8eb63f84 | https://github.com/COEN-390/YOLOv5-Lite/tree/06a53f5d001c5d37729f55f47cbd46cc8eb63f84 |
Theta | # 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.autograd import Function
import torch.nn as nn
from typing import Tup... | neka-nat/Transfer-Learning-Library | Theta | false | 16,149 | [
"MIT"
] | 1,474 | a3b27b0d7562fa90a02e914140b37ab438469e6c | https://github.com/neka-nat/Transfer-Learning-Library/tree/a3b27b0d7562fa90a02e914140b37ab438469e6c |
Encoder | import torch
from torch import nn
from torch.nn import functional as F
class Encoder(nn.Module):
def __init__(self, channel=512, out_class=1, is_dis=True):
super(Encoder, self).__init__()
self.is_dis = is_dis
self.channel = channel
n_class = out_class
self.conv1 = nn.Conv3... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | ShadowTwin41/alpha-WGAN-SigmaRat | Encoder | false | 11,885 | [
"MIT"
] | 0 | 051bb8c5d7b8248e9c724d3de87c0fd771d7070f | https://github.com/ShadowTwin41/alpha-WGAN-SigmaRat/tree/051bb8c5d7b8248e9c724d3de87c0fd771d7070f |
MemoryLayer | import torch
import numpy as np
import torch.nn as nn
class MemoryLayer(nn.Module):
def __init__(self, input_dim, memory_dim, model_dim, mlp_dim, dropout_p):
super(MemoryLayer, self).__init__()
self.input_dim = input_dim
self.memory_dim = memory_dim
self.model_dim = model_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.... | MaryZolfaghar/WCSLS | MemoryLayer | false | 811 | [
"Apache-2.0"
] | 0 | fcb3bfd11c19bb90690ec772f91bbd107832d636 | https://github.com/MaryZolfaghar/WCSLS/tree/fcb3bfd11c19bb90690ec772f91bbd107832d636 |
GATgate_lp | import torch
from torch import nn
class GATgate_lp(nn.Module):
def __init__(self, n_dim):
super(GATgate_lp, self).__init__()
self.w_l1 = nn.Linear(n_dim, n_dim)
self.w_l2 = nn.Linear(n_dim, n_dim)
self.w_p1 = nn.Linear(n_dim, n_dim)
self.w_p2 = nn.Linear(n_dim, n_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 import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_st... | arwhirang/affinity_prediction_BGNN | GATgate_lp | false | 9,747 | [
"MIT"
] | 0 | b8a2a5de16a61a46dadd53856d758e7f63f9ca91 | https://github.com/arwhirang/affinity_prediction_BGNN/tree/b8a2a5de16a61a46dadd53856d758e7f63f9ca91 |
LBM | import torch
import torch.nn as nn
class LBM(nn.Module):
def __init__(self, l_dim, r_dim):
super(LBM, self).__init__()
self.W = nn.Bilinear(l_dim * 2, r_dim, 1, bias=False)
def forward(self, e1, e2, q):
"""
e1: tensor of size (*, l_dim)
e2: tensor of size (*, r_dim)
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | QingkaiZeng/GenTaxo | LBM | false | 8,718 | [
"MIT"
] | 28 | 10257a1714d14c6a4c49cbfa0b507408f718cdf0 | https://github.com/QingkaiZeng/GenTaxo/tree/10257a1714d14c6a4c49cbfa0b507408f718cdf0 |
ConvBlockFixup | import torch
from torch import nn
class ConvBlockFixup(nn.Module):
def __init__(self, filter_width, input_filters, nb_filters, dilation):
super(ConvBlockFixup, self).__init__()
self.filter_width = filter_width
self.input_filters = input_filters
self.nb_filters = nb_filters
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | KartikaySrivadtava/dl-for-har-ea1e9babb2b178cc338dbc72db974325c193c781 | ConvBlockFixup | false | 2,451 | [
"MIT"
] | 0 | f4fa436000a46df80ec083c8e3692cd21787e5b3 | https://github.com/KartikaySrivadtava/dl-for-har-ea1e9babb2b178cc338dbc72db974325c193c781/tree/f4fa436000a46df80ec083c8e3692cd21787e5b3 |
Scale | import torch
import torch.nn as nn
from torch.nn.parameter import Parameter
from itertools import product as product
import torch.onnx
class Scale(nn.Module):
def __init__(self, channels):
super(Scale, self).__init__()
self.weight = Parameter(torch.Tensor(channels))
self.bias = Parameter(... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from torch.nn.parameter import Parameter
from itertools import product as product
import torch.onnx
assert_size_stride... | Janus1984/Msnhnet | Scale | false | 13,874 | [
"MIT"
] | 546 | 4e09f2501ba8db789f0a20441a357de3ba468f10 | https://github.com/Janus1984/Msnhnet/tree/4e09f2501ba8db789f0a20441a357de3ba468f10 |
UNETMax | import torch
from torch import nn
class UNETMax(nn.Module):
"""UNET Without concatenation during decoding"""
def __init__(self):
super(UNETMax, self).__init__()
self.conv1_1 = nn.Conv2d(in_channels=3, out_channels=16,
kernel_size=3, stride=1, padding=1)
self.conv1_2 = nn.C... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | quenting44/semantic_segmentation | UNETMax | false | 10,876 | [
"MIT"
] | 0 | bd197ddda3c6891d69ff7e552a0c224c7ec1269a | https://github.com/quenting44/semantic_segmentation/tree/bd197ddda3c6891d69ff7e552a0c224c7ec1269a |
SplitCosineLinear | from torch.nn import Module
import math
import torch
from torch.nn.parameter import Parameter
from torch.nn import functional as F
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
from torch.nn.modules.module import Module
class CosineLinear(Module):
def __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.... | JosephKJ/class-incremental-learning | SplitCosineLinear | false | 17,520 | [
"MIT"
] | 8 | 689271b84f2e553930ca6687d036ac99bd84b311 | https://github.com/JosephKJ/class-incremental-learning/tree/689271b84f2e553930ca6687d036ac99bd84b311 |
ScaledConv2d | # 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 math as tl_math
from torch im... | glynpu/icefall | ScaledConv2d | false | 3,552 | [
"Apache-2.0"
] | 0 | d766dc5aeea1a8aefab033e581948b07c4ac4bc0 | https://github.com/glynpu/icefall/tree/d766dc5aeea1a8aefab033e581948b07c4ac4bc0 |
OneLayerFCBodyWithAction | import torch
import torch.nn as nn
import torch.nn.functional as F
def layer_init(layer, w_scale=1.0):
nn.init.orthogonal_(layer.weight.data)
layer.weight.data.mul_(w_scale)
nn.init.constant_(layer.bias.data, 0)
return layer
class OneLayerFCBodyWithAction(nn.Module):
def __init__(self, state_di... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | Fieps1/p3-tennis | OneLayerFCBodyWithAction | false | 494 | [
"MIT"
] | 0 | 29f3dab5810d7cd7f84120416a615956d266c256 | https://github.com/Fieps1/p3-tennis/tree/29f3dab5810d7cd7f84120416a615956d266c256 |
ExtendedModel | # 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_... | SID262000/BentoML | ExtendedModel | false | 9,419 | [
"Apache-2.0"
] | 0 | 0708a6495e4d1f0ddf639026be768abf2d55410a | https://github.com/SID262000/BentoML/tree/0708a6495e4d1f0ddf639026be768abf2d55410a |
Normalize | import torch
import torch.utils.data
from torch import nn
class Normalize(nn.Module):
def __init__(self, power=2):
super(Normalize, self).__init__()
self.power = power
def forward(self, x):
norm = x.pow(self.power).sum(1, keepdim=True).pow(1.0 / self.power)
out = x.div(norm +... | 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 import nn
assert_size_stride = torch._C._dyn... | Archjbald/PoseStylizer | Normalize | false | 1,977 | [
"BSD-3-Clause"
] | 0 | 95aae02d1f4ac83536d91b8db5f78d12e7830f97 | https://github.com/Archjbald/PoseStylizer/tree/95aae02d1f4ac83536d91b8db5f78d12e7830f97 |
Downscale2d | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | BillyXYB/TransEditor | Downscale2d | false | 17,057 | [
"MIT"
] | 4 | 0194cd6f0e96c801d55c0cb9683e1f552bcf6d48 | https://github.com/BillyXYB/TransEditor/tree/0194cd6f0e96c801d55c0cb9683e1f552bcf6d48 |
DNNModel | import torch
from torch import nn
class DNNModel(nn.Module):
def __init__(self, dropout=0.2):
super(DNNModel, self).__init__()
self.fc1 = nn.Linear(4, 4)
self.relu1 = nn.ReLU()
self.dropout1 = nn.Dropout(p=dropout)
self.fc2 = nn.Linear(4, 4)
self.relu2 = 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 import nn
assert_s... | ehsangolshani/workload-to-metric-mapper | DNNModel | false | 12,341 | [
"Apache-2.0"
] | 0 | 4c2825696200748382247909f2f777f49bf62cf0 | https://github.com/ehsangolshani/workload-to-metric-mapper/tree/4c2825696200748382247909f2f777f49bf62cf0 |
GCN | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | SamujjwalSam/XC_GCN | GCN | false | 1,022 | [
"MIT"
] | 0 | 7902cbd6b3ebc7806655080979e8c52caa4a16e0 | https://github.com/SamujjwalSam/XC_GCN/tree/7902cbd6b3ebc7806655080979e8c52caa4a16e0 |
MultiHeadAttention | from torch.nn import Module
import torch
import numpy as np
from torch import nn
class ScaledDotProductAttention(nn.Module):
"""
Scaled dot-product attention
"""
def __init__(self, d_model, d_k, d_v, h):
"""
:param d_model: Output dimensionality of the model
:param d_k: Dimens... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | Kilichbek/artemis-m2-transformer | MultiHeadAttention | false | 17,560 | [
"MIT"
] | 8 | 99f7e797965710bf2565283d6b5028a6fe32664c | https://github.com/Kilichbek/artemis-m2-transformer/tree/99f7e797965710bf2565283d6b5028a6fe32664c |
unetConvUnit | import torch
import numpy as np
from torch import nn
import torch.nn.functional as F
import torch.utils.data
import torch.nn.init as init
import torch.nn.init
class conv23DUnit(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1,
padding=0, groups=1, bias=True, dilation=1, nd=... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 numpy as np
from torch... | ForrestPi/Unsupervised-Defect-Segmentation | unetConvUnit | false | 8,211 | [
"MIT"
] | 17 | e366ac7c757bb1b45f38ebbc502dfee7ccb72398 | https://github.com/ForrestPi/Unsupervised-Defect-Segmentation/tree/e366ac7c757bb1b45f38ebbc502dfee7ccb72398 |
SemanticComposite | import torch
import torch.nn as nn
class SemanticComposite(nn.Module):
"""
SemanticComposite module.
Apply a self-attention layer and a semantic composite fuse gate to compute the
encoding result of one tensor.
:param in_features: Feature size of input.
:param dropout_rate: The 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.... | zfjsail/MatchZoo-py | SemanticComposite | false | 4,705 | [
"Apache-2.0"
] | 0 | c93e52e7db7e257b46bb8bf8df8ce1ab1944e2f2 | https://github.com/zfjsail/MatchZoo-py/tree/c93e52e7db7e257b46bb8bf8df8ce1ab1944e2f2 |
BinaryCrossEntropyLabelSmooth | import torch
class BinaryCrossEntropyLabelSmooth(torch.nn.BCEWithLogitsLoss):
def __init__(self, num_classes, epsilon=0.1, weight=None, size_average=
None, reduce=None, reduction='mean', pos_weight=None):
super(BinaryCrossEntropyLabelSmooth, self).__init__(weight,
size_average, reduce... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
assert_size... | dianjixz/AutoDL | BinaryCrossEntropyLabelSmooth | false | 15,189 | [
"Apache-2.0"
] | 1,044 | 48db4eb04d55ce69e93d4a3bdc24592bdb34a868 | https://github.com/dianjixz/AutoDL/tree/48db4eb04d55ce69e93d4a3bdc24592bdb34a868 |
AFTFull | # 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 math as tl_math
from torch im... | Datta0/aft-pytorch | AFTFull | false | 2,138 | [
"MIT"
] | 0 | a0ebad01ea6616b00bde319b0c5e63bea467c400 | https://github.com/Datta0/aft-pytorch/tree/a0ebad01ea6616b00bde319b0c5e63bea467c400 |
CrossPooling | import torch
import torch.nn as nn
class CrossPooling(nn.Module):
""" Cross pooling """
def forward(self, x):
""" Forward function of CrossPooling module.
Args:
x: a stack of (batch x channel x height x width) tensors on the last axis.
Returns:
A (batch x channel x height x widt... | 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... | manipopopo/C5 | CrossPooling | false | 15,993 | [
"Apache-2.0"
] | 51 | 154eb38c330e65476ddb77836948a28237f23c88 | https://github.com/manipopopo/C5/tree/154eb38c330e65476ddb77836948a28237f23c88 |
MMTMTri | import torch
import torch.nn as nn
from typing import Sequence
class MMTMTri(nn.Module):
"""
tri-modal fusion
"""
def __init__(self, dim_img, ratio=4):
"""
Parameters
----------
dim_tab: feature dimension of tabular data
dim_img: feature dimension of MIL model... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | ditannan/Multi-modal-Multi-instance-Learning | MMTMTri | false | 6,577 | [
"Apache-2.0"
] | 1 | 06aada1ff85784d5ed50aa528c506947c892d584 | https://github.com/ditannan/Multi-modal-Multi-instance-Learning/tree/06aada1ff85784d5ed50aa528c506947c892d584 |
KdMseLoss | import torch
import torch.nn as nn
import torch.nn.functional as F
class KdMseLoss(nn.Module):
def __init__(self):
super().__init__()
def forward(self, logits_S, logits_T, temperature=1):
"""
Calculate the mse loss between logits_S and logits_T
:param logits_S: Tensor of sha... | 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... | Raiselimit/TorchBlocks | KdMseLoss | false | 5,731 | [
"MIT"
] | 1 | a5baecb9a2470ff175087475630f2b7db3f7ef51 | https://github.com/Raiselimit/TorchBlocks/tree/a5baecb9a2470ff175087475630f2b7db3f7ef51 |
HirarchicalAttention | from torch.nn import Module
import torch
from typing import *
import torch.utils.data
import torch.nn as nn
import torch.onnx.operators
import torch.optim
class HirarchicalAttention(Module):
"""
ref: Hierarchical Attention Networks for Document Classification
"""
def __init__(self, hidden_size: 'int')... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | hrshy0629/naturalcc | HirarchicalAttention | false | 6,826 | [
"MIT"
] | 1 | 9c3329dd8387c8242deb52bf590ebe3ac795f8de | https://github.com/hrshy0629/naturalcc/tree/9c3329dd8387c8242deb52bf590ebe3ac795f8de |
Psi2QNet | import torch
from torch.nn.parameter import Parameter
import torch.nn as nn
class Psi2QNet(nn.Module):
def __init__(self, output_dim, feature_dim):
super(Psi2QNet, self).__init__()
self.w = Parameter(torch.Tensor(feature_dim))
nn.init.constant_(self.w, 0)
self
def forward(sel... | 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.nn.parameter import Parameter
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided... | IanWangg/Multi-Context-RL | Psi2QNet | false | 9,162 | [
"MIT"
] | 0 | a268b16c5ad421b35339cb85de5347d4cf56b3dd | https://github.com/IanWangg/Multi-Context-RL/tree/a268b16c5ad421b35339cb85de5347d4cf56b3dd |
ExtResNetBlock | import torch
from torch import nn
def conv3d(in_channels, out_channels, kernel_size, bias, padding):
return nn.Conv3d(in_channels, out_channels, kernel_size, padding=
padding, bias=bias)
def create_conv(in_channels, out_channels, kernel_size, order, num_groups,
padding):
"""
Create a list of... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | charmsoya/pytorch-3dunet | ExtResNetBlock | false | 9,887 | [
"MIT"
] | 0 | 07a8dabf988ac3df110a3c10db6ed5fb769498d9 | https://github.com/charmsoya/pytorch-3dunet/tree/07a8dabf988ac3df110a3c10db6ed5fb769498d9 |
WeightedL1Loss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import numpy as np
import torch.nn as nn
assert_size_stride = ... | blakechen97/SASA | WeightedL1Loss | false | 14,962 | [
"Apache-2.0"
] | 46 | cd79f60e923242590b64cb0cc70203a524e7e9a7 | https://github.com/blakechen97/SASA/tree/cd79f60e923242590b64cb0cc70203a524e7e9a7 |
MultiHeadAttention | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | DartingMelody/perceiver-io | MultiHeadAttention | false | 371 | [
"Apache-2.0"
] | 0 | fb818b1763f61e259b23b8b014df2ac01c303a54 | https://github.com/DartingMelody/perceiver-io/tree/fb818b1763f61e259b23b8b014df2ac01c303a54 |
Gain | # AOT ID: ['1_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | wesbz/torchaudio-augmentations | Gain | false | 16,721 | [
"MIT"
] | 112 | e7b379be60376bb4a44f72a6840358871b3ff06d | https://github.com/wesbz/torchaudio-augmentations/tree/e7b379be60376bb4a44f72a6840358871b3ff06d |
Custom | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch._utils
assert_si... | ijinjay/torch2mindspore | Custom | false | 3,660 | [
"MIT"
] | 0 | e4c06bd5e8a3b25b72bf158393a66c5cd1b572d2 | https://github.com/ijinjay/torch2mindspore/tree/e4c06bd5e8a3b25b72bf158393a66c5cd1b572d2 |
MFBFusion | # 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 time
from torch import nn
assert_size_stride = torch._C._dynamo.guards.as... | chorseng/UMD | MFBFusion | false | 15,039 | [
"MIT"
] | 48 | 680681fea76abcea02ff5f351727bcbb468c372a | https://github.com/chorseng/UMD/tree/680681fea76abcea02ff5f351727bcbb468c372a |
SimpleTypeasModel | import torch
import torch.jit
import torch.onnx
import torch.nn
class SimpleTypeasModel(torch.nn.Module):
def __init__(self):
super(SimpleTypeasModel, self).__init__()
def forward(self, tensor, other=None):
other = tensor if other is None else other
if tensor.dtype != torch.bool:
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | opti-mix/glow | SimpleTypeasModel | false | 7,412 | [
"Apache-2.0"
] | 1 | 4ba074df5da9822986a23a6679ab592c22660f6d | https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d |
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.... | Donfa1con/distiller | BahdanauAttention | false | 11,523 | [
"Apache-2.0"
] | 0 | 645ee41bfebc463523b228ff087e41619607d8b2 | https://github.com/Donfa1con/distiller/tree/645ee41bfebc463523b228ff087e41619607d8b2 |
HaltingUnit | # 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 ... | pgplus1628/dgl | HaltingUnit | false | 7,455 | [
"Apache-2.0"
] | 1 | bf3994eea68b5841349f1616f41d0f70123a11ec | https://github.com/pgplus1628/dgl/tree/bf3994eea68b5841349f1616f41d0f70123a11ec |
ResidualBlock | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | Thaigun/Griddly | ResidualBlock | false | 2,972 | [
"MIT"
] | 0 | de5972a608a2928172510a0ac81a977c48af6b1f | https://github.com/Thaigun/Griddly/tree/de5972a608a2928172510a0ac81a977c48af6b1f |
SpatialAttention | import torch
import torch._C
import torch.serialization
from torch import nn
from typing import *
class SpatialAttention(nn.Module):
def __init__(self, kernel_size=7):
super(SpatialAttention, self).__init__()
assert kernel_size in (3, 7), 'kernel size must be 3 or 7'
padding = 3 if kernel... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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._C
import torch.... | shuaizzZ/mmsegmentation | SpatialAttention | false | 4,325 | [
"Apache-2.0"
] | 0 | a6c6b348dbf8c4a0a39ffbdb832a1e82309c533c | https://github.com/shuaizzZ/mmsegmentation/tree/a6c6b348dbf8c4a0a39ffbdb832a1e82309c533c |
LinearDrop | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | CBIIT/NCI-DOE-Colab-Pilot1-Combo | LinearDrop | false | 11,270 | [
"MIT"
] | 0 | 8d60900c29618083e0944b5b8ef43a2e98881b32 | https://github.com/CBIIT/NCI-DOE-Colab-Pilot1-Combo/tree/8d60900c29618083e0944b5b8ef43a2e98881b32 |
GroupNorm | from torch.nn import Module
import torch
from torch import nn
import torch.utils.data
import torch.nn.functional
import torch.autograd
class GroupNorm(Module):
"""
## Group Normalization Layer
"""
def __init__(self, groups: 'int', channels: 'int', *, eps: float=1e-05,
affine: bool=True):
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch.nn import Module
from torch import nn
import torch.utils.data
import... | Hadryan/nn | GroupNorm | false | 9,386 | [
"MIT"
] | 0 | b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d | https://github.com/Hadryan/nn/tree/b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d |
SpatialGroupEnhance | import torch
from torch import nn
from torch.nn import init
class SpatialGroupEnhance(nn.Module):
def __init__(self, groups):
super().__init__()
self.groups = groups
self.avg_pool = nn.AdaptiveAvgPool2d(1)
self.weight = nn.Parameter(torch.zeros(1, groups, 1, 1))
self.bias ... | 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
from torch.nn import init
assert_size_stride = torch._C._d... | LeftAttention/Attention-Codebase | SpatialGroupEnhance | false | 17,598 | [
"Apache-2.0"
] | 6 | 348ec66233a7c0f95a3cb5f0f11641e2a7a9b9c3 | https://github.com/LeftAttention/Attention-Codebase/tree/348ec66233a7c0f95a3cb5f0f11641e2a7a9b9c3 |
FCN8s | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.utils.data
impor... | XomniaJADS/CycleGAN_Unsupervised_Domain_Adaptation | FCN8s | false | 18,393 | [
"MIT"
] | 4 | 37165c74aac8f5743799c36d0f66ee23432068f4 | https://github.com/XomniaJADS/CycleGAN_Unsupervised_Domain_Adaptation/tree/37165c74aac8f5743799c36d0f66ee23432068f4 |
Categorical | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | ArChiiii/TSP_DRL_PtrNet | Categorical | false | 13,258 | [
"MIT"
] | 59 | 8218a508c563d9641b341dff5a6241d90e4e031b | https://github.com/ArChiiii/TSP_DRL_PtrNet/tree/8218a508c563d9641b341dff5a6241d90e4e031b |
DiceLoss4BraTS | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
import torch.jit
import torch.nn.functional
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strid... | MargeryLab/nnConRes | DiceLoss4BraTS | false | 9,332 | [
"Apache-2.0"
] | 0 | a5aba912d0f0f30490ae820fb6d3dbb8cf1556d4 | https://github.com/MargeryLab/nnConRes/tree/a5aba912d0f0f30490ae820fb6d3dbb8cf1556d4 |
NegativePowerNormSimilarity | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
from abc import abstractmethod
from typing import Union
import torch.utils.data
assert_size_stride = torch._C._dynamo.g... | DimitrisAlivas/StarQE | NegativePowerNormSimilarity | false | 7,978 | [
"MIT"
] | 11 | c17676e5f1e3f19c0c4c117a50abe2ce22ffef28 | https://github.com/DimitrisAlivas/StarQE/tree/c17676e5f1e3f19c0c4c117a50abe2ce22ffef28 |
TransformerBlock | # 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.... | bopopescu/covid-19-visualization | TransformerBlock | false | 12,193 | [
"MIT"
] | 0 | 8a9325b52f007dd5e3ee5bbd323b71bbf19b9640 | https://github.com/bopopescu/covid-19-visualization/tree/8a9325b52f007dd5e3ee5bbd323b71bbf19b9640 |
series_decomp | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guar... | MAZiqing/FEDformer | series_decomp | false | 17,648 | [
"MIT"
] | 7 | 7914d39df829494a8172afb9676982c3789d491d | https://github.com/MAZiqing/FEDformer/tree/7914d39df829494a8172afb9676982c3789d491d |
SimpleConvNet | import torch
import torch.nn.functional as F
from torch import nn
class SimpleConvNet(nn.Module):
def __init__(self, num_classes=10):
super(SimpleConvNet, self).__init__()
self.conv1_1 = nn.Conv2d(3, 32, 3, 1)
self.conv1_2 = nn.Conv2d(32, 32, 3, 1)
self.conv2_1 = nn.Conv2d(32, 64,... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.functional as... | Princeton-SysML/GradAttack | SimpleConvNet | false | 8,777 | [
"MIT"
] | 43 | 40f0ab3b88d995d9c59acb7609d01380bb0749fe | https://github.com/Princeton-SysML/GradAttack/tree/40f0ab3b88d995d9c59acb7609d01380bb0749fe |
NonLinearModel | # 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.... | ycsun2017/simple_transfer | NonLinearModel | false | 4,617 | [
"Apache-2.0"
] | 0 | b807f7a9d818c5586c101f616d190fe9968fabbd | https://github.com/ycsun2017/simple_transfer/tree/b807f7a9d818c5586c101f616d190fe9968fabbd |
SimpleAttention | # 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.... | NouamaneTazi/conv-emotion | SimpleAttention | false | 14,124 | [
"MIT"
] | 488 | 0c9dcb9cc5234a7ca8cf6af81aabe28ef3814d0e | https://github.com/NouamaneTazi/conv-emotion/tree/0c9dcb9cc5234a7ca8cf6af81aabe28ef3814d0e |
NormActivation | # 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... | AnimeshSinha1309/qroute-router | NormActivation | false | 41 | [
"MIT"
] | 0 | 56ef1b6c08e721011e1f73a04b0b0229f7bdff1b | https://github.com/AnimeshSinha1309/qroute-router/tree/56ef1b6c08e721011e1f73a04b0b0229f7bdff1b |
RobertaClassificationHead | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
import torch.utils.data
import torch.nn
class RobertaClassificationHead(nn.Module):
"""Head for sentence-level classification tasks."""
def __init__(self, config):
super(RobertaClassificationHead, 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.triton_helpers import libdevice
import torch.nn as ... | GavinGuan95/Generative-VQA | RobertaClassificationHead | false | 7,622 | [
"MIT"
] | 1 | 0912e3a2426809ef4d4eb40bae667b31c2269161 | https://github.com/GavinGuan95/Generative-VQA/tree/0912e3a2426809ef4d4eb40bae667b31c2269161 |
Conv3x3 | # 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 math as tl_math
import torch.... | aliasghar53/packnet-sfm | Conv3x3 | false | 9,778 | [
"MIT"
] | 0 | d07dcbf026194b618a2bd9fc05b599563611f9a3 | https://github.com/aliasghar53/packnet-sfm/tree/d07dcbf026194b618a2bd9fc05b599563611f9a3 |
Critic | import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
def hidden_init(layer):
fan_in = layer.weight.data.size()[0]
lim = 1.0 / np.sqrt(fan_in)
return -lim, lim
class Critic(nn.Module):
"""Critic (Value) Model."""
def __init__(self, full_state_size, full_action_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.triton_helpers import libdevice
import numpy as np
... | SriramPingali/P3_collaborate_complete | Critic | false | 11,897 | [
"MIT"
] | 0 | 66df22c9eb7577b15adcaa7bbc1796dbd333af2e | https://github.com/SriramPingali/P3_collaborate_complete/tree/66df22c9eb7577b15adcaa7bbc1796dbd333af2e |
Attention | import math
import torch
import torch.nn as nn
import torch as t
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.... | yhgon/Transformer-TTS | Attention | false | 13,146 | [
"MIT"
] | 0 | 5f34945cb5500d484275700c4e393ed125d5e753 | https://github.com/yhgon/Transformer-TTS/tree/5f34945cb5500d484275700c4e393ed125d5e753 |
Attention | import torch
from torch import nn
class Attention(nn.Module):
def __init__(self, feature_dim, K, bias=True, **kwargs):
super(Attention, self).__init__(**kwargs)
self.supports_masking = True
self.bias = bias
self.feature_dim = feature_dim
self.K = K
weight = torch.z... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
fr... | heyitsmine/FewRel | Attention | false | 10,269 | [
"MIT"
] | 0 | 2a2b8ae471298d9eb3557796a085c23b21982fb2 | https://github.com/heyitsmine/FewRel/tree/2a2b8ae471298d9eb3557796a085c23b21982fb2 |
DenoisingNet | # 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 ... | ULTR-Community/ULTRA_Pytorch | DenoisingNet | false | 14,542 | [
"Apache-2.0"
] | 46 | ec4fe329e4239b588a940cb4bcdd6a321aade679 | https://github.com/ULTR-Community/ULTRA_Pytorch/tree/ec4fe329e4239b588a940cb4bcdd6a321aade679 |
CalibrationModel | # 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... | kungfuai/d3m-segmentation-research | CalibrationModel | false | 7,061 | [
"MIT"
] | 1 | 5bc44ddd0e8522fb2b369866ad47aa62a24a8f63 | https://github.com/kungfuai/d3m-segmentation-research/tree/5bc44ddd0e8522fb2b369866ad47aa62a24a8f63 |
StyleEmbedAttention | import torch
import torch.nn.functional as F
import torch.nn as nn
class StyleEmbedAttention(nn.Module):
""" StyleEmbedAttention """
def __init__(self, query_dim, key_dim, num_units, num_heads):
super(StyleEmbedAttention, self).__init__()
self.num_units = num_units
self.num_heads = nu... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | ishine/Comprehensive-Transformer-TTS | StyleEmbedAttention | false | 15,622 | [
"MIT"
] | 147 | dca252cae50a18464ce2410aa85a21c557c72d7a | https://github.com/ishine/Comprehensive-Transformer-TTS/tree/dca252cae50a18464ce2410aa85a21c557c72d7a |
MobileViTv2Attention | import torch
from torch import nn
from torch.nn import init
class MobileViTv2Attention(nn.Module):
"""
Scaled dot-product attention
"""
def __init__(self, d_model):
"""
:param d_model: Output dimensionality of the model
:param d_k: Dimensionality of queries and keys
:p... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | weihaoxie/External-Attention-pytorch | MobileViTv2Attention | false | 4,526 | [
"MIT"
] | 0 | 9bec70f4ed8dd858c815e9bad240ab2f95a91a9f | https://github.com/weihaoxie/External-Attention-pytorch/tree/9bec70f4ed8dd858c815e9bad240ab2f95a91a9f |
ResidualBlock | import torch
import torch.nn as nn
class ResidualBlock(nn.Sequential):
def __init__(self, *args):
super(ResidualBlock, self).__init__(*args)
def forward(self, x):
identity = x
x = super(ResidualBlock, self).forward(x)
x += identity
return x
def get_inputs():
ret... | 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_... | Bobholamovic/ever | ResidualBlock | false | 7,799 | [
"Apache-2.0"
] | 22 | f38060674a40ed53072b9d9be99cc656a830398f | https://github.com/Bobholamovic/ever/tree/f38060674a40ed53072b9d9be99cc656a830398f |
TorchAdd | import torch
class TorchAdd(torch.nn.Module):
def __init__(self):
super(TorchAdd, self).__init__()
def forward(self, x, y):
return torch.add(x, y)
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
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | ahangchen/torch2trt | TorchAdd | false | 6,113 | [
"MIT"
] | 1 | 53c663f0e0570ef7ffd6771354ae3478f63bd328 | https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328 |
DDPGConvBody | import torch
import torch.nn as nn
import torch.nn.functional as F
def layer_init(layer, w_scale=1.0):
nn.init.orthogonal_(layer.weight.data)
layer.weight.data.mul_(w_scale)
nn.init.constant_(layer.bias.data, 0)
return layer
class DDPGConvBody(nn.Module):
def __init__(self, in_channels=4):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | Rajawat23/DeepRL | DDPGConvBody | false | 11,832 | [
"MIT"
] | 0 | 9f77dfbc593f9c9055254c781f97983b9630dad2 | https://github.com/Rajawat23/DeepRL/tree/9f77dfbc593f9c9055254c781f97983b9630dad2 |
GRULRCell | import torch
import torch.nn as nn
import torch.onnx
def gen_nonlinearity(A, nonlinearity):
"""
Returns required activation for a tensor based on the inputs
nonlinearity is either a callable or a value in
['tanh', 'sigmoid', 'relu', 'quantTanh', 'quantSigm', 'quantSigm4']
"""
if nonlinear... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | adityakusupati/EdgeML | GRULRCell | false | 3,035 | [
"MIT"
] | 0 | 65933a6fdfc38945f4311043a62e120784b2b0bf | https://github.com/adityakusupati/EdgeML/tree/65933a6fdfc38945f4311043a62e120784b2b0bf |
Conv2d | import torch
import torch.nn.functional as F
from torch.nn.modules.conv import _ConvNd
from torch.nn.modules.utils import _pair
def keep_variance_fn(x):
return x + 0.001
class Conv2d(_ConvNd):
def __init__(self, in_channels, out_channels, kernel_size, stride=1,
padding=0, dilation=1, groups=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
from torch.nn.modules.conv import _ConvNd
from torch.nn.modules.utils import _pa... | collector-m/LiDAR-MOS | Conv2d | false | 15,069 | [
"MIT"
] | 268 | 7ccbb63b4ee7c40195b35dd0dddd71473fae25b1 | https://github.com/collector-m/LiDAR-MOS/tree/7ccbb63b4ee7c40195b35dd0dddd71473fae25b1 |
Mish | import torch
from torch import nn
class Mish(nn.Module):
"""Mish activation."""
def forward(self, x):
return x * torch.tanh(nn.functional.softplus(x))
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch import nn
assert_size_stride = torch._C._dynamo.gua... | Benjamin-Etheredge/lightning-bolts | Mish | false | 133 | [
"Apache-2.0"
] | 0 | 1971d6a924729940b98793aa7751bdf769350aca | https://github.com/Benjamin-Etheredge/lightning-bolts/tree/1971d6a924729940b98793aa7751bdf769350aca |
ChannelPool | import torch
import torch.nn as nn
import torch.nn.functional as F
class ChannelPool(nn.MaxPool1d):
def forward(self, X):
X = X.permute(1, 2, 0)
pooled = F.max_pool1d(X, self.kernel_size)
pooled = pooled.permute(2, 0, 1).squeeze(0)
return pooled
def get_inputs():
return [tor... | 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... | ananyaganesh/ftmp | ChannelPool | false | 6,193 | [
"MIT"
] | 1 | 9ee23939f0c1da854846b8ce1a9abe4e9b377031 | https://github.com/ananyaganesh/ftmp/tree/9ee23939f0c1da854846b8ce1a9abe4e9b377031 |
SSD300 | # 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.... | mosevg/ssd | SSD300 | false | 11,145 | [
"MIT"
] | 0 | 8fd9f6cc376c027427531bcf475188ae43c4b2d6 | https://github.com/mosevg/ssd/tree/8fd9f6cc376c027427531bcf475188ae43c4b2d6 |
Conv5x5 | # 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 math as tl_math
import torch.... | maxuanquang/FeatDepth | Conv5x5 | false | 4,066 | [
"MIT"
] | 0 | cc68d9f1f49b65ace8f2918af5b9d552ecd80ba4 | https://github.com/maxuanquang/FeatDepth/tree/cc68d9f1f49b65ace8f2918af5b9d552ecd80ba4 |
GlobalAttention | # 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.... | GT-SALT/Disfluency-Generation-and-Detection | GlobalAttention | false | 8,166 | [
"MIT"
] | 11 | 72126172b466aa74277f3cf0f73b915e5dbeefbb | https://github.com/GT-SALT/Disfluency-Generation-and-Detection/tree/72126172b466aa74277f3cf0f73b915e5dbeefbb |
CustomInverse | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | Sanster/onnxruntime-extensions | CustomInverse | false | 2,821 | [
"MIT"
] | 0 | 6eb41afcb2394d94ee90c7ae409fa96122e4cace | https://github.com/Sanster/onnxruntime-extensions/tree/6eb41afcb2394d94ee90c7ae409fa96122e4cace |
MLB | import torch
import torch.nn as nn
import torch.nn.functional as F
class MLB(nn.Module):
def __init__(self, input_dims, output_dim, mm_dim=1200, activ_input=
'relu', activ_output='relu', normalize=False, dropout_input=0.0,
dropout_pre_lin=0.0, dropout_output=0.0):
super(MLB, 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
assert_... | JoannaLXY/block.bootstrap.pytorch | MLB | false | 11,568 | [
"BSD-3-Clause"
] | 0 | 42c3e7616b704e05c6ff2376ff68b5b18044fe77 | https://github.com/JoannaLXY/block.bootstrap.pytorch/tree/42c3e7616b704e05c6ff2376ff68b5b18044fe77 |
DenseResidualLayer | # 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... | DaikiSannoXC/simple-cnaps | DenseResidualLayer | false | 13,555 | [
"MIT"
] | 62 | be35c4522b180eaae8278633b1c6ca7e5bb56ebb | https://github.com/DaikiSannoXC/simple-cnaps/tree/be35c4522b180eaae8278633b1c6ca7e5bb56ebb |
ResidualBlock_noBN | import torch
import torch.utils.data
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
def initialize_weights(net_l, scale=1):
if not isinstance(net_l, list):
net_l = [net_l]
for net in net_l:
for m in net.modules():
if isinstance(m, nn.Conv2d):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.utils.data
impor... | WenlongZhang0724/mmsr | ResidualBlock_noBN | false | 11,975 | [
"Apache-2.0"
] | 0 | 375ce9207c2b8586101406577faea285885b8009 | https://github.com/WenlongZhang0724/mmsr/tree/375ce9207c2b8586101406577faea285885b8009 |
IdentityPadding | import torch
import torch.nn as nn
import torch.nn.functional as F
class IdentityPadding(nn.Module):
def __init__(self, num_filters, channels_in, stride):
super(IdentityPadding, self).__init__()
self.identity = nn.MaxPool2d(1, stride=stride)
self.num_zeros = num_filters - channels_in
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | sunqcc/Pytorch-HW-CIFAR10 | IdentityPadding | false | 4,391 | [
"MIT"
] | 0 | 33a55a5a832474083820b65c46f809ac98f8b109 | https://github.com/sunqcc/Pytorch-HW-CIFAR10/tree/33a55a5a832474083820b65c46f809ac98f8b109 |
WeightedL1 | # 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
... | acrosson/dl | WeightedL1 | false | 1,366 | [
"MIT"
] | 0 | 94e68533b38f53f09e9bef460ba96fa389fc8eb4 | https://github.com/acrosson/dl/tree/94e68533b38f53f09e9bef460ba96fa389fc8eb4 |
NeuralNet | import torch
class NeuralNet(torch.nn.Module):
def __init__(self, input_features, hidden_layer_size, output_classes):
super(NeuralNet, self).__init__()
self.l1 = torch.nn.Linear(input_features, hidden_layer_size)
self.l2 = torch.nn.Linear(hidden_layer_size, output_classes)
def forwar... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cu... | rahimftd/digit_recognizer | NeuralNet | false | 4,160 | [
"MIT"
] | 0 | a134efa915670308ad7a77c8ace2662e5c775913 | https://github.com/rahimftd/digit_recognizer/tree/a134efa915670308ad7a77c8ace2662e5c775913 |
GlobalAttentionGeneral | import torch
import torch.nn as nn
import torch.nn.parallel
class GlobalAttentionGeneral(nn.Module):
def __init__(self, idf, cdf):
super(GlobalAttentionGeneral, self).__init__()
self.sm = nn.Softmax()
self.mask = None
def applyMask(self, mask):
self.mask = mask
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
from torch._inductor.runtime.... | ts170/T2I_CL | GlobalAttentionGeneral | false | 10,911 | [
"MIT"
] | 0 | 8754bea1101aabcbf8108b95e722f7aaeb385869 | https://github.com/ts170/T2I_CL/tree/8754bea1101aabcbf8108b95e722f7aaeb385869 |
CrossEntropy | import torch
import torchvision.transforms.functional as F
import torch.nn as nn
import torch.nn.functional as F
class CrossEntropy(nn.Module):
def forward(self, x, y):
return F.cross_entropy(x, torch.argmax(y, -1))
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | tgxs002/1-stage-wseg | CrossEntropy | false | 4,474 | [
"Apache-2.0"
] | 0 | de16c51cc6cf8cd0ef248145980434d5f6104910 | https://github.com/tgxs002/1-stage-wseg/tree/de16c51cc6cf8cd0ef248145980434d5f6104910 |
PixelNorm | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import torch.utils.cpp_extension
assert_size_stride = tor... | bladesaber/mmgeneration | PixelNorm | false | 1,884 | [
"Apache-2.0"
] | 0 | 158b49f7efd8028f231f6e9ca758ae0e20dd72ae | https://github.com/bladesaber/mmgeneration/tree/158b49f7efd8028f231f6e9ca758ae0e20dd72ae |
LayerTanh | import torch
import torch.nn as nn
class LayerTanh(nn.Module):
"""
Test for nn.layers based types
"""
def __init__(self):
super(LayerTanh, self).__init__()
self.tanh = nn.Tanh()
def forward(self, x):
x = self.tanh(x)
return x
def get_inputs():
return [torch.... | 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_... | dawnclaude/onnx2keras | LayerTanh | false | 15,147 | [
"MIT"
] | 115 | 3d2a47c0a228b91fd434232274e216e491da36e3 | https://github.com/dawnclaude/onnx2keras/tree/3d2a47c0a228b91fd434232274e216e491da36e3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.