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 |
|---|---|---|---|---|---|---|---|---|---|---|
CRF_S | # 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.init
assert_size_stride = torch._C._dynamo... | markWJJ/LM-LSTM-CRF | CRF_S | false | 12,752 | [
"Apache-2.0"
] | 0 | e468974ce2193a5579417f9e253eb6c997932636 | https://github.com/markWJJ/LM-LSTM-CRF/tree/e468974ce2193a5579417f9e253eb6c997932636 |
Downscale2d | import torch
from torch import nn
class Downscale2d(nn.Module):
def __init__(self, factor=2):
super().__init__()
self.downsample = nn.AvgPool2d(kernel_size=factor, stride=factor)
def forward(self, x):
return self.downsample(x)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch 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 |
PolicyNet | import torch
import torch.nn as nn
import torch.nn.functional as F
class PolicyNet(nn.Module):
def __init__(self):
super(PolicyNet, self).__init__()
self.fc1 = nn.Linear(4, 24)
self.fc2 = nn.Linear(24, 36)
self.fc3 = nn.Linear(36, 1)
def forward(self, x):
x = F.relu(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
import torch.nn as nn
assert_... | Alfo5123/ConcreteDropout | PolicyNet | false | 16,878 | [
"MIT"
] | 7 | c442871553e20a2de078c0fbac7fa52302d50abf | https://github.com/Alfo5123/ConcreteDropout/tree/c442871553e20a2de078c0fbac7fa52302d50abf |
ClampModule | # 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 as th
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_... | Miffyli/policy-supervectors | ClampModule | false | 8,538 | [
"MIT"
] | 17 | 358284805e5bc96b95cae15e9741571e46d84bc9 | https://github.com/Miffyli/policy-supervectors/tree/358284805e5bc96b95cae15e9741571e46d84bc9 |
RobertaSequenceClassificationHead | import torch
import torch.nn as nn
import torch.utils.data
import torch.onnx.operators
import torch.optim
import torch.optim.lr_scheduler
class RobertaSequenceClassificationHead(nn.Module):
"""Head for sequence-level classification tasks. Ignores the <s> vector."""
def __init__(self, input_dim, inner_dim, ke... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.data
import torch.onnx.operators
import... | Sanjaje/stp_llmushu | RobertaSequenceClassificationHead | false | 9,458 | [
"MIT"
] | 0 | f6652c9c0506780374b4634933b1b725e989de24 | https://github.com/Sanjaje/stp_llmushu/tree/f6652c9c0506780374b4634933b1b725e989de24 |
h_swish | import torch
import torch.nn as nn
class h_sigmoid(nn.Module):
def __init__(self, inplace=True):
super(h_sigmoid, self).__init__()
self.relu = nn.ReLU6(inplace=inplace)
def forward(self, x):
return self.relu(x + 3) / 6
class h_swish(nn.Module):
def __init__(self, inplace=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 import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | EileenWang90/mmpose | h_swish | false | 2,175 | [
"Apache-2.0"
] | 0 | 3fa1328a3b6351bf9b35df60d4d959973a6f8a71 | https://github.com/EileenWang90/mmpose/tree/3fa1328a3b6351bf9b35df60d4d959973a6f8a71 |
SelfExpression | # 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... | qilinli/DSC-Net | SelfExpression | false | 4,151 | [
"MIT"
] | 0 | c0e7a3cae3e07c34b2989234f568c7007cf0fc55 | https://github.com/qilinli/DSC-Net/tree/c0e7a3cae3e07c34b2989234f568c7007cf0fc55 |
NaiveGroupNorm | from torch.nn import Module
import torch
from torch.nn import Parameter
from torch.nn import init
import torch.nn.parallel
class NaiveGroupNorm(Module):
"""NaiveGroupNorm implements Group Normalization with the high-level matrix operations in PyTorch.
It is a temporary solution to export GN by ONNX before the... | 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.nn import Parameter
from torch.nn import... | gist-ailab/uoais | NaiveGroupNorm | false | 15,448 | [
"BSD-2-Clause"
] | 52 | fb42d9a96cd54daad61c956d8d9d65dd0ebef4c7 | https://github.com/gist-ailab/uoais/tree/fb42d9a96cd54daad61c956d8d9d65dd0ebef4c7 |
ExampleBackbone | import torch
import torch.nn as nn
import torch._C
import torch.serialization
class ExampleBackbone(nn.Module):
def __init__(self):
super(ExampleBackbone, self).__init__()
self.conv = nn.Conv2d(3, 3, 3)
def init_weights(self, pretrained=None):
pass
def forward(self, 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
import torch._C
import torch.serialization
assert_size_str... | AnonSubmission6150/submission6150 | ExampleBackbone | false | 8,985 | [
"Apache-2.0"
] | 0 | 571633d9a12b4fd7a9546947787fc068966dab04 | https://github.com/AnonSubmission6150/submission6150/tree/571633d9a12b4fd7a9546947787fc068966dab04 |
LxmertCrossAttentionLayer | # 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.... | Clemens123/transformers | LxmertCrossAttentionLayer | false | 13,217 | [
"Apache-2.0"
] | 0 | 22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26 | https://github.com/Clemens123/transformers/tree/22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26 |
VAE | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
import t... | ShengquanChen/stPlus | VAE | false | 11,872 | [
"MIT"
] | 0 | b2af43a4fe78230ddf95cab75c114e25527800e1 | https://github.com/ShengquanChen/stPlus/tree/b2af43a4fe78230ddf95cab75c114e25527800e1 |
Linear | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
from torch import Tensor
from torch.nn import Parameter
import torch... | GrumpyZhou/pytorch_geometric | Linear | false | 5,236 | [
"MIT"
] | 1 | 88c54e72d3e26ad48e9ccd99e5696c7f19269d94 | https://github.com/GrumpyZhou/pytorch_geometric/tree/88c54e72d3e26ad48e9ccd99e5696c7f19269d94 |
Bias | # 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... | TaoStarlit/Sound-of-Pixels | Bias | false | 11,921 | [
"MIT"
] | 0 | 06cd37a75836e22208f2e59bcc263b89938e065e | https://github.com/TaoStarlit/Sound-of-Pixels/tree/06cd37a75836e22208f2e59bcc263b89938e065e |
AMSoftmaxLoss | import torch
import torch.nn as nn
import torch.nn.functional as F
class AMSoftmaxLoss(nn.Module):
def __init__(self, hidden_dim, speaker_num, s=30.0, m=0.4, **kwargs):
"""
AM Softmax Loss
"""
super(AMSoftmaxLoss, self).__init__()
self.s = s
self.m = m
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.... | czlwang/s3prl | AMSoftmaxLoss | false | 12,269 | [
"Apache-2.0"
] | 0 | 81d4bb8d051cee20fa87c083b8478999e1766172 | https://github.com/czlwang/s3prl/tree/81d4bb8d051cee20fa87c083b8478999e1766172 |
ExternalAttention | # 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.... | LeftAttention/Attention-Codebase | ExternalAttention | false | 17,589 | [
"Apache-2.0"
] | 6 | 348ec66233a7c0f95a3cb5f0f11641e2a7a9b9c3 | https://github.com/LeftAttention/Attention-Codebase/tree/348ec66233a7c0f95a3cb5f0f11641e2a7a9b9c3 |
NeuralNerwork | import torch
import torch.nn as nn
import torch.nn.functional as F
class NeuralNerwork(nn.Module):
def __init__(self, n_features, n_targets):
super(NeuralNerwork, self).__init__()
self.fc1 = nn.Linear(n_features, 15)
self.fc2 = nn.Linear(15, 10)
self.fc3 = nn.Linear(10, n_targets)... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | jf20541/NeuralNetworks | NeuralNerwork | false | 3,714 | [
"MIT"
] | 0 | ee36b734880f30d9e8691205dadcd074795bdff3 | https://github.com/jf20541/NeuralNetworks/tree/ee36b734880f30d9e8691205dadcd074795bdff3 |
AnyHead | import torch
import torch.nn as nn
import torch.utils.data
class AnyHead(nn.Module):
"""AnyNet head: AvgPool, 1x1."""
def __init__(self, w_in, nc):
super(AnyHead, self).__init__()
self.avg_pool = nn.AdaptiveAvgPool2d((1, 1))
self.fc = nn.Linear(w_in, nc, bias=True)
def forward(se... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dyn... | Pre-release/BAKE | AnyHead | false | 14,234 | [
"MIT"
] | 67 | 2899b38d556a9151f55079c1b9888d462369aec8 | https://github.com/Pre-release/BAKE/tree/2899b38d556a9151f55079c1b9888d462369aec8 |
ChannelAttention | import torch
from torch import nn
class ChannelAttention(nn.Module):
def __init__(self, in_planes, ratio=8):
super(ChannelAttention, self).__init__()
self.avg_pool = nn.AdaptiveAvgPool2d(1)
self.max_pool = nn.AdaptiveMaxPool2d(1)
self.fc1 = nn.Conv2d(in_planes, ratio, 1, bias=Fals... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | HT-hlf/mmdetection_miner-2.22.0 | ChannelAttention | false | 2,322 | [
"Apache-2.0"
] | 0 | 76eb94d6547f9f95cd58f41bb5c91941e82322b9 | https://github.com/HT-hlf/mmdetection_miner-2.22.0/tree/76eb94d6547f9f95cd58f41bb5c91941e82322b9 |
GlobalAttention | import torch
import torch.nn as nn
import torch.utils.data
import torch.cuda
import torch.optim
def aeq(*args):
"""
Assert all arguments have the same value
"""
arguments = (arg for arg in args)
first = next(arguments)
assert all(arg == first for arg in arguments
), 'Not all arguments ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | Flamexmt/LMA | GlobalAttention | false | 13,715 | [
"MIT"
] | 321 | f6fdec2d17a2d7a7733dd5a5745312bad392cdf3 | https://github.com/Flamexmt/LMA/tree/f6fdec2d17a2d7a7733dd5a5745312bad392cdf3 |
TimeEncoding | import torch
import torch.nn as nn
class TimeEncoding(nn.Module):
def __init__(self, d_model, dropout=0.1, max_len=5000):
super(TimeEncoding, self).__init__()
self.dropout = nn.Dropout(p=dropout)
def forward(self, x, mask, lengths):
time = mask * 1 / (lengths[..., None] - 1)
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | Tim-blo/ACTOR | TimeEncoding | false | 2,903 | [
"MIT"
] | 0 | f10d7534a34fa557ab6b1739217649ae4f654505 | https://github.com/Tim-blo/ACTOR/tree/f10d7534a34fa557ab6b1739217649ae4f654505 |
ConvertPointsFromHomogeneous | import torch
import torch.nn as nn
def convert_points_from_homogeneous(points):
"""Function that converts points from homogeneous to Euclidean space.
See :class:`~torchgeometry.ConvertPointsFromHomogeneous` for details.
Examples::
>>> input = torch.rand(2, 4, 3) # BxNx3
>>> output = tg... | 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... | aravinho/frankmocap | ConvertPointsFromHomogeneous | false | 3,124 | [
"BSD-3-Clause"
] | 0 | 6a150a9cb96e9b32a60d8047eaa84d0c37e471f5 | https://github.com/aravinho/frankmocap/tree/6a150a9cb96e9b32a60d8047eaa84d0c37e471f5 |
GaussianLayer | # 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.... | Junyoungpark/2021-lg-AI-camp | GaussianLayer | false | 17,527 | [
"MIT"
] | 4 | 3c0e5dd689e8e3dd61cc80243ad90cab951c06de | https://github.com/Junyoungpark/2021-lg-AI-camp/tree/3c0e5dd689e8e3dd61cc80243ad90cab951c06de |
L1GradLoss | import torch
import torch.nn as nn
import torch.utils.data
class L1GradLoss(nn.Module):
def __init__(self, grad=False):
super(L1GradLoss, self).__init__()
self.grad = grad
def forward(self, input, target):
err = input - target
loss = err.norm(p=1).div(err.numel())
if ... | 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
... | JaguAroo/SRResCGAN | L1GradLoss | false | 590 | [
"MIT"
] | 0 | 9aac612aff631f7fb9142e0a36de9559cfc1a62d | https://github.com/JaguAroo/SRResCGAN/tree/9aac612aff631f7fb9142e0a36de9559cfc1a62d |
DoubleSymLayer | # 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 copy
import math
impor... | EmoryMLIP/DynamicBlocks | DoubleSymLayer | false | 17,248 | [
"MIT"
] | 9 | 52acc9fbc1a2640c6ac8922fa18105279ccaea97 | https://github.com/EmoryMLIP/DynamicBlocks/tree/52acc9fbc1a2640c6ac8922fa18105279ccaea97 |
DenseBlock | import torch
import torch.nn as nn
import torch.nn.functional as F
class CausalConv1d(nn.Module):
"""A 1D causal convolution layer.
Input: (B, D_in, T), where B is the minibatch size, D_in is the number of
dimensions per step, and T is the number of steps.
Output: (B, D_out, T), where B is the mi... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | NagisaZj/oyster | DenseBlock | false | 872 | [
"MIT"
] | 0 | 069a510fe63bb29ecd9871e0e189e58b03c8cad9 | https://github.com/NagisaZj/oyster/tree/069a510fe63bb29ecd9871e0e189e58b03c8cad9 |
HSwishV2 | import torch
import torch.nn as nn
import torch.nn.functional as F
class HSwishFunctionV2(torch.autograd.Function):
@staticmethod
def forward(ctx, feat):
act = F.relu6(feat + 3).mul_(feat).div_(6)
ctx.variables = feat
return act
@staticmethod
def backward(ctx, grad_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
import torch.nn as nn
import torch.nn.functional as F
assert_size_stride = torch._C._dyna... | imvladikon/pytorch-loss | HSwishV2 | false | 6,867 | [
"MIT"
] | 1 | 6cfaabe1be898e1ff000b3dffb46d0ef09096f6b | https://github.com/imvladikon/pytorch-loss/tree/6cfaabe1be898e1ff000b3dffb46d0ef09096f6b |
MaskL1Loss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch import nn
a... | gentlebreeze1/dbnet | MaskL1Loss | false | 3,533 | [
"Apache-2.0"
] | 0 | be28a7ae835af7d6f8b7c2b636b875adc9fc187c | https://github.com/gentlebreeze1/dbnet/tree/be28a7ae835af7d6f8b7c2b636b875adc9fc187c |
DecInit | import torch
import torch.nn as nn
class DecInit(nn.Module):
def __init__(self, d_enc, d_dec, n_enc_layer):
self.d_enc_model = d_enc
self.n_enc_layer = n_enc_layer
self.d_dec_model = d_dec
super(DecInit, self).__init__()
self.initer = nn.Linear(self.d_enc_model * self.n_en... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | YuxiXie/Semantic-Graphs-for-Generating-Deep-Questions | DecInit | false | 14,710 | [
"MIT"
] | 62 | 6e5ef241c64b5b30a6ff54ddad31e610013b8388 | https://github.com/YuxiXie/Semantic-Graphs-for-Generating-Deep-Questions/tree/6e5ef241c64b5b30a6ff54ddad31e610013b8388 |
Fire | import torch
import torch.utils.data
import torch.nn as nn
class Fire(nn.Module):
def __init__(self, inplanes, squeeze_planes, expand1x1_planes,
expand3x3_planes):
super(Fire, self).__init__()
self.inplanes = inplanes
self.squeeze = nn.Conv1d(inplanes, squeeze_planes, kernel_size=... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.utils.data
impor... | botcs/dsp-lr | Fire | false | 9,890 | [
"Apache-2.0"
] | 0 | 15856def3c91821cbcbf37803337630a68dd1f86 | https://github.com/botcs/dsp-lr/tree/15856def3c91821cbcbf37803337630a68dd1f86 |
MaskedSumPooling | import torch
from torch import nn
class MaskedSumPooling(nn.Module):
def __init__(self):
super(MaskedSumPooling, self).__init__()
def forward(self, embedding_matrix):
return torch.sum(embedding_matrix, dim=1)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
... | 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... | byzhang/OpenMatch | MaskedSumPooling | false | 10,012 | [
"Apache-2.0"
] | 0 | 28b2d49a5eec2e1dc3934767c747ff0ca6c93d96 | https://github.com/byzhang/OpenMatch/tree/28b2d49a5eec2e1dc3934767c747ff0ca6c93d96 |
BasicModel_ConvNet_One_Conv | import torch
from torch import Tensor
import torch.nn as nn
from typing import Optional
from typing import no_type_check
class BasicModel_ConvNet_One_Conv(nn.Module):
def __init__(self, inplace: 'bool'=False):
super().__init__()
self.conv1 = nn.Conv2d(1, 2, 3, 1)
self.relu1 = nn.ReLU(inpl... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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_... | Europium248/captum | BasicModel_ConvNet_One_Conv | false | 445 | [
"BSD-3-Clause"
] | 0 | ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc | https://github.com/Europium248/captum/tree/ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc |
PredictionHeadTransform | import math
import torch
import typing
from torch import nn
from torch.nn import LayerNorm
def gelu(x: 'torch.Tensor') ->torch.Tensor:
return x * 0.5 * (1.0 + torch.erf(x / math.sqrt(2.0)))
def swish(x: 'torch.Tensor') ->torch.Tensor:
return x * torch.sigmoid(x)
def get_activation_fn(name: 'str') ->typing... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | jgoodson/TraGeC | PredictionHeadTransform | false | 6,939 | [
"BSD-3-Clause"
] | 1 | 3370e29ba0639745055cbee726a40181a4dd61df | https://github.com/jgoodson/TraGeC/tree/3370e29ba0639745055cbee726a40181a4dd61df |
Net | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | Marissa4/RPyCA | Net | false | 11,688 | [
"MIT"
] | 0 | e3c229361a4cd9ddd53accc5541b7c8b5f8939e0 | https://github.com/Marissa4/RPyCA/tree/e3c229361a4cd9ddd53accc5541b7c8b5f8939e0 |
FrmScrLoss | # 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
... | LeonHLJ/MMSD | FrmScrLoss | false | 9,283 | [
"MIT"
] | 0 | e39838e4e38524a670c08cc696a65da8ae01f648 | https://github.com/LeonHLJ/MMSD/tree/e39838e4e38524a670c08cc696a65da8ae01f648 |
LinearModel | import torch
class LinearModel(torch.nn.Module):
def __init__(self, input_size: 'int', output_size: 'int', dropout: 'float'
):
super().__init__()
self.linear = torch.nn.Linear(input_size, output_size)
self.dropout = torch.nn.Dropout(dropout)
def forward(self, data):
d... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | TDteach/SEAM | LinearModel | false | 1,126 | [
"MIT"
] | 0 | 231447dad15403e7620adcf6629b6e7fccc4b809 | https://github.com/TDteach/SEAM/tree/231447dad15403e7620adcf6629b6e7fccc4b809 |
ScaledDotProductAttention | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | YuxiXie/Semantic-Graphs-for-Generating-Deep-Questions | ScaledDotProductAttention | false | 14,703 | [
"MIT"
] | 62 | 6e5ef241c64b5b30a6ff54ddad31e610013b8388 | https://github.com/YuxiXie/Semantic-Graphs-for-Generating-Deep-Questions/tree/6e5ef241c64b5b30a6ff54ddad31e610013b8388 |
adder2d | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | ShangyinGao/pytorch-cifar | adder2d | false | 1,058 | [
"MIT"
] | 0 | 480e19825bb155e3d0fafae3545faa3a4165bd77 | https://github.com/ShangyinGao/pytorch-cifar/tree/480e19825bb155e3d0fafae3545faa3a4165bd77 |
NNAttention | import torch
import torch.nn as nn
class NNAttention(nn.Module):
def __init__(self, in_dim, out_dim):
super().__init__()
self.q_net = nn.Linear(in_dim, out_dim)
self.k_net = nn.Linear(in_dim, out_dim)
self.v_net = nn.Linear(in_dim, out_dim)
def forward(self, Q, K, V):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | eitin-infant/FinRL-Meta | NNAttention | false | 15,293 | [
"MIT"
] | 214 | 4c94011e58425796e7e2e5c1bf848afd65c828d6 | https://github.com/eitin-infant/FinRL-Meta/tree/4c94011e58425796e7e2e5c1bf848afd65c828d6 |
BPR | import torch
import torch.nn as nn
import torch.nn.functional as F
class BPR(nn.Module):
def __init__(self, user_size, item_size, dim, weight_decay):
super().__init__()
self.W = nn.Parameter(torch.empty(user_size, dim))
None
self.H = nn.Parameter(torch.empty(item_size, 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 import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torc... | kerengaiger/bpr | BPR | false | 12,662 | [
"MIT"
] | 0 | 66bfa57469a9c70ba5b9158fde5210abe1bd8d7b | https://github.com/kerengaiger/bpr/tree/66bfa57469a9c70ba5b9158fde5210abe1bd8d7b |
AdditiveAttention | # 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.... | Vision-CAIR/HalentNet | AdditiveAttention | false | 18,075 | [
"MIT"
] | 4 | dedef73c57c63aa580fc497fa42d512f4241a64b | https://github.com/Vision-CAIR/HalentNet/tree/dedef73c57c63aa580fc497fa42d512f4241a64b |
Lowerer | import torch
import torch.distributions
import torch.utils.data
class AdversarialNoiseGenerator(torch.nn.Module):
def __init__(self):
super().__init__()
return
def forward(self, x):
raise NotImplementedError()
class Lowerer(AdversarialNoiseGenerator):
def __init__(self, eps):
... | 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.distributions
import torch.utils.data
assert_size_stride = torch._C._dynamo.... | AlexMeinke/Provable-OOD-Detection | Lowerer | false | 7,694 | [
"MIT"
] | 21 | 9a132aec994ff718c96b81885736ab866df60d87 | https://github.com/AlexMeinke/Provable-OOD-Detection/tree/9a132aec994ff718c96b81885736ab866df60d87 |
GDeconv1DBlock | # 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
from torch.nn.utils.spectral_norm import spectral_norm
ass... | BaiYuhaoSpiceeYJ/SEGAN_denoise | GDeconv1DBlock | false | 2,016 | [
"MIT"
] | 0 | 5bf65ae72b9f0a996ae338c53c68c4967e08cd59 | https://github.com/BaiYuhaoSpiceeYJ/SEGAN_denoise/tree/5bf65ae72b9f0a996ae338c53c68c4967e08cd59 |
BesselBasis | # 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 math as tl_math
import math
import torch.jit
import torch.nn.functional
from torch import... | mir-group/nequip | BesselBasis | false | 16,163 | [
"MIT"
] | 153 | 4e6a0914a289cf000da57a6b6e79678efdf3347f | https://github.com/mir-group/nequip/tree/4e6a0914a289cf000da57a6b6e79678efdf3347f |
AUGRUCell | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | dreaming-qin/RecBole | AUGRUCell | false | 12,320 | [
"MIT"
] | 0 | d6de39521484ded60c387ca604abaf86310acdbe | https://github.com/dreaming-qin/RecBole/tree/d6de39521484ded60c387ca604abaf86310acdbe |
BackboneModel1 | # 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... | savan77/nni | BackboneModel1 | false | 4,272 | [
"MIT"
] | 0 | 510213393d9cae58c5a8cccd21f322f7bba4e0cf | https://github.com/savan77/nni/tree/510213393d9cae58c5a8cccd21f322f7bba4e0cf |
BasicBlock | # 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.... | suulkyy/GPM | BasicBlock | false | 10,833 | [
"MIT"
] | 0 | f094012a6ea6ea145bd100d1481a984783ae14dd | https://github.com/suulkyy/GPM/tree/f094012a6ea6ea145bd100d1481a984783ae14dd |
InvConvNear | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
import torch.utils.data
import torch.optim
assert_size_stri... | Royeqiu/Nemo_ASR | InvConvNear | false | 17,873 | [
"Apache-2.0"
] | 10 | 12b91b06dc5e4d0aa29d43bc7e701a93ee5eec4e | https://github.com/Royeqiu/Nemo_ASR/tree/12b91b06dc5e4d0aa29d43bc7e701a93ee5eec4e |
PAConv | import torch
import torch.nn as nn
class PAConv(nn.Module):
def __init__(self, nf, k_size=3):
super(PAConv, self).__init__()
self.k2 = nn.Conv2d(nf, nf, 1)
self.sigmoid = nn.Sigmoid()
self.k3 = nn.Conv2d(nf, nf, kernel_size=k_size, padding=(k_size - 1
) // 2, bias=Fals... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | YingqiLiulll/scrips_for_SR | PAConv | false | 1,267 | [
"MIT"
] | 0 | 04fa6fdaf157e913d3e2521cd80315a10a2ccedc | https://github.com/YingqiLiulll/scrips_for_SR/tree/04fa6fdaf157e913d3e2521cd80315a10a2ccedc |
MaxPool2dStaticSamePadding | # 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... | CYHYCY/EfficientDet | MaxPool2dStaticSamePadding | false | 4,958 | [
"Apache-2.0"
] | 1 | e749c29d31d611250ba63ff4dec443847dc08572 | https://github.com/CYHYCY/EfficientDet/tree/e749c29d31d611250ba63ff4dec443847dc08572 |
Encoder | import torch
import torch.nn as nn
import torch.nn.functional as F
class Encoder(nn.Module):
def __init__(self, out_dim=64):
super(Encoder, self).__init__()
self.conv1 = nn.Conv2d(3, 16, kernel_size=3, stride=1, padding=1)
self.conv2 = nn.Conv2d(16, 32, kernel_size=3, stride=1, padding=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 as nn
assert_... | GuohongLi/simclr-pytorch | Encoder | false | 9,076 | [
"BSD-3-Clause"
] | 0 | 7e08b2433a623fdbc1c097402fded4cc69d1b54e | https://github.com/GuohongLi/simclr-pytorch/tree/7e08b2433a623fdbc1c097402fded4cc69d1b54e |
CReLU | import torch
import torch.nn as nn
import torch.nn.functional as F
class CReLU(nn.ReLU):
def __init__(self):
super(CReLU, self).__init__()
def forward(self, input):
return torch.cat((F.relu(input, self.inplace), F.relu(-input, self.
inplace)), 1)
def get_inputs():
return [t... | 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... | ethancaballero/multi-agent-reinforcement-learning-for-emergent-communication | CReLU | false | 6,653 | [
"MIT"
] | 1 | 426edaa1ee58b467dfc0f46fe1f83ceea26f2ed7 | https://github.com/ethancaballero/multi-agent-reinforcement-learning-for-emergent-communication/tree/426edaa1ee58b467dfc0f46fe1f83ceea26f2ed7 |
MLP | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | mattkelleher/Nasty-Teacher | MLP | false | 16,034 | [
"MIT"
] | 59 | 7cca6e41aca10dcceeb215fa15107baae91e0140 | https://github.com/mattkelleher/Nasty-Teacher/tree/7cca6e41aca10dcceeb215fa15107baae91e0140 |
LeakyReLU | import torch
import numpy as np
import torch.nn as nn
from numbers import Number
def normcdf(value, mu=0.0, stddev=1.0):
sinv = 1.0 / stddev if isinstance(stddev, Number) else stddev.reciprocal()
return 0.5 * (1.0 + torch.erf((value - mu) * sinv / np.sqrt(2.0)))
def _normal_log_pdf(value, mu, stddev):
v... | 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
from numbers import N... | SaumilShah66/dqn_uav | LeakyReLU | false | 9,608 | [
"MIT"
] | 0 | 2bf780369e964b870624aebcff16c0714cad03c1 | https://github.com/SaumilShah66/dqn_uav/tree/2bf780369e964b870624aebcff16c0714cad03c1 |
SelfGate | import torch
import torch.nn as nn
from torch.nn import functional as F
class SelfGate(nn.Module):
def __init__(self, dim_in, dim_out):
super().__init__()
self.proj = nn.Linear(dim_in, dim_out * 2)
def forward(self, x):
x = self.proj(x)
x, gate = x.chunk(2, dim=-1)
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.triton_helpers import libdevice, math as tl_math
im... | awesome-archive/AI-Writer | SelfGate | false | 6,276 | [
"BSD-3-Clause"
] | 1 | abdcd5582f81fca2f677a020360654865bf82065 | https://github.com/awesome-archive/AI-Writer/tree/abdcd5582f81fca2f677a020360654865bf82065 |
GroupLinear | # 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.optim
import torch.nn as nn
assert_size_stride = torch._C._dynamo.g... | tiruns/grad_proj | GroupLinear | false | 4,427 | [
"MIT"
] | 0 | 8882ff1e3205e346e972d963480c57dbf5aef407 | https://github.com/tiruns/grad_proj/tree/8882ff1e3205e346e972d963480c57dbf5aef407 |
PositionwiseFeedForward | import torch
import torch.nn as nn
import torch.nn.functional as F
class PositionwiseFeedForward(nn.Module):
def __init__(self, d_in, d_hid, dropout=0.1):
super().__init__()
self.w1 = nn.Linear(d_in, d_hid)
self.w2 = nn.Linear(d_hid, d_in)
self.layer_norm = nn.LayerNorm(d_in, 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 import triton_helpers
from torch._inductor.runtime.... | Eddie-Hwang/Co-Eye_Motion_Generation | PositionwiseFeedForward | false | 5,106 | [
"MIT"
] | 1 | 8e244680115fb63bc26018cb6b53bcfbd04e9683 | https://github.com/Eddie-Hwang/Co-Eye_Motion_Generation/tree/8e244680115fb63bc26018cb6b53bcfbd04e9683 |
ResHead | from torch.nn import Module
import torch
import torch.nn as nn
import torch.utils.data
def gap2d(_w_in):
"""Helper for building a gap2d layer."""
return nn.AdaptiveAvgPool2d((1, 1))
def gap2d_cx(cx, _w_in):
"""Accumulates complexity of gap2d into cx = (h, w, flops, params, acts)."""
flops, params, 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.nn import Module
import torch.nn as nn
import torch.utils.data
assert... | MAC-AutoML/XCompression | ResHead | false | 5,558 | [
"MIT"
] | 1 | 9f76eb3ccfb3057110ecf12aa48dec00a4667a25 | https://github.com/MAC-AutoML/XCompression/tree/9f76eb3ccfb3057110ecf12aa48dec00a4667a25 |
BertLayerNorm | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | AdrianVandierAst/fast-bert | BertLayerNorm | false | 8,854 | [
"Apache-2.0"
] | 0 | f5adb426accee4a1882cdd4372fced4ef922c978 | https://github.com/AdrianVandierAst/fast-bert/tree/f5adb426accee4a1882cdd4372fced4ef922c978 |
DecoderLayer | import math
import torch
from torch import nn
from torch.nn import functional as F
def attention(q, k, v, d_k, mask=None, dropout=None):
scores = torch.matmul(q, k.transpose(-2, -1)) / math.sqrt(d_k)
if mask is not None:
mask = mask.unsqueeze(1)
scores = scores.masked_fill(mask == 0, -10000000... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | aim-uofa/DyCo3D | DecoderLayer | false | 14,776 | [
"BSD-2-Clause"
] | 100 | 17d22c2d839c0a1043fb72df301e3935af5ca0e9 | https://github.com/aim-uofa/DyCo3D/tree/17d22c2d839c0a1043fb72df301e3935af5ca0e9 |
DistanceNetwork | # 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.utils.checkpoint
assert_size_stride = torch._... | RosettaCommons/RFDesign | DistanceNetwork | false | 14,328 | [
"MIT"
] | 45 | b404b8b2c57f89c047529c30259aeeb8f6012b61 | https://github.com/RosettaCommons/RFDesign/tree/b404b8b2c57f89c047529c30259aeeb8f6012b61 |
SimpleLogSoftmaxModel | # 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.jit
impor... | opti-mix/glow | SimpleLogSoftmaxModel | false | 7,413 | [
"Apache-2.0"
] | 1 | 4ba074df5da9822986a23a6679ab592c22660f6d | https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d |
ExpPool | # 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
... | C3-ASV-Team/torchxrayvision | ExpPool | false | 4,921 | [
"Apache-2.0"
] | 1 | 7e53f0606986562f17a1ffd9f31d006756eff78d | https://github.com/C3-ASV-Team/torchxrayvision/tree/7e53f0606986562f17a1ffd9f31d006756eff78d |
Vol | import math
import torch
from torch import Tensor
import torchaudio.functional as F
class Vol(torch.nn.Module):
"""Add a volume to an waveform.
Args:
gain (float): Interpreted according to the given gain_type:
If ``gain_type`` = ``amplitude``, ``gain`` is a positive amplitude ratio.
... | 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... | tbright17/audio | Vol | false | 10,927 | [
"BSD-2-Clause"
] | 0 | 00d38203e401b8d9472a8f8394a10e2c309be02c | https://github.com/tbright17/audio/tree/00d38203e401b8d9472a8f8394a10e2c309be02c |
AsymmetricLossOptimized | import torch
import torch.nn as nn
import torch.nn.parallel
class AsymmetricLossOptimized(nn.Module):
""" Notice - optimized version, minimizes memory allocation and gpu uploading,
favors inplace operations"""
def __init__(self, gamma_neg=4, gamma_pos=1, clip=0.05, eps=1e-08,
disable_torch_grad_f... | 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... | aangelopoulos/rcps | AsymmetricLossOptimized | false | 14,732 | [
"MIT"
] | 52 | b400457f7cc7261d1ed610cdf7aa2230de657c57 | https://github.com/aangelopoulos/rcps/tree/b400457f7cc7261d1ed610cdf7aa2230de657c57 |
ResBlock | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | kpandey008/DiffuseVAE | ResBlock | false | 15,863 | [
"MIT"
] | 90 | b505894668ac1e4ef9a66ec220f5b40f5c83629e | https://github.com/kpandey008/DiffuseVAE/tree/b505894668ac1e4ef9a66ec220f5b40f5c83629e |
Cube | # 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... | minhnhat93/didyprog | Cube | false | 16,086 | [
"MIT"
] | 57 | 78886ed939d269b9b2bcb192bf849aa34082880c | https://github.com/minhnhat93/didyprog/tree/78886ed939d269b9b2bcb192bf849aa34082880c |
Attention | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | juyongjiang/Simple-SR | Attention | false | 7,044 | [
"MIT"
] | 1 | 76820511abc04fbe6e4a79d23c67aee97406d563 | https://github.com/juyongjiang/Simple-SR/tree/76820511abc04fbe6e4a79d23c67aee97406d563 |
SE | # 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... | adarsh-kr/CVModelsBenchmark | SE | false | 3,019 | [
"MIT"
] | 0 | 85aeb76c7c796d86baa97e1272aea83d734665b5 | https://github.com/adarsh-kr/CVModelsBenchmark/tree/85aeb76c7c796d86baa97e1272aea83d734665b5 |
StyleResidual | import torch
from torch import nn
import torch.utils.data
import torch.optim
class StyleResidual(nn.Module):
"""Styling."""
def __init__(self, d_channel: 'int', d_style: 'int', kernel_size: 'int'=1):
super().__init__()
self.rs = nn.Conv1d(in_channels=d_style, out_channels=d_channel,
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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.utils.data
import torch.optim
assert_size_stri... | PiotrDabkowski/NeMo | StyleResidual | false | 11,797 | [
"Apache-2.0"
] | 0 | 7c251e9035b24136cf130f3caf760087e5ccf07c | https://github.com/PiotrDabkowski/NeMo/tree/7c251e9035b24136cf130f3caf760087e5ccf07c |
CMVN | # 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_... | chiluen/s3prl | CMVN | false | 1,688 | [
"Apache-2.0"
] | 0 | c81838f6414d3c4767de355144449e40f86c7066 | https://github.com/chiluen/s3prl/tree/c81838f6414d3c4767de355144449e40f86c7066 |
AdaptiveFeatureNorm | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import torch.nn.parallel
import torch.utils.data
import t... | Liuhong99/CST | AdaptiveFeatureNorm | false | 8,496 | [
"MIT"
] | 20 | f6653a4ee7968fa3ba875a182670636f648be783 | https://github.com/Liuhong99/CST/tree/f6653a4ee7968fa3ba875a182670636f648be783 |
MLP | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | CNLPT/lightNLP | MLP | false | 13,443 | [
"Apache-2.0"
] | 889 | c7f128422ba5b16f514bb294145cb3b562e95829 | https://github.com/CNLPT/lightNLP/tree/c7f128422ba5b16f514bb294145cb3b562e95829 |
CosNorm_Classifier | # 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
from to... | caisarl76/classifier-balancing | CosNorm_Classifier | false | 9,832 | [
"BSD-3-Clause"
] | 0 | b381279dc29539afb92fe40f7ca917e352aff9c6 | https://github.com/caisarl76/classifier-balancing/tree/b381279dc29539afb92fe40f7ca917e352aff9c6 |
DiceBCELoss | # 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... | daoducanhc/Tumor_Segmentation | DiceBCELoss | false | 9,988 | [
"MIT"
] | 0 | 485a70492f7efb65a0f88f61a0eeffd6f0c92cc9 | https://github.com/daoducanhc/Tumor_Segmentation/tree/485a70492f7efb65a0f88f61a0eeffd6f0c92cc9 |
GatedTransition | # 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.... | devonjkohler/sysbioDMM | GatedTransition | false | 10,025 | [
"MIT"
] | 0 | 3967a084a492f5b7abd1f3274f1dc5ee9ef868ff | https://github.com/devonjkohler/sysbioDMM/tree/3967a084a492f5b7abd1f3274f1dc5ee9ef868ff |
TimeEncode | import torch
import numpy as np
class TimeEncode(torch.nn.Module):
def __init__(self, dimension):
super(TimeEncode, self).__init__()
self.dimension = dimension
self.w = torch.nn.Linear(1, dimension)
self.w.weight = torch.nn.Parameter(torch.from_numpy(1 / 10 ** np.
lins... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 numpy ... | Awannaphasch2016/tgn | TimeEncode | false | 85 | [
"Apache-2.0"
] | 0 | a0eb4b4759cb44e053dfb6a825ccac1d54dba33f | https://github.com/Awannaphasch2016/tgn/tree/a0eb4b4759cb44e053dfb6a825ccac1d54dba33f |
GramMatrix | import torch
import torch.nn as nn
class GramMatrix(nn.Module):
def forward(self, y):
b, ch, h, w = y.size()
features = y.view(b, ch, w * h)
features_t = features.transpose(1, 2)
gram = features.bmm(features_t) / (ch * h * w)
return gram
def get_inputs():
return [tor... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | globz-eu/PyTorch-Multi-Style-Transfer | GramMatrix | false | 3,551 | [
"MIT"
] | 0 | d00ca44ffee6a4eb4b517f3f1a6eabf72db2a3d2 | https://github.com/globz-eu/PyTorch-Multi-Style-Transfer/tree/d00ca44ffee6a4eb4b517f3f1a6eabf72db2a3d2 |
ResidualMLP | # 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_... | greydanus/piecewise_node | ResidualMLP | false | 6,776 | [
"Apache-2.0"
] | 1 | 9d218d4ec1bab486ae954ad2e84732a5f952770f | https://github.com/greydanus/piecewise_node/tree/9d218d4ec1bab486ae954ad2e84732a5f952770f |
GramLoss | import torch
import torch.nn as nn
import torch.fft
class GramMatrix(torch.nn.Module):
def forward(self, input):
b, c, h, w = input.size()
features = input.view(b, c, h * w)
gram_matrix = torch.bmm(features, features.transpose(1, 2))
gram_matrix.div_(h * w)
return gram_mat... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | NejcHirci/material-addon | GramLoss | false | 17,779 | [
"MIT"
] | 4 | c08e2081413c3319b712c2f7193ac8013f601382 | https://github.com/NejcHirci/material-addon/tree/c08e2081413c3319b712c2f7193ac8013f601382 |
_BahdanauAttention | import math
import torch
from torch import nn
from torch.nn import functional
class _BahdanauAttention(nn.Module):
def __init__(self, method, hidden_size):
super(_BahdanauAttention, self).__init__()
self.method = method
self.hidden_size = hidden_size
self.attn = nn.Linear(self.hid... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | VarnithChordia/Multlingual_Punctuation_restoration | _BahdanauAttention | false | 18,048 | [
"MIT"
] | 8 | 17c026e8935b9fecae01d446a756926c7733fcd1 | https://github.com/VarnithChordia/Multlingual_Punctuation_restoration/tree/17c026e8935b9fecae01d446a756926c7733fcd1 |
Adaptive | import torch
import torch.optim
def dims(tensor: 'torch.Tensor', start_index: 'int'=1) ->torch.Tensor:
return torch.Tensor([tensor.size()[start_index:]]).squeeze()
class Adaptive(torch.nn.Module):
def __init__(self, scale_factor: 'float'=2.0, mode: 'str'='max', dims:
'int'=2):
super(Adaptiv... | 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.optim
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_... | ai-in-motion/moai | Adaptive | false | 18,339 | [
"Apache-2.0"
] | 10 | e38cac046c059d2e2331ef4883bbabc5a500a5cf | https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf |
L1 | import torch
import torch.nn as nn
class L1(nn.Module):
def __init__(self):
super(L1, self).__init__()
def forward(self, output, target):
lossvalue = torch.abs(output - target).mean()
return lossvalue
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | AnonymousAuthors444/VEC_VAD | L1 | false | 13,255 | [
"MIT"
] | 67 | 0072bf857030e621e2f9c12689407b81e45ed603 | https://github.com/AnonymousAuthors444/VEC_VAD/tree/0072bf857030e621e2f9c12689407b81e45ed603 |
AB | import torch
import torch.nn as nn
import torch._utils
from itertools import product as product
import torch.utils.data.distributed
class AB(nn.Module):
"""
Knowledge Transfer via Distillation of Activation Boundaries Formed by Hidden Neurons
https://arxiv.org/pdf/1811.03233.pdf
"""
def __init__(self, mar... | 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
from itertools import product as product
import... | Capetian/FaceX-Zoo | AB | false | 4,953 | [
"Apache-2.0"
] | 1 | 029786c40d8aba15d891d33973de25fcd7e5399a | https://github.com/Capetian/FaceX-Zoo/tree/029786c40d8aba15d891d33973de25fcd7e5399a |
N_TransE | # 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.functional as F
assert_size_stride = torch._C._dynamo.guards.as... | weihangzhang/EAkit | N_TransE | false | 16,696 | [
"MIT"
] | 102 | dde8e914480cd1a3585271f70db11d567d9c2a04 | https://github.com/weihangzhang/EAkit/tree/dde8e914480cd1a3585271f70db11d567d9c2a04 |
LayerNormConv2d | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import torch.nn.functional
assert_size_stride = torch._C.... | ChenFengYe/relightable-nr | LayerNormConv2d | false | 13,462 | [
"MIT"
] | 105 | 239a97406f4df01cf5786dcdde58e464395a682d | https://github.com/ChenFengYe/relightable-nr/tree/239a97406f4df01cf5786dcdde58e464395a682d |
SimpleMLPGen_with_meta_feature | import torch
import torch.optim
import torch.jit
import torch.nn as nn
class SimpleMLPGen_with_meta_feature(nn.Module):
def __init__(self, num_in_features, num_out_features, neurons_per_layer):
super(SimpleMLPGen_with_meta_feature, self).__init__()
self.l_in = nn.Linear(in_features=num_in_feature... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.optim
... | zhaofeng-shu33/deep_euler_tests | SimpleMLPGen_with_meta_feature | false | 13,166 | [
"MIT"
] | 0 | a3d0961af679d490b0c58873ee0726234122bc7a | https://github.com/zhaofeng-shu33/deep_euler_tests/tree/a3d0961af679d490b0c58873ee0726234122bc7a |
DownsampleA | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | code-inter/leak | DownsampleA | false | 9,935 | [
"MIT"
] | 0 | 0e2b12a42f5fbaac4c5fa68627a21aa9a2f3d1d6 | https://github.com/code-inter/leak/tree/0e2b12a42f5fbaac4c5fa68627a21aa9a2f3d1d6 |
PositionEmbs | import torch
from torch import nn
class PositionEmbs(nn.Module):
def __init__(self, num_patches, emb_dim, dropout_rate=0.1):
super(PositionEmbs, self).__init__()
self.pos_embedding = nn.Parameter(torch.randn(1, num_patches + 2,
emb_dim))
if dropout_rate > 0:
self.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 import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | Graeme22/VisionTransformer-Pytorch | PositionEmbs | false | 17,310 | [
"Apache-2.0"
] | 5 | 4e8abecf27e92dffd8d00f3d9b5ad4a21079cd0e | https://github.com/Graeme22/VisionTransformer-Pytorch/tree/4e8abecf27e92dffd8d00f3d9b5ad4a21079cd0e |
NaiveGroupNorm | from torch.nn import Module
import torch
from torch.nn import Parameter
from torch.nn import init
import torch.nn.parallel
class NaiveGroupNorm(Module):
"""NaiveGroupNorm implements Group Normalization with the high-level matrix operations in PyTorch.
It is a temporary solution to export GN by ONNX before the... | 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.nn import Parameter
from torch.nn import... | XDong18/AdelaiDet | NaiveGroupNorm | false | 12,068 | [
"BSD-2-Clause"
] | 0 | 837cd1078923892fe6e84ac29fd0963f1b2c474f | https://github.com/XDong18/AdelaiDet/tree/837cd1078923892fe6e84ac29fd0963f1b2c474f |
BinaryClassificationHead | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
assert_size_stride ... | IgnatovFedor/DeepPavlov | BinaryClassificationHead | false | 10,822 | [
"Apache-2.0"
] | 0 | 02ba9c4b2919384c142c170c7f89c65cf05dd426 | https://github.com/IgnatovFedor/DeepPavlov/tree/02ba9c4b2919384c142c170c7f89c65cf05dd426 |
GHMC | import torch
import torch.nn as nn
import torch.nn.functional as F
def _expand_binary_labels(labels, label_weights, label_channels):
bin_labels = labels.new_full((labels.size(0), label_channels), 0)
inds = torch.nonzero(labels >= 1).squeeze()
if inds.numel() > 0:
bin_labels[inds, labels[inds] - 1]... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | AlphaLFC/mmdetection | GHMC | false | 4,849 | [
"Apache-2.0"
] | 1 | 45619c5b8aca0ca3e6ddc211210a8946c94694d8 | https://github.com/AlphaLFC/mmdetection/tree/45619c5b8aca0ca3e6ddc211210a8946c94694d8 |
FFloorTest | # 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_... | dawnclaude/onnx2keras | FFloorTest | false | 15,145 | [
"MIT"
] | 115 | 3d2a47c0a228b91fd434232274e216e491da36e3 | https://github.com/dawnclaude/onnx2keras/tree/3d2a47c0a228b91fd434232274e216e491da36e3 |
GeM | # 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... | layumi/dgcnn | GeM | false | 10,390 | [
"MIT"
] | 0 | a7b58796ffe549f2d8bdb06a84f62aba03e1d3a1 | https://github.com/layumi/dgcnn/tree/a7b58796ffe549f2d8bdb06a84f62aba03e1d3a1 |
FixedSubnetConv | import math
import torch
from torch import nn
from torch.nn import functional as F
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
class FixedSubnetConv(nn.Conv2d):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
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
import math
from torch import nn
import torch.nn.parallel
import torch.optim
imp... | MorganeAyle/SNIP-it | FixedSubnetConv | false | 858 | [
"MIT"
] | 0 | df2bf44d6d3f7e4ea7733242a79c916735a7b49e | https://github.com/MorganeAyle/SNIP-it/tree/df2bf44d6d3f7e4ea7733242a79c916735a7b49e |
FCVAE | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch import device
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from... | mbusy/vae | FCVAE | false | 7,201 | [
"MIT"
] | 1 | 455e382a557b72fc944460331e5dd010ff83a76a | https://github.com/mbusy/vae/tree/455e382a557b72fc944460331e5dd010ff83a76a |
GeLU | import torch
import torch.nn as nn
class GeLU(nn.Module):
def forward(self, x):
return 0.5 * x * (1.0 + torch.tanh(x * 0.7978845608 * (1.0 +
0.044715 * x * x)))
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | YJiangcm/Chinese-sentence-pair-modeling | GeLU | false | 14,609 | [
"Apache-2.0"
] | 49 | 90adbc5c121832ce3e4a4057e30417a6ec5e7ebc | https://github.com/YJiangcm/Chinese-sentence-pair-modeling/tree/90adbc5c121832ce3e4a4057e30417a6ec5e7ebc |
MaxPoolPad | import torch
import torch.utils.data
import torch.nn as nn
from torchvision.models import *
import torch.nn.init
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)
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.utils.data
import torch.nn as nn
from torchvision.models import *
import tor... | JiahuaWU/fastai | MaxPoolPad | false | 13,895 | [
"Apache-2.0"
] | 59 | 13a2df812d875abf0558004283392ab40d9bdea1 | https://github.com/JiahuaWU/fastai/tree/13a2df812d875abf0558004283392ab40d9bdea1 |
MeanAggregator | import torch
import torch.nn as nn
class MeanAggregator(nn.Module):
def __init__(self):
super(MeanAggregator, self).__init__()
def forward(self, x: 'torch.Tensor'):
return x.mean(dim=1)
def __call__(self, *args, **kwargs):
return super(MeanAggregator, self).__call__(*args, **kwa... | 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... | angpo/VKD | MeanAggregator | false | 14,850 | [
"MIT"
] | 68 | 2a136e00dad4c73612d6efe087675604ac2416eb | https://github.com/angpo/VKD/tree/2a136e00dad4c73612d6efe087675604ac2416eb |
UnpoolAvgEquiangular | import torch
from torch.nn import functional as F
def equiangular_dimension_unpack(nodes, ratio):
"""Calculate the two underlying dimensions
from the total number of nodes
Args:
nodes (int): combined dimensions
ratio (float): ratio between the two dimensions
Returns:
int, int: ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
reinterpret... | ownzonefeng/weather_prediction | UnpoolAvgEquiangular | false | 7,426 | [
"MIT"
] | 1 | 723c02b6b3c0a40751d87572b66c7a4e040dec92 | https://github.com/ownzonefeng/weather_prediction/tree/723c02b6b3c0a40751d87572b66c7a4e040dec92 |
GELU | import torch
import torch.nn as nn
import torch.nn.functional as F
class GELU(nn.Module):
def forward(self, input):
return F.gelu(input)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | ag8/mrl | GELU | false | 3,017 | [
"MIT"
] | 0 | f05b00347f88020cbeb216c7e4764a4d2523b67e | https://github.com/ag8/mrl/tree/f05b00347f88020cbeb216c7e4764a4d2523b67e |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.