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 |
|---|---|---|---|---|---|---|---|---|---|---|
SLN | # 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_... | nandkishore1/TransformersInVision | SLN | false | 16,130 | [
"MIT"
] | 94 | 134ef26b63916d2b9ae384124de7365a97102b06 | https://github.com/nandkishore1/TransformersInVision/tree/134ef26b63916d2b9ae384124de7365a97102b06 |
Attn | # 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.... | Verylovenlp/MinTL-SKKU | Attn | false | 14,566 | [
"MIT"
] | 60 | 15b5cb870c7d6dcd0f5d895aac2806539cc5101f | https://github.com/Verylovenlp/MinTL-SKKU/tree/15b5cb870c7d6dcd0f5d895aac2806539cc5101f |
cnn_4layer | import torch
import torch.nn as nn
import torch.nn.functional as F
class cnn_4layer(nn.Module):
def __init__(self, in_ch, in_dim, width=2, linear_size=256):
super(cnn_4layer, self).__init__()
self.conv1 = nn.Conv2d(in_ch, 4 * width, 4, stride=2, padding=1)
self.conv2 = nn.Conv2d(4 * width... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | mnmueller/auto_LiRPA | cnn_4layer | false | 7,263 | [
"BSD-3-Clause"
] | 1 | 55cb270b0b99f07b74541d55706c69fbb9daff66 | https://github.com/mnmueller/auto_LiRPA/tree/55cb270b0b99f07b74541d55706c69fbb9daff66 |
AttentionBlock | import math
import torch
from torch.nn import functional as F
from torch import nn
import torch.utils.data
import torch.optim
def convert_pad_shape(pad_shape):
"""
Used to get arguments for F.pad
"""
l = pad_shape[::-1]
pad_shape = [item for sublist in l for item in sublist]
return pad_shape
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Oktai15/NeMo | AttentionBlock | false | 5,693 | [
"Apache-2.0"
] | 1 | 5b6dd3850129898be47cf0d65587897ec45a5b59 | https://github.com/Oktai15/NeMo/tree/5b6dd3850129898be47cf0d65587897ec45a5b59 |
SoftEntropy | import torch
from torch import nn
import torch.nn.functional as F
from torch.nn import *
from torch.optim.lr_scheduler import *
class SoftEntropy(nn.Module):
def __init__(self):
super(SoftEntropy, self).__init__()
self.logsoftmax = nn.LogSoftmax(dim=1)
def forward(self, inputs, targets):
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch import nn
f... | chrizandr/MMT | SoftEntropy | false | 12,227 | [
"MIT"
] | 0 | e2bb5984efb165e7ea1ed6080610cfe176344ac0 | https://github.com/chrizandr/MMT/tree/e2bb5984efb165e7ea1ed6080610cfe176344ac0 |
PoswiseFeedForwardNet | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
import torch.nn.functional as F
class PoswiseFeedForwardNet(nn.Module):
""" feed forward """
def __init__(self, config):
super().__init__()
self.config = config
self.conv1 = nn.Conv1d(in_channels=self.con... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | bage79/transformer-evolution-bage | PoswiseFeedForwardNet | false | 6,315 | [
"Apache-2.0"
] | 1 | 715bdf61421dc19e21fb0f66bfa4b564305987f8 | https://github.com/bage79/transformer-evolution-bage/tree/715bdf61421dc19e21fb0f66bfa4b564305987f8 |
BalancedL1Loss | import torch
import numpy as np
import torch.nn.functional as F
import torch.nn as nn
def balanced_l1_loss(pred, target, beta=1.0, alpha=0.5, gamma=1.5,
reduction='none'):
assert beta > 0
assert pred.size() == target.size() and target.numel() > 0
diff = torch.abs(pred - target)
b = np.e ** (gamma ... | 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 numpy as np
imp... | Complicateddd/Complicateddd-ROITransformer | BalancedL1Loss | false | 11,305 | [
"Apache-2.0"
] | 0 | 2adfbf98892d569c460d100c6e2169c5fa3a9b82 | https://github.com/Complicateddd/Complicateddd-ROITransformer/tree/2adfbf98892d569c460d100c6e2169c5fa3a9b82 |
GatedConv | # 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 ... | Catherine0505/mar-scf-flow | GatedConv | false | 17,109 | [
"Apache-2.0"
] | 10 | aa7c3564cb9f2967c5e580a633516dba1b597f98 | https://github.com/Catherine0505/mar-scf-flow/tree/aa7c3564cb9f2967c5e580a633516dba1b597f98 |
SSGConv | # 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.nn import Module
assert_size_stride = torch._C._dynamo.guards.assert_... | EdisonLeeeee/GraphGallery | SSGConv | false | 13,642 | [
"MIT"
] | 300 | 4eec9c5136bda14809bd22584b26cc346cdb633b | https://github.com/EdisonLeeeee/GraphGallery/tree/4eec9c5136bda14809bd22584b26cc346cdb633b |
SEModule | import torch
import torch.nn as nn
import torch.utils.data
from collections import OrderedDict
import torch.nn.functional as F
import torch.nn.parallel
import torch.optim
def make_divisible(v, divisor, min_val=None):
"""
This function is taken from the original tf repo.
It ensures that all layers have a channel... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | AlbertiPot/once-for-all | SEModule | false | 8,971 | [
"MIT"
] | 0 | 092b9e6184be353383396761ea5ec61d67152645 | https://github.com/AlbertiPot/once-for-all/tree/092b9e6184be353383396761ea5ec61d67152645 |
JaccardLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch.nn.modules.loss import _Loss
assert_size_stride = torch._C._dynamo.guards.asse... | BloodAxe/segmentation-networks-benchmark | JaccardLoss | false | 7,852 | [
"MIT"
] | 34 | 2e3feb560102230be9369ab442b4a59cc86dff61 | https://github.com/BloodAxe/segmentation-networks-benchmark/tree/2e3feb560102230be9369ab442b4a59cc86dff61 |
AP | import torch
import torch.nn as nn
class AttentivePooling(nn.Module):
"""
Implementation of Attentive Pooling
"""
def __init__(self, input_dim, **kwargs):
super(AttentivePooling, self).__init__()
self.W_a = nn.Linear(input_dim, input_dim)
self.W = nn.Linear(input_dim, 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
from torch._inductor.runtime.... | albertvillanova/s3prl | AP | false | 6,151 | [
"MIT"
] | 1 | b127ade4ed2f80a1027901bbd2f204b4fb1aaf03 | https://github.com/albertvillanova/s3prl/tree/b127ade4ed2f80a1027901bbd2f204b4fb1aaf03 |
GeM | import torch
from torch import nn
from torch.nn import functional as F
from torchvision.transforms import *
class GeM(nn.Module):
def __init__(self, dim=2048, p=3, eps=1e-06):
super(GeM, self).__init__()
self.p = nn.Parameter(torch.ones(dim) * p, requires_grad=True)
self.eps = eps
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch ... | uestcwcw/University1652-Baseline | GeM | false | 13,056 | [
"MIT"
] | 0 | fda1e4773fc911cbb43a9b96901d436298dc1284 | https://github.com/uestcwcw/University1652-Baseline/tree/fda1e4773fc911cbb43a9b96901d436298dc1284 |
Highway | import torch
import torch.nn as nn
import torch.nn.utils
class Highway(nn.Module):
"""it is not fun"""
def __init__(self, e_word_size, drop_rate=0.3):
super(Highway, self).__init__()
self.w_proj = nn.Linear(e_word_size, e_word_size)
self.w_gate = nn.Linear(e_word_size, e_word_size)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | thophan92/cs224n-winter2019 | Highway | false | 4,426 | [
"MIT"
] | 0 | f3f8041b35e949e73167135d662a2bd93e7406de | https://github.com/thophan92/cs224n-winter2019/tree/f3f8041b35e949e73167135d662a2bd93e7406de |
TransformerDecoderLayer | # 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.... | amazon-research/long-short-term-transformer | TransformerDecoderLayer | false | 14,847 | [
"Apache-2.0"
] | 52 | a425be4b52ab68fddd85c91d26571e4cdfe8379a | https://github.com/amazon-research/long-short-term-transformer/tree/a425be4b52ab68fddd85c91d26571e4cdfe8379a |
ScaledDotProductAttention | import torch
import numpy as np
import torch.nn as nn
class ScaledDotProductAttention(nn.Module):
""" Scaled Dot-Product Attention
"""
def __init__(self, attn_dropout=0.0):
super(ScaledDotProductAttention, self).__init__()
self.dropout = nn.Dropout(attn_dropout)
self.softmax = nn.... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | JiaweiSheng/FAAN | ScaledDotProductAttention | false | 8,356 | [
"MIT"
] | 41 | b439b829506c4e2e9044a6b2ab7f3d844f445a95 | https://github.com/JiaweiSheng/FAAN/tree/b439b829506c4e2e9044a6b2ab7f3d844f445a95 |
Entmax15 | from torch.autograd import Function
import torch
import torch.nn as nn
def _make_ix_like(X, dim):
d = X.size(dim)
rho = torch.arange(1, d + 1, device=X.device, dtype=X.dtype)
view = [1] * X.dim()
view[0] = -1
return rho.view(view).transpose(0, dim)
def _roll_last(X, dim):
if 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 import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
from torch.autograd import F... | roholazandie/entmax | Entmax15 | false | 7,574 | [
"MIT"
] | 1 | 657374e6a792ec6840b6f78bc759cc1f51570aad | https://github.com/roholazandie/entmax/tree/657374e6a792ec6840b6f78bc759cc1f51570aad |
Decoder | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | VDelv/Spatio-Temporal-EEG-Analysis | Decoder | false | 2,926 | [
"BSD-3-Clause"
] | 0 | 7207e642da013e19dfd4316a22b597a93ce59581 | https://github.com/VDelv/Spatio-Temporal-EEG-Analysis/tree/7207e642da013e19dfd4316a22b597a93ce59581 |
SphereMSE | # 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 math
from numpy import pi
from torch import nn
from torch.nn.parameter import Para... | JaviBite/TFG | SphereMSE | false | 2,400 | [
"MIT"
] | 0 | e406580697132f53b63a7c983daaa098af45b52c | https://github.com/JaviBite/TFG/tree/e406580697132f53b63a7c983daaa098af45b52c |
TemporalEmbedding | import math
import torch
import torch.nn as nn
class FixedEmbedding(nn.Module):
def __init__(self, c_in, d_model):
super(FixedEmbedding, self).__init__()
w = torch.zeros(c_in, d_model).float()
w.require_grad = False
position = torch.arange(0, c_in).float().unsqueeze(1)
div... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guar... | Ares-Long/Time | TemporalEmbedding | false | 11,294 | [
"Apache-2.0"
] | 0 | 7827463613f45baea82de189a890afb7394e73e4 | https://github.com/Ares-Long/Time/tree/7827463613f45baea82de189a890afb7394e73e4 |
ConvolModel | # 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_... | VVKot/mlinseconds-vote-prediction | ConvolModel | false | 2,943 | [
"MIT"
] | 0 | c869ae428fb8d5e83f0a47468722da968aed28c6 | https://github.com/VVKot/mlinseconds-vote-prediction/tree/c869ae428fb8d5e83f0a47468722da968aed28c6 |
AvgPool2d | # 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 Module
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._em... | brandonhee/PySyft | AvgPool2d | false | 6,357 | [
"Apache-2.0"
] | 1 | 31217f28aa3d996b2bb84477fb15a990f0cb9a80 | https://github.com/brandonhee/PySyft/tree/31217f28aa3d996b2bb84477fb15a990f0cb9a80 |
ActorDownAction | # 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.... | TachikakaMin/dreamer-torch | ActorDownAction | false | 1,138 | [
"MIT"
] | 0 | 3c99526f4507e28cf8b34ada0321001adcf8ae1f | https://github.com/TachikakaMin/dreamer-torch/tree/3c99526f4507e28cf8b34ada0321001adcf8ae1f |
BaseQuantization | import torch
from torch import nn
class Clipping(nn.Module):
def __init__(self):
"""
This module perform element-wise clipping.
"""
super(Clipping, self).__init__()
def forward(self, x, max_value, min_value):
"""
The forward function of the clipping module
... | 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_... | UniSerj/ai-research | BaseQuantization | false | 14,536 | [
"Apache-2.0"
] | 46 | 79f0093c93408cc5dd7d3f56aafd7dc1f901421c | https://github.com/UniSerj/ai-research/tree/79f0093c93408cc5dd7d3f56aafd7dc1f901421c |
Conv1dLinear | # 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
from ... | entn-at/efficient_tts | Conv1dLinear | false | 15,320 | [
"MIT"
] | 111 | 5e6ea55d0c9694f7e30eecb5048976088f1a3c66 | https://github.com/entn-at/efficient_tts/tree/5e6ea55d0c9694f7e30eecb5048976088f1a3c66 |
TransposeLayer | import torch
class TransposeLayer(torch.nn.Module):
"""Transpose the input."""
def forward(self, data):
return data.t().contiguous()
def get_inputs():
return [torch.rand([4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | BUTSpeechFIT/beer | TransposeLayer | false | 16,964 | [
"MIT"
] | 6 | 43fb9027a859db28d2f2f8709260ca2ce9501e25 | https://github.com/BUTSpeechFIT/beer/tree/43fb9027a859db28d2f2f8709260ca2ce9501e25 |
MultiHeadedAttention | import math
import torch
from torch import Tensor
from torch import nn
class MultiHeadedAttention(nn.Module):
"""
Multi-Head Attention module from "Attention is All You Need"
Implementation modified from OpenNMT-py.
https://github.com/OpenNMT/OpenNMT-py
"""
def __init__(self, num_heads: 'int... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Merterm/-Modeling-Intensification-for-SLG | MultiHeadedAttention | false | 17,718 | [
"MIT"
] | 5 | 800fff3d3c7bacc86c1db8382f7c2e68d2f0c074 | https://github.com/Merterm/-Modeling-Intensification-for-SLG/tree/800fff3d3c7bacc86c1db8382f7c2e68d2f0c074 |
BWCEWLoss | # 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 ... | carlogrisetti/ludwig | BWCEWLoss | false | 1,630 | [
"Apache-2.0"
] | 0 | 5c0887f14867e1577e0ddc3806c5cf7a781fb665 | https://github.com/carlogrisetti/ludwig/tree/5c0887f14867e1577e0ddc3806c5cf7a781fb665 |
MaskedL1Loss | import torch
import torch.utils.data
import torch
import torch.nn as nn
class MaskedL1Loss(nn.Module):
def __init__(self):
super(MaskedL1Loss, self).__init__()
self.criterion = nn.L1Loss()
def forward(self, input, target, mask):
mask = mask.expand(-1, input.size()[1], -1, -1)
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.utils.dat... | WeisiX/ITAS3D | MaskedL1Loss | false | 18,103 | [
"MIT"
] | 4 | fc861e0cb2d4516905bfadab5e5e880c2b021832 | https://github.com/WeisiX/ITAS3D/tree/fc861e0cb2d4516905bfadab5e5e880c2b021832 |
InteractiveKLLoss | # 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... | pkuyym/nni | InteractiveKLLoss | false | 11,010 | [
"MIT"
] | 0 | fe533e3bc65ea27997e16250adb503638548d500 | https://github.com/pkuyym/nni/tree/fe533e3bc65ea27997e16250adb503638548d500 |
ConvChain | import torch
import torch.utils.data
import torch.nn as nn
def _get_activation(activation):
valid = ['relu', 'leaky_relu', 'lrelu', 'tanh', 'sigmoid']
assert activation in valid, 'activation should be one of {}'.format(valid)
if activation == 'relu':
return nn.ReLU(inplace=True)
if activation ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | IlyaBizyaev/ttools | ConvChain | false | 8,317 | [
"MIT"
] | 11 | b1435b19f397ce1baff9daed3cb287e52a029fdb | https://github.com/IlyaBizyaev/ttools/tree/b1435b19f397ce1baff9daed3cb287e52a029fdb |
StyleMod | # 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... | NeuralBending/StyleCLIP | StyleMod | false | 14,096 | [
"MIT"
] | 91 | 190d3a0d48823ccdbdd15c7f8af6e08703a6dbd8 | https://github.com/NeuralBending/StyleCLIP/tree/190d3a0d48823ccdbdd15c7f8af6e08703a6dbd8 |
Baseline | import torch
from torch import nn
import torch.nn.functional as F
class Baseline(nn.Module):
def __init__(self):
super(Baseline, self).__init__()
self.conv1 = nn.Conv2d(3, 6, 3)
self.pool = nn.MaxPool2d(2, 2)
self.conv2 = nn.Conv2d(6, 16, 3)
self.conv3 = nn.Conv2d(16, 32, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | Karin-S/USYD-ELEC5307 | Baseline | false | 9,225 | [
"Apache-2.0"
] | 0 | 83cb40adf0c15ee703a880fc7aba5c69b82a5434 | https://github.com/Karin-S/USYD-ELEC5307/tree/83cb40adf0c15ee703a880fc7aba5c69b82a5434 |
PairCosineSim | # 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.... | SamujjwalSam/MatchingNetworks4XC | PairCosineSim | false | 1,026 | [
"MIT"
] | 0 | 2519cc1a527ea121c4966c1a860d890d5182f887 | https://github.com/SamujjwalSam/MatchingNetworks4XC/tree/2519cc1a527ea121c4966c1a860d890d5182f887 |
CriticNetwork | import torch
import torch.nn.functional as F
import torch.nn as nn
class CriticNetwork(nn.Module):
def __init__(self, state_size, action_size, seed):
super(CriticNetwork, self).__init__()
torch.manual_seed(seed)
fcs1_units = 64
fc2_units = 64
self.fcs1 = nn.Linear(state_si... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | aishikawa/drl-impl | CriticNetwork | false | 9,711 | [
"MIT"
] | 0 | 1afe7426494cd94990cb4dae247486a25dfe37bf | https://github.com/aishikawa/drl-impl/tree/1afe7426494cd94990cb4dae247486a25dfe37bf |
SE | import torch
import torch.nn as nn
class SE(nn.Module):
"""Squeeze-and-Excitation block"""
def __init__(self, w_in, w_se):
super(SE, self).__init__()
self.avg_pool = nn.AdaptiveAvgPool2d((1, 1))
self.se1 = nn.Conv2d(w_in, w_se, kernel_size=1, bias=True)
self.reluse = nn.ReLU(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
import torch.nn as nn
assert_... | Alessiacosmos/Basic-RegNet-pytorch | SE | false | 18,408 | [
"MIT"
] | 2 | fd6b9a67599dcea6c90ba247f532a7624252b33c | https://github.com/Alessiacosmos/Basic-RegNet-pytorch/tree/fd6b9a67599dcea6c90ba247f532a7624252b33c |
Joiner | import torch
from torch import nn
import torch.nn.functional as F
class Joiner(nn.Module):
def __init__(self, input_dim: 'int', output_dim: 'int'):
super().__init__()
self.output_linear = nn.Linear(input_dim, output_dim)
def forward(self, encoder_out: 'torch.Tensor', decoder_out: 'torch.Tens... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | huangruizhe/icefall | Joiner | false | 15,541 | [
"Apache-2.0"
] | 173 | ea8af0ee9af5169d93f8f389ffebbc27a1d9e82a | https://github.com/huangruizhe/icefall/tree/ea8af0ee9af5169d93f8f389ffebbc27a1d9e82a |
Network | import torch
import torch.nn as nn
import torch.nn.functional as F
class Network(nn.Module):
def __init__(self, input_size, action_size):
super(Network, self).__init__()
self.fc1 = nn.Linear(input_size, 256)
self.fc2 = nn.Linear(256, 256)
self.logits_p = nn.Linear(256, action_size... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | NeuralFlux/rl-analysis | Network | false | 5,659 | [
"MIT"
] | 1 | bb45e1f8bb9da4683cce4bd0a5e687770a4005e2 | https://github.com/NeuralFlux/rl-analysis/tree/bb45e1f8bb9da4683cce4bd0a5e687770a4005e2 |
_netD_Q | # 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.... | nathalia-kim/nu_gan | _netD_Q | false | 10,721 | [
"MIT"
] | 0 | c1d0891945bd7ac3d95869db91f490f57f203110 | https://github.com/nathalia-kim/nu_gan/tree/c1d0891945bd7ac3d95869db91f490f57f203110 |
GlobalNonLocal | import torch
import torch.nn as nn
import torch.nn.functional as F
class GlobalNonLocal(nn.Module):
def __init__(self, in_channel=64):
super(GlobalNonLocal, self).__init__()
assert in_channel % 2 == 0
self.hidden_channel = in_channel // 2
self.theta = nn.Conv2d(in_channel, self.hi... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Galaxies99/alpha-protein | GlobalNonLocal | false | 17,334 | [
"MIT"
] | 4 | db4b77ab48d5905ade5d4a66004f8387773718fa | https://github.com/Galaxies99/alpha-protein/tree/db4b77ab48d5905ade5d4a66004f8387773718fa |
Actor | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
class Actor(nn.Module):
def __init__(self, nb_states, nb_actions, hidden1=400, hidden2=300,
init_w=0.003):
super(Actor, self).__init__()
self.fc1 = nn.Linear(nb_states, hidden1)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | Sharpiless/HAQ-for-Mobilenetv3-Quantization | Actor | false | 17,916 | [
"MIT"
] | 5 | 76b7d98471adb666ad140abd2518bce6f0de3cfa | https://github.com/Sharpiless/HAQ-for-Mobilenetv3-Quantization/tree/76b7d98471adb666ad140abd2518bce6f0de3cfa |
SnakeHyperSolver | import torch
import torch.nn as nn
from torch import sin
from torch import pow
from torch.nn import Parameter
from torch.distributions.exponential import Exponential
class Snake(nn.Module):
"""
Implementation of the serpentine-like sine-based periodic activation function
.. 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 math as tl_math
import torch.... | Juju-botu/diffeqml-research | SnakeHyperSolver | false | 13,929 | [
"Apache-2.0"
] | 49 | aa796c87447e5299ec4f25a07fc4d032afb1f63e | https://github.com/Juju-botu/diffeqml-research/tree/aa796c87447e5299ec4f25a07fc4d032afb1f63e |
TOP1_max | import torch
import torch.nn as nn
import torch.nn.functional as F
class TOP1_max(nn.Module):
def __init__(self):
super(TOP1_max, self).__init__()
def forward(self, logit):
logit_softmax = F.softmax(logit, dim=1)
diff = -(logit.diag().view(-1, 1).expand_as(logit) - logit)
los... | 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
... | Ethan-Yys/GRU4REC-pytorch-master | TOP1_max | false | 2,202 | [
"Apache-2.0"
] | 0 | 175ccb851f881d3506680c459491e76f50aa9898 | https://github.com/Ethan-Yys/GRU4REC-pytorch-master/tree/175ccb851f881d3506680c459491e76f50aa9898 |
MaxPool2dLayer | # 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... | a-kore/lucent | MaxPool2dLayer | false | 1,344 | [
"Apache-2.0"
] | 0 | 6b2b4dfea45c36c99e16f9923104a532df80e0a8 | https://github.com/a-kore/lucent/tree/6b2b4dfea45c36c99e16f9923104a532df80e0a8 |
SEModule | import torch
import torch.nn as nn
import torch.nn.functional as F
def hardsigmoid(x):
return F.relu6(x + 3.0, inplace=True) / 6.0
class SEModule(nn.Module):
def __init__(self, channel, reduction=4):
super(SEModule, self).__init__()
self.avg_pool = nn.AdaptiveAvgPool2d(1)
self.conv1... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | BHD233/PaddleOCR2Pytorch | SEModule | false | 13,378 | [
"Apache-2.0"
] | 364 | f114069b3e2669c6adf0adf9596756205f184c9c | https://github.com/BHD233/PaddleOCR2Pytorch/tree/f114069b3e2669c6adf0adf9596756205f184c9c |
BasicBlock | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
assert_size_stride = torch._C... | leggedrobotics/DeLORA | BasicBlock | false | 15,900 | [
"BSD-3-Clause"
] | 154 | 909948d63a9517e6dd54bedcf099f6b39ded2cb4 | https://github.com/leggedrobotics/DeLORA/tree/909948d63a9517e6dd54bedcf099f6b39ded2cb4 |
Classify | import torch
import torch.nn as nn
def autopad(k, p=None):
if p is None:
p = k // 2 if isinstance(k, int) else [(x // 2) for x in k]
return p
class Flatten(nn.Module):
@staticmethod
def forward(x):
return x.view(x.size(0), -1)
class Classify(nn.Module):
def __init__(self, c1,... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | Mac-AI/BNA-traffic-mapper | Classify | false | 17,697 | [
"MIT"
] | 4 | 9fcc3f516e18e19704444b6b848fc8aa356007bc | https://github.com/Mac-AI/BNA-traffic-mapper/tree/9fcc3f516e18e19704444b6b848fc8aa356007bc |
BAP | # 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.... | GunjanChourasia/WS_DAN_PyTorch | BAP | false | 2,310 | [
"MIT"
] | 0 | 6c12a1b5b0b8980e3b69d44474e0b5edb455570c | https://github.com/GunjanChourasia/WS_DAN_PyTorch/tree/6c12a1b5b0b8980e3b69d44474e0b5edb455570c |
BCELoss2d | import torch
from torch.utils.data.sampler import *
import torch.nn as nn
import torch.nn.functional as F
class BCELoss2d(nn.Module):
def __init__(self, weight=None, size_average=True):
super(BCELoss2d, self).__init__()
self.bce_loss = nn.BCELoss(weight, size_average)
def forward(self, logit... | 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.... | chicm/carvana | BCELoss2d | false | 1,686 | [
"Apache-2.0"
] | 0 | 493a19fbb2fdab1cc1b4b95d97742684e4144229 | https://github.com/chicm/carvana/tree/493a19fbb2fdab1cc1b4b95d97742684e4144229 |
DiceWithLogitsLoss | import torch
import torch.nn as nn
import torch.optim
class DiceWithLogitsLoss(nn.Module):
def __init__(self, smooth=1.0):
super(DiceWithLogitsLoss, self).__init__()
self.smooth = smooth
def _dice_coeff(self, pred, target):
"""
Args:
pred: [N, 1] within [0, 1]
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import torch.optim
assert_size_stride = torch._C._dynamo.guards.ass... | Bobholamovic/SimpleCV | DiceWithLogitsLoss | false | 7,803 | [
"MIT"
] | 44 | f4edacf088d0155725a469e227de847820bdfa53 | https://github.com/Bobholamovic/SimpleCV/tree/f4edacf088d0155725a469e227de847820bdfa53 |
FrameAvgPool | from _paritybench_helpers import _mock_config
import torch
import torch.nn.parallel
import torch.nn as nn
import torch.utils.data
import torch.backends.cudnn
class FrameAvgPool(nn.Module):
def __init__(self, cfg):
super(FrameAvgPool, self).__init__()
input_size = cfg.INPUT_SIZE
hidden_siz... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.parallel
impo... | MicroTensor-ai/episodic-memory | FrameAvgPool | false | 11,763 | [
"MIT"
] | 0 | 295a3752ab94c7a6f45355aa2c54bffbf84b574f | https://github.com/MicroTensor-ai/episodic-memory/tree/295a3752ab94c7a6f45355aa2c54bffbf84b574f |
Conv2dSWU | import torch
import torch.utils.data
import torch.nn as nn
import torch
class Conv2dSWU(nn.Module):
def __init__(self, in_channels, out_channels, kernel_radius=2, bias=True):
super(Conv2dSWU, self).__init__()
kernel_size_h = 2 * kernel_radius - 1
self.padding = kernel_radius - 1
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
import torch.utils.data
import torch.nn as nn
import torch
assert_size_stride = ... | FVL2020/MSWSR | Conv2dSWU | false | 8,099 | [
"MIT"
] | 27 | 0844e78ee68fb0465efd5c4a2215ce815980526b | https://github.com/FVL2020/MSWSR/tree/0844e78ee68fb0465efd5c4a2215ce815980526b |
ShapeConv2d | # 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.nn import Module
import math
import numpy as np
from torch.nn.modules... | COATZ/ShapeConv | ShapeConv2d | false | 13,467 | [
"Apache-2.0"
] | 57 | f34f4e95ee2b69ac645fd5ba608e3c11cfadfded | https://github.com/COATZ/ShapeConv/tree/f34f4e95ee2b69ac645fd5ba608e3c11cfadfded |
SANet | # 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.... | TimandXiyu/SANet-style-transfer- | SANet | false | 5,899 | [
"MIT"
] | 1 | 91c3dd1344d1dded61aa2e79618240a49345b40e | https://github.com/TimandXiyu/SANet-style-transfer-/tree/91c3dd1344d1dded61aa2e79618240a49345b40e |
Actor | import torch
import torch.nn as nn
import torch.nn.functional as F
class Actor(nn.Module):
def __init__(self, state_dim, action_dim):
super(Actor, self).__init__()
self.l1 = nn.Linear(state_dim, 400)
self.l2 = nn.Linear(400, 200)
self.l3 = nn.Linear(200, action_dim)
def forwa... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | rortiz9/meleeml | Actor | false | 4,212 | [
"MIT"
] | 0 | 9be4bf53a377dfb46dbb3b51f102f1bffc0124d2 | https://github.com/rortiz9/meleeml/tree/9be4bf53a377dfb46dbb3b51f102f1bffc0124d2 |
SqueezeExcitate | import torch
from torch import nn
import torch.nn.functional as F
class SqueezeExcitate(nn.Module):
def __init__(self, in_channels, se_size, activation=None):
super(SqueezeExcitate, self).__init__()
self.dim_reduce = nn.Conv2d(in_channels=in_channels, out_channels=
se_size, kernel_siz... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | Dogy06/COVID-Efficientnet-Pytorch-1 | SqueezeExcitate | false | 17,223 | [
"MIT"
] | 4 | 3c1f7d9513abe59783152efca28dc886bf4afc2f | https://github.com/Dogy06/COVID-Efficientnet-Pytorch-1/tree/3c1f7d9513abe59783152efca28dc886bf4afc2f |
BatchNorm2D_noparam | import torch
import torch.nn as nn
class BatchNorm2D_noparam(nn.Module):
def __init__(self, eps=1e-08):
super(BatchNorm2D_noparam, self).__init__()
self.eps = eps
def forward(self, x):
_bs, _c, _h, _w = x.shape
mean = torch.mean(x, (0, 2, 3), keepdim=True)
var = 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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | ericlearning/General-I2I | BatchNorm2D_noparam | false | 6,652 | [
"MIT"
] | 1 | ba7c5d6a582bdf2e7b53c0e20c31e9097b1883a9 | https://github.com/ericlearning/General-I2I/tree/ba7c5d6a582bdf2e7b53c0e20c31e9097b1883a9 |
AP | import torch
import torch.nn as nn
class AttentivePooling(nn.Module):
"""
Implementation of Attentive Pooling
"""
def __init__(self, input_dim, **kwargs):
super(AttentivePooling, self).__init__()
self.W_a = nn.Linear(input_dim, input_dim)
self.W = nn.Linear(input_dim, 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
from torch._inductor.runtime.... | B06901052/s3prl | AP | false | 122 | [
"MIT"
] | 0 | 5f63d2df043d2d7c81580cd042fa2cea34746f48 | https://github.com/B06901052/s3prl/tree/5f63d2df043d2d7c81580cd042fa2cea34746f48 |
MSELoss | import functools
import torch
from torch.nn import functional as F
import torch.nn as nn
import torch._C
import torch.serialization
from torch import optim as optim
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Op... | 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 functools
from torch.nn import functional as F
import torch.nn as nn
import torch.... | Atten4Vis/DemystifyLocalViT | MSELoss | false | 13,338 | [
"MIT"
] | 64 | 2e2327caec6d56ae2c8aa861b32bb62f3cdb786e | https://github.com/Atten4Vis/DemystifyLocalViT/tree/2e2327caec6d56ae2c8aa861b32bb62f3cdb786e |
ConvBlock | import copy
import torch
from torch import nn
import torch.utils.data
def get_activation(activation):
if isinstance(activation, str):
if activation == 'relu':
return nn.ReLU()
elif activation == 'leaky':
return nn.LeakyReLU(negative_slope=0.1)
elif activation == 'pr... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import copy
from torch import... | ELEKTRONN/elektronn3 | ConvBlock | false | 13,624 | [
"MIT"
] | 124 | 19c751855dffc67b744cd43e757aa4a5bd577d9b | https://github.com/ELEKTRONN/elektronn3/tree/19c751855dffc67b744cd43e757aa4a5bd577d9b |
PartialConv | import math
import torch
import torch.nn as nn
def weights_init(init_type='gaussian'):
def init_fun(m):
classname = m.__class__.__name__
if (classname.find('Conv') == 0 or classname.find('Linear') == 0
) and hasattr(m, 'weight'):
if init_type == 'gaussian':
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | ShiraLightricks/3d-photo-inpainting | PartialConv | false | 1,071 | [
"MIT"
] | 0 | c42ac41576690b765e50f5281ddbfb58439ff36d | https://github.com/ShiraLightricks/3d-photo-inpainting/tree/c42ac41576690b765e50f5281ddbfb58439ff36d |
MSELoss | # 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 functools
import torch.nn as nn
import torch.nn.functional as F
assert_size_stride... | Min-Sheng/mmregression | MSELoss | false | 841 | [
"Apache-2.0"
] | 0 | 6d70383d89ccb3dea7f425b665c2a184d014a99f | https://github.com/Min-Sheng/mmregression/tree/6d70383d89ccb3dea7f425b665c2a184d014a99f |
MovingAverage | # 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
import torch.utils.data
import torch.nn as torch_nn
import torch.nn.functional a... | Ninushkat/Impact-Synth-Hardware | MovingAverage | false | 14,097 | [
"MIT"
] | 55 | 37a2ecfec51b052b39d1ad0d4676f09d5f00e3c2 | https://github.com/Ninushkat/Impact-Synth-Hardware/tree/37a2ecfec51b052b39d1ad0d4676f09d5f00e3c2 |
FunnelClassificationHead | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import n... | Clemens123/transformers | FunnelClassificationHead | false | 11,807 | [
"Apache-2.0"
] | 0 | 22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26 | https://github.com/Clemens123/transformers/tree/22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26 |
MaskedAveragePooling | # 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... | byzhang/OpenMatch | MaskedAveragePooling | false | 10,010 | [
"Apache-2.0"
] | 0 | 28b2d49a5eec2e1dc3934767c747ff0ca6c93d96 | https://github.com/byzhang/OpenMatch/tree/28b2d49a5eec2e1dc3934767c747ff0ca6c93d96 |
Agreement_Routing_Down | # 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, math as tl_math
assert_size... | arjunsbalaji/oct | Agreement_Routing_Down | false | 1,480 | [
"Apache-2.0"
] | 0 | f21e11f6dda952cd914444512ddadb4141757951 | https://github.com/arjunsbalaji/oct/tree/f21e11f6dda952cd914444512ddadb4141757951 |
DepthWiseConvolution | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_s... | Pranshu-Bahadur/g2net | DepthWiseConvolution | false | 9,494 | [
"MIT"
] | 0 | a117df7699837c9a3ae21ec59a310d7384369601 | https://github.com/Pranshu-Bahadur/g2net/tree/a117df7699837c9a3ae21ec59a310d7384369601 |
BasicModel_ConvNet_MaxPool3d | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | LMdeLiangMi/captum | BasicModel_ConvNet_MaxPool3d | false | 5,508 | [
"BSD-3-Clause"
] | 1 | 8bd9686013fe0ba8996e9b1cbeb0ea8e91512787 | https://github.com/LMdeLiangMi/captum/tree/8bd9686013fe0ba8996e9b1cbeb0ea8e91512787 |
Swish | import torch
import torch.utils.data
import torch.nn as nn
from math import sqrt as sqrt
from itertools import product as product
class Swish(nn.Module):
def forward(self, x):
return x.mul_(torch.sigmoid(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.utils.data
import torch.nn as nn
from math import sqrt as sqrt
from itertools import product as product
assert_size_stride = to... | Het-Shah/Monk_Object_Detection | Swish | false | 8,227 | [
"Apache-2.0"
] | 15 | 1d7a07193ea3455221caa41d07c33c81d50c6b3f | https://github.com/Het-Shah/Monk_Object_Detection/tree/1d7a07193ea3455221caa41d07c33c81d50c6b3f |
PSNR | # 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
from torch.nn import init as... | RunqiuBao/Event_ESTRNN | PSNR | false | 14,332 | [
"MIT"
] | 180 | 6d156cc42a3a33bd0b4b7c4c4be98f943ff53acb | https://github.com/RunqiuBao/Event_ESTRNN/tree/6d156cc42a3a33bd0b4b7c4c4be98f943ff53acb |
GDL | import torch
from torch import nn
class GDL(nn.Module):
def __init__(self, drop_rate=0.8, drop_th=0.7):
super(GDL, self).__init__()
if not 0 <= drop_rate <= 1:
raise ValueError('drop-rate must be in range [0, 1].')
if not 0 <= drop_th <= 1:
raise ValueError('drop-t... | import torch
from torch import device
import triton
import triton.language as tl
from 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
fro... | Lixy1997/Group-WSSS | GDL | false | 14,007 | [
"MIT"
] | 80 | 0afcc3a21c3bec69fbc5b6d1d4ee84ffd405d253 | https://github.com/Lixy1997/Group-WSSS/tree/0afcc3a21c3bec69fbc5b6d1d4ee84ffd405d253 |
PolicyNetwork | import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions import Normal
class PolicyNetwork(nn.Module):
def __init__(self, num_inputs, num_actions, hidden_size, action_range=
1.0, init_w=0.003, log_std_min=-20, log_std_max=2):
super(PolicyNetwo... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | biemann/rl-testbed-for-energyplus | PolicyNetwork | false | 9,804 | [
"MIT"
] | 0 | a01be4d12eda970b352729ff6cb4a3eea8ddee6a | https://github.com/biemann/rl-testbed-for-energyplus/tree/a01be4d12eda970b352729ff6cb4a3eea8ddee6a |
Net | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | ConstantSun/ResNeXt | Net | false | 11,405 | [
"MIT"
] | 0 | 43a23cf776bfd8438796e4978a0b6ead49c893e5 | https://github.com/ConstantSun/ResNeXt/tree/43a23cf776bfd8438796e4978a0b6ead49c893e5 |
SoftEntropy | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch import nn
f... | chrizandr/MMT | SoftEntropy | false | 12,227 | [
"MIT"
] | 0 | e2bb5984efb165e7ea1ed6080610cfe176344ac0 | https://github.com/chrizandr/MMT/tree/e2bb5984efb165e7ea1ed6080610cfe176344ac0 |
Gram | # 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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | L1aoXingyu/neural-transfer | Gram | false | 8,404 | [
"MIT"
] | 45 | bed445791d823872d9a40ea8927681d8cc99e8df | https://github.com/L1aoXingyu/neural-transfer/tree/bed445791d823872d9a40ea8927681d8cc99e8df |
LearnedKernel | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
class LearnedKernel(nn.Module):
def __init__(self, args: 'Namespace'):
super(LearnedKernel, self).__init__()
self.A = nn.Linear(args.ffn_hidden_size, args.ffn_hidden_size)
def forward(self, encodings: 'torch.Ten... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | AayushGrover/ViscaNet | LearnedKernel | false | 7,541 | [
"MIT"
] | 1 | 41786e10b84f2264b638567bdce1c189c1b66b00 | https://github.com/AayushGrover/ViscaNet/tree/41786e10b84f2264b638567bdce1c189c1b66b00 |
Str2MSA | # 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.... | wukevin/RoseTTAFold | Str2MSA | false | 4,590 | [
"MIT"
] | 0 | e3c15dbf4bc1e4f8726e26c63aca1625188da803 | https://github.com/wukevin/RoseTTAFold/tree/e3c15dbf4bc1e4f8726e26c63aca1625188da803 |
GEGLU | # 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 ... | edchengmoore/pytorch_tabular | GEGLU | false | 3,455 | [
"MIT"
] | 0 | 25f87089fbed95b46f2a1a8a96fba1f581aa8af1 | https://github.com/edchengmoore/pytorch_tabular/tree/25f87089fbed95b46f2a1a8a96fba1f581aa8af1 |
EncoderLayer | # 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.... | QiuhongAnnaWei/IBRNet | EncoderLayer | false | 14,289 | [
"Apache-2.0"
] | 254 | 6c8b68e6d95eae04535ff0906387ec7899f5d5ce | https://github.com/QiuhongAnnaWei/IBRNet/tree/6c8b68e6d95eae04535ff0906387ec7899f5d5ce |
ShortcutLayer | import torch
import torch.nn as nn
class ShortcutLayer(nn.Module):
def __init__(self, idx):
super(ShortcutLayer, self).__init__()
self.idx = idx
def forward(self, x, outputs):
return x + outputs[self.idx]
def get_inputs():
return [torch.rand([5, 4, 4, 4]), torch.rand([5, 4, 4, ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | vrindaprabhu/solofy | ShortcutLayer | false | 4,506 | [
"MIT"
] | 0 | d5e26ff20d293c200485c70be6dcd6481afba396 | https://github.com/vrindaprabhu/solofy/tree/d5e26ff20d293c200485c70be6dcd6481afba396 |
AveragedHausdorffLoss | # 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... | adriangrepo/segmentl | AveragedHausdorffLoss | false | 18,264 | [
"MIT"
] | 5 | 9b520bf6cfd005eef9bba3db36ee6b3bb373b085 | https://github.com/adriangrepo/segmentl/tree/9b520bf6cfd005eef9bba3db36ee6b3bb373b085 |
MultiHeadAttention | import math
import torch
import torch.utils.data
from torch import nn
from torch.nn import LayerNorm as FusedLayerNorm
class MultiHeadAttention(nn.Module):
"""
Multi-head scaled dot-product attention layer.
Args:
hidden_size: size of the embeddings in the model, also known as d_model
num_a... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | hieuvecto/CASIA-SURF_CeFA | MultiHeadAttention | false | 15,545 | [
"MIT"
] | 133 | 71dfd846ce968b3ed26974392a6e0c9b40aa12ae | https://github.com/hieuvecto/CASIA-SURF_CeFA/tree/71dfd846ce968b3ed26974392a6e0c9b40aa12ae |
ReOrgLayer | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._... | Dazz993/AlphaPose | ReOrgLayer | false | 5,040 | [
"Apache-2.0"
] | 1 | d4b9a3af5f590fa21bd033b4a19e98b5748ae683 | https://github.com/Dazz993/AlphaPose/tree/d4b9a3af5f590fa21bd033b4a19e98b5748ae683 |
Bottleneck | # 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
from col... | createnewdemo/SPANet | Bottleneck | false | 15,081 | [
"BSD-3-Clause"
] | 177 | 86cfb05d1778cf30142ef30692e995a5b7b59bb8 | https://github.com/createnewdemo/SPANet/tree/86cfb05d1778cf30142ef30692e995a5b7b59bb8 |
Encoder | import torch
import torch.nn as nn
class Encoder(nn.Module):
def __init__(self):
super(Encoder, self).__init__()
self.conv1 = torch.nn.Conv1d(1, 64, 3, padding=1)
self.maxp1 = torch.nn.MaxPool1d(2, padding=0)
self.conv2 = torch.nn.Conv1d(64, 128, 3, padding=1)
self.maxp2 =... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | Koukyosyumei/Zatsuon | Encoder | false | 2,480 | [
"Apache-2.0"
] | 0 | d7f520a282cf00bfd19d2dec300701c21403cba1 | https://github.com/Koukyosyumei/Zatsuon/tree/d7f520a282cf00bfd19d2dec300701c21403cba1 |
CE_loss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import 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 |
FloorDivConst | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_c... | PogChamper/torch2trt | FloorDivConst | false | 14,202 | [
"MIT"
] | 3,363 | 43b12627ec0de4d212efb6d02b07570205085ccc | https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc |
NetModel | # 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.datal... | Michaelzhouisnotwhite/Learning-Gan | NetModel | false | 5,594 | [
"MIT"
] | 1 | cf1cff1f2afba296489db55f5de9ebb8405feb0e | https://github.com/Michaelzhouisnotwhite/Learning-Gan/tree/cf1cff1f2afba296489db55f5de9ebb8405feb0e |
Codebook | # 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_... | JiangtaoFeng/MaskGIT-pytorch | Codebook | false | 15,903 | [
"MIT"
] | 163 | 198b32e29a306fae2830a71621befad008500f76 | https://github.com/JiangtaoFeng/MaskGIT-pytorch/tree/198b32e29a306fae2830a71621befad008500f76 |
BiAffine | import torch
from torch import nn
import torch.utils.data
from torch.nn import Parameter
class BiAffine(nn.Module):
def __init__(self, n_enc, n_dec, n_labels, biaffine=True, **kwargs):
"""
Args:
n_enc: int
the dimension of the encoder input.
n_dec: int
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
import torch.utils.data
from torch.nn import Parameter
asse... | FengZiYjun/fastNLP | BiAffine | false | 5,163 | [
"Apache-2.0"
] | 1 | 3ae73ab0a05d1ceef4a5181516891a8057d7f719 | https://github.com/FengZiYjun/fastNLP/tree/3ae73ab0a05d1ceef4a5181516891a8057d7f719 |
GlobalDiscriminator | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim
class GlobalDiscriminator(nn.Module):
def __init__(self, y_size, M_channels):
super().__init__()
self.c0 = nn.Conv2d(M_channels, 64, kernel_size=3)
self.c1 = nn.Conv2d(64, 32, kernel_size=3)
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
import ... | neuralsyn/self-supervised-relational-reasoning | GlobalDiscriminator | false | 16,229 | [
"MIT"
] | 130 | 6ecfafcf4a36c2eacef7ddd5bd1b23c28fbb14c8 | https://github.com/neuralsyn/self-supervised-relational-reasoning/tree/6ecfafcf4a36c2eacef7ddd5bd1b23c28fbb14c8 |
FixedSubnetConv | # 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.multiprocessing
import torch.nn as nn
import torch.nn.p... | ZeroEi8ht/hidden-networks | FixedSubnetConv | false | 14,721 | [
"Apache-2.0"
] | 132 | ebe13e71d2f60356ee473cd3cff3e14b69d13d70 | https://github.com/ZeroEi8ht/hidden-networks/tree/ebe13e71d2f60356ee473cd3cff3e14b69d13d70 |
ClassicalConv5 | import torch
import torch.nn.functional as F
import torch.nn as nn
import torch.nn.utils.prune
import torch.backends.cudnn
import torch.cuda
import torch.nn
import torch.utils.data
class ClassicalConv5(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(1, 32, 3, 1, padding=... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | mit-han-lab/pytorch-quantum | ClassicalConv5 | false | 16,107 | [
"MIT"
] | 98 | 05cf000d689307f6b1fe02d12744ad455685935b | https://github.com/mit-han-lab/pytorch-quantum/tree/05cf000d689307f6b1fe02d12744ad455685935b |
MLP | import torch
import torch.nn as nn
from torch.autograd import *
class FullyConnectedLayer(nn.Module):
def __init__(self, in_size, out_size, dropout_r=0.0, use_relu=True):
super(FullyConnectedLayer, self).__init__()
self.dropout_r = dropout_r
self.use_relu = use_relu
self.linear = ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | VISLANG-Lab/MGCL | MLP | false | 1,181 | [
"MIT"
] | 0 | 22da06ffa7410d9632bfda8eefb1b79e4f660de0 | https://github.com/VISLANG-Lab/MGCL/tree/22da06ffa7410d9632bfda8eefb1b79e4f660de0 |
Block | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | JunnYu/Paddle-AI-Writer | Block | false | 8,822 | [
"BSD-3-Clause"
] | 25 | 8d211f9e60aeed323b6330065668f54350514c70 | https://github.com/JunnYu/Paddle-AI-Writer/tree/8d211f9e60aeed323b6330065668f54350514c70 |
Coords | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.data
import torch.random
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_stri... | DuaneNielsen/keypoints | Coords | false | 8,037 | [
"MIT"
] | 42 | 302fa02966d4372ac9b5aaa3d8dc24684be0b252 | https://github.com/DuaneNielsen/keypoints/tree/302fa02966d4372ac9b5aaa3d8dc24684be0b252 |
BertLayerNorm | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
import torch.onnx
assert_size_stride = torch._C._dynamo.gu... | Alwaysproblem/examples-1 | BertLayerNorm | false | 42 | [
"MIT"
] | 0 | 9754fa63ed1931489a21ac1f5b299f945e369a5c | https://github.com/Alwaysproblem/examples-1/tree/9754fa63ed1931489a21ac1f5b299f945e369a5c |
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
from torch.autograd import Function
import abc
import math
from torch import nn
... | LizhenWangT/FaceVerse | ToRGB | false | 8,476 | [
"BSD-2-Clause",
"MIT"
] | 20 | bb4a5d3e52fb10b34bbe94f055ff637095bf9152 | https://github.com/LizhenWangT/FaceVerse/tree/bb4a5d3e52fb10b34bbe94f055ff637095bf9152 |
QueryEncoder | import torch
from torch import nn
import torch.nn.functional as F
class QueryEncoder(nn.Module):
def __init__(self, input_size):
super(QueryEncoder, self).__init__()
self.fc1 = nn.Linear(input_size, 16)
self.fc2 = nn.Linear(16, 10)
self.fc3 = nn.Linear(10, 8)
def forward(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 import nn
assert_s... | huyi-work/UnifiedEmbeddingModel | QueryEncoder | false | 15,561 | [
"MIT"
] | 50 | 85c8442122213d1f1b1027df0fd34f428259aaa4 | https://github.com/huyi-work/UnifiedEmbeddingModel/tree/85c8442122213d1f1b1027df0fd34f428259aaa4 |
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 import triton_helpers
from torch._inductor.runtime.... | ShirelJosef/deep-reinforcement-learning | Actor | false | 11,884 | [
"MIT"
] | 0 | 63979b975c71e730c9d4c66e39efac210260dd18 | https://github.com/ShirelJosef/deep-reinforcement-learning/tree/63979b975c71e730c9d4c66e39efac210260dd18 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.