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 |
|---|---|---|---|---|---|---|---|---|---|---|
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 import triton_helpers
from torch._inductor.runtime.... | zamerman/Udacity-AI-Programming | Classifier | false | 11,035 | [
"MIT"
] | 0 | 6537f273fb00531d448330c1c85886d86e1161d2 | https://github.com/zamerman/Udacity-AI-Programming/tree/6537f273fb00531d448330c1c85886d86e1161d2 |
MNIST_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 import triton_helpers
from torch import nn
import t... | MorganeAyle/SNIP-it | MNIST_classifier | false | 863 | [
"MIT"
] | 0 | df2bf44d6d3f7e4ea7733242a79c916735a7b49e | https://github.com/MorganeAyle/SNIP-it/tree/df2bf44d6d3f7e4ea7733242a79c916735a7b49e |
Downsample | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | Jack000/improved-diffusion | Downsample | false | 11,532 | [
"MIT"
] | 0 | e2abfc8072f9007b558b697b79d2affdae0eca3b | https://github.com/Jack000/improved-diffusion/tree/e2abfc8072f9007b558b697b79d2affdae0eca3b |
ConvReLUNorm | import torch
from torch.nn import functional as F
from torch import nn
import torch.utils.data
import torch.optim
class ConvReLUNorm(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=1, dropout=0.0):
super(ConvReLUNorm, self).__init__()
self.conv = nn.Conv1d(in_channels, out_c... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | PiotrDabkowski/NeMo | ConvReLUNorm | false | 11,785 | [
"Apache-2.0"
] | 0 | 7c251e9035b24136cf130f3caf760087e5ccf07c | https://github.com/PiotrDabkowski/NeMo/tree/7c251e9035b24136cf130f3caf760087e5ccf07c |
DepthHead | import torch
import torch.nn as nn
import torch.nn.functional as F
class DepthHead(nn.Module):
def __init__(self, input_dim=256, hidden_dim=128, scale=False):
super(DepthHead, self).__init__()
self.scale = scale
self.conv1 = nn.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | aliyun/dro-sfm | DepthHead | false | 14,803 | [
"MIT"
] | 147 | 8707e2e0ef799d7d47418a018060f503ef449fe3 | https://github.com/aliyun/dro-sfm/tree/8707e2e0ef799d7d47418a018060f503ef449fe3 |
simple_mlp | import torch
import torch.nn as nn
from torch.nn import functional as F
class simple_mlp(nn.Module):
def __init__(self, feature_dim, layer, hidden):
super(simple_mlp, self).__init__()
self.layer = layer
self.linear1 = nn.Linear(feature_dim, hidden)
if layer == 2:
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
import torch.nn as nn
assert_... | broadinstitute/TCRP | simple_mlp | false | 1,580 | [
"MIT"
] | 0 | 9e580dbf0c9d0ec5e5b1a949087df5a3724fa35b | https://github.com/broadinstitute/TCRP/tree/9e580dbf0c9d0ec5e5b1a949087df5a3724fa35b |
PixelNormLayer | # 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_... | AleksiKnuutila/ganspace | PixelNormLayer | false | 1,913 | [
"Apache-2.0"
] | 0 | 23471a07c8b0d693fa7f1f2dfbb8b34ce22d9d38 | https://github.com/AleksiKnuutila/ganspace/tree/23471a07c8b0d693fa7f1f2dfbb8b34ce22d9d38 |
MinLossModule | import torch
import torch.nn.functional as F
class MinLossModule(torch.nn.Module):
def __init__(self):
super(MinLossModule, self).__init__()
def forward(self, predictions, targets):
y_losses = F.cross_entropy(predictions, targets, reduction='none')
y_losses = torch.sum(y_losses, 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 math as tl_math
assert_size_stride = t... | pkalluri/specialized-conditional-pcnn | MinLossModule | false | 4,121 | [
"Apache-2.0"
] | 0 | ed94e47654ed749a7dd3492c4e074e2a8fb12df8 | https://github.com/pkalluri/specialized-conditional-pcnn/tree/ed94e47654ed749a7dd3492c4e074e2a8fb12df8 |
CommunicationLayer | import torch
from torch import nn
class AffineTransform(nn.Module):
def __init__(self, num_features):
super().__init__()
self.alpha = nn.Parameter(torch.ones(1, 1, num_features))
self.beta = nn.Parameter(torch.zeros(1, 1, num_features))
def forward(self, x):
return self.alpha... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_st... | jaketae/res-mlp | CommunicationLayer | false | 12,599 | [
"MIT"
] | 0 | 6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd | https://github.com/jaketae/res-mlp/tree/6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd |
Linear3D | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
import torch as th
from torch.nn import Parameter
assert_size_stride... | TheSignPainter/CausalDiscoveryToolbox | Linear3D | false | 14,477 | [
"MIT"
] | 528 | 33eae18184905e505be978b08003b9477bf38e0c | https://github.com/TheSignPainter/CausalDiscoveryToolbox/tree/33eae18184905e505be978b08003b9477bf38e0c |
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
import torch.nn as nn
import torch.nn.functional as F
assert_size_stride = torch... | HaiyinPiao/pytorch-a3c | Net | false | 9,060 | [
"MIT"
] | 0 | d151fb4197449610f090c1d687c50a74422f594c | https://github.com/HaiyinPiao/pytorch-a3c/tree/d151fb4197449610f090c1d687c50a74422f594c |
dilated_1D | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
import torch.nn as nn
assert_size_stride = torch._C._dyn... | kevin-xuan/Traffic-Benchmark | dilated_1D | false | 15,813 | [
"MIT"
] | 120 | b9f8e40b4df9b58f5ad88432dc070cbbbcdc0228 | https://github.com/kevin-xuan/Traffic-Benchmark/tree/b9f8e40b4df9b58f5ad88432dc070cbbbcdc0228 |
ModulatedSiren2d | # 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... | Dolorousrtur/style-people | ModulatedSiren2d | false | 8,022 | [
"MIT"
] | 15 | c48b12b245cc50f8230c0654dffe40016f2a69f1 | https://github.com/Dolorousrtur/style-people/tree/c48b12b245cc50f8230c0654dffe40016f2a69f1 |
MinibatchStatConcatLayer | # 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_... | Lornatang/PyTorch-PGGAN | MinibatchStatConcatLayer | false | 17,592 | [
"MIT"
] | 5 | a5ad433968641cafc13e2d0c2d9780872071b262 | https://github.com/Lornatang/PyTorch-PGGAN/tree/a5ad433968641cafc13e2d0c2d9780872071b262 |
A2CCritic | import torch
import torch as t
import torch.nn as nn
class A2CCritic(nn.Module):
def __init__(self, state_dim):
super().__init__()
self.fc1 = nn.Linear(state_dim, 16)
self.fc2 = nn.Linear(16, 16)
self.fc3 = nn.Linear(16, 1)
def forward(self, state):
v = t.relu(self.fc... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | ikamensh/machin | A2CCritic | false | 6,856 | [
"MIT"
] | 1 | af7b423c47bc1412530cf6c96c11bd3af9b3e239 | https://github.com/ikamensh/machin/tree/af7b423c47bc1412530cf6c96c11bd3af9b3e239 |
DispAct | import torch
import torch.nn as nn
import torch.nn.functional as F
class DispAct(nn.Module):
def __init__(self):
super(DispAct, self).__init__()
def forward(self, x):
return torch.clamp(F.softplus(x), min=0.0001, max=10000.0)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def ge... | 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... | jdasam/scDCC | DispAct | false | 10,235 | [
"Apache-2.0"
] | 0 | 8ebaed766db5ad56021983ebc13e9a60b6c7b453 | https://github.com/jdasam/scDCC/tree/8ebaed766db5ad56021983ebc13e9a60b6c7b453 |
ReshapeF | import torch
import torch.utils.data
import torch
import torch.nn as nn
class Normalize(nn.Module):
def __init__(self, power=2):
super(Normalize, self).__init__()
self.power = power
def forward(self, x):
norm = x.pow(self.power).sum(1, keepdim=True).pow(1.0 / self.power)
out ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.utils.data
import torch
import torch.nn as nn
assert_size_stride =... | a11isonliu/contrastive-unpaired-translation | ReshapeF | false | 9,843 | [
"BSD-3-Clause"
] | 0 | 67651ed9877cae121d9398f46094ce8dbc678802 | https://github.com/a11isonliu/contrastive-unpaired-translation/tree/67651ed9877cae121d9398f46094ce8dbc678802 |
MultiheadAttention | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | lyh512796310/MMSA | MultiheadAttention | false | 3,963 | [
"MIT"
] | 0 | e1735afd1b4e763995ab7aacb001884a7b7146ff | https://github.com/lyh512796310/MMSA/tree/e1735afd1b4e763995ab7aacb001884a7b7146ff |
TestPointLSTM | import torch
import torch.nn as nn
class PointLSTMCell(nn.Module):
def __init__(self, pts_num, in_channels, hidden_dim, offset_dim, bias):
super(PointLSTMCell, self).__init__()
self.bias = bias
self.pts_num = pts_num
self.in_channels = in_channels
self.hidden_dim = hidden_... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | evanfebrianto/pointlstm_gesture_recognition_pytorch | TestPointLSTM | false | 15,329 | [
"Apache-2.0"
] | 69 | 797ccdc7da5a859e28f2a8cc7ef7118358b82cb4 | https://github.com/evanfebrianto/pointlstm_gesture_recognition_pytorch/tree/797ccdc7da5a859e28f2a8cc7ef7118358b82cb4 |
MultiHead | # 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.... | TheShadow29/vognet-pytorch | MultiHead | false | 14,482 | [
"MIT"
] | 70 | 238e93c37cf9f03a2fd376a14760bb3d334a113d | https://github.com/TheShadow29/vognet-pytorch/tree/238e93c37cf9f03a2fd376a14760bb3d334a113d |
leaky_hardtanh | import torch
import torch.nn as nn
class leaky_hardtanh(nn.Module):
def __init__(self, min=-1, max=1, slope=0.01):
super(leaky_hardtanh, self).__init__()
self.min = min
self.max = max
self.slope = slope
def forward(self, x):
x = torch.where(x < self.min, self.min + x ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | nikolasmorshuis/gadolinium_prediction | leaky_hardtanh | false | 7,349 | [
"Apache-2.0"
] | 1 | 7d6640df5b62ce578a947d3a9b9c701c3d1ccd79 | https://github.com/nikolasmorshuis/gadolinium_prediction/tree/7d6640df5b62ce578a947d3a9b9c701c3d1ccd79 |
Net | import torch
from torch import Tensor
from logging import info
from torch import nn
from logging import error
from torch.nn import Linear
from torch.nn.functional import relu
class Net(nn.Module):
def __init__(self, size):
super(Net, self).__init__()
convolutions = [5]
info('CONV LAYERS: ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 logging import info
from... | ChsHub/ai_denoiser | Net | false | 309 | [
"MIT"
] | 0 | abb0852765b10a0f05593a850f9922c5737f5f6a | https://github.com/ChsHub/ai_denoiser/tree/abb0852765b10a0f05593a850f9922c5737f5f6a |
ToRGB | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
from torch import nn
from torch.nn import functional as F
assert_siz... | Liamkuo/SAIR | ToRGB | false | 17,579 | [
"MIT"
] | 6 | 0fb289cd975b5a196b58e7d16bac00e31fd41d39 | https://github.com/Liamkuo/SAIR/tree/0fb289cd975b5a196b58e7d16bac00e31fd41d39 |
Task | import torch
import torch.nn
import torch.utils.data.distributed
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.cuda
import torch.cuda.nccl
import torch.backends.cudnn
import torch.backends.mkl
class Task(nn.Module):
def __init__(self):
super().__in... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn
import torch.utils.data.distributed
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.dat... | lipovsek/bagua | Task | false | 12,718 | [
"MIT"
] | 0 | d8b03333ab6cf3745279311b9da76e99d5c2c00a | https://github.com/lipovsek/bagua/tree/d8b03333ab6cf3745279311b9da76e99d5c2c00a |
DenseGraphConv | # 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.nn import Parameter
import torch.utils.data
assert_size_s... | douglasrizzo/pytorch_geometric | DenseGraphConv | false | 12,303 | [
"MIT"
] | 0 | effc617c6ad6daad506038bb79e4407082e74740 | https://github.com/douglasrizzo/pytorch_geometric/tree/effc617c6ad6daad506038bb79e4407082e74740 |
HighwayLayer | import torch
import torch.nn as nn
import torch.utils.data
import torch.utils.data.distributed
def my_xavier_init(m, gain=1):
"""Xavier initialization: weights initialization that tries to make variance of outputs
of a layer equal to variance of its inputs.
"""
for p in m.parameters():
if p.di... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | Dhiraj100892/droidlet | HighwayLayer | false | 11,340 | [
"MIT"
] | 0 | e4ea578672531524552b6ff021165fc9371b0ec8 | https://github.com/Dhiraj100892/droidlet/tree/e4ea578672531524552b6ff021165fc9371b0ec8 |
RnLU | import math
import torch
import torch.nn as nn
from torch.autograd.function import InplaceFunction
import torch.nn.parallel
import torch.utils.data
def birelu(x, inplace=False):
return BiReLUFunction().apply(x, inplace)
def rnlu(x, inplace=False, shift=0, scale_fix=(math.pi / 2) ** 0.5):
x = birelu(x, inpla... | 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 math
import torch.nn as nn
from torch.autograd.function import InplaceFunction
imp... | aparna-aketi/Low_Precision_DL | RnLU | false | 3,116 | [
"MIT"
] | 0 | 5a2489cac5da8f43dd8490a9d871f1ce17f8e7f8 | https://github.com/aparna-aketi/Low_Precision_DL/tree/5a2489cac5da8f43dd8490a9d871f1ce17f8e7f8 |
CorrelationAlignmentLoss | import torch
import torch.nn as nn
import torch.utils.data
class CorrelationAlignmentLoss(nn.Module):
"""The `Correlation Alignment Loss` in
`Deep CORAL: Correlation Alignment for Deep Domain Adaptation (ECCV 2016) <https://arxiv.org/pdf/1607.01719.pdf>`_.
Given source features :math:`f_S` and target fea... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | neka-nat/Transfer-Learning-Library | CorrelationAlignmentLoss | false | 16,152 | [
"MIT"
] | 1,474 | a3b27b0d7562fa90a02e914140b37ab438469e6c | https://github.com/neka-nat/Transfer-Learning-Library/tree/a3b27b0d7562fa90a02e914140b37ab438469e6c |
LinearNet | import torch
import torch.nn
import torch.optim
class LinearNet(torch.nn.Module):
def __init__(self, D_in, H, D_out):
super().__init__()
self.linear1 = torch.nn.Linear(D_in, H)
self.nonlinear = torch.nn.ReLU()
self.linear2 = torch.nn.Linear(H, D_out)
def forward(self, x: '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
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | OregonWebSells/ReAgent | LinearNet | false | 5,687 | [
"BSD-3-Clause"
] | 1 | 866f91785ca86db32fb67744aa063fe77791ff21 | https://github.com/OregonWebSells/ReAgent/tree/866f91785ca86db32fb67744aa063fe77791ff21 |
L2 | import torch
import torch.nn as nn
class L2(nn.Module):
def __init__(self):
super(L2, self).__init__()
def forward(self, output, target):
lossvalue = torch.norm(output - target, p=2, dim=1).mean()
return lossvalue
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([... | 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_... | dark-tea/flownet2-pytorch | L2 | false | 10,079 | [
"Apache-2.0"
] | 0 | 41ea3353f11048833f6baebcf9f9c951b0b722d7 | https://github.com/dark-tea/flownet2-pytorch/tree/41ea3353f11048833f6baebcf9f9c951b0b722d7 |
Unet_2levels | import torch
import torch.nn as nn
class Unet_2levels(nn.Module):
def __init__(self):
super().__init__()
self.relu = nn.ReLU()
self.sigmoid = nn.Sigmoid()
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear',
align_corners=True)
self.maxpool = nn.MaxPool... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | AbdulMuqadim2001/dvae-refiner | Unet_2levels | false | 7,697 | [
"MIT"
] | 27 | c1ff46f91b28e613a3b7b157f8fd97ddf43e6fb2 | https://github.com/AbdulMuqadim2001/dvae-refiner/tree/c1ff46f91b28e613a3b7b157f8fd97ddf43e6fb2 |
QNet | # 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
from to... | AswinRetnakumar/Machina | QNet | false | 13,331 | [
"MIT"
] | 302 | 6519935ca4553192ac99fc1c7c1e7cab9dd72693 | https://github.com/AswinRetnakumar/Machina/tree/6519935ca4553192ac99fc1c7c1e7cab9dd72693 |
MergeLayer | # 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
assert_size_stride = torch._C... | IDSC-io/vre-tgn | MergeLayer | false | 9,138 | [
"Apache-2.0"
] | 0 | 46e8327e3befe67003874fa70b384a511523f8f7 | https://github.com/IDSC-io/vre-tgn/tree/46e8327e3befe67003874fa70b384a511523f8f7 |
DiceLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | azxj/BRRNet | DiceLoss | false | 6,303 | [
"MIT"
] | 1 | 274068efd5453f2c1fb07bfaad448d048b9c793b | https://github.com/azxj/BRRNet/tree/274068efd5453f2c1fb07bfaad448d048b9c793b |
FastRCNNPredictor | # 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... | Okery/PyTorch-Simple-MaskRCNN | FastRCNNPredictor | false | 14,130 | [
"MIT"
] | 147 | 5e57a353f211c7130bfcf1d55cacd80057d81423 | https://github.com/Okery/PyTorch-Simple-MaskRCNN/tree/5e57a353f211c7130bfcf1d55cacd80057d81423 |
DirectedGraphConvolution | # 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_... | naszilla/naszilla | DirectedGraphConvolution | false | 16,145 | [
"Apache-2.0"
] | 112 | 5575cc8c95e79ce5743e8ea7ef53d6da900f8480 | https://github.com/naszilla/naszilla/tree/5575cc8c95e79ce5743e8ea7ef53d6da900f8480 |
TVLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
import torch.utils.model_zoo
assert_size_stride = t... | manuel-rdz/SGL-Retinal-Vessel-Segmentation | TVLoss | false | 16,008 | [
"MIT"
] | 45 | 7897d977e77aa0b5d3acb86e0aa74c6829d67415 | https://github.com/manuel-rdz/SGL-Retinal-Vessel-Segmentation/tree/7897d977e77aa0b5d3acb86e0aa74c6829d67415 |
EMLLoss | import torch
import torch.nn as nn
from torch import optim as optim
class EMLLoss(nn.Module):
def __init__(self):
super(EMLLoss, self).__init__()
def forward(self, y_pred, y_true):
gamma = 1.1
alpha = 0.48
smooth = 1.0
epsilon = 1e-07
y_true = y_true.view(-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 libdevice, math as tl_math
import torc... | DarkoBomer/VCANet | EMLLoss | false | 2,128 | [
"MIT"
] | 0 | 1c76deb195a2dcb8aa4b40856d49eb6796de12bc | https://github.com/DarkoBomer/VCANet/tree/1c76deb195a2dcb8aa4b40856d49eb6796de12bc |
ActorCriticNetwork | # 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.... | bluebibi/rl_book_codes | ActorCriticNetwork | false | 3,236 | [
"MIT"
] | 0 | ef7fc9993eb66618e4b4e80e59cc2879a8db3522 | https://github.com/bluebibi/rl_book_codes/tree/ef7fc9993eb66618e4b4e80e59cc2879a8db3522 |
SqueezeAndExcite | import torch
import torch.nn as nn
class SqueezeAndExcite(nn.Module):
def __init__(self, channels, squeeze_channels, se_ratio):
super(SqueezeAndExcite, self).__init__()
squeeze_channels = squeeze_channels * se_ratio
if not squeeze_channels.is_integer():
raise ValueError('chann... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | JACKYLUO1991/HybridNet | SqueezeAndExcite | false | 17,456 | [
"Apache-2.0"
] | 6 | eb97d8a048ca4bb4087bc542360172e169a08dbf | https://github.com/JACKYLUO1991/HybridNet/tree/eb97d8a048ca4bb4087bc542360172e169a08dbf |
Actor | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import numpy as np
... | albimc/deep-reinforcement-learning | Actor | false | 1,401 | [
"MIT"
] | 0 | e11a6c9d4c8991cf229e686b645ae22ec4cff4f5 | https://github.com/albimc/deep-reinforcement-learning/tree/e11a6c9d4c8991cf229e686b645ae22ec4cff4f5 |
Actor | import torch
import numpy as np
import torch.nn as nn
def fanin_init(size, fanin=None):
fanin = fanin or size[0]
v = 1.0 / np.sqrt(fanin)
return torch.Tensor(size).uniform_(-v, v)
class Actor(nn.Module):
def __init__(self, nb_states, nb_actions, hidden1=256, hidden2=128,
init_w=0.003):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | ChangyWen/wolpertinger_ddpg | Actor | false | 13,468 | [
"MIT"
] | 46 | 23e1dcf19dd4bed3cc48f898122c3d57cfc296d3 | https://github.com/ChangyWen/wolpertinger_ddpg/tree/23e1dcf19dd4bed3cc48f898122c3d57cfc296d3 |
RNN | import torch
import torch.nn as nn
class RNN(nn.Module):
def __init__(self, input_size, hidden_size, output_size):
super(RNN, self).__init__()
self.hidden_size = hidden_size
self.i2h = nn.Linear(input_size + hidden_size, hidden_size)
self.i2o = nn.Linear(input_size + hidden_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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | khalilbalaree/Key-Smasher | RNN | false | 12,670 | [
"Apache-2.0"
] | 0 | 981bb1fd9b91e9a693dba8b1cd4ee7ea82409d14 | https://github.com/khalilbalaree/Key-Smasher/tree/981bb1fd9b91e9a693dba8b1cd4ee7ea82409d14 |
LayerNorm | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | Lhx94As/PHO-LID | LayerNorm | false | 5,523 | [
"MIT"
] | 1 | 44843b25b977dd6e0b77b520dbe3f2ff1ea633cd | https://github.com/Lhx94As/PHO-LID/tree/44843b25b977dd6e0b77b520dbe3f2ff1ea633cd |
Softmax | import torch
import torch.nn as nn
class Softmax(nn.Module):
def forward(self, x):
y = torch.exp(x)
return y / torch.sum(y, dim=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.triton_helpers import math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | awlange/pysurvival | Softmax | false | 14,934 | [
"Apache-2.0"
] | 242 | 841b9bc6ce700ba8898d2a1488aa9cd25ee7a8e6 | https://github.com/awlange/pysurvival/tree/841b9bc6ce700ba8898d2a1488aa9cd25ee7a8e6 |
Swish | # 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... | ANI717/effecientnet_b7_pneumonia | Swish | false | 4,758 | [
"MIT"
] | 1 | f8bf71c92bc1ae5a80b8e37b685bf314004001b3 | https://github.com/ANI717/effecientnet_b7_pneumonia/tree/f8bf71c92bc1ae5a80b8e37b685bf314004001b3 |
SSIM | # 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
... | shlomi-amitai/myDIFFNet | SSIM | false | 10,881 | [
"MIT"
] | 0 | 39dead457f10c82caae2a12ea152f2339188014c | https://github.com/shlomi-amitai/myDIFFNet/tree/39dead457f10c82caae2a12ea152f2339188014c |
MinibatchStdDev | # 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.utils.cpp_extension
assert_size_stride = torch._C._dynamo.guards.a... | STomoya/animeface | MinibatchStdDev | false | 15,346 | [
"MIT"
] | 61 | 37b3cd26097d7874559d4c152e41e5712b7a1a42 | https://github.com/STomoya/animeface/tree/37b3cd26097d7874559d4c152e41e5712b7a1a42 |
TotalVariation | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | JoanFM/kornia | TotalVariation | false | 11,558 | [
"ECL-2.0",
"Apache-2.0"
] | 0 | 808898887cde69074ca3e3df9b24dea9682aad90 | https://github.com/JoanFM/kornia/tree/808898887cde69074ca3e3df9b24dea9682aad90 |
DenseSAGEConv | import math
import torch
import torch.nn.functional as F
from torch.nn import Parameter
import torch.utils.data
def uniform(size, tensor):
bound = 1.0 / math.sqrt(size)
if tensor is not None:
tensor.data.uniform_(-bound, bound)
class DenseSAGEConv(torch.nn.Module):
"""See :class:`torch_geometric... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import math
from torch.nn imp... | cshjin/pytorch_geometric | DenseSAGEConv | false | 1,760 | [
"MIT"
] | 0 | 8dd0e76beb72135949a275edd851f80f7b97648f | https://github.com/cshjin/pytorch_geometric/tree/8dd0e76beb72135949a275edd851f80f7b97648f |
BCEDiceLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch ... | ciubecca/3dunet-cavity | BCEDiceLoss | false | 1,717 | [
"MIT"
] | 0 | cfcc827773b18a95d221ab86c1afc5e2f7c30ecb | https://github.com/ciubecca/3dunet-cavity/tree/cfcc827773b18a95d221ab86c1afc5e2f7c30ecb |
FastBiliner | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.a... | Perfec-Yu/Lifelong-ED | FastBiliner | false | 17,811 | [
"MIT"
] | 6 | f1af49129dd6ed4ff545f84e680565cccdb5b55a | https://github.com/Perfec-Yu/Lifelong-ED/tree/f1af49129dd6ed4ff545f84e680565cccdb5b55a |
G_t | # 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_... | HCShi/IONet | G_t | false | 18,361 | [
"MIT"
] | 4 | 42e3c0455a1ecb610f458e814d7310d685b2be7b | https://github.com/HCShi/IONet/tree/42e3c0455a1ecb610f458e814d7310d685b2be7b |
AGELU | import math
import torch
import torch.utils.data
import torch.cuda
import torch.utils.checkpoint
def agelu(x):
SQRT_M2_PI = math.sqrt(2 / math.pi)
COEFF = 0.044715
return 0.5 * x * (1.0 + torch.tanh(SQRT_M2_PI * (x + COEFF * torch.pow(
x, 3))))
class AGELU(torch.nn.Module):
def forward(self... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import math
import torch.utils.data
import torch.cuda
import torch.utils.checkp... | mullovc/NMTGMinor | AGELU | false | 4,035 | [
"MIT"
] | 0 | b1b7b1e018eaa0d99a43449655937cc050a29987 | https://github.com/mullovc/NMTGMinor/tree/b1b7b1e018eaa0d99a43449655937cc050a29987 |
TransposeLayer | # 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... | bolajiy/beer | TransposeLayer | false | 14,963 | [
"MIT"
] | 46 | 6fe968c7ca4864437890aa6bd705755c2580696e | https://github.com/bolajiy/beer/tree/6fe968c7ca4864437890aa6bd705755c2580696e |
BPRLoss | # 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
... | Ahren09/RecBole | BPRLoss | false | 1,912 | [
"MIT"
] | 0 | b3921818dfbc1b81f9eda8d5e9f05bc9d9114089 | https://github.com/Ahren09/RecBole/tree/b3921818dfbc1b81f9eda8d5e9f05bc9d9114089 |
SimpleNet | import torch
import torch.nn as nn
import torch.nn.functional as F
class SimpleNet(nn.Module):
def __init__(self, ni):
super().__init__()
self.linear1 = nn.Linear(ni, 128)
self.linear2 = nn.Linear(128, 128)
self.linear3 = nn.Linear(128, 64)
self.linear4 = nn.Linear(64, 64)... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | P403n1x87/AI-Feynman | SimpleNet | false | 2,710 | [
"MIT"
] | 0 | 73398ad1b739d02b4cb8d9648b208e76d0a9085d | https://github.com/P403n1x87/AI-Feynman/tree/73398ad1b739d02b4cb8d9648b208e76d0a9085d |
ComplexConv2d | # 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.data
import torch.onnx.operators
import... | IIP-Sogang/Audio-Visual-Speech-Recognition | ComplexConv2d | false | 17,452 | [
"MIT"
] | 9 | bd03be91135acbc6162b83092d462b7fe71dd007 | https://github.com/IIP-Sogang/Audio-Visual-Speech-Recognition/tree/bd03be91135acbc6162b83092d462b7fe71dd007 |
BatchLinear | # 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 re
import warnings
from torch import nn
from collections import OrderedDi... | Timothy102/light-field-networks | BatchLinear | false | 14,507 | [
"MIT"
] | 95 | 0d2d6099ea1df4332b173fab47e5606d579b4293 | https://github.com/Timothy102/light-field-networks/tree/0d2d6099ea1df4332b173fab47e5606d579b4293 |
CrossEntropyLossWithAuxiliary | # 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
... | dani3l125/torchprune | CrossEntropyLossWithAuxiliary | false | 15,110 | [
"MIT"
] | 74 | f2589ec7514bd531ddaa7da3aed6388bb13712d3 | https://github.com/dani3l125/torchprune/tree/f2589ec7514bd531ddaa7da3aed6388bb13712d3 |
Policy | import torch
import torch.nn as nn
import torch.nn.functional as F
class Policy(nn.Module):
"""
implements both actor and critic in one model
"""
def __init__(self):
super(Policy, self).__init__()
self.affine1 = nn.Linear(4, 128)
self.action_head = nn.Linear(128, 2)
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
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | caimingxue/Reinforcement-Learning | Policy | false | 6,376 | [
"MIT"
] | 1 | 5ccb8a6a25b41526f4d6195e69964245abc46d38 | https://github.com/caimingxue/Reinforcement-Learning/tree/5ccb8a6a25b41526f4d6195e69964245abc46d38 |
ScaleNorm | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
assert_... | antofuller/configaformers | ScaleNorm | false | 14,876 | [
"Apache-2.0"
] | 51 | 293253cd35d96c8a24c4004ba3d24fc6dc85a260 | https://github.com/antofuller/configaformers/tree/293253cd35d96c8a24c4004ba3d24fc6dc85a260 |
SimpleCNN | # 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
assert_size_stride = torch._C... | Cuilie/Collect-feature-maps | SimpleCNN | false | 5,078 | [
"MIT"
] | 1 | 32e8ac59690837f2a299ab6d4c11b98f5d3d721a | https://github.com/Cuilie/Collect-feature-maps/tree/32e8ac59690837f2a299ab6d4c11b98f5d3d721a |
Critic | import torch
import numpy as np
import torch.nn.functional as F
import torch.nn as nn
def hidden_init(layer):
fan_in = layer.weight.data.size()[0]
lim = 1.0 / np.sqrt(fan_in)
return -lim, lim
class Critic(nn.Module):
"""Critic (Value) Model."""
def __init__(self, state_size, action_size, seed, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import numpy as np
import tor... | BenKang34/deep-reinforcement-learning-nanodegree | Critic | false | 151 | [
"MIT"
] | 0 | 17c9007f757dfb1217c869fdee51798c4a21ba92 | https://github.com/BenKang34/deep-reinforcement-learning-nanodegree/tree/17c9007f757dfb1217c869fdee51798c4a21ba92 |
BertOutAttention | from _paritybench_helpers import _mock_config
import math
import torch
import torch.nn as nn
class BertOutAttention(nn.Module):
def __init__(self, config, ctx_dim=None):
super().__init__()
if config.hidden_size % config.num_attention_heads != 0:
raise ValueError(
'The ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | chanhee-luke/Recurrent-VLN-BERT | BertOutAttention | false | 11,135 | [
"MIT"
] | 0 | 31db5e02efb0a4685df22949ac4643a9e37ed26a | https://github.com/chanhee-luke/Recurrent-VLN-BERT/tree/31db5e02efb0a4685df22949ac4643a9e37ed26a |
SP | # 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.... | Capetian/FaceX-Zoo | SP | false | 4,967 | [
"Apache-2.0"
] | 1 | 029786c40d8aba15d891d33973de25fcd7e5399a | https://github.com/Capetian/FaceX-Zoo/tree/029786c40d8aba15d891d33973de25fcd7e5399a |
Scale | import torch
from torch import nn
from torch.nn import *
class Scale(nn.Module):
def __init__(self, scale):
super().__init__()
self.scale = scale
def forward(self, x):
return x * self.scale
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
from torch.nn import *
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._d... | kcorder/autonomous-learning-library | Scale | false | 15,780 | [
"MIT"
] | 584 | 0266195fa47564e51a32087bc007bff6dda5e263 | https://github.com/kcorder/autonomous-learning-library/tree/0266195fa47564e51a32087bc007bff6dda5e263 |
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.triton_helpers import libdevice
import torch.nn as ... | glee1228/segment_temporal_context_aggregation | Attention | false | 6,749 | [
"Apache-2.0"
] | 1 | e5778f848f1cfd89bd1f77beb5e1b38a66a2f13d | https://github.com/glee1228/segment_temporal_context_aggregation/tree/e5778f848f1cfd89bd1f77beb5e1b38a66a2f13d |
ImageEncoderV4 | import torch
from torch import nn
import torch.nn.functional as F
class ImageEncoderV4(nn.Module):
"""
Outputs a 5 x 5 x 32 feature map that preserves spatial information.
"""
def __init__(self, input_channels=3, init_scale=1.0, no_weight_init=
False, init_method='ortho', activation='relu'):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | KH-Kyle/rmp_nav | ImageEncoderV4 | false | 8,454 | [
"MIT"
] | 30 | d598fe70664a4cdc0e9b9dd4b52e84aa3de1b551 | https://github.com/KH-Kyle/rmp_nav/tree/d598fe70664a4cdc0e9b9dd4b52e84aa3de1b551 |
LinearLR | import torch
import torch.nn as nn
import torch.utils.checkpoint
class LinearLR(nn.Module):
"""[u * v + res] version of torch.nn.Linear"""
def __init__(self, in_features, out_features, rank_ratio=0.25, bias=
True, device=None, dtype=None):
super().__init__()
sliced_rank = int(min(in_f... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.checkpoint
assert_size_stride = torch._... | bahducoup/factorized_training | LinearLR | false | 12,152 | [
"MIT"
] | 0 | 0af38f16338a9bcfcc11091b1a6b75befd67f234 | https://github.com/bahducoup/factorized_training/tree/0af38f16338a9bcfcc11091b1a6b75befd67f234 |
HardSigmoid | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | klaudiapalasz/torchlayers | HardSigmoid | false | 15,839 | [
"MIT"
] | 573 | e6edd8797875325b7c0539d75a12f0d51f494127 | https://github.com/klaudiapalasz/torchlayers/tree/e6edd8797875325b7c0539d75a12f0d51f494127 |
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... | Hiroki9759/HandyRL | Head | false | 5,324 | [
"MIT"
] | 1 | 7d4dc869ba2f657d65fc461be4bed2d90dd0343b | https://github.com/Hiroki9759/HandyRL/tree/7d4dc869ba2f657d65fc461be4bed2d90dd0343b |
PTLogreg | import torch
import torch.nn as nn
class PTLogreg(nn.Module):
def __init__(self, D, C):
"""Arguments:
- D: dimensions of each datapoint
- C: number of classes
"""
super(PTLogreg, self).__init__()
self.W = torch.nn.Parameter(torch.zeros(D, C))
self.b =... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | EduardEdiJerkovic/deeplearning | PTLogreg | false | 8,995 | [
"MIT"
] | 0 | 0493b26ca153f93f41e8de930e16df658fb01a56 | https://github.com/EduardEdiJerkovic/deeplearning/tree/0493b26ca153f93f41e8de930e16df658fb01a56 |
Biaffine | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data.dataloader
import torch.nn
assert_size_stride = torch._C... | ParikhKadam/flair | Biaffine | false | 14,145 | [
"MIT"
] | 7,539 | a1732bc5ab0b4aeb09d1ed3a630ae2fd8fa095ef | https://github.com/ParikhKadam/flair/tree/a1732bc5ab0b4aeb09d1ed3a630ae2fd8fa095ef |
PAM_Module | from torch.nn import Module
import torch
from math import sqrt as sqrt
from itertools import product as product
from torch.nn import Conv2d
from torch.nn import Parameter
from torch.nn import Softmax
from torch.nn.modules.module import Module
class PAM_Module(Module):
""" Position attention module"""
def __i... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | gpdsec/HSD | PAM_Module | false | 15,471 | [
"MIT"
] | 58 | 8abcf78db5f313266a3bb3f85b9424927fe59a2d | https://github.com/gpdsec/HSD/tree/8abcf78db5f313266a3bb3f85b9424927fe59a2d |
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.... | MinkiJ/SnaTCHer | ScaledDotProductAttention | false | 8,564 | [
"MIT"
] | 12 | 335c42469f0a7ad72c5c3480c8effc8c293823e0 | https://github.com/MinkiJ/SnaTCHer/tree/335c42469f0a7ad72c5c3480c8effc8c293823e0 |
SoftmaxFocalClassificationLoss | # 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
... | collector-m/BtcDet | SoftmaxFocalClassificationLoss | false | 15,062 | [
"Apache-2.0"
] | 108 | 80bee34f2f40931600f812a6edbcb27e51cb7ec3 | https://github.com/collector-m/BtcDet/tree/80bee34f2f40931600f812a6edbcb27e51cb7ec3 |
SimpleCNN | import torch
import torch.nn as nn
import torch.nn.functional as F
class SimpleCNN(nn.Module):
def __init__(self):
super(SimpleCNN, self).__init__()
self.fc1 = nn.Linear(28 * 28, 500)
self.fc2 = nn.Linear(500, 256)
self.fc3 = nn.Linear(256, 10)
def forward(self, x):
x... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | AnweshCR7/just-some-crypto-fun | SimpleCNN | false | 16,945 | [
"MIT"
] | 4 | e614cd9f46e355272aec37df7a7cc90a589c993a | https://github.com/AnweshCR7/just-some-crypto-fun/tree/e614cd9f46e355272aec37df7a7cc90a589c993a |
Softsign | import torch
import torch.onnx
import torch.nn as nn
class Softsign(nn.Module):
def forward(self, x):
return torch.nn.Softsign()(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 math as tl_math
import torch.onnx
import torch.nn as nn
assert_size_stride = torch._C._dy... | mil-tokyo/webdnn | Softsign | false | 16,082 | [
"MIT"
] | 1,967 | 38a60fd3e1a4e72bc01108189a3aa51e0752aecd | https://github.com/mil-tokyo/webdnn/tree/38a60fd3e1a4e72bc01108189a3aa51e0752aecd |
JointsMSELoss | import torch
import torch.nn as nn
import torch._utils
import torch.utils.data
import torch.utils.data.distributed
import torch.nn.parallel
import torch.optim
class JointsMSELoss(nn.Module):
def __init__(self, use_target_weight):
super(JointsMSELoss, self).__init__()
self.criterion = nn.MSELoss()... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch._utils
import torch.utils.data
import torch.utils.data.distributed
import torch.nn.parallel
import torch.... | fsImageries/video-to-pose3D | JointsMSELoss | false | 10,182 | [
"MIT"
] | 0 | 098c87ce19dc3331da03e6eac0b9744684eb66f6 | https://github.com/fsImageries/video-to-pose3D/tree/098c87ce19dc3331da03e6eac0b9744684eb66f6 |
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
from torch._inductor.runtime.... | AlexMeinke/serverless-hosting-of-image-captioning | Attention | false | 11,174 | [
"MIT"
] | 0 | 2b539561ac600e6a502ac4ecb25948a50e26cc54 | https://github.com/AlexMeinke/serverless-hosting-of-image-captioning/tree/2b539561ac600e6a502ac4ecb25948a50e26cc54 |
TwoLayerFCBodyWithAction | import torch
import torch.nn as nn
import torch.nn.functional as F
def layer_init(layer, w_scale=1.0):
nn.init.orthogonal_(layer.weight.data)
layer.weight.data.mul_(w_scale)
nn.init.constant_(layer.bias.data, 0)
return layer
class TwoLayerFCBodyWithAction(nn.Module):
def __init__(self, state_di... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | Sohojoe/UdacityDeepRL-Project2 | TwoLayerFCBodyWithAction | false | 5,854 | [
"MIT"
] | 1 | 7137eea0b606ea32d00424d23130ff213f03ecf1 | https://github.com/Sohojoe/UdacityDeepRL-Project2/tree/7137eea0b606ea32d00424d23130ff213f03ecf1 |
MINCNet | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.utils.data
impor... | KwanWaiPang/BasicSR | MINCNet | false | 17,607 | [
"Apache-2.0"
] | 5 | b48db3f962beca806f70388be759889620257112 | https://github.com/KwanWaiPang/BasicSR/tree/b48db3f962beca806f70388be759889620257112 |
BERTOutput | from _paritybench_helpers import _mock_config
import copy
import math
import torch
import torch.nn as nn
def gelu(x):
"""Implementation of the gelu activation function.
For information: OpenAI GPT's gelu is slightly different (and gives slightly different results):
0.5 * x * (1 + torch.tanh(math.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
import copy
import ... | Chriskuei/FedMatch | BERTOutput | false | 18,363 | [
"Apache-2.0"
] | 4 | 305e8c4bbb398712b00c883a986dfec17b500f76 | https://github.com/Chriskuei/FedMatch/tree/305e8c4bbb398712b00c883a986dfec17b500f76 |
SimpleMaxModule | import torch
import torch.jit
import torch.onnx
import torch.nn
class SimpleMaxModule(torch.nn.Module):
def __init__(self):
super(SimpleMaxModule, self).__init__()
def forward(self, a, b):
return torch.max(a + a, b + b)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4,... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.... | opti-mix/glow | SimpleMaxModule | false | 7,396 | [
"Apache-2.0"
] | 1 | 4ba074df5da9822986a23a6679ab592c22660f6d | https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d |
FastRNNCell | # 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 ... | adityakusupati/EdgeML | FastRNNCell | false | 3,032 | [
"MIT"
] | 0 | 65933a6fdfc38945f4311043a62e120784b2b0bf | https://github.com/adityakusupati/EdgeML/tree/65933a6fdfc38945f4311043a62e120784b2b0bf |
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.... | Shengqiang-Zhang/self-attentive-parser | ScaledDotProductAttention | false | 2,826 | [
"MIT"
] | 0 | 493f74c7acab9824d593f55d231754c5ac7cbb26 | https://github.com/Shengqiang-Zhang/self-attentive-parser/tree/493f74c7acab9824d593f55d231754c5ac7cbb26 |
SEModule | import torch
import torch.nn as nn
class SEModule(nn.Module):
def __init__(self, channels, reduction):
super(SEModule, self).__init__()
self.avg_pool = nn.AdaptiveAvgPool2d(1)
self.fc1 = nn.Conv2d(channels, channels // reduction, kernel_size=1,
padding=0)
self.relu = n... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | ChrisLiu007/Pytorch-Code-Template | SEModule | false | 5,008 | [
"MIT"
] | 1 | 25eae3ffe43f60a4f7e06651e3a3cd5d0b69b9ae | https://github.com/ChrisLiu007/Pytorch-Code-Template/tree/25eae3ffe43f60a4f7e06651e3a3cd5d0b69b9ae |
TwoLayerFCBodyWithAction | # 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.nn import function... | Marianoetchart/DeepRL | TwoLayerFCBodyWithAction | false | 2,662 | [
"Apache-2.0"
] | 0 | 40d4825694c0890440859166de56701fc1f61d5b | https://github.com/Marianoetchart/DeepRL/tree/40d4825694c0890440859166de56701fc1f61d5b |
SmallConvNet | import torch
import torch.nn as nn
from numpy import prod
class SmallConvNet(nn.Module):
"""
A network with three conv layers. This is used for testing convolution
layers for activation count.
"""
def __init__(self, input_dim: 'int') ->None:
super(SmallConvNet, self).__init__()
co... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from numpy import prod
assert_size_stride = torch._C._dyna... | Jennifer-Rigdon/fvcore | SmallConvNet | false | 5,391 | [
"Apache-2.0"
] | 1 | 7e800a86f2df93da017e07380543b4060ab88c94 | https://github.com/Jennifer-Rigdon/fvcore/tree/7e800a86f2df93da017e07380543b4060ab88c94 |
SpatialCrossMapLRN | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dy... | BigFishMaster/tnt | SpatialCrossMapLRN | false | 17,162 | [
"BSD-3-Clause"
] | 3 | 8b80bb3b194eb87ac18924428ef0924c2fb263c5 | https://github.com/BigFishMaster/tnt/tree/8b80bb3b194eb87ac18924428ef0924c2fb263c5 |
SiLU | # 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... | AranKomat/Diff-DALLE | SiLU | false | 13,266 | [
"MIT"
] | 53 | 9418e98e97b599c5c65f16ee168fedf76a29095f | https://github.com/AranKomat/Diff-DALLE/tree/9418e98e97b599c5c65f16ee168fedf76a29095f |
CoAttention | # 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.... | fmetze/nmtpytorch | CoAttention | false | 12,383 | [
"MIT"
] | 0 | 658a39a2c50e4e9e2fde69b520ddac7efc083257 | https://github.com/fmetze/nmtpytorch/tree/658a39a2c50e4e9e2fde69b520ddac7efc083257 |
ConvDenoiser | # 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.init
import t... | joydeba/autocount | ConvDenoiser | false | 3,791 | [
"MIT"
] | 0 | 52ddb47726fa34d5f54e2850dc6690b67c768728 | https://github.com/joydeba/autocount/tree/52ddb47726fa34d5f54e2850dc6690b67c768728 |
GlobalAttention | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data
class GlobalAttention(nn.Module):
"""
Global attention takes a matrix and a query vector. It
then computes a parameterized convex combination of the matrix
based on the input query.
Constructs a unit mapping a quer... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Fenkail/hgr_v2t | GlobalAttention | false | 13,690 | [
"MIT"
] | 190 | d8cc1c18cdaae54fd1878d6dc7b8e9c60d83fcbb | https://github.com/Fenkail/hgr_v2t/tree/d8cc1c18cdaae54fd1878d6dc7b8e9c60d83fcbb |
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
from torch.nn import functional as F
import torch.nn.parallel
asser... | Fanzhongjie/ARFE | AdaptiveAvgMaxPool2d | false | 437 | [
"Apache-2.0"
] | 0 | 4b96b8c5bc0895d3d30acec2a490f81a860fe860 | https://github.com/Fanzhongjie/ARFE/tree/4b96b8c5bc0895d3d30acec2a490f81a860fe860 |
NormedConv2d | import torch
from torch import nn
class NormedConv2d(nn.Conv2d):
"""Normalized Conv2d Layer.
Args:
tempeature (float, optional): Tempeature term. Default to 20.
power (int, optional): Power term. Default to 1.0.
eps (float, optional): The minimal value of divisor to
keep ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | CVPR2022-911/PPH | NormedConv2d | false | 8,986 | [
"Apache-2.0"
] | 0 | f066933525aaeef412b8d166ef167f00170b5428 | https://github.com/CVPR2022-911/PPH/tree/f066933525aaeef412b8d166ef167f00170b5428 |
Quaternion | import torch
import torch.nn as nn
import torch.utils.data
class Quaternion(nn.Module):
def __init__(self):
super(Quaternion, self).__init__()
def forward(self, rvec):
theta = torch.sqrt(1e-05 + torch.sum(rvec ** 2, dim=1))
rvec = rvec / theta[:, None]
return torch.stack((1.0... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dy... | zhuhao-nju/mofanerf | Quaternion | false | 16,824 | [
"MIT"
] | 55 | 0206526e25aab3dd8f0cc789f290c7559642676b | https://github.com/zhuhao-nju/mofanerf/tree/0206526e25aab3dd8f0cc789f290c7559642676b |
Tanh | import torch
import torch.nn as nn
class ActivationFunction(nn.Module):
def __init__(self):
super().__init__()
self.name = self.__class__.__name__
self.config = {'name': self.name}
class Tanh(ActivationFunction):
def forward(self, x):
x_exp, neg_x_exp = torch.exp(x), torch.... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | ashutoshml/lightning-tutorials | Tanh | false | 6,247 | [
"Apache-2.0"
] | 1 | 898b8b6f9852c0b80f034a3187bc1cd34dd521ce | https://github.com/ashutoshml/lightning-tutorials/tree/898b8b6f9852c0b80f034a3187bc1cd34dd521ce |
BertSelfAttention | # 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.... | BIT-ENGD/eeqa | BertSelfAttention | false | 15,834 | [
"MIT"
] | 142 | 2995abbaff1fb47131246a247ee7ed62aa94f4c3 | https://github.com/BIT-ENGD/eeqa/tree/2995abbaff1fb47131246a247ee7ed62aa94f4c3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.