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 |
|---|---|---|---|---|---|---|---|---|---|---|
PolynomialEnvelope | # 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... | RolnickLab/ocp | PolynomialEnvelope | false | 2,770 | [
"MIT"
] | 0 | e120c3b90203a46f5fc7626f0b5c8979e4944765 | https://github.com/RolnickLab/ocp/tree/e120c3b90203a46f5fc7626f0b5c8979e4944765 |
CDCM | import torch
import torch.nn as nn
class CDCM(nn.Module):
"""
Compact Dilation Convolution based Module
"""
def __init__(self, in_channels, out_channels):
super(CDCM, self).__init__()
self.relu1 = nn.ReLU()
self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=1,
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | mgpadalkar/pidinet | CDCM | false | 16,037 | [
"MIT"
] | 137 | 781924fe30469cdc64f63ce6666a3e1f5b4e576f | https://github.com/mgpadalkar/pidinet/tree/781924fe30469cdc64f63ce6666a3e1f5b4e576f |
Tanh | import torch
import torch.nn as nn
class Tanh(nn.Module):
"""
https://arxiv.org/abs/1710.05941
The hype was so huge that I could not help but try it
"""
def __init__(self):
super(Tanh, self).__init__()
def forward(self, x):
return torch.tanh(x)
def get_inputs():
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | dustlrdk/noise2self | Tanh | false | 3,442 | [
"MIT"
] | 0 | 46e8c4650f7ec4f664448417fecd39b4cae477f7 | https://github.com/dustlrdk/noise2self/tree/46e8c4650f7ec4f664448417fecd39b4cae477f7 |
sSEmodule | # 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... | HwangJohn/feature_representation | sSEmodule | false | 2,355 | [
"MIT"
] | 0 | 27389caacc9c026b65f47ab0cbb4e6d0465e6a60 | https://github.com/HwangJohn/feature_representation/tree/27389caacc9c026b65f47ab0cbb4e6d0465e6a60 |
RobertaClassificationHead | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
class RobertaClassificationHead(nn.Module):
"""Head for sentence-level classification tasks."""
def __init__(self, config):
super().__init__()
self.dense = nn.Linear(config.hidden_size * 2, config.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
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | kamranazmat/CodeBERT | RobertaClassificationHead | false | 12,648 | [
"MIT"
] | 0 | 109c1b58b96c61314a76563c6bd686bb09f86eab | https://github.com/kamranazmat/CodeBERT/tree/109c1b58b96c61314a76563c6bd686bb09f86eab |
MuNet | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | ChangQingAAS/Deep-Reinforcement-Learning | MuNet | false | 237 | [
"MIT"
] | 0 | 3bc1381c632b1730a48e63e972aea62086c4287c | https://github.com/ChangQingAAS/Deep-Reinforcement-Learning/tree/3bc1381c632b1730a48e63e972aea62086c4287c |
SimpleModel | import torch
import torch.cuda
from torch.nn.functional import *
class SimpleModel(torch.nn.Module):
def __init__(self, hidden_dim, empty_grad=False, rank=0):
super(SimpleModel, self).__init__()
self.linear = torch.nn.Linear(hidden_dim, hidden_dim)
if empty_grad:
self.linear2 ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | bratao/DeepSpeed | SimpleModel | false | 6,359 | [
"MIT"
] | 1 | c50d8955e942e5e26cf81835d59ec3f20ef8540d | https://github.com/bratao/DeepSpeed/tree/c50d8955e942e5e26cf81835d59ec3f20ef8540d |
SmallAdversarialNetwork | import torch
import torch.utils.data
import torch
import torch.nn as nn
class SmallAdversarialNetwork(nn.Module):
def __init__(self, in_feature):
super(SmallAdversarialNetwork, self).__init__()
self.ad_layer1 = nn.Linear(in_feature, 64)
self.ad_layer2 = nn.Linear(64, 1)
self.relu1... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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
import torch.nn as nn
assert_size_stride = ... | FigaroK/pytorch-CycleGAN-and-pix2pix | SmallAdversarialNetwork | false | 9,065 | [
"BSD-3-Clause"
] | 0 | 74407363baf4626782398040e34a342e20915d41 | https://github.com/FigaroK/pytorch-CycleGAN-and-pix2pix/tree/74407363baf4626782398040e34a342e20915d41 |
DataEmbedding_wo_pos | import math
import torch
import torch.nn as nn
class PositionalEmbedding(nn.Module):
def __init__(self, d_model, max_len=5000):
super(PositionalEmbedding, self).__init__()
pe = torch.zeros(max_len, d_model).float()
pe.require_grad = False
position = torch.arange(0, max_len).float(... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | MAZiqing/FEDformer | DataEmbedding_wo_pos | false | 17,657 | [
"MIT"
] | 7 | 7914d39df829494a8172afb9676982c3789d491d | https://github.com/MAZiqing/FEDformer/tree/7914d39df829494a8172afb9676982c3789d491d |
InnerProductModel | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
reinterpret... | Yufei-Kang/plato | InnerProductModel | false | 1,293 | [
"Apache-2.0"
] | 0 | 16b170698242b1e11677e80229c3439a9e26965a | https://github.com/Yufei-Kang/plato/tree/16b170698242b1e11677e80229c3439a9e26965a |
DownSampleConv | import torch
import torch.nn as nn
class DownSampleConv(nn.Module):
def __init__(self, in_feature, out_feature, kernel):
super(DownSampleConv, self).__init__()
self.conv = nn.Conv1d(in_feature, out_feature, kernel_size=kernel,
stride=2, padding=kernel // 2, groups=in_feature)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | alexchartrand/IoT | DownSampleConv | false | 1,411 | [
"MIT"
] | 0 | 2cc0d40b7f8305b9f82fc83ad4ed55c83efa1bfd | https://github.com/alexchartrand/IoT/tree/2cc0d40b7f8305b9f82fc83ad4ed55c83efa1bfd |
SmallDecoder3_16x | # 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.... | EndyWon/Texture-Reformer | SmallDecoder3_16x | false | 8,148 | [
"MIT"
] | 11 | f84f95accb3574c7b759a7f03c0b0b4e150314b5 | https://github.com/EndyWon/Texture-Reformer/tree/f84f95accb3574c7b759a7f03c0b0b4e150314b5 |
ReinforcedReceiver | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.nn.parallel
import torch.utils.data
import to... | cjlovering/EGG | ReinforcedReceiver | false | 10,061 | [
"MIT"
] | 0 | cce146e035decbc410e981f8bc7ada32979f3b6d | https://github.com/cjlovering/EGG/tree/cce146e035decbc410e981f8bc7ada32979f3b6d |
Unet | import torch
import torch.utils.data
import torch
import torch.nn as nn
import torch.nn.functional as F
class conv_bn_relu(nn.Module):
def __init__(self, in_channel, out_channel, stride=1, has_relu=True):
super(conv_bn_relu, self).__init__()
self.conv = nn.Conv2d(in_channel, out_channel, 3, strid... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | SeanChenxy/GAN_RS | Unet | false | 8,807 | [
"BSD-3-Clause"
] | 17 | a1786b946caf7bd24c83cea4c7a9bb74445cc381 | https://github.com/SeanChenxy/GAN_RS/tree/a1786b946caf7bd24c83cea4c7a9bb74445cc381 |
StructuredAttention_bi | import torch
import torch.nn as nn
import torch.nn.functional as F
class StructuredAttention_bi(nn.Module):
def __init__(self, dropout=0.1, scale=100):
super(StructuredAttention_bi, self).__init__()
self.dropout = dropout
self.scale = scale
def forward(self, C, Q, c_mask, q_mask):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | vivekrajput566/03testing2022 | StructuredAttention_bi | false | 16,699 | [
"MIT"
] | 49 | f7e04f921c6607d383806ca2bbb85d2de84e0369 | https://github.com/vivekrajput566/03testing2022/tree/f7e04f921c6607d383806ca2bbb85d2de84e0369 |
Invertible1x1Conv | import torch
import torch.nn.functional as F
from torch.autograd import Variable
import torch.utils.data
class Invertible1x1Conv(torch.nn.Module):
"""
The layer outputs both the convolution, and the log determinant
of its weight matrix. If reverse=True it does convolution with
inverse
"""
de... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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.functional as F
from torch.autograd import Variable
import torch... | Moon-sung-woo/VAE_Tacotron_korean | Invertible1x1Conv | false | 2,676 | [
"BSD-3-Clause"
] | 0 | dafa4ea557235350211b7a2187da1d6855eb5e9f | https://github.com/Moon-sung-woo/VAE_Tacotron_korean/tree/dafa4ea557235350211b7a2187da1d6855eb5e9f |
SEModule | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
class FastAvgPool2d(nn.Module):
def __init__(self, flatten=False):
super(FastAvgPool2d, self).__init__()
self.flatten = flatten
def forward(self, x):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | ChangeTheWorld20191008/query2labels | SEModule | false | 2,145 | [
"MIT"
] | 0 | cdca1f3519f75cc91ef2aa166c2534691016f04f | https://github.com/ChangeTheWorld20191008/query2labels/tree/cdca1f3519f75cc91ef2aa166c2534691016f04f |
Cartesian | # 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 import nn
import torch.utils.data
import torch.utils.data.dist... | Samuel-van-Gurp/fastMRI | Cartesian | false | 2,863 | [
"MIT"
] | 0 | 0b1884a1c218961f81199144057ffcfde29a86ad | https://github.com/Samuel-van-Gurp/fastMRI/tree/0b1884a1c218961f81199144057ffcfde29a86ad |
FullSort | # 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 import nn
import torch.utils.data.distributed
assert_size_stride = torch._C._d... | rh-ia/color-information | FullSort | false | 4,283 | [
"MIT"
] | 0 | e912a1667e4fffb339dbc574c85020ec6cf78b02 | https://github.com/rh-ia/color-information/tree/e912a1667e4fffb339dbc574c85020ec6cf78b02 |
Attention | import torch
import torch.nn as nn
class Attention(nn.Module):
def __init__(self, num_channels, embed_size, dropout=True):
"""Stacked attention Module
"""
super(Attention, self).__init__()
self.ff_image = nn.Linear(embed_size, num_channels)
self.ff_questions = nn.Linear(em... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | ahmed563/Group14_Project_DLSpring2021 | Attention | false | 3,050 | [
"MIT"
] | 0 | d2b03555cadb483ae472b613f107173f89c07d9b | https://github.com/ahmed563/Group14_Project_DLSpring2021/tree/d2b03555cadb483ae472b613f107173f89c07d9b |
GCNLayer | # 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_... | snap-stanford/distance-encoding | GCNLayer | false | 16,490 | [
"MIT"
] | 177 | b9ccb1b59422b11b40883d0284d7fc9ba88efdb6 | https://github.com/snap-stanford/distance-encoding/tree/b9ccb1b59422b11b40883d0284d7fc9ba88efdb6 |
PositionalEmbedding | import torch
import torch.nn as nn
class PositionalEmbedding(nn.Module):
def __init__(self, n_model, max_len=1024):
super().__init__()
self.embed = nn.Embedding(max_len, n_model)
self.reset_parameters()
@torch.no_grad()
def reset_parameters(self):
w = self.embed.weight
... | 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... | yzhangcs/parser | PositionalEmbedding | false | 16,787 | [
"MIT"
] | 439 | 3abebde1c9fe0bf2e99adce845aaf2a04b194f8a | https://github.com/yzhangcs/parser/tree/3abebde1c9fe0bf2e99adce845aaf2a04b194f8a |
GCN | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | DongHande/PT_propagation_then_training | GCN | false | 7,996 | [
"MIT"
] | 21 | 3f346ff161d2a0b807e3c0269ad26a7266305cc3 | https://github.com/DongHande/PT_propagation_then_training/tree/3f346ff161d2a0b807e3c0269ad26a7266305cc3 |
PositionwiseFeedForward | import torch
from torch import nn as nn
import torch.utils.data.distributed
def get_activation_function(activation: 'str') ->nn.Module:
"""
Gets an activation function module given the name of the activation.
:param activation: The name of the activation function.
:return: The activation function mod... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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 as nn
import torch.utils.data.distributed
assert_size_strid... | MatthewMasters/grover | PositionwiseFeedForward | false | 825 | [
"MIT"
] | 0 | 737a340754bc4c63134ef84019a0a84023fd69a3 | https://github.com/MatthewMasters/grover/tree/737a340754bc4c63134ef84019a0a84023fd69a3 |
LandmarkHead | # 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 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 |
Conv2d | # 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 ... | JassiGhuman/backgroundSubtraction | Conv2d | false | 11,544 | [
"MIT"
] | 0 | 351a380b34f9d84548bea734a69842227e373e65 | https://github.com/JassiGhuman/backgroundSubtraction/tree/351a380b34f9d84548bea734a69842227e373e65 |
DiscriminatorLoss | # 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 ... | akanametov/pathgan | DiscriminatorLoss | false | 18,296 | [
"MIT"
] | 8 | d93464a9c2490532afdf7bbc0f60decdf2d0767d | https://github.com/akanametov/pathgan/tree/d93464a9c2490532afdf7bbc0f60decdf2d0767d |
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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | EKami/EzeeML | TVLoss | false | 8,055 | [
"MIT"
] | 35 | 21753a0ede7cc1dc675a2dcd09b6306cea2cad56 | https://github.com/EKami/EzeeML/tree/21753a0ede7cc1dc675a2dcd09b6306cea2cad56 |
FocalLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torc... | OctThe16th/COMP-652-FinalProject | FocalLoss | false | 2,712 | [
"MIT"
] | 0 | 00b8a2328516d8ca76d365004c753a91cc426b30 | https://github.com/OctThe16th/COMP-652-FinalProject/tree/00b8a2328516d8ca76d365004c753a91cc426b30 |
_ImpalaCNN | # 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 typing import Tuple
from... | nrfulton/vsrl-framework | _ImpalaCNN | false | 7,445 | [
"MIT"
] | 1 | c778824b3285e3e994a4c5846c7b1c2ac03c669b | https://github.com/nrfulton/vsrl-framework/tree/c778824b3285e3e994a4c5846c7b1c2ac03c669b |
FeatureAssembler | import torch
from typing import Optional
import torch.nn as nn
class FeatureAssembler(nn.Module):
def __init__(self, T: 'int', embed_static: 'Optional[FeatureEmbedder]'=
None, embed_dynamic: 'Optional[FeatureEmbedder]'=None) ->None:
super().__init__()
self.T = T
self.embeddings = ... | 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 typing import Optional
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch... | ZhuangweiKang/pytorch-ts | FeatureAssembler | false | 2,991 | [
"Apache-2.0",
"MIT"
] | 0 | 076d456358fd1bac96becba4f1ba38ec5a5fcf4d | https://github.com/ZhuangweiKang/pytorch-ts/tree/076d456358fd1bac96becba4f1ba38ec5a5fcf4d |
ActFirstResBlock | import torch
import torch.nn.functional as F
from torch import nn
class AdaptiveInstanceNorm2d(nn.Module):
def __init__(self, num_features, eps=1e-05, momentum=0.1):
super(AdaptiveInstanceNorm2d, self).__init__()
self.num_features = num_features
self.eps = eps
self.momentum = mome... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | belphegor2211/KLTN_GANwriting | ActFirstResBlock | false | 3,207 | [
"MIT"
] | 0 | 67d4d5c286ec45ef704b49c5abf9774d38bf65eb | https://github.com/belphegor2211/KLTN_GANwriting/tree/67d4d5c286ec45ef704b49c5abf9774d38bf65eb |
CnnQAHead | import torch
from torch import nn
class CnnQAHead(nn.Module):
def __init__(self, input_size):
super().__init__()
self.conv_1 = nn.Conv1d(in_channels=input_size, out_channels=2,
kernel_size=1, padding=0)
self.conv_3 = nn.Conv1d(in_channels=input_size, out_channels=2,
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | park-sungmoo/odqa_baseline_code | CnnQAHead | false | 16,238 | [
"Apache-2.0"
] | 67 | 45954be766e5f987bef18e5b8a2e47f1508742cd | https://github.com/park-sungmoo/odqa_baseline_code/tree/45954be766e5f987bef18e5b8a2e47f1508742cd |
NeighborNormLayer | # 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... | bokutotu/cgnet | NeighborNormLayer | false | 1,563 | [
"BSD-3-Clause"
] | 0 | a35170001d969d51548dd01522b1ab93e43741b4 | https://github.com/bokutotu/cgnet/tree/a35170001d969d51548dd01522b1ab93e43741b4 |
ActionScoring | # 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... | IMNearth/Curriculum-Learning-For-VLN | ActionScoring | false | 17,475 | [
"MIT"
] | 8 | d2fe1286eb295dc8c63a0c886b35883f32481d85 | https://github.com/IMNearth/Curriculum-Learning-For-VLN/tree/d2fe1286eb295dc8c63a0c886b35883f32481d85 |
TransformerNet | import torch
import numpy as np
import torch.nn as nn
class ConvLayer(torch.nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride):
super(ConvLayer, self).__init__()
reflection_padding = int(np.floor(kernel_size / 2))
self.reflection_pad = nn.ReflectionPad2d(reflec... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | ImageProcessingCentraleLille2021/fast-neural-style | TransformerNet | false | 13,926 | [
"MIT"
] | 350 | e77456c35c2a49f90227119d158828a0964c7e13 | https://github.com/ImageProcessingCentraleLille2021/fast-neural-style/tree/e77456c35c2a49f90227119d158828a0964c7e13 |
GCN | import math
import torch
import torch.nn as nn
from torch.nn import functional as F
class GraphConvLayer(nn.Module):
""" A Graph Convolution Layer as per https://arxiv.org/pdf/1609.02907.pdf with Glorot initialisation """
def __init__(self, in_features: 'int', out_filters: 'int',
dropout_ratio: 'floa... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import math
import torch.nn a... | alecokas/swahili-text-gcn | GCN | false | 18,265 | [
"MIT"
] | 4 | 14b8196b30baac2a05c869a1f6c17a912d1adcea | https://github.com/alecokas/swahili-text-gcn/tree/14b8196b30baac2a05c869a1f6c17a912d1adcea |
StableBCELoss | # 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
assert_size_stride = t... | KeremTurgutlu/fast-kaggle | StableBCELoss | false | 17,533 | [
"Apache-2.0"
] | 8 | 0ea341b44a58da2dfb606a0ae32bac166985b49e | https://github.com/KeremTurgutlu/fast-kaggle/tree/0ea341b44a58da2dfb606a0ae32bac166985b49e |
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 ... | Shenzhen-Cloudatawalk-Technology-Co-Ltd/EdgeML | FastRNNCell | false | 14,414 | [
"MIT"
] | 719 | ef9f8a77f096acbdeb941014791f8eda1c1bc35b | https://github.com/Shenzhen-Cloudatawalk-Technology-Co-Ltd/EdgeML/tree/ef9f8a77f096acbdeb941014791f8eda1c1bc35b |
Loss | import math
import torch
import torch.nn as nn
class Loss(nn.Module):
def __init__(self, device, type_in='pred_intervals', alpha=0.1,
loss_type='qd_soft', censor_R=False, soften=100.0, lambda_in=10.0,
sigma_in=0.5):
super().__init__()
self.alpha = alpha
self.lambda_in = la... | 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
... | Neronjust2017/pytorch-classification-project | Loss | false | 888 | [
"MIT"
] | 0 | fc5f4d7c46d071765f682ce20e6580646d4e5c76 | https://github.com/Neronjust2017/pytorch-classification-project/tree/fc5f4d7c46d071765f682ce20e6580646d4e5c76 |
ComplexMul | # 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... | Rikorose/DeepFilterNet | ComplexMul | false | 14,313 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 54 | afe6bfb53efae70207e18df7ed372c2cfe337fee | https://github.com/Rikorose/DeepFilterNet/tree/afe6bfb53efae70207e18df7ed372c2cfe337fee |
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.... | ROCmSoftwarePlatform/translate | MultiheadAttention | false | 984 | [
"BSD-3-Clause"
] | 0 | 32a6380d914ebe1a6c38c4992aac9600ed3d9810 | https://github.com/ROCmSoftwarePlatform/translate/tree/32a6380d914ebe1a6c38c4992aac9600ed3d9810 |
ScaledLinear | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch im... | glynpu/icefall | ScaledLinear | false | 3,555 | [
"Apache-2.0"
] | 0 | d766dc5aeea1a8aefab033e581948b07c4ac4bc0 | https://github.com/glynpu/icefall/tree/d766dc5aeea1a8aefab033e581948b07c4ac4bc0 |
Netleaky | # 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_... | gautam-sharma1/openRL | Netleaky | false | 6,721 | [
"MIT"
] | 1 | 14310a97a328fe5682a01ee85d83a6b5e1ae29ca | https://github.com/gautam-sharma1/openRL/tree/14310a97a328fe5682a01ee85d83a6b5e1ae29ca |
ExpNormalSmearing | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import math
from torch import nn
assert_size_stride = torch._C._dynamo.gu... | lsnty5190/torchmd-net | ExpNormalSmearing | false | 15,964 | [
"MIT"
] | 51 | 0bedf43801f0c7d38900d8e1db778fe69f3a4d01 | https://github.com/lsnty5190/torchmd-net/tree/0bedf43801f0c7d38900d8e1db778fe69f3a4d01 |
PatchMerging | import torch
import torch.nn as nn
import torch.nn.functional as F
from math import sqrt
from torch import optim as optim
class PatchMerging(nn.Module):
"""Patch Merging Layer.
Args:
input_resolution (tuple[int]): Resolution of input feature.
dim (int): Number of input channels.
norm_... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | billpsomas/ibot | PatchMerging | false | 1,553 | [
"Apache-2.0"
] | 0 | c6fbce7e2a59780f39ad7304ed9a8b1acf038d2d | https://github.com/billpsomas/ibot/tree/c6fbce7e2a59780f39ad7304ed9a8b1acf038d2d |
GELU | import torch
import torch.nn as nn
class GELU(nn.Module):
def forward(self, x):
return torch.sigmoid(1.702 * x) * x
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | txsing/augmix | GELU | false | 4,462 | [
"Apache-2.0"
] | 0 | 9127809d8534ccb20a654f631833153e75a277fd | https://github.com/txsing/augmix/tree/9127809d8534ccb20a654f631833153e75a277fd |
RegularizedLinear | import torch
import torch.nn as nn
class RegularizedLinear(nn.Linear):
def __init__(self, *args, ar_weight=0.001, l1_weight=0.001, **kwargs):
super(RegularizedLinear, self).__init__(*args, **kwargs)
self.ar_weight = ar_weight
self.l1_weight = l1_weight
self._losses = {}
def f... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | dearkafka/inferno | RegularizedLinear | false | 1,818 | [
"Apache-2.0"
] | 0 | e9e3b863fd1fc97cf94d08ac6b4f8df7665f996a | https://github.com/dearkafka/inferno/tree/e9e3b863fd1fc97cf94d08ac6b4f8df7665f996a |
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.nn import functional as F
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cud... | grofit/traiNNer | TVLoss | false | 15,481 | [
"Apache-2.0"
] | 78 | 12d006fd44ed304e4178839c53b1f3d95ca25dcb | https://github.com/grofit/traiNNer/tree/12d006fd44ed304e4178839c53b1f3d95ca25dcb |
LSTM | # 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 ... | bernharl/CamelsML | LSTM | false | 3,215 | [
"Apache-2.0"
] | 0 | 4ec3ea231ba6ed8c9db68f0aa61aba8da32652b8 | https://github.com/bernharl/CamelsML/tree/4ec3ea231ba6ed8c9db68f0aa61aba8da32652b8 |
DoubleForwardCrossAttentionLayer | # 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.... | KirkGuo/HCN | DoubleForwardCrossAttentionLayer | false | 5,493 | [
"MIT"
] | 1 | 7d8020c8d76413b6ca3a359fb2e9b34652949e17 | https://github.com/KirkGuo/HCN/tree/7d8020c8d76413b6ca3a359fb2e9b34652949e17 |
QNetwork | import torch
from torch import nn
import torch.nn.functional as F
def weights_init_(m):
if isinstance(m, nn.Linear):
torch.nn.init.xavier_uniform_(m.weight, gain=1)
torch.nn.init.constant_(m.bias, 0)
class QNetwork(nn.Module):
def __init__(self, num_inputs, num_actions, hidden_dim):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | SINGROUP/Atom_manipulation_with_RL | QNetwork | false | 2,810 | [
"MIT"
] | 0 | 428e05459ed395f1a5fc00a7c65a9b0c26210ee8 | https://github.com/SINGROUP/Atom_manipulation_with_RL/tree/428e05459ed395f1a5fc00a7c65a9b0c26210ee8 |
Hswish | import torch
import torch.nn as nn
import torch.nn.functional as F
class Hswish(nn.Module):
def __init__(self, inplace=True):
super(Hswish, self).__init__()
self.inplace = inplace
def forward(self, x):
return x * F.relu6(x + 3.0, inplace=self.inplace) / 6.0
def get_inputs():
re... | 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... | BHD233/PaddleOCR2Pytorch | Hswish | false | 13,357 | [
"Apache-2.0"
] | 364 | f114069b3e2669c6adf0adf9596756205f184c9c | https://github.com/BHD233/PaddleOCR2Pytorch/tree/f114069b3e2669c6adf0adf9596756205f184c9c |
OneHiddenLayer | import torch
import torch as tr
import torch.nn as nn
class quadexp(nn.Module):
def __init__(self, sigma=2.0):
super(quadexp, self).__init__()
self.sigma = sigma
def forward(self, x):
return tr.exp(-x ** 2 / self.sigma ** 2)
class OneHiddenLayer(nn.Module):
def __init__(self, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | MichaelArbel/MMD-gradient-flow | OneHiddenLayer | false | 17,705 | [
"BSD-3-Clause"
] | 5 | aa7be78c53c1995ae156fb04b6f1b4fcf02dd039 | https://github.com/MichaelArbel/MMD-gradient-flow/tree/aa7be78c53c1995ae156fb04b6f1b4fcf02dd039 |
OutlookAttention | # 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.... | sithu31296/image_classification | OutlookAttention | false | 16,483 | [
"MIT"
] | 57 | 6b8cbce96100225621cee3166a73e852ba216cc3 | https://github.com/sithu31296/image_classification/tree/6b8cbce96100225621cee3166a73e852ba216cc3 |
Critic | # 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_... | ChenShawn/Adapted_TD3_Robustness_Certification | Critic | false | 13,470 | [
"MIT"
] | 91 | 6b28b031b098a2f0a49f2945f8a669205f09c4fe | https://github.com/ChenShawn/Adapted_TD3_Robustness_Certification/tree/6b28b031b098a2f0a49f2945f8a669205f09c4fe |
SENet | import torch
import torch.nn as nn
import torch.utils.data
class SENet(nn.Module):
"""support estimation network"""
def __init__(self, input_size: 'int', hidden_size: 'int', output_dims:
'int') ->None:
super(SENet, self).__init__()
self.l_1 = 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
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | Hcnaeg/DI-engine | SENet | false | 2,389 | [
"Apache-2.0"
] | 0 | aba0c629f87649854091e9e59d948f83962e3e1e | https://github.com/Hcnaeg/DI-engine/tree/aba0c629f87649854091e9e59d948f83962e3e1e |
MyElementwiseModule | import torch
import torch.nn.parallel
import torch.utils.data
import torch.onnx
import torch.fx
import torch.optim
import torch.utils.data.distributed
class MyElementwiseModule(torch.nn.Module):
def forward(self, x, y):
return x * y + y
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
import torch.nn.parallel
import torch.utils.data
import torch.onnx
import torch.fx
import torch.optim
import torch.utils.data.distributed
as... | ShuaihuaLu/examples | MyElementwiseModule | false | 5,831 | [
"BSD-3-Clause"
] | 1 | 2639cf050493df9d3cbf065d45e6025733add0f4 | https://github.com/ShuaihuaLu/examples/tree/2639cf050493df9d3cbf065d45e6025733add0f4 |
MSE_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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | WorksApplications/omni_torch | MSE_Loss | false | 1,223 | [
"Apache-2.0"
] | 0 | 10b689d794c8f485e38c765303ef018da17bc641 | https://github.com/WorksApplications/omni_torch/tree/10b689d794c8f485e38c765303ef018da17bc641 |
SoftmaxLoss | import torch
import torch.nn as nn
class SoftmaxLoss(nn.Module):
def __init__(self, hidden_dim, speaker_num, **kwargs):
"""
Softmax Loss
"""
super(SoftmaxLoss, self).__init__()
self.fc = nn.Linear(hidden_dim, speaker_num)
self.loss = nn.CrossEntropyLoss()
def ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | albertvillanova/s3prl | SoftmaxLoss | false | 6,165 | [
"MIT"
] | 1 | b127ade4ed2f80a1027901bbd2f204b4fb1aaf03 | https://github.com/albertvillanova/s3prl/tree/b127ade4ed2f80a1027901bbd2f204b4fb1aaf03 |
Conv | import torch
from torch import nn
class Conv(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=3, dilation=1,
causal=True):
super(Conv, self).__init__()
self.causal = causal
if self.causal:
self.padding = dilation * (kernel_size - 1)
else:
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | batikim09/FloWaveNet | Conv | false | 14,943 | [
"MIT"
] | 499 | 791f51aff530b2af4f9aa0d9fcb4af53d28a0997 | https://github.com/batikim09/FloWaveNet/tree/791f51aff530b2af4f9aa0d9fcb4af53d28a0997 |
LeNet5 | # 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_... | SuhangGeongyu/2019_SNUST_DEEPLEARNING_HW | LeNet5 | false | 2,962 | [
"MIT"
] | 0 | e6eb119483ab905f558f63341922a56ebee9b5c6 | https://github.com/SuhangGeongyu/2019_SNUST_DEEPLEARNING_HW/tree/e6eb119483ab905f558f63341922a56ebee9b5c6 |
h_swish | import torch
import torch.utils.data
import torch.nn as nn
class h_sigmoid(nn.Module):
def __init__(self, inplace=True):
super(h_sigmoid, self).__init__()
self.relu = nn.ReLU6(inplace=inplace)
def forward(self, x):
return self.relu(x + 3) / 6
class h_swish(nn.Module):
def __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
from torch._inductor.runtime import triton_helpers
import torch.utils.data
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guard... | Ghaust/SSD | h_swish | false | 9,125 | [
"MIT"
] | 0 | 2bf14a48795d20ad2177f622e84d62b3ff81183f | https://github.com/Ghaust/SSD/tree/2bf14a48795d20ad2177f622e84d62b3ff81183f |
DQN | import torch
import torch.nn as nn
class DQN(nn.Module):
def __init__(self, state_dim, nb_actions, hidden1=50, hidden2=50):
super(DQN, self).__init__()
self.fc1 = nn.Linear(state_dim, hidden1)
self.fc2 = nn.Linear(hidden1, hidden2)
self.fc3 = nn.Linear(hidden2, nb_actions)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | alvinwan/explore | DQN | false | 12,092 | [
"MIT"
] | 0 | 358c076b8250f561394e32b1ee2de9bc5562dcdb | https://github.com/alvinwan/explore/tree/358c076b8250f561394e32b1ee2de9bc5562dcdb |
_GRU_ODE | import torch
class _GRU_ODE(torch.nn.Module):
def __init__(self, input_channels, hidden_channels):
super(_GRU_ODE, self).__init__()
self.input_channels = input_channels
self.hidden_channels = hidden_channels
self.W_r = torch.nn.Linear(input_channels, hidden_channels, bias=False)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | lysuk96/rl_representations | _GRU_ODE | false | 15,980 | [
"MIT"
] | 438 | 19de69305e40c9b3a1d746a7af26d232c9fb3f6f | https://github.com/lysuk96/rl_representations/tree/19de69305e40c9b3a1d746a7af26d232c9fb3f6f |
CE_loss | import torch
import torch.nn as nn
import torch.utils.model_zoo
class CE_loss(nn.Module):
def __init__(self):
super().__init__()
self.loss = nn.CrossEntropyLoss()
def forward(self, predict, target):
n, _c, h, w = target.data.shape
predict = predict.permute(0, 2, 3, 1).contigu... | 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
... | SeleSchaefer/super_resolution | CE_loss | false | 17,947 | [
"MIT"
] | 5 | bf28a959fb150ceeadbd9f0bcfc12f3025cf82f4 | https://github.com/SeleSchaefer/super_resolution/tree/bf28a959fb150ceeadbd9f0bcfc12f3025cf82f4 |
MultiAttributeLoss | import torch
import torch.nn.functional as F
class MultiAttributeLoss(torch.nn.Module):
def __init__(self):
super(MultiAttributeLoss, self).__init__()
def forward(self, input, target):
product = 1
count = len(input)
for i in range(count):
attribute_loss = F.cross_... | 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... | GregoryEHunter/generalization_to_OOD_category_viewpoint_combinations | MultiAttributeLoss | false | 17,347 | [
"MIT"
] | 10 | 52aacbb3420639cae64ce65085c17b245e5ef865 | https://github.com/GregoryEHunter/generalization_to_OOD_category_viewpoint_combinations/tree/52aacbb3420639cae64ce65085c17b245e5ef865 |
ContrastiveLoss | import torch
from torch import nn
from torch.nn import functional as F
class ContrastiveLoss(nn.Module):
"""
Contrastive loss function. ref: http://yann.lecun.com/exdb/publis/pdf/hadsell-chopra-lecun-06.pdf
"""
def __init__(self, margin=2.0):
super(ContrastiveLoss, self).__init__()
se... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
assert_... | CV-ZMH/human-action-recognition | ContrastiveLoss | false | 7,841 | [
"MIT"
] | 36 | 009bd1da71c087c3071173b325e34ed342599581 | https://github.com/CV-ZMH/human-action-recognition/tree/009bd1da71c087c3071173b325e34ed342599581 |
BERTLowRank | from _paritybench_helpers import _mock_config
import math
import torch
import torch.nn as nn
def gelu(x):
"""Implementation of the gelu activation function.
For information: OpenAI GPT's gelu is slightly different (and gives slightly different results):
0.5 * x * (1 + torch.tanh(math.sqrt(2 / math... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | DAQuestionAnswering/Bert-n-Pals | BERTLowRank | false | 7,614 | [
"MIT"
] | 1 | d5a288b9ac62259e70c249635108ba3906e19f00 | https://github.com/DAQuestionAnswering/Bert-n-Pals/tree/d5a288b9ac62259e70c249635108ba3906e19f00 |
SoftmaxLayer | import torch
import torch.nn as nn
class SoftmaxLayer(nn.Module):
""" Naive softmax-layer """
def __init__(self, output_dim, n_class):
"""
:param output_dim: int
:param n_class: int
"""
super(SoftmaxLayer, self).__init__()
self.hidden2tag = nn.Linear(output_dim, n_class)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | luomou97/ELMoForManyLangs | SoftmaxLayer | false | 3,942 | [
"MIT"
] | 0 | 3e97600baa3a4dde229c1e78c513785e7d50e8e1 | https://github.com/luomou97/ELMoForManyLangs/tree/3e97600baa3a4dde229c1e78c513785e7d50e8e1 |
Binarizer | from torch.autograd import Function
import torch
import torch.nn as nn
import torch.nn.functional as F
class SignFunction(Function):
def __init__(self):
super(SignFunction, self).__init__()
@staticmethod
def forward(ctx, input, is_training=True):
if is_training:
prob = input.... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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... | MeMihir/SuperResCompression | Binarizer | false | 5,586 | [
"MIT"
] | 1 | c76bcf6b12d56ce3ad81ebb1b204fc0425f0e633 | https://github.com/MeMihir/SuperResCompression/tree/c76bcf6b12d56ce3ad81ebb1b204fc0425f0e633 |
CrossAttention | # 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.... | krasserm/perceiver-io | CrossAttention | false | 15,857 | [
"Apache-2.0"
] | 133 | 16e1029300304b617c0b0ae8eb06129ec103c755 | https://github.com/krasserm/perceiver-io/tree/16e1029300304b617c0b0ae8eb06129ec103c755 |
Encoding | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | Atten4Vis/DemystifyLocalViT | Encoding | false | 13,365 | [
"MIT"
] | 64 | 2e2327caec6d56ae2c8aa861b32bb62f3cdb786e | https://github.com/Atten4Vis/DemystifyLocalViT/tree/2e2327caec6d56ae2c8aa861b32bb62f3cdb786e |
MidNet2 | # 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... | DevilMayNotCry/My_curl | MidNet2 | false | 9,128 | [
"BSD-3-Clause"
] | 0 | a8f65a3e58cbdeefb4679aa2f0c3d9d800b67381 | https://github.com/DevilMayNotCry/My_curl/tree/a8f65a3e58cbdeefb4679aa2f0c3d9d800b67381 |
BertLMHead | from _paritybench_helpers import _mock_config
from torch.nn import Module
import torch
from torch.nn import LayerNorm
from torch.nn import Linear
from torch.nn.functional import gelu
class BertLMHead(Module):
def __init__(self, config):
super(BertLMHead, self).__init__()
hidden_size = config['hid... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch.nn impor... | yulonglin/bert | BertLMHead | false | 13,167 | [
"MIT"
] | 0 | 7f992e88f109e4267b0e84f8398cab0561a67f4f | https://github.com/yulonglin/bert/tree/7f992e88f109e4267b0e84f8398cab0561a67f4f |
TransformerEncoderLayerWithConv1d | # 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.... | jzlianglu/pykaldi2 | TransformerEncoderLayerWithConv1d | false | 15,831 | [
"MIT"
] | 179 | 4d31968f8dff7cccf6a8395b7e69005ae3b2b30a | https://github.com/jzlianglu/pykaldi2/tree/4d31968f8dff7cccf6a8395b7e69005ae3b2b30a |
Decoder | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data
class Decoder(nn.Module):
""" VAE decoder """
def __init__(self, img_channels, latent_size):
super(Decoder, self).__init__()
self.latent_size = latent_size
self.img_channels = img_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 import triton_helpers
import torch.nn as nn
import ... | benedictquartey/softgym_wm | Decoder | false | 12,170 | [
"BSD-3-Clause"
] | 0 | 0aef75fed207b11029f6052c656a679c105b4677 | https://github.com/benedictquartey/softgym_wm/tree/0aef75fed207b11029f6052c656a679c105b4677 |
PearsonCorrelation | # 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... | alexhepburn/expert | PearsonCorrelation | false | 6,177 | [
"BSD-3-Clause"
] | 1 | 546f7452ced2213ef91e5ce6e7456a1668dd9f95 | https://github.com/alexhepburn/expert/tree/546f7452ced2213ef91e5ce6e7456a1668dd9f95 |
Conv2D | import math
import torch
from torch import nn
class Conv2D(nn.Module):
def __init__(self, in_channels, kernel_size, last):
super().__init__()
if last:
out_channels = 1
else:
out_channels = 5
self.conv2d = nn.Conv2d(in_channels, out_channels, kernel_size=
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
from torch import nn
assert_size_stride = torch._C._dynamo.guards.as... | Yusoi/mmdetection | Conv2D | false | 9,734 | [
"Apache-2.0"
] | 0 | cbb5fb00f6e124fbb2c15e7e3438d7fa76b8850a | https://github.com/Yusoi/mmdetection/tree/cbb5fb00f6e124fbb2c15e7e3438d7fa76b8850a |
BertSelfOutput | from _paritybench_helpers import _mock_config
import torch
from torch import nn
import torch.onnx
class BertLayerNorm(nn.Module):
def __init__(self, hidden_size, eps=1e-12):
"""Construct a layernorm module in the TF style (epsilon inside the square root).
"""
super(BertLayerNorm, 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.triton_helpers import libdevice
from torch import n... | Splendon/examples | BertSelfOutput | false | 3,377 | [
"MIT"
] | 0 | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | https://github.com/Splendon/examples/tree/ed4a8a01857b6ddca49559141acf5d0986eb01e1 |
VGG11 | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
import torch.nn.functional as F
class VGG11(nn.Module):
def __init__(self, num_classes=10, out_ch_conv1=17, out_ch_conv2=27,
out_ch_conv3=39, out_ch_conv4=35, out_ch_... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | FujitsuLaboratories/CAC | VGG11 | false | 17,328 | [
"Apache-2.0"
] | 8 | d12df8e47f61eaf7d7b0ed355e2d1aa296453f86 | https://github.com/FujitsuLaboratories/CAC/tree/d12df8e47f61eaf7d7b0ed355e2d1aa296453f86 |
EmbeddingLayer | # 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.... | YuWVandy/chemicalx | EmbeddingLayer | false | 1,281 | [
"Apache-2.0"
] | 0 | c02f979a502409c26700e6d5a1b2e6c0aa77e64c | https://github.com/YuWVandy/chemicalx/tree/c02f979a502409c26700e6d5a1b2e6c0aa77e64c |
LearnedPositionalEmbedding1D | import torch
from torch import nn
class LearnedPositionalEmbedding1D(nn.Module):
"""Adds (optionally learned) positional embeddings to the inputs."""
def __init__(self, seq_len, dim):
super().__init__()
self.pos_embedding = nn.Parameter(torch.zeros(1, seq_len, dim))
def forward(self, x):... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | styler00dollar/Colab-animesion | LearnedPositionalEmbedding1D | false | 16,500 | [
"MIT"
] | 67 | 0fa603689fec3ed4ede098fd7c15b519dbb76a09 | https://github.com/styler00dollar/Colab-animesion/tree/0fa603689fec3ed4ede098fd7c15b519dbb76a09 |
LowRankResidualEncoderLayer | # 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.... | bahducoup/factorized_training | LowRankResidualEncoderLayer | false | 12,167 | [
"MIT"
] | 0 | 0af38f16338a9bcfcc11091b1a6b75befd67f234 | https://github.com/bahducoup/factorized_training/tree/0af38f16338a9bcfcc11091b1a6b75befd67f234 |
BinaryFocalLoss | # 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
... | cumtchenchang/PPGNet | BinaryFocalLoss | false | 15,088 | [
"MIT"
] | 171 | 9b280aacb887ec584e905b9f9ab006b4f4cb2cc3 | https://github.com/cumtchenchang/PPGNet/tree/9b280aacb887ec584e905b9f9ab006b4f4cb2cc3 |
MultiHeadAttentionLayer | import math
import torch
import torch.nn as nn
class MultiHeadAttentionLayer(nn.Module):
def __init__(self, d_model, n_heads, dropout):
super().__init__()
assert d_model % n_heads == 0
self.d_model = d_model
self.n_heads = n_heads
self.head_dim = d_model // n_heads
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | salvacarrion/nmt-continual-learning | MultiHeadAttentionLayer | false | 7,600 | [
"MIT"
] | 1 | 302147ac9c270f3341a68a72c803c457f05ff37b | https://github.com/salvacarrion/nmt-continual-learning/tree/302147ac9c270f3341a68a72c803c457f05ff37b |
BahdanauAttention | import math
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
from torch.optim.lr_scheduler import *
import torch.optim.lr_scheduler
from torch.nn.parameter import Parameter
import torch.onnx
import torch.testing
class EltwiseAdd(nn.Module):
def __init__(self,... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Emily0219/distiller | BahdanauAttention | false | 5,142 | [
"Apache-2.0"
] | 1 | 445ed35b671fb54586acc280b53d951f18bf97ae | https://github.com/Emily0219/distiller/tree/445ed35b671fb54586acc280b53d951f18bf97ae |
MLPPolicy | # 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
im... | Timliang/RL-Competition | MLPPolicy | false | 9,558 | [
"MIT"
] | 0 | 638462b95a5aab0bbae46677a59ffc90ba6cd971 | https://github.com/Timliang/RL-Competition/tree/638462b95a5aab0bbae46677a59ffc90ba6cd971 |
AngleSimpleLinear | import torch
import torch.nn.functional as F
import torch.nn as nn
from torch.nn import Parameter
import torch.utils.data
class AngleSimpleLinear(nn.Module):
"""Computes cos of angles between input vectors and weights vectors"""
def __init__(self, in_features, out_features):
super(AngleSimpleLinear, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | KhurramPirov/Twins-recognition | AngleSimpleLinear | false | 11,616 | [
"MIT"
] | 0 | f99ba1128afb3674a49db6a4b19afd5108c3fdf9 | https://github.com/KhurramPirov/Twins-recognition/tree/f99ba1128afb3674a49db6a4b19afd5108c3fdf9 |
MultiheadAttention | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import Linear
from torch.nn.init import xavier_uniform_
class MultiheadAttention(nn.Module):
"""Allows the model to jointly attend to information
from different representation subspaces.
See reference: Attention Is All You Ne... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | verages/PaddleOCR2Pytorch | MultiheadAttention | false | 4,675 | [
"Apache-2.0"
] | 0 | 201f0d5d6007f49620c49af7d222c3b220eb3e70 | https://github.com/verages/PaddleOCR2Pytorch/tree/201f0d5d6007f49620c49af7d222c3b220eb3e70 |
Conv2dDynamicSamePadding | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch._C
import torch.serialization
class Conv2dDynamicSamePadding(nn.Conv2d):
"""2D Convolutions like TensorFlow, for a dynamic image size.
The padding is operated in forward function by calculating dynamically.
"""
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch._C
import torch.serialization
assert_size_str... | AlexanderDokuchaev/mmsegmentation | Conv2dDynamicSamePadding | false | 11,172 | [
"Apache-2.0"
] | 0 | 0c443ee370cce6227661b802184072174c4e3f64 | https://github.com/AlexanderDokuchaev/mmsegmentation/tree/0c443ee370cce6227661b802184072174c4e3f64 |
sSEmodule | import torch
import torch.nn as nn
class sSEmodule(nn.Module):
""" ChannelSequeezeExcitationModule
input: [B, C, H, W] torch tensor
output: [B, C, H, W] torch tensor
"""
def __init__(self, in_channel):
super().__init__()
self.conv2d = nn.Conv2d(in_channel, 1, 1)
se... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | HwangJohn/feature_representation | sSEmodule | false | 2,355 | [
"MIT"
] | 0 | 27389caacc9c026b65f47ab0cbb4e6d0465e6a60 | https://github.com/HwangJohn/feature_representation/tree/27389caacc9c026b65f47ab0cbb4e6d0465e6a60 |
RelationNonLocal | import torch
import torch.nn as nn
class RelationNonLocal(nn.Module):
def __init__(self, C):
super(RelationNonLocal, self).__init__()
self.conv_fv = nn.Conv2d(C, C, kernel_size=1, stride=1)
self.conv_fk = nn.Conv2d(C, C, kernel_size=1, stride=1)
self.conv_fq = nn.Conv2d(C, C, kern... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | luozn15/FloorplanGAN | RelationNonLocal | false | 3,946 | [
"MIT"
] | 0 | 113813c2e857c5cd4e64c92626d359e5746e9eab | https://github.com/luozn15/FloorplanGAN/tree/113813c2e857c5cd4e64c92626d359e5746e9eab |
PixelNorm | import torch
import torch.utils.data
import torch
from torch import nn
class PixelNorm(nn.Module):
def __init__(self, epsilon=1e-08):
super(PixelNorm, self).__init__()
self.epsilon = epsilon
def forward(self, x):
tmp = torch.mul(x, x)
tmp1 = torch.rsqrt(torch.mean(tmp, dim=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.triton_helpers import libdevice
import torch.utils.data
import torch
from torch import nn
assert_size_stride = ... | siyuhuang/PoseStylizer | PixelNorm | false | 16,465 | [
"BSD-3-Clause"
] | 75 | d1d832781ddfd3efde24bf32b36a4074fafebcc1 | https://github.com/siyuhuang/PoseStylizer/tree/d1d832781ddfd3efde24bf32b36a4074fafebcc1 |
MaxBlock | # 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... | CS236G/pcgan | MaxBlock | false | 4,942 | [
"MIT"
] | 1 | e1ac013a087617f93c14347428a0d234d6d2a012 | https://github.com/CS236G/pcgan/tree/e1ac013a087617f93c14347428a0d234d6d2a012 |
HINet | # 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_... | AmaldevHari/Ghost-DeblurGAN | HINet | false | 7,681 | [
"MIT"
] | 16 | e725e5dad6a5fa5865d317e6644d96d0e800eae6 | https://github.com/AmaldevHari/Ghost-DeblurGAN/tree/e725e5dad6a5fa5865d317e6644d96d0e800eae6 |
CA1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class CA1(nn.Module):
"""Reconstructs the inputs that originated from EC network.
Consists of 2 fully connected layers, recieving inputs from CA3
and outputs to EC.
"""
def __init__(self, N, D_in, D_out, resize_dim):
sup... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | sachio222/aha4 | CA1 | false | 7,586 | [
"MIT"
] | 1 | ec378fe1bace85e325ad7cb8686b8ba321dc97d0 | https://github.com/sachio222/aha4/tree/ec378fe1bace85e325ad7cb8686b8ba321dc97d0 |
BinaryMinus | # 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 abc
import inspect
import warnings
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
from typ... | Johnsonms/NNI_master | BinaryMinus | false | 11,571 | [
"MIT"
] | 0 | e5e5c7aed89cf3189cffe1056464833c15eb54ff | https://github.com/Johnsonms/NNI_master/tree/e5e5c7aed89cf3189cffe1056464833c15eb54ff |
CosNorm_Classifier | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import math
import ... | PiperLiu/AliProducts | CosNorm_Classifier | false | 5,719 | [
"MIT"
] | 1 | f51884c4dae035a879dbaca2c1575797f30ee7d3 | https://github.com/PiperLiu/AliProducts/tree/f51884c4dae035a879dbaca2c1575797f30ee7d3 |
OffsetNet | import torch
import torch.nn as nn
class OffsetNet(nn.Module):
"""OffsetNet in Temporal interlace module.
The OffsetNet consists of one convolution layer and two fc layers
with a relu activation following with a sigmoid function. Following
the convolution layer, two fc layers and relu are applied to ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | Alexis-Fab/mmaction2 | OffsetNet | false | 11,213 | [
"Apache-2.0"
] | 0 | 6f76bb465a7164f907318cf58f77fc3d613f8f0f | https://github.com/Alexis-Fab/mmaction2/tree/6f76bb465a7164f907318cf58f77fc3d613f8f0f |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.