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 |
|---|---|---|---|---|---|---|---|---|---|---|
SelfAttentionPooling | import torch
import torch.nn as nn
class SelfAttentionPooling(nn.Module):
"""
Implementation of SelfAttentionPooling
Original Paper: Self-Attention Encoding and Pooling for Speaker Recognition
https://arxiv.org/pdf/2008.01077v1.pdf
"""
def __init__(self, input_dim):
super(SelfAttentio... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 | SelfAttentionPooling | false | 12,272 | [
"Apache-2.0"
] | 0 | 81d4bb8d051cee20fa87c083b8478999e1766172 | https://github.com/czlwang/s3prl/tree/81d4bb8d051cee20fa87c083b8478999e1766172 |
MixActiv | # 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... | JiangZehua/control-pcgrl | MixActiv | false | 8,336 | [
"MIT"
] | 15 | e4fd1bf9670e5855f04941ebca34170517c451b4 | https://github.com/JiangZehua/control-pcgrl/tree/e4fd1bf9670e5855f04941ebca34170517c451b4 |
ThumbAdaptiveInstanceNorm | import torch
import torch.nn as nn
class ThumbInstanceNorm(nn.Module):
def __init__(self, out_channels=None, affine=True):
super(ThumbInstanceNorm, self).__init__()
self.thumb_mean = None
self.thumb_std = None
self.collection = True
if affine is True:
self.weig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | czczup/URST | ThumbAdaptiveInstanceNorm | false | 15,099 | [
"Apache-2.0"
] | 119 | 000ec9f7728f12ffad989ec1d07b1dd579514133 | https://github.com/czczup/URST/tree/000ec9f7728f12ffad989ec1d07b1dd579514133 |
wTransitionLinearUnit | from torch.nn import Module
import torch
import torch.nn.functional as F
from torch.nn.modules.module import Module
from scipy.sparse import *
class wTransitionLinearUnit(Module):
def __init__(self, ori_dim, tar_dim):
super(wTransitionLinearUnit, self).__init__()
self.linear_1 = torch.nn.Linear(t... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | TTomatoZhang/GHGCN | wTransitionLinearUnit | false | 3,090 | [
"Apache-2.0"
] | 0 | 09a07ff9e29e5889b912ca5feff74bb9308eda55 | https://github.com/TTomatoZhang/GHGCN/tree/09a07ff9e29e5889b912ca5feff74bb9308eda55 |
BCEFocalLoss | import torch
from torch import nn
class BCEFocalLoss(nn.Module):
"""Implementation of Focal Loss for Binary Classification Problems.
Focal loss was proposed in `Focal Loss for Dense Object Detection_.
<https://arxiv.org/abs/1708.02002>`_.
"""
def __init__(self, gamma=0, eps=1e-07, reduction='mea... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch ... | Atharva-Phatak/torchflare | BCEFocalLoss | false | 13,330 | [
"Apache-2.0"
] | 86 | 945f4bee73a855edd8cb19cd646731155499a27f | https://github.com/Atharva-Phatak/torchflare/tree/945f4bee73a855edd8cb19cd646731155499a27f |
SISDRLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_c... | leoauri/auraloss | SISDRLoss | false | 15,909 | [
"Apache-2.0"
] | 272 | 0e3362674ae1b53aa61c6a631fb4e6970c5683c1 | https://github.com/leoauri/auraloss/tree/0e3362674ae1b53aa61c6a631fb4e6970c5683c1 |
OFLoss | # 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
from torch.nn.modules.loss import _Loss
assert_size_stride = torch._C._dy... | StannisZhou/FFB6D | OFLoss | false | 11,894 | [
"MIT"
] | 0 | 5e7534805cd2e397427886d9a2a8ecfbb4f6cdfe | https://github.com/StannisZhou/FFB6D/tree/5e7534805cd2e397427886d9a2a8ecfbb4f6cdfe |
GT | import torch
class GT(torch.nn.Module):
def __init__(self):
super(GT, self).__init__()
def forward(self, x, y):
return 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 | GT | false | 6,095 | [
"MIT"
] | 1 | 53c663f0e0570ef7ffd6771354ae3478f63bd328 | https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328 |
BilinearMatrixAttention | # 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... | Impavidity/relogic | BilinearMatrixAttention | false | 8,292 | [
"MIT"
] | 24 | f647106e143cd603b95b63e06ea530cdd516aefe | https://github.com/Impavidity/relogic/tree/f647106e143cd603b95b63e06ea530cdd516aefe |
SSD300 | import torch
import torchvision
from torch import nn
import torch.nn.functional as F
from math import sqrt
from itertools import product as product
import torch.optim
import torch.utils.data
def decimate(tensor, m):
"""
Decimate a tensor by a factor 'm', i.e. downsample by keeping every 'm'th value.
This... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 |
nin | import torch
import torch.nn as nn
from torch.nn.utils import weight_norm as wn
class nin(nn.Module):
def __init__(self, dim_in, dim_out):
super(nin, self).__init__()
self.lin_a = wn(nn.Linear(dim_in, dim_out))
self.dim_out = dim_out
def forward(self, x):
""" a network in net... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | elahekhodaie/PixelCnnPP | nin | false | 10,070 | [
"MIT"
] | 0 | ab1e245ed8c24009364b1f891288eb1a526b0121 | https://github.com/elahekhodaie/PixelCnnPP/tree/ab1e245ed8c24009364b1f891288eb1a526b0121 |
StackTime | import torch
import torch.onnx
class StackTime(torch.nn.Module):
__constants__ = ['factor']
def __init__(self, factor):
super().__init__()
self.factor = int(factor)
def forward(self, x, x_lens):
seq = [x]
for i in range(1, self.factor):
tmp = torch.zeros_like(... | 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.onnx
assert_size_stride = torch._C._dynamo.guards.assert_size_stri... | swiftdiaries/inference | StackTime | false | 10,842 | [
"Apache-2.0"
] | 0 | dbb39947d4515449b1a3393cde39ca0dba935b1d | https://github.com/swiftdiaries/inference/tree/dbb39947d4515449b1a3393cde39ca0dba935b1d |
NetVLAD | import torch
import torch.nn as nn
import torch.nn.functional as F
class NetVLAD(nn.Module):
"""NetVLAD layer implementation"""
def __init__(self, num_clusters, dim, alpha=1.0):
"""
Args:
num_clusters : int
The number of clusters
dim : int
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Guido27/project_vg | NetVLAD | false | 9,132 | [
"MIT"
] | 0 | 3322fc355742929f43f3d97204398035645d968c | https://github.com/Guido27/project_vg/tree/3322fc355742929f43f3d97204398035645d968c |
SigmoidRange | # 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... | wegroupwolves/fastai | SigmoidRange | false | 4,522 | [
"Apache-2.0"
] | 0 | df40df403e05e132411f0f7abc7ec33c86e58bb9 | https://github.com/wegroupwolves/fastai/tree/df40df403e05e132411f0f7abc7ec33c86e58bb9 |
TestTimeIN | import torch
import torch.nn as nn
import torch.optim
import torch.nn.parallel
import torch.utils.data
import torch.utils.data.distributed
class TestTimeIN(nn.BatchNorm2d):
def __init__(self, num_features: 'int', eps: 'float'=1e-05, momentum:
'float'=1, affine: 'bool'=True, track_running_stats: 'bool'=Tr... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import... | MosyMosy/Pytorch_ImaneNet_With_wandb | TestTimeIN | false | 8,582 | [
"MIT"
] | 30 | b7b6e245e29ec342212025b8164e5053d4197fa1 | https://github.com/MosyMosy/Pytorch_ImaneNet_With_wandb/tree/b7b6e245e29ec342212025b8164e5053d4197fa1 |
Net | import torch
import torch.nn as nn
import torch.utils
import torch.nn.functional as F
class Net(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(3, 16, kernel_size=3, padding=1)
self.conv2 = nn.Conv2d(16, 8, kernel_size=3, padding=1)
self.fc1 = nn.Linear(8... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | dustasa/senior_software_HW | Net | false | 3,446 | [
"Apache-2.0"
] | 0 | 767d1d7bbd5e7d7414c17fa14b92b942e53d84ed | https://github.com/dustasa/senior_software_HW/tree/767d1d7bbd5e7d7414c17fa14b92b942e53d84ed |
ModulatedConv2d | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch.autograd... | CTPLab/IID_representation_learning | ModulatedConv2d | false | 5,213 | [
"MIT"
] | 1 | b9dc13536963f9af332b039f7cc772e2f1090c62 | https://github.com/CTPLab/IID_representation_learning/tree/b9dc13536963f9af332b039f7cc772e2f1090c62 |
BahdanauAttention | import torch
from torch import nn
class BahdanauAttention(nn.Module):
def __init__(self, dim):
super(BahdanauAttention, self).__init__()
self.query_layer = nn.Linear(dim, dim, bias=False)
self.tanh = nn.Tanh()
self.v = nn.Linear(dim, 1, bias=False)
def forward(self, query, pr... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | Emotional-Text-to-Speech/tacotron_pytorch | BahdanauAttention | false | 5,131 | [
"MIT"
] | 1 | e6b1a3907afb01fe31bcbd77c677667adf6733f5 | https://github.com/Emotional-Text-to-Speech/tacotron_pytorch/tree/e6b1a3907afb01fe31bcbd77c677667adf6733f5 |
DPRNNCell | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import math
import ... | anibadde/opacus | DPRNNCell | false | 14,860 | [
"Apache-2.0"
] | 958 | be221231e1b579bdae4ad34c8ae0c7c4928cee25 | https://github.com/anibadde/opacus/tree/be221231e1b579bdae4ad34c8ae0c7c4928cee25 |
TimeEncode | # 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 numpy ... | Blidge/tgn-caw-main | TimeEncode | false | 4,911 | [
"Apache-2.0"
] | 1 | 7a58f22bc7d9f1e2f6e9cbb1a60a18aed81071ee | https://github.com/Blidge/tgn-caw-main/tree/7a58f22bc7d9f1e2f6e9cbb1a60a18aed81071ee |
Pool | # 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.fx
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.... | NVIDIA/Torch-TensorRT | Pool | false | 14,078 | [
"BSD-3-Clause"
] | 430 | 1a22204fecec690bc3c2a318dab4f57b98c57f05 | https://github.com/NVIDIA/Torch-TensorRT/tree/1a22204fecec690bc3c2a318dab4f57b98c57f05 |
CnnViewModel | import torch
import torch.nn as nn
class CnnViewModel(nn.Module):
def __init__(self, out_dim=10):
super(CnnViewModel, self).__init__()
self.cnn1 = nn.Conv2d(in_channels=1, out_channels=16, kernel_size=5,
stride=1, padding=2)
self.relu1 = nn.ReLU()
self.maxpool1 = nn.Ma... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | bbrighttaer/DCCA_demo | CnnViewModel | false | 3,186 | [
"MIT"
] | 0 | c5410f2e163c6538899bf8f5f9afe031a517408f | https://github.com/bbrighttaer/DCCA_demo/tree/c5410f2e163c6538899bf8f5f9afe031a517408f |
LearnablePositionalEncoding | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | YexuZhou/TimeSeriesClassification_Transformer | LearnablePositionalEncoding | false | 6,014 | [
"MIT"
] | 1 | c20e00cfac4cfdb849e57e14c184f7d424257409 | https://github.com/YexuZhou/TimeSeriesClassification_Transformer/tree/c20e00cfac4cfdb849e57e14c184f7d424257409 |
LayerNorm | import torch
import numpy as np
class BaseModule(torch.nn.Module):
def __init__(self):
super(BaseModule, self).__init__()
@property
def nparams(self):
"""
Returns number of trainable parameters of the module.
"""
num_params = 0
for name, param in self.name... | 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 numpy as np
assert_size_stride = torch._C._dynamo.guards.assert_size_str... | Sobsz/uberduck-ml-dev | LayerNorm | false | 1,078 | [
"Apache-2.0"
] | 0 | f099238f6f2e3f600d72d89dea3c883c59d91387 | https://github.com/Sobsz/uberduck-ml-dev/tree/f099238f6f2e3f600d72d89dea3c883c59d91387 |
NoiseInjection | # 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 import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | ArashVahabpour/encoder4editing | NoiseInjection | false | 1,971 | [
"MIT"
] | 0 | 819b90ecd7397fbe2ab7cb30eb451dab0f3149fd | https://github.com/ArashVahabpour/encoder4editing/tree/819b90ecd7397fbe2ab7cb30eb451dab0f3149fd |
AvgCorr | import torch
from torch import nn
def _assert_no_grad(tensor):
assert not tensor.requires_grad
class AvgCorr(nn.Module):
def __init__(self, eps=1e-12):
self.eps = eps
super().__init__()
def forward(self, output, target):
_assert_no_grad(target)
delta_out = output - outp... | 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... | dattientran/attorch | AvgCorr | false | 12,391 | [
"MIT"
] | 0 | 469b225846c6d8a7d833ebac19d040c7a407a0ff | https://github.com/dattientran/attorch/tree/469b225846c6d8a7d833ebac19d040c7a407a0ff |
RMulInt | import torch
class RMulInt(torch.nn.Module):
def __init__(self):
super(RMulInt, self).__init__()
def forward(self, x):
return 10 * x
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | Ilyabasharov/torch2trt | RMulInt | false | 2,549 | [
"MIT"
] | 0 | 76bf298b3da408509665e23e2494922b131afb10 | https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10 |
InterWeightedBCEWithLogits | import torch
from torch import Tensor
import torch.nn as nn
from typing import Optional
from typing import Any
import torch.nn.functional as F
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mea... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch ... | CAMP-eXplain-AI/imba-explain | InterWeightedBCEWithLogits | false | 2,052 | [
"MIT"
] | 0 | e41b4ca5de63955cb0e925aad9599f38c5a3e973 | https://github.com/CAMP-eXplain-AI/imba-explain/tree/e41b4ca5de63955cb0e925aad9599f38c5a3e973 |
SelfAttention | # 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.... | shahrukhx01/model_serve_pytorch | SelfAttention | false | 4,307 | [
"MIT"
] | 0 | c97ab45264b41ce349828e8b230ed85a51d6b213 | https://github.com/shahrukhx01/model_serve_pytorch/tree/c97ab45264b41ce349828e8b230ed85a51d6b213 |
DeepTable3 | # 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.... | CoAxLab/azad | DeepTable3 | false | 17,181 | [
"MIT"
] | 6 | d1498069dd8856e93ae077b34dd7c9f1c7ce80e6 | https://github.com/CoAxLab/azad/tree/d1498069dd8856e93ae077b34dd7c9f1c7ce80e6 |
MultiheadAttention | from _paritybench_helpers import _mock_config
import math
import torch
import torch.nn as nn
from typing import Optional
class MultiheadAttention(nn.Module):
"""Multi-Head Attention Implemenetation from huggingface/transformer"""
def __init__(self, config: 'ConveRTModelConfig'):
super().__init__()
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | luweishuang/ConveRT-pytorch | MultiheadAttention | false | 10,570 | [
"Apache-2.0"
] | 0 | e14aaf2287eb3a78ee7d83ea02d9bd322863227f | https://github.com/luweishuang/ConveRT-pytorch/tree/e14aaf2287eb3a78ee7d83ea02d9bd322863227f |
Decoder | # 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_... | hcgcarry/usad | Decoder | false | 3,586 | [
"BSD-3-Clause"
] | 0 | 4e99a6acd43ef109be4d89b80e96978b9ad61c2f | https://github.com/hcgcarry/usad/tree/4e99a6acd43ef109be4d89b80e96978b9ad61c2f |
Swish | from torch.autograd import Function
import torch
from torch import nn
def swish(x, beta=1.0):
"""Swish activation.
'https://arxiv.org/pdf/1710.05941.pdf'
Args:
x: Input tensor.
beta:
"""
return SwishOP.apply(x, beta)
class SwishOP(Function):
@staticmethod
def forward(ctx... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch.autograd import Function
from torch import nn
assert_size_stri... | sailfish009/torch-toolbox | Swish | false | 7,580 | [
"BSD-3-Clause"
] | 1 | 80dfc22c697b9f323e097de72af04f0e5435d7b4 | https://github.com/sailfish009/torch-toolbox/tree/80dfc22c697b9f323e097de72af04f0e5435d7b4 |
CircularPad | # 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... | leggedrobotics/DeLORA | CircularPad | false | 15,888 | [
"BSD-3-Clause"
] | 154 | 909948d63a9517e6dd54bedcf099f6b39ded2cb4 | https://github.com/leggedrobotics/DeLORA/tree/909948d63a9517e6dd54bedcf099f6b39ded2cb4 |
WavePool | import torch
import numpy as np
import torch.nn as nn
def get_wav(in_channels, pool=True):
"""wavelet decomposition using conv2d"""
harr_wav_L = 1 / np.sqrt(2) * np.ones((1, 2))
harr_wav_H = 1 / np.sqrt(2) * np.ones((1, 2))
harr_wav_H[0, 0] = -1 * harr_wav_H[0, 0]
harr_wav_LL = np.transpose(harr_w... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import numpy as np
import torch.nn as nn
assert_size_stride = torch._C._dynamo.g... | noapadan/WCT2 | WavePool | false | 12,840 | [
"MIT"
] | 0 | 56c819bebb9f023e9eb8603f1f56a37650231730 | https://github.com/noapadan/WCT2/tree/56c819bebb9f023e9eb8603f1f56a37650231730 |
ResidualBlock_noBN | import torch
import torch.utils.data
import torch.nn as nn
import torch.nn.init as init
import torch.nn.functional as F
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... | AbnerVictor/HCFlow | ResidualBlock_noBN | false | 9,106 | [
"Apache-2.0"
] | 0 | e55938ac9f58c117898e3d161ddc73b14d15289b | https://github.com/AbnerVictor/HCFlow/tree/e55938ac9f58c117898e3d161ddc73b14d15289b |
FocalLossV2 | # 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... | chizhu/pytorch-loss | FocalLossV2 | false | 6,436 | [
"MIT"
] | 1 | c8fbd78771f11a910b0b51ae3697c09761dd9696 | https://github.com/chizhu/pytorch-loss/tree/c8fbd78771f11a910b0b51ae3697c09761dd9696 |
L1_Charbonnier_loss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert... | AnimatedRNG/pytorch-LapSRN | L1_Charbonnier_loss | false | 13,261 | [
"MIT"
] | 270 | 1b7737abe6ccaef2d14b673d301edbace3414c02 | https://github.com/AnimatedRNG/pytorch-LapSRN/tree/1b7737abe6ccaef2d14b673d301edbace3414c02 |
MaskedInstanceNorm1d | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.cuda
from torch... | bugface/NeMo | MaskedInstanceNorm1d | false | 1,581 | [
"Apache-2.0"
] | 0 | 431c561380a120e9e164a4c9deed8f1ca9acace5 | https://github.com/bugface/NeMo/tree/431c561380a120e9e164a4c9deed8f1ca9acace5 |
BareLoss | # 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... | JDAI-CV/LIO | BareLoss | false | 13,847 | [
"Apache-2.0"
] | 105 | 7bcd4d5e2990db5c8a7ec6ecc76a23c2e913e523 | https://github.com/JDAI-CV/LIO/tree/7bcd4d5e2990db5c8a7ec6ecc76a23c2e913e523 |
ChannelNorm | import torch
import torch.nn as nn
class ChannelNorm(nn.Module):
def __init__(self, numFeatures, epsilon=1e-05, affine=True):
super(ChannelNorm, self).__init__()
if affine:
self.weight = nn.parameter.Parameter(torch.Tensor(1,
numFeatures, 1))
self.bias = nn... | 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_... | czlwang/s3prl | ChannelNorm | false | 12,279 | [
"Apache-2.0"
] | 0 | 81d4bb8d051cee20fa87c083b8478999e1766172 | https://github.com/czlwang/s3prl/tree/81d4bb8d051cee20fa87c083b8478999e1766172 |
ZSSRNet | # 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_... | HaiTMai/pytorch-zssr | ZSSRNet | false | 11,478 | [
"Apache-2.0"
] | 0 | 433143ef7bcc036648e2d4294699c6ce15c21a7c | https://github.com/HaiTMai/pytorch-zssr/tree/433143ef7bcc036648e2d4294699c6ce15c21a7c |
SE | import torch
from itertools import chain as chain
import torch.utils.data
import torch.nn as nn
class SwishEfficient(torch.autograd.Function):
"""Swish activation function: x * sigmoid(x)."""
@staticmethod
def forward(ctx, x):
result = x * torch.sigmoid(x)
ctx.save_for_backward(x)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from itertools import chain a... | WoojuLee24/SlowFast | SE | false | 9,601 | [
"Apache-2.0"
] | 0 | 1fa9fda86a83ee09af5d38e11b14d2a2a18e419b | https://github.com/WoojuLee24/SlowFast/tree/1fa9fda86a83ee09af5d38e11b14d2a2a18e419b |
LogitCosineDistance | # 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.... | ParikhKadam/flair | LogitCosineDistance | false | 14,153 | [
"MIT"
] | 7,539 | a1732bc5ab0b4aeb09d1ed3a630ae2fd8fa095ef | https://github.com/ParikhKadam/flair/tree/a1732bc5ab0b4aeb09d1ed3a630ae2fd8fa095ef |
NormalAttention_embedded_gaussian | import torch
import torch.nn as nn
class NormalAttention_embedded_gaussian(nn.Module):
def __init__(self, input_channel_num, k=4):
super(NormalAttention_embedded_gaussian, self).__init__()
self.c_in = input_channel_num
self.query_conv = nn.Conv2d(in_channels=self.c_in, out_channels=
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | Schwartz-Zha/My-invertible-resnet | NormalAttention_embedded_gaussian | false | 1,039 | [
"MIT"
] | 0 | 5415975bb0d640f3bf3ef4a7b986563e84109270 | https://github.com/Schwartz-Zha/My-invertible-resnet/tree/5415975bb0d640f3bf3ef4a7b986563e84109270 |
ToRGB | from torch.autograd import Function
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import init as init
from torchvision.models import vgg as vgg
from torch import autograd as autograd
def make_resample_kernel(k):
"""Make resampling kernel for UpFirDn.
Args:
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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 math
import torch.nn as nn
import tor... | cyysc1998/EDVRDarts | ToRGB | false | 6,523 | [
"MIT"
] | 1 | 201badbc8c6469b519647a8869c3782ebe1176cf | https://github.com/cyysc1998/EDVRDarts/tree/201badbc8c6469b519647a8869c3782ebe1176cf |
SpacialGatingUnit | import torch
from torch import nn
import torch.utils.data
from typing import Optional
import torch.nn.functional
import torch.autograd
class SpacialGatingUnit(nn.Module):
"""
## Spatial Gating Unit
$$s(Z) = Z_1 \\odot f_{W,b}(Z_2)$$
where $f_{W,b}(Z) = W Z + b$ is a linear transformation along the 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.triton_helpers import libdevice
from torch import n... | techthiyanes/annotated_deep_learning_paper_implementations | SpacialGatingUnit | false | 16,571 | [
"MIT"
] | 3,714 | 8af24da2dd39a9a87482a4d18c2dc829bbd3fd47 | https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47 |
ToHalf | import torch
import torch.onnx
class ToHalf(torch.nn.Module):
def forward(self, tensor):
return tensor.half()
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.onnx
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_stride... | Alwaysproblem/examples-1 | ToHalf | false | 58 | [
"MIT"
] | 0 | 9754fa63ed1931489a21ac1f5b299f945e369a5c | https://github.com/Alwaysproblem/examples-1/tree/9754fa63ed1931489a21ac1f5b299f945e369a5c |
PositionAttentionModule | # 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.... | Nitin-Mane/External-Attention-pytorch | PositionAttentionModule | false | 14,157 | [
"MIT"
] | 4,466 | 1ceda306c41063af11c956334747763444a4d83f | https://github.com/Nitin-Mane/External-Attention-pytorch/tree/1ceda306c41063af11c956334747763444a4d83f |
HardSwish | import torch
import torch.nn as nn
class HardSwish(nn.Module):
def __init__(self):
super().__init__()
self.relu6 = nn.ReLU6()
def forward(self, x):
return self.relu6(x + 3.0) / 6.0 * x
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | binyao2020/ElegantRL | HardSwish | false | 1,545 | [
"Apache-2.0"
] | 0 | bf79f0d071d00cd93be03f1ca005020c3ab8dfe0 | https://github.com/binyao2020/ElegantRL/tree/bf79f0d071d00cd93be03f1ca005020c3ab8dfe0 |
Attention | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | chentuochao/Learn_attention_and_transformer | Attention | false | 3,286 | [
"MIT"
] | 0 | 3934ea3b700c6b8c0709057700372c531f43345f | https://github.com/chentuochao/Learn_attention_and_transformer/tree/3934ea3b700c6b8c0709057700372c531f43345f |
AttentionHead | # 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.... | Leo1998-Lu/CommonLit-Readability-Prize-Silver-Medal-Solution | AttentionHead | false | 9,239 | [
"MIT"
] | 0 | 1df3282a77b5f8f45c4eef9831061cb390a63fc5 | https://github.com/Leo1998-Lu/CommonLit-Readability-Prize-Silver-Medal-Solution/tree/1df3282a77b5f8f45c4eef9831061cb390a63fc5 |
MaxPPVPool1d | # 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.nn import Module
import torch.multiprocessing
import torch
assert_size_stride ... | sjdlloyd/tsai | MaxPPVPool1d | false | 4,472 | [
"Apache-2.0"
] | 0 | 98d9c02b8429708819d373b475deb9e99f0ab7df | https://github.com/sjdlloyd/tsai/tree/98d9c02b8429708819d373b475deb9e99f0ab7df |
GRUCell | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import numpy as np
... | H4LL/PyGrid | GRUCell | false | 13,764 | [
"Apache-2.0"
] | 69 | 62d5ba6f207498ca365c12ac59dbcd11c1337881 | https://github.com/H4LL/PyGrid/tree/62d5ba6f207498ca365c12ac59dbcd11c1337881 |
AE_3D_100 | import torch
import torch.nn as nn
import torch.utils.data
class AE_3D_100(nn.Module):
def __init__(self, n_features=4):
super(AE_3D_100, self).__init__()
self.en1 = nn.Linear(n_features, 100)
self.en2 = nn.Linear(100, 100)
self.en3 = nn.Linear(100, 50)
self.en4 = nn.Linea... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | gitter-badger/HEPAutoencoders | AE_3D_100 | false | 12,427 | [
"Apache-2.0"
] | 0 | 43010cd66fa4335a04b30b87926148e1c8d92de9 | https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9 |
HardSwish | # 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 torchvision.transforms.functional as F
import torch.nn as nn
import torch.nn.funct... | Oh-Donggyu/model-optimization-level3-nlp-01 | HardSwish | false | 2,711 | [
"MIT"
] | 0 | 3cfe03fd67fa1c5d08e9548c32dcf3c3981923a8 | https://github.com/Oh-Donggyu/model-optimization-level3-nlp-01/tree/3cfe03fd67fa1c5d08e9548c32dcf3c3981923a8 |
Mish | import torch
import torch.nn.functional as F
import torch.nn as nn
class Mish(nn.Module):
def forward(self, x):
return x.mul_(F.softplus(x).tanh())
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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.gu... | Nigel233/Different-Backbones-for-YOLO-v3 | Mish | false | 9,355 | [
"MIT"
] | 0 | 030e7860e966b079afc9b53a320a41f3eb7950be | https://github.com/Nigel233/Different-Backbones-for-YOLO-v3/tree/030e7860e966b079afc9b53a320a41f3eb7950be |
OneConv3d | import logging
import torch
class OneConv3d(torch.nn.Module):
"""OneConv3d.
"""
def __init__(self, out_channels=2):
super().__init__()
self.layer = torch.nn.Conv3d(in_channels=1, out_channels=
out_channels, kernel_size=3, padding=1)
def forward(self, x):
logging.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
@triton.jit
de... | kirchhausenlab/incasem | OneConv3d | false | 3,852 | [
"BSD-3-Clause"
] | 0 | ee9e007c5c04571e547e2fb5af5e800bd2d2b435 | https://github.com/kirchhausenlab/incasem/tree/ee9e007c5c04571e547e2fb5af5e800bd2d2b435 |
PSNRLoss | import torch
import torch.nn as nn
from torch.nn.functional import mse_loss
def psnr_loss(input: 'torch.Tensor', target: 'torch.Tensor', max_val: 'float'
) ->torch.Tensor:
"""Function that computes PSNR
See :class:`~kornia.losses.PSNRLoss` for details.
"""
if not torch.is_tensor(input) or not 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
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
from t... | alopezgit/kornia | PSNRLoss | false | 1,414 | [
"ECL-2.0",
"Apache-2.0"
] | 0 | 7bf47ae472012d2d6cf24463a76e8089daa65d0b | https://github.com/alopezgit/kornia/tree/7bf47ae472012d2d6cf24463a76e8089daa65d0b |
_DynamicGates | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
class _DynamicGates(nn.Module):
"""Internal class to wrap the dynamic gate parameters into a dedicated PyTorch Module"""
def __init__(self, cfg: 'Config', input_size: 'int'):
super(_DynamicGates, 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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | rro2q2/transfer-learning-aaai21 | _DynamicGates | false | 10,813 | [
"BSD-3-Clause"
] | 0 | f1960540d0608ce1e4d1d64bb4abd29d953f250f | https://github.com/rro2q2/transfer-learning-aaai21/tree/f1960540d0608ce1e4d1d64bb4abd29d953f250f |
DecoderBlock | # 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.... | SVRTK/Segmentation_FetalMRI | DecoderBlock | false | 17,894 | [
"Apache-2.0"
] | 6 | 9344a2248cbe8e4cccbe05ca98214626dcf62805 | https://github.com/SVRTK/Segmentation_FetalMRI/tree/9344a2248cbe8e4cccbe05ca98214626dcf62805 |
DotRNNSelector | # 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 as th
from torch... | NagisaZj/RODE | DotRNNSelector | false | 10,585 | [
"Apache-2.0"
] | 0 | f7f6831fee58a7910e1d7c3a8ae19cef82ab8d03 | https://github.com/NagisaZj/RODE/tree/f7f6831fee58a7910e1d7c3a8ae19cef82ab8d03 |
FullSort | import torch
import torch.nn as nn
class FullSort(nn.Module):
def forward(self, x):
return torch.sort(x, 1)[0]
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 import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | hologerry/residual-flows | FullSort | false | 10,296 | [
"MIT"
] | 0 | 33a3639150490279c2e13238dd6244b80c52adf7 | https://github.com/hologerry/residual-flows/tree/33a3639150490279c2e13238dd6244b80c52adf7 |
GluMlp | import torch
import torch.nn as nn
class GluMlp(nn.Module):
""" MLP w/ GLU style gating
See: https://arxiv.org/abs/1612.08083, https://arxiv.org/abs/2002.05202
"""
def __init__(self, in_features, hidden_features=None, out_features=None,
act_layer=nn.Sigmoid, drop=0.0):
super().__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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | RICE-EIC/Patch-Fool | GluMlp | false | 17,826 | [
"MIT"
] | 7 | 9638ec33a4d13b0c5ff0ec3ee5ce6b46ea7da5a6 | https://github.com/RICE-EIC/Patch-Fool/tree/9638ec33a4d13b0c5ff0ec3ee5ce6b46ea7da5a6 |
BertOutput | from _paritybench_helpers import _mock_config
from torch.nn import Module
import torch
import torch.nn as nn
class BertLayerNorm(Module):
def __init__(self, hidden_size, eps=1e-12):
super(BertLayerNorm, self).__init__()
self.shape = torch.Size((hidden_size,))
self.eps = eps
self.w... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch.nn impor... | axiserr/Hetu | BertOutput | false | 14,938 | [
"Apache-2.0"
] | 82 | 0052f727488db0570d6b37f63549b43b0920bc29 | https://github.com/axiserr/Hetu/tree/0052f727488db0570d6b37f63549b43b0920bc29 |
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.... | Galaxies99/alpha-protein | BasicBlock | false | 17,316 | [
"MIT"
] | 4 | db4b77ab48d5905ade5d4a66004f8387773718fa | https://github.com/Galaxies99/alpha-protein/tree/db4b77ab48d5905ade5d4a66004f8387773718fa |
PPMConcat | import torch
import torch.nn as nn
import torch._C
import torch.serialization
class PPMConcat(nn.ModuleList):
"""Pyramid Pooling Module that only concat the features of each layer.
Args:
pool_scales (tuple[int]): Pooling scales used in Pooling Pyramid
Module.
"""
def __init__(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
import torch.nn as nn
import torch._C
import torch.serialization
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strid... | ImportPaddle/APCNet | PPMConcat | false | 2,387 | [
"MIT"
] | 0 | 68ade1f83827b4cdd60ee4b6ac25454397100316 | https://github.com/ImportPaddle/APCNet/tree/68ade1f83827b4cdd60ee4b6ac25454397100316 |
JointHeatmapLoss | import torch
import torch.utils.data
import torch.nn as nn
class JointHeatmapLoss(nn.Module):
def __ini__(self):
super(JointHeatmapLoss, self).__init__()
def forward(self, joint_out, joint_gt, joint_valid):
loss = (joint_out - joint_gt) ** 2 * joint_valid[:, :, None, None, None
]... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C.... | DuinoDu/InterHand2.6M.pl | JointHeatmapLoss | false | 5,082 | [
"MIT"
] | 1 | 2d216960cf95b066a197a9b49795840b1ecfd0c1 | https://github.com/DuinoDu/InterHand2.6M.pl/tree/2d216960cf95b066a197a9b49795840b1ecfd0c1 |
MaskUpdate | # 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.multiprocessing
assert_size_stride = torch._C._dynamo.... | Xiefan-Guo/LBAM | MaskUpdate | false | 18,107 | [
"MIT"
] | 4 | 9795e2af4677a9f5e8e13b5d89fc6d50534c006a | https://github.com/Xiefan-Guo/LBAM/tree/9795e2af4677a9f5e8e13b5d89fc6d50534c006a |
UpsampleConvLayer | # 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.optim import *
imp... | EvilPerfectionist/ssl_e2vid | UpsampleConvLayer | false | 8,086 | [
"MIT"
] | 24 | 84f7c7e59875f134e97c14ec423f396725e04be7 | https://github.com/EvilPerfectionist/ssl_e2vid/tree/84f7c7e59875f134e97c14ec423f396725e04be7 |
VertexDirectEmbedder | import torch
import torch.utils.data
from torch import nn
def normalize_embeddings(embeddings: 'torch.Tensor', epsilon: 'float'=1e-06
) ->torch.Tensor:
"""
Normalize N D-dimensional embedding vectors arranged in a tensor [N, D]
Args:
embeddings (tensor [N, D]): N D-dimensional embedding vecto... | 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.utils.data
from... | Lele-Zhou/detectron2-based | VertexDirectEmbedder | false | 9,254 | [
"Apache-2.0"
] | 0 | a6f65174c6f11918c8e7600746f9f87baa89ecc0 | https://github.com/Lele-Zhou/detectron2-based/tree/a6f65174c6f11918c8e7600746f9f87baa89ecc0 |
SoftmaxModel | # 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.... | LMdeLiangMi/captum | SoftmaxModel | false | 5,476 | [
"BSD-3-Clause"
] | 1 | 8bd9686013fe0ba8996e9b1cbeb0ea8e91512787 | https://github.com/LMdeLiangMi/captum/tree/8bd9686013fe0ba8996e9b1cbeb0ea8e91512787 |
AdaptiveAvgMaxPool2d | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import torch.utils.data
import torchvision.transforms.functional as... | DifferentSC/pytorch-image-models | AdaptiveAvgMaxPool2d | false | 11,619 | [
"Apache-2.0"
] | 0 | ccfb5751abc70d80add4f197464190c4a2637c6c | https://github.com/DifferentSC/pytorch-image-models/tree/ccfb5751abc70d80add4f197464190c4a2637c6c |
Asym_ReLU_Block | # 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... | HwangToeMat/Asym_VDSR | Asym_ReLU_Block | false | 17,412 | [
"MIT"
] | 4 | 598200f745434fc6e1bb46b6da7d6cf7b0fdaa50 | https://github.com/HwangToeMat/Asym_VDSR/tree/598200f745434fc6e1bb46b6da7d6cf7b0fdaa50 |
GumbelSoftmaxLayer | import torch
import torch.nn as nn
from torch.distributions import RelaxedOneHotCategorical
import torch.nn.parallel
import torch.utils.data
import torch.distributions
def gumbel_softmax_sample(logits: 'torch.Tensor', temperature: 'float'=1.0,
training: 'bool'=True, straight_through: 'bool'=False):
size = log... | 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.distributions import RelaxedOneHotCategorical
import torch.nn.parallel
import torch.utils.data
import torch... | XeniaOhmer/SystematicRepresentations | GumbelSoftmaxLayer | false | 1,270 | [
"MIT"
] | 0 | 825208d1be659dc820e61f577cdb53afc47302f4 | https://github.com/XeniaOhmer/SystematicRepresentations/tree/825208d1be659dc820e61f577cdb53afc47302f4 |
WQ | import torch
import torch.nn as nn
def stats_quant(x, nbit, qmode='symm', dequantize=True):
z_typical = {'4bit': [0.077, 1.013], '8bit': [0.027, 1.114]}
z = z_typical[f'{int(nbit)}bit']
m = x.abs().mean()
std = x.std()
if qmode == 'symm':
n_lv = 2 ** (nbit - 1) - 1
alpha_w = 1 / z[... | 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... | mengjian0502/TorchInference_SRAM | WQ | false | 7,221 | [
"MIT"
] | 1 | fcc465c73b79f2ab670b6af03aa53f9bb47c64ca | https://github.com/mengjian0502/TorchInference_SRAM/tree/fcc465c73b79f2ab670b6af03aa53f9bb47c64ca |
ResBlock | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import n... | divelab/mri | ResBlock | false | 3,427 | [
"MIT"
] | 0 | e181b446acfc6f9ac3f42657f710dd583e77d1aa | https://github.com/divelab/mri/tree/e181b446acfc6f9ac3f42657f710dd583e77d1aa |
TimeDecayMSELoss | # 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... | Zinoex/hyperverlet | TimeDecayMSELoss | false | 18,178 | [
"MIT"
] | 7 | 431ef92fa2448ce69c357f01c0862353067bfa8a | https://github.com/Zinoex/hyperverlet/tree/431ef92fa2448ce69c357f01c0862353067bfa8a |
Block | # 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 ... | pgruening/ConvNeXt | Block | false | 12,892 | [
"MIT"
] | 0 | e9a1beaf312f3a724f0c21d098efbe7db872b049 | https://github.com/pgruening/ConvNeXt/tree/e9a1beaf312f3a724f0c21d098efbe7db872b049 |
SmallBlock | import torch
from torch import nn
from torchvision import models as models
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
from torchvision.transforms import *
import torch.onnx
class SmallBlock(nn.Module):
def __init__(self, channels):
super(SmallB... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
from tor... | aalborov/openvino_training_extensions | SmallBlock | false | 6,049 | [
"Apache-2.0"
] | 1 | a0bb39424151a98e1ca80c4aa5c865636d401785 | https://github.com/aalborov/openvino_training_extensions/tree/a0bb39424151a98e1ca80c4aa5c865636d401785 |
Fp32GroupNorm | # 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.utils.data
import torch.onnx.operators
impor... | AppleHolic/fairseq | Fp32GroupNorm | false | 13,323 | [
"MIT"
] | 429 | c5b32cb2bde59a7bb7987b22864731fe927523d4 | https://github.com/AppleHolic/fairseq/tree/c5b32cb2bde59a7bb7987b22864731fe927523d4 |
BilinearUpsample | # 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 typing import Union
from typing import List
import torch.nn as nn
import torch.utils... | Weiyuhong-1998/DI-engine | BilinearUpsample | false | 14,565 | [
"Apache-2.0"
] | 464 | 88658ea358298c6e61e95a454284b8853a3e9484 | https://github.com/Weiyuhong-1998/DI-engine/tree/88658ea358298c6e61e95a454284b8853a3e9484 |
FullAttention | from torch.nn import Module
import torch
from torch.nn import Dropout
class FullAttention(Module):
def __init__(self, use_dropout=False, attention_dropout=0.1):
super().__init__()
self.use_dropout = use_dropout
self.dropout = Dropout(attention_dropout)
def forward(self, queries, keys... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | EStorm21/kornia | FullAttention | false | 384 | [
"ECL-2.0",
"Apache-2.0"
] | 0 | b2bba7950d748ba0b8ce0cc68035a248799a1044 | https://github.com/EStorm21/kornia/tree/b2bba7950d748ba0b8ce0cc68035a248799a1044 |
NpairLoss | # 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.... | Chilydream/SyncNet | NpairLoss | false | 5,006 | [
"MIT"
] | 1 | 8555fe13364a5ecf32fbc0eb72a733c35e256da2 | https://github.com/Chilydream/SyncNet/tree/8555fe13364a5ecf32fbc0eb72a733c35e256da2 |
LandmarkHead | import torch
from itertools import product as product
import torch.nn as nn
class LandmarkHead(nn.Module):
def __init__(self, inchannels=512, num_anchors=3):
super(LandmarkHead, self).__init__()
self.conv1x1 = nn.Conv2d(inchannels, num_anchors * 10, kernel_size=
(1, 1), stride=1, padd... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from itertools import product as product
import torch.nn as nn
assert_size_strid... | Danil328/Pytorch_Retinaface | LandmarkHead | false | 2,214 | [
"MIT"
] | 0 | 048a1d68217b2a99fbf83e2537ecc7e281ed6bd6 | https://github.com/Danil328/Pytorch_Retinaface/tree/048a1d68217b2a99fbf83e2537ecc7e281ed6bd6 |
N0reparameterize | # 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, math as tl_math
fr... | pimdh/lie-vae | N0reparameterize | false | 16,251 | [
"MIT"
] | 83 | 0e0cc4d533c064fcfc405e8a75449f8b2f6cf8cf | https://github.com/pimdh/lie-vae/tree/0e0cc4d533c064fcfc405e8a75449f8b2f6cf8cf |
SpectralConvergengeLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.utils.data
asse... | tebin/Fre-GAN-pytorch | SpectralConvergengeLoss | false | 10,871 | [
"MIT"
] | 0 | e2f51317ae3953f10b8a0d112fc14991a02ebe91 | https://github.com/tebin/Fre-GAN-pytorch/tree/e2f51317ae3953f10b8a0d112fc14991a02ebe91 |
CrossEntropyLoss | import torch
import torch.nn.functional as F
import torch.nn as nn
def mask_cross_entropy(pred, target, label):
num_rois = pred.size()[0]
inds = torch.arange(0, num_rois, dtype=torch.long, device=pred.device)
pred_slice = pred[inds, label].squeeze(1)
return F.binary_cross_entropy_with_logits(pred_slic... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn.functi... | es6rc/icevision | CrossEntropyLoss | false | 3,476 | [
"Apache-2.0"
] | 0 | bb78dd2e1721c2edb82fb9c1a826fe301541d2a1 | https://github.com/es6rc/icevision/tree/bb78dd2e1721c2edb82fb9c1a826fe301541d2a1 |
Head | # 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... | PaParaZz1/DI-engine | Head | false | 11,856 | [
"Apache-2.0"
] | 0 | b38144117c1ebc6eb860d8637ec8866dfbcdf2de | https://github.com/PaParaZz1/DI-engine/tree/b38144117c1ebc6eb860d8637ec8866dfbcdf2de |
CQAttention | import torch
import torch.nn.parallel
import torch.nn as nn
import torch.utils.data
import torch.backends.cudnn
def mask_logits(inputs, mask, mask_value=-1e+30):
mask = mask.type(torch.float32)
return inputs + (1.0 - mask) * mask_value
class Conv1D(nn.Module):
def __init__(self, in_dim, out_dim, 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
from torch._inductor.runtime.... | MicroTensor-ai/episodic-memory | CQAttention | false | 11,708 | [
"MIT"
] | 0 | 295a3752ab94c7a6f45355aa2c54bffbf84b574f | https://github.com/MicroTensor-ai/episodic-memory/tree/295a3752ab94c7a6f45355aa2c54bffbf84b574f |
Classification | # 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.... | OuYangg/GNNs | Classification | false | 9,451 | [
"Apache-2.0"
] | 0 | ef5b1944490507684d603de3ae0b2aa7b5168f47 | https://github.com/OuYangg/GNNs/tree/ef5b1944490507684d603de3ae0b2aa7b5168f47 |
MetricCalcLayer | # 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... | BUPT-GAMMA/OpenHGNN | MetricCalcLayer | false | 13,380 | [
"Apache-2.0"
] | 235 | 5f218dad4ed1415aa6d842bc20785c61e74e5405 | https://github.com/BUPT-GAMMA/OpenHGNN/tree/5f218dad4ed1415aa6d842bc20785c61e74e5405 |
VariableBoxMLP | import torch
import torch.optim
import torch.jit
import torch.nn as nn
class VariableBoxMLP(nn.Module):
def __init__(self, num_in_features: 'int', num_out_features: 'int',
neurons_per_layer: 'int', hidden_layers: 'int'):
super(VariableBoxMLP, self).__init__()
self.hidden_layers = hidden_l... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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
... | plaveczlambert/deep_euler_tests | VariableBoxMLP | false | 7,477 | [
"MIT"
] | 1 | a3ceef98ba76bd7a00ccd3c773cd9850311b3b1a | https://github.com/plaveczlambert/deep_euler_tests/tree/a3ceef98ba76bd7a00ccd3c773cd9850311b3b1a |
AdaptiveAveragePooling | import torch
import torch.nn as nn
class AdaptiveAveragePooling(nn.Module):
"""Adaptive Pooling neck.
Args:
dim (int): Dimensions of each sample channel, can be one of {1, 2, 3}.
Default: 2
output_size (int | tuple): output size,
If dim equals to 1: output_size is a ... | 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... | Min-Sheng/mmregression | AdaptiveAveragePooling | false | 843 | [
"Apache-2.0"
] | 0 | 6d70383d89ccb3dea7f425b665c2a184d014a99f | https://github.com/Min-Sheng/mmregression/tree/6d70383d89ccb3dea7f425b665c2a184d014a99f |
GAT | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import init
class GraphAttentionLayer(nn.Module):
"""
Simple GAT layer, similar to https://arxiv.org/abs/1710.10903
"""
def __init__(self, in_features, out_features, dropout, alpha, concat=True):
super(GraphAtten... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | HecatePhy/directed_graphsage | GAT | false | 17,394 | [
"MIT"
] | 6 | 0e35f8971d44b8b3477fd7339225e1a69da4456a | https://github.com/HecatePhy/directed_graphsage/tree/0e35f8971d44b8b3477fd7339225e1a69da4456a |
LoopFallbackNoEval | import torch
import torch.nn as nn
import torch.fx
class LoopFallbackNoEval(nn.Module):
def __init__(self):
super(LoopFallbackNoEval, self).__init__()
def forward(self, x):
for _ in range(x.shape[1]):
x = x + torch.ones_like(x)
return x
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
import torch.nn as nn
import torch.fx
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.... | NVIDIA/Torch-TensorRT | LoopFallbackNoEval | false | 14,079 | [
"BSD-3-Clause"
] | 430 | 1a22204fecec690bc3c2a318dab4f57b98c57f05 | https://github.com/NVIDIA/Torch-TensorRT/tree/1a22204fecec690bc3c2a318dab4f57b98c57f05 |
SaN | # 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.... | Jiangtong-Li/ZHSIR | SaN | false | 17,568 | [
"Apache-2.0"
] | 8 | fd2c0a7e79f22cbf565ccd5e13342f1b317ac9b7 | https://github.com/Jiangtong-Li/ZHSIR/tree/fd2c0a7e79f22cbf565ccd5e13342f1b317ac9b7 |
Decoder | import math
import torch
from torch import nn
import torch.hub
def overlap_and_add(signal, frame_step):
outer_dimensions = signal.size()[:-2]
frames, frame_length = signal.size()[-2:]
subframe_length = math.gcd(frame_length, frame_step)
subframe_step = frame_step // subframe_length
subframes_per_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
import math
from torch import nn
import torch.hub
assert_size_stride = torch._C.... | KilianRuiz2B/demucs | Decoder | false | 13,979 | [
"MIT"
] | 3,013 | a6fbf3806b018634f68563887feaee64c5e36600 | https://github.com/KilianRuiz2B/demucs/tree/a6fbf3806b018634f68563887feaee64c5e36600 |
ReLUDeepLiftModel | import torch
import torch.nn as nn
class ReLUDeepLiftModel(nn.Module):
"""
https://www.youtube.com/watch?v=f_iAM0NPwnM
"""
def __init__(self):
super().__init__()
self.relu1 = nn.ReLU()
self.relu2 = nn.ReLU()
def forward(self, x1, x2, x3=2):
return 2 * self.rel... | 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... | Europium248/captum | ReLUDeepLiftModel | false | 423 | [
"BSD-3-Clause"
] | 0 | ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc | https://github.com/Europium248/captum/tree/ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc |
Step | # 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... | Bhaskers-Blu-Org1/online-alt-min | Step | false | 7,758 | [
"Apache-2.0"
] | 23 | ef31aaad639c0880df8700d34613164298bcadd0 | https://github.com/Bhaskers-Blu-Org1/online-alt-min/tree/ef31aaad639c0880df8700d34613164298bcadd0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.