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 |
|---|---|---|---|---|---|---|---|---|---|---|
ResidualDenseBlock | # 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... | cyun-404/PieESRGAN | ResidualDenseBlock | false | 3,381 | [
"Apache-2.0"
] | 0 | 22ffe683bf2389b646429494d1bc88e61a9d72c5 | https://github.com/cyun-404/PieESRGAN/tree/22ffe683bf2389b646429494d1bc88e61a9d72c5 |
TanhGaussianDistParams | # 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.... | MrSyee/rl_algorithms | TanhGaussianDistParams | false | 5,618 | [
"MIT"
] | 1 | 5b5276982032f8a8a614b9466849b7b3ef245b3e | https://github.com/MrSyee/rl_algorithms/tree/5b5276982032f8a8a614b9466849b7b3ef245b3e |
GaussianFocalLoss | # 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 functools
impor... | Andrew-Zhu/DyFPN | GaussianFocalLoss | false | 7,729 | [
"Apache-2.0"
] | 32 | a74463b59c4ce28253c2449a07c0f6692a0147a1 | https://github.com/Andrew-Zhu/DyFPN/tree/a74463b59c4ce28253c2449a07c0f6692a0147a1 |
DecoderLayer | # 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.... | superMC5657/transformer | DecoderLayer | false | 10,892 | [
"MIT"
] | 0 | b9d9ca3a5f307f6587330a8235e8d5a2a3650510 | https://github.com/superMC5657/transformer/tree/b9d9ca3a5f307f6587330a8235e8d5a2a3650510 |
FrameMaxPool | import torch
import torch.nn as nn
class FrameMaxPool(nn.Module):
def __init__(self, input_size, hidden_size, stride):
super(FrameMaxPool, self).__init__()
self.vis_conv = nn.Conv1d(input_size, hidden_size, 1, 1)
self.max_pool = nn.MaxPool1d(stride)
def forward(self, visual_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 import triton_helpers
import torch.nn as nn
assert_... | CFM-MSG/Code_LEORN | FrameMaxPool | false | 4,922 | [
"MIT"
] | 1 | fabea1e1ded973a4db692e51e2df442bde55f626 | https://github.com/CFM-MSG/Code_LEORN/tree/fabea1e1ded973a4db692e51e2df442bde55f626 |
ConvEncoder | # 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 ... | amyhemmeter/baseline | ConvEncoder | false | 3,093 | [
"Apache-2.0"
] | 0 | 101a393398570747d14a32eb3af72664e2774c8b | https://github.com/amyhemmeter/baseline/tree/101a393398570747d14a32eb3af72664e2774c8b |
Mlp | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import numpy as np
... | bubbliiiing/classification-pytorch | Mlp | false | 14,988 | [
"MIT"
] | 88 | ee62c05bd3094c3fab48bada5a57cb2ed8b61c11 | https://github.com/bubbliiiing/classification-pytorch/tree/ee62c05bd3094c3fab48bada5a57cb2ed8b61c11 |
WRNUnit | # 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... | HyperGAN/imgclsmob | WRNUnit | false | 17,691 | [
"MIT"
] | 9 | 88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3 | https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3 |
RobertaClassificationHead | # 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 ... | AlexShypula/CodeGen | RobertaClassificationHead | false | 14,554 | [
"MIT"
] | 241 | 2e5f8090c4369fd3f0ebec4a867503edc1362d5d | https://github.com/AlexShypula/CodeGen/tree/2e5f8090c4369fd3f0ebec4a867503edc1362d5d |
RealConv2d | import torch
import torch.nn as nn
import torch.nn.functional as F
class RealConv2d(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=(1, 1),
stride=(1, 1), padding=(0, 0), dilation=1, groups=1, causal=True,
complex_axis=1):
"""
in_channels: real+imag
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | JamesLiao714/FullSubNet | RealConv2d | false | 607 | [
"MIT"
] | 0 | dad740bac35b5d7544c97740ae59101455acdc40 | https://github.com/JamesLiao714/FullSubNet/tree/dad740bac35b5d7544c97740ae59101455acdc40 |
CDilated | # 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... | IRLSCU/siamban | CDilated | false | 2,431 | [
"Apache-2.0"
] | 0 | abb12d028e93aaee74efc5042a5bb305c7805053 | https://github.com/IRLSCU/siamban/tree/abb12d028e93aaee74efc5042a5bb305c7805053 |
DiceLoss | import torch
import torch.nn as nn
from typing import *
class DiceLoss(nn.Module):
def __init__(self, smooth: 'float'=1.0):
super().__init__()
self.smooth = smooth
def forward(self, logits, targets):
num = targets.size(0)
probs = torch.sigmoid(logits)
m1, m2 = probs.v... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from typing import *
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dy... | Lleyton-Ariton/landwatch | DiceLoss | false | 5,550 | [
"MIT"
] | 1 | 21e86e899d33d0ee349cf9bf87c6c13ebdab82fa | https://github.com/Lleyton-Ariton/landwatch/tree/21e86e899d33d0ee349cf9bf87c6c13ebdab82fa |
ScaledDotProductAttention | import torch
from torch import nn
from torchvision import models as models
import torch.onnx
import torch.nn
class ScaledDotProductAttention(nn.Module):
def __init__(self, dropout=0, scale=True):
super().__init__()
self.dropout = nn.Dropout(p=dropout)
self.softmax = nn.Softmax(dim=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._inductor.runtime.... | dqawami/openvino_training_extensions | ScaledDotProductAttention | false | 15,214 | [
"Apache-2.0"
] | 256 | dddda1dfd651eaae2d59cecda84275b1b03bd0ad | https://github.com/dqawami/openvino_training_extensions/tree/dddda1dfd651eaae2d59cecda84275b1b03bd0ad |
BertImagePooler | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
import torch.multiprocessing
class BertImagePooler(nn.Module):
def __init__(self, config):
super(BertImagePooler, self).__init__()
self.dense = nn.Linear(config.v_hidden_size, config.bi_hidden_size)
self.acti... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | ayushjain1144/vilbert-multi-task | BertImagePooler | false | 4,287 | [
"MIT"
] | 0 | cf30feee9617dd92bb030f380f8b59388b7054f6 | https://github.com/ayushjain1144/vilbert-multi-task/tree/cf30feee9617dd92bb030f380f8b59388b7054f6 |
ChannelNorm | # 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_... | albertvillanova/s3prl | ChannelNorm | false | 6,158 | [
"MIT"
] | 1 | b127ade4ed2f80a1027901bbd2f204b4fb1aaf03 | https://github.com/albertvillanova/s3prl/tree/b127ade4ed2f80a1027901bbd2f204b4fb1aaf03 |
BPR | # 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
import torc... | EternalImmortal/bpr | BPR | false | 9,008 | [
"MIT"
] | 0 | ba95806530e51b580359d22ed533ad461124fa22 | https://github.com/EternalImmortal/bpr/tree/ba95806530e51b580359d22ed533ad461124fa22 |
HLCriterion | # 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.... | kiminh/mt-dnn | HLCriterion | false | 7,030 | [
"MIT"
] | 1 | 133884b380244dbe74acc4d7507e551b2c5035b3 | https://github.com/kiminh/mt-dnn/tree/133884b380244dbe74acc4d7507e551b2c5035b3 |
DenseCrossEntropy | # 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
... | Tanmengxuan/Google-Landmark-Recognition-2020-3rd-Place-Solution | DenseCrossEntropy | false | 1,131 | [
"Apache-2.0"
] | 0 | 8e2d9056d5c88c6415827086809e73522b336fbb | https://github.com/Tanmengxuan/Google-Landmark-Recognition-2020-3rd-Place-Solution/tree/8e2d9056d5c88c6415827086809e73522b336fbb |
SEModule | # 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_... | ChrisLee63/reid-strong-baseline | SEModule | false | 11,301 | [
"MIT"
] | 0 | da755d3812da3c2e6e69920066badaad42f6fa6b | https://github.com/ChrisLee63/reid-strong-baseline/tree/da755d3812da3c2e6e69920066badaad42f6fa6b |
TonemappedRelativeMSE | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | Mephisto405/WCMC-Public | TonemappedRelativeMSE | false | 8,545 | [
"BSD-2-Clause"
] | 19 | bd54f218d5239db84f404fbe1b465f9497bcf9e4 | https://github.com/Mephisto405/WCMC-Public/tree/bd54f218d5239db84f404fbe1b465f9497bcf9e4 |
Conv2d | import torch
import torch.nn as nn
class Conv2d(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=1, stride=1,
padding='auto', dilation=1, bias=False, norm=nn.Identity(),
activation=nn.ReLU()):
super(Conv2d, self).__init__()
if padding == 'auto':
ke... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | ClementPla/NNTools | Conv2d | false | 306 | [
"MIT"
] | 0 | 61562be2d931a7f720ceee1bd91a37a2b9a329af | https://github.com/ClementPla/NNTools/tree/61562be2d931a7f720ceee1bd91a37a2b9a329af |
NormedResidualLayer | # 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.nn impor... | yulonglin/bert | NormedResidualLayer | false | 13,168 | [
"MIT"
] | 0 | 7f992e88f109e4267b0e84f8398cab0561a67f4f | https://github.com/yulonglin/bert/tree/7f992e88f109e4267b0e84f8398cab0561a67f4f |
SlidingWindowCmn | import torch
from torch import Tensor
import torchaudio.functional as F
class SlidingWindowCmn(torch.nn.Module):
"""
Apply sliding-window cepstral mean (and optionally variance) normalization per utterance.
Args:
cmn_window (int, optional): Window in frames for running average CMN computation (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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
reinterpret... | Nayef211/audio | SlidingWindowCmn | false | 11,742 | [
"BSD-2-Clause"
] | 0 | 241ab1e8284e589262f510ee9411baf2bc374ded | https://github.com/Nayef211/audio/tree/241ab1e8284e589262f510ee9411baf2bc374ded |
HSwish | import torch
import torch.nn as nn
import torch.nn
class HSwish(nn.Module):
"""
H-Swish activation function from 'Searching for MobileNetV3,' https://arxiv.org/abs/1905.02244.
Parameters:
----------
inplace : bool
Whether to use inplace version of the module.
"""
def __init__(self... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert... | Kthyeon/micronet_neurips_challenge | HSwish | false | 8,413 | [
"MIT"
] | 19 | 9f71fb752e8fbd5abca07be530f7fb19e164125c | https://github.com/Kthyeon/micronet_neurips_challenge/tree/9f71fb752e8fbd5abca07be530f7fb19e164125c |
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.... | HCDM/XRec | Attn | false | 521 | [
"MIT"
] | 0 | dae7d3e1237b8e41913656eb33d81e78c61424ea | https://github.com/HCDM/XRec/tree/dae7d3e1237b8e41913656eb33d81e78c61424ea |
FCN8s | # 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 numpy as np
import tor... | MatthewKleinsmith/portrait-seg | FCN8s | false | 14,775 | [
"MIT"
] | 50 | 0dcdd5952c6d10aa103c4997556559173d922687 | https://github.com/MatthewKleinsmith/portrait-seg/tree/0dcdd5952c6d10aa103c4997556559173d922687 |
ReconstructionLoss | import torch
from functools import reduce
import torch.nn as nn
class BaseModule(nn.Module):
"""
Implements the basic module.
All other modules inherit from this one
"""
def load_w(self, checkpoint_path):
"""
Loads a checkpoint into the state_dict.
:param checkpoint_path:... | 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 functools import reduce
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | BotanAtomic/anomaly-detection | ReconstructionLoss | false | 13,401 | [
"MIT"
] | 179 | 6617880f19a4955d70a34a3bbee83f157eb087f8 | https://github.com/BotanAtomic/anomaly-detection/tree/6617880f19a4955d70a34a3bbee83f157eb087f8 |
ELUPlus | # 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
from torch import nn
import torch.nn
assert_size_stride = torch._C._dynamo.guar... | UzTak/nflows | ELUPlus | false | 1,197 | [
"MIT"
] | 0 | 7211b129bfd60fabed199a1d2a3272b2aac8bbda | https://github.com/UzTak/nflows/tree/7211b129bfd60fabed199a1d2a3272b2aac8bbda |
BasicModel_ConvNet_One_Conv | # 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_... | aravipati12/captum | BasicModel_ConvNet_One_Conv | false | 10,106 | [
"BSD-3-Clause"
] | 0 | ef3e81d89c8c4404a49c384cf0727f2e7d393f5f | https://github.com/aravipati12/captum/tree/ef3e81d89c8c4404a49c384cf0727f2e7d393f5f |
QNet | import torch
class QNet(torch.nn.Module):
def __init__(self, n_features):
super(QNet, self).__init__()
self.fc1 = torch.nn.Linear(n_features, 20)
self.fc1_activate = torch.nn.ReLU()
self.fc2 = torch.nn.Linear(20, 1)
def forward(self, x):
x = self.fc1(x)
x = se... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
assert_size_stride = torch._C... | Lovestarni/Reinforcement-learning-with-tensorflow | QNet | false | 9,288 | [
"MIT"
] | 0 | 822a4ae812b044687c11138ef9c9db1e1190f98c | https://github.com/Lovestarni/Reinforcement-learning-with-tensorflow/tree/822a4ae812b044687c11138ef9c9db1e1190f98c |
MLP3_clamp_eval | # 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.... | RuokaiYin/UnarySim | MLP3_clamp_eval | false | 5,778 | [
"MIT"
] | 1 | 343ff9abf356a63d526b1df8eb946ad528690a27 | https://github.com/RuokaiYin/UnarySim/tree/343ff9abf356a63d526b1df8eb946ad528690a27 |
ConvEncoder | import torch
import torch.nn as nn
class ConvEncoder(nn.Module):
"""
A simple Convolutional Encoder Model
"""
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(3, 16, (3, 3), padding=(1, 1))
self.relu1 = nn.ReLU(inplace=True)
self.maxpool1 = nn.MaxPool2d((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
import torch.nn as nn
assert_... | Alexander-Minyushkin/image_similarity | ConvEncoder | false | 13,339 | [
"Apache-2.0"
] | 160 | 99bb68f0ccf226c068c43ad4feb47b76f7a5f180 | https://github.com/Alexander-Minyushkin/image_similarity/tree/99bb68f0ccf226c068c43ad4feb47b76f7a5f180 |
SoftAttention | # 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.... | Pratyush1991/crop-type-mapping | SoftAttention | false | 14,253 | [
"MIT"
] | 94 | d9d99ec92c3a090ec5576f9e46c89dfcc6f50cf3 | https://github.com/Pratyush1991/crop-type-mapping/tree/d9d99ec92c3a090ec5576f9e46c89dfcc6f50cf3 |
decoder5 | import torch
import torch.nn as nn
class decoder5(nn.Module):
def __init__(self):
super(decoder5, self).__init__()
self.reflecPad15 = nn.ReflectionPad2d((1, 1, 1, 1))
self.conv15 = nn.Conv2d(512, 512, 3, 1, 0)
self.relu15 = nn.ReLU(inplace=True)
self.unpool = nn.Upsampling... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | guswl8033/ARtists | decoder5 | false | 3,603 | [
"Apache-2.0"
] | 0 | d353195872c1ef1a1aa68659a32fb47779a416fc | https://github.com/guswl8033/ARtists/tree/d353195872c1ef1a1aa68659a32fb47779a416fc |
Encoding | import torch
import torch.nn.functional as F
import torch.nn as nn
import torch._C
import torch.serialization
class Encoding(nn.Module):
"""Encoding Layer: a learnable residual encoder.
Input is of shape (batch_size, channels, height, width).
Output is of shape (batch_size, num_codes, channels).
Ar... | 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
... | CVIU-CSU/M2MRF-Lesion-Segmentation | Encoding | false | 17,066 | [
"Apache-2.0"
] | 10 | 13af87927f4cdeca70e35d570edd1aec43b387b6 | https://github.com/CVIU-CSU/M2MRF-Lesion-Segmentation/tree/13af87927f4cdeca70e35d570edd1aec43b387b6 |
SpatialAttentionModule | import torch
import torch.nn as nn
import torch.utils.data
class SpatialAttentionModule(nn.Module):
def __init__(self):
super(SpatialAttentionModule, self).__init__()
self.conv2d = nn.Conv2d(in_channels=2, out_channels=1, kernel_size=
7, stride=1, padding=3)
self.sigmoid = 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
import torch.nn as nn
import ... | lidawei0124/ISD_yolo_dual | SpatialAttentionModule | false | 7,085 | [
"Apache-2.0"
] | 1 | a4617a6ad20b3988f3b422df7a1b8533e32e241b | https://github.com/lidawei0124/ISD_yolo_dual/tree/a4617a6ad20b3988f3b422df7a1b8533e32e241b |
ShuffleBlock | import torch
from torch import nn
class ShuffleBlock(nn.Module):
def __init__(self, groups=2):
super(ShuffleBlock, self).__init__()
self.groups = groups
def forward(self, x):
"""Channel shuffle: [N,C,H,W] -> [N,g,C/g,H,W] -> [N,C/g,g,H,w] -> [N,C,H,W]"""
N, C, H, W = x.size()... | 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... | Alibaba-MIIL/HeadSharingKD | ShuffleBlock | false | 7,654 | [
"BSD-2-Clause"
] | 15 | 8e2738bf069c7d12ec933f9b9107f267f7b6603a | https://github.com/Alibaba-MIIL/HeadSharingKD/tree/8e2738bf069c7d12ec933f9b9107f267f7b6603a |
NextSentencePrediction | import torch
import torch.nn as nn
class NextSentencePrediction(nn.Module):
"""
2-class classification model : is_next, is_not_next
"""
def __init__(self, hidden):
"""
:param hidden: BERT model output size
"""
super().__init__()
self.linear = nn.Linear(hidden, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | JacobTyo/Syntax-Encoding_EMNLP2018 | NextSentencePrediction | false | 11,657 | [
"MIT"
] | 0 | 5aed2fdd01dc7d0baebbd555c97a25fedbde0c39 | https://github.com/JacobTyo/Syntax-Encoding_EMNLP2018/tree/5aed2fdd01dc7d0baebbd555c97a25fedbde0c39 |
SpatialAttentionGate | import torch
from torch import nn
from torch.nn import functional as F
class SpatialAttentionGate(nn.Module):
def __init__(self, channel, reduction=16):
super(SpatialAttentionGate, self).__init__()
self.fc1 = nn.Conv2d(channel, reduction, kernel_size=1, padding=0)
self.fc2 = nn.Conv2d(red... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | Diyago/Automatic-salt-deposits-segmentation | SpatialAttentionGate | false | 7,999 | [
"MIT"
] | 20 | fedfc7f1d9878674382eeb16a820b5f16791f4ab | https://github.com/Diyago/Automatic-salt-deposits-segmentation/tree/fedfc7f1d9878674382eeb16a820b5f16791f4ab |
stage_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
import torch.nn as nn
import ... | kacel33/ActionAI_PC | stage_block | false | 15,787 | [
"MIT"
] | 1,311 | a0528f49ea61cc07d7c1e9a3cd6846e5f50cfae7 | https://github.com/kacel33/ActionAI_PC/tree/a0528f49ea61cc07d7c1e9a3cd6846e5f50cfae7 |
ThetaEncoder | import torch
from torch import nn
class ThetaEncoder(nn.Module):
def __init__(self, encoder_len):
super(ThetaEncoder, self).__init__()
self.encoder_len = encoder_len
self.omega = 1
def forward(self, theta):
"""
:param theta: [B, lead_num, 2]
:return: [B, lead_... | 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
assert_size_stride = torch._C._dynamo.guards.assert_... | yhy489275918/Electrocardio-Panorama | ThetaEncoder | false | 4,616 | [
"MIT"
] | 0 | 1acdbb43d873ce98a0350b7912b6b190e026d3db | https://github.com/yhy489275918/Electrocardio-Panorama/tree/1acdbb43d873ce98a0350b7912b6b190e026d3db |
NeuralNet1 | import torch
import torch.nn as nn
class NeuralNet1(nn.Module):
def __init__(self, input_size, hidden_size):
super(NeuralNet1, self).__init__()
self.linear1 = nn.Linear(input_size, hidden_size)
self.relu = nn.ReLU()
self.linear2 = nn.Linear(hidden_size, 1)
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
assert_... | KOPFYF/pytorchTutorial | NeuralNet1 | false | 701 | [
"MIT"
] | 0 | 4ed7642049a0fba46edd505a23ffcea9d8e03679 | https://github.com/KOPFYF/pytorchTutorial/tree/4ed7642049a0fba46edd505a23ffcea9d8e03679 |
VitMlpHead | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
assert_size_stride ... | sourcery-ai-bot/Megatron-LM | VitMlpHead | false | 4,377 | [
"MIT"
] | 0 | f27f44e2c49d1cb39b2288bef6f7d837e11094cb | https://github.com/sourcery-ai-bot/Megatron-LM/tree/f27f44e2c49d1cb39b2288bef6f7d837e11094cb |
_ASPPModule | import torch
import torch.nn as nn
class _ASPPModule(nn.Module):
"""Atrous Spatial Pyramid Pooling"""
def __init__(self, in_channels, out_channels, pyramids):
super(_ASPPModule, self).__init__()
self.stages = nn.Module()
for i, (dilation, padding) in enumerate(zip(pyramids, pyramids))... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | LcDog/APL | _ASPPModule | false | 17,562 | [
"MIT"
] | 7 | a4302b5d28d63672eda7eff35075b3bce3eccd68 | https://github.com/LcDog/APL/tree/a4302b5d28d63672eda7eff35075b3bce3eccd68 |
MapReduce | # 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... | ZitongYu/pidinet | MapReduce | false | 18,202 | [
"MIT"
] | 5 | 15cdf9fb056549934877675bf7571b427f86db55 | https://github.com/ZitongYu/pidinet/tree/15cdf9fb056549934877675bf7571b427f86db55 |
GlobalAttention | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_st... | StefOe/selection-masks | GlobalAttention | false | 2,860 | [
"BSD-2-Clause"
] | 0 | e59487bffe3c30bdab7a6425bed01f6adeda4f67 | https://github.com/StefOe/selection-masks/tree/e59487bffe3c30bdab7a6425bed01f6adeda4f67 |
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.... | tjkemp/tennis-example | Actor | false | 13,039 | [
"MIT"
] | 0 | 3cb0c52a93c65f88872cf44e3782bf87d9d8cef3 | https://github.com/tjkemp/tennis-example/tree/3cb0c52a93c65f88872cf44e3782bf87d9d8cef3 |
ConvLayer | import torch
import torch.nn as nn
from torch.nn.utils import weight_norm
class ConvLayer(nn.Module):
def __init__(self, input_units, output_units, filter_size,
padding_sizes, dropout=0.2):
super(ConvLayer, self).__init__()
self.conv = weight_norm(nn.Conv1d(in_channels=input_units,
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | RandolphVI/HyperNet | ConvLayer | false | 5,757 | [
"Apache-2.0"
] | 1 | e9f376f5eb087e57360ca41cca2533c3ca967e47 | https://github.com/RandolphVI/HyperNet/tree/e9f376f5eb087e57360ca41cca2533c3ca967e47 |
MSE | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import torch.utils.checkpoint
assert_size_stride = torch._C._dynamo... | lyh512796310/MMSA | MSE | false | 3,948 | [
"MIT"
] | 0 | e1735afd1b4e763995ab7aacb001884a7b7146ff | https://github.com/lyh512796310/MMSA/tree/e1735afd1b4e763995ab7aacb001884a7b7146ff |
BasicLinearNet | import torch
import torch.nn as nn
class BasicLinearNet(nn.Module):
def __init__(self, in_features, hidden_nodes, out_features):
super().__init__()
self.linear1 = nn.Linear(in_features, hidden_nodes)
self.linear2 = nn.Linear(hidden_nodes, out_features)
def forward(self, 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
import torch.nn as ... | dkrako/captum | BasicLinearNet | false | 10,032 | [
"BSD-3-Clause"
] | 0 | b5297bacbaec4e37f353a27de5e728bc2cbc1694 | https://github.com/dkrako/captum/tree/b5297bacbaec4e37f353a27de5e728bc2cbc1694 |
testHSwish | # 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... | CaichaoGitHub/model_optimization_demo | testHSwish | false | 11,281 | [
"Apache-2.0"
] | 0 | b3bca3ad4a1b972fe069049f9efd7365a22733c6 | https://github.com/CaichaoGitHub/model_optimization_demo/tree/b3bca3ad4a1b972fe069049f9efd7365a22733c6 |
PerfectProd | # 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.utils.data
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._... | hoedt/stable-nalu | PerfectProd | false | 3,597 | [
"MIT"
] | 0 | 64b3d240db8bff4da857d955f213ef3c7e38e035 | https://github.com/hoedt/stable-nalu/tree/64b3d240db8bff4da857d955f213ef3c7e38e035 |
SmoothL1Loss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
import torch.cuda
import torch.distributed
import t... | pkashinkunti/retinanet-examples | SmoothL1Loss | false | 7,465 | [
"BSD-3-Clause"
] | 1 | 30466522c018d4d0bd921485024e871b32ec4e73 | https://github.com/pkashinkunti/retinanet-examples/tree/30466522c018d4d0bd921485024e871b32ec4e73 |
LinearBlock | import torch
from scipy.stats import truncnorm
def truncated_normal_(tensor, mean=0.0, std=1.0):
values = truncnorm.rvs(-2, 2, size=tensor.shape)
values = mean + std * values
tensor.copy_(torch.from_numpy(values))
return tensor
def fc_init_(module):
if hasattr(module, 'weight') and module.weight... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Barchid/snn-fsl | LinearBlock | false | 5,152 | [
"Apache-2.0"
] | 1 | 8adca6b7541d51b4ac4198f00e784e54589b4c9d | https://github.com/Barchid/snn-fsl/tree/8adca6b7541d51b4ac4198f00e784e54589b4c9d |
ScaledDotProductAttention | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | AutuanLiu/LeetCode2019 | ScaledDotProductAttention | false | 4,875 | [
"MIT"
] | 1 | 8efc7c5475fd888f7d86c3b08a3c1c9e55c1ac30 | https://github.com/AutuanLiu/LeetCode2019/tree/8efc7c5475fd888f7d86c3b08a3c1c9e55c1ac30 |
EqualLinear | # 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 math
from torch import nn
assert_size... | Dolorousrtur/style-people | EqualLinear | false | 8,021 | [
"MIT"
] | 15 | c48b12b245cc50f8230c0654dffe40016f2a69f1 | https://github.com/Dolorousrtur/style-people/tree/c48b12b245cc50f8230c0654dffe40016f2a69f1 |
Discrete | import torch
import torch.nn as nn
class Discrete(nn.Module):
def __init__(self):
super(Discrete, self).__init__()
def forward(self, x):
return nn.functional.softmax(x, dim=0)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | MPGek/client | Discrete | false | 5,572 | [
"Apache-2.0"
] | 1 | 541d760c5cb8776b1ad5fcf1362d7382811cbc61 | https://github.com/MPGek/client/tree/541d760c5cb8776b1ad5fcf1362d7382811cbc61 |
SinActv | import torch
import torch.nn as nn
class SinActv(nn.Module):
def __init__(self):
super().__init__()
def forward(self, input_):
return torch.sin(input_)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | gnicks007/neurodiffeq | SinActv | false | 10,081 | [
"MIT"
] | 0 | a4a4fd2379442937b748712e1cf45510aba6f0c0 | https://github.com/gnicks007/neurodiffeq/tree/a4a4fd2379442937b748712e1cf45510aba6f0c0 |
BiAttention | import torch
from torchvision.transforms import functional as F
import torch.utils.data
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils import weight_norm
class FCNet(nn.Module):
def __init__(self, in_size, out_size, activate=None, drop=0.0):
super(FCNet, self).__init__()
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | KaihuaTang/scene-graph-benchmark.pytorch | BiAttention | false | 5,443 | [
"MIT"
] | 1 | 45cd54f7465b81d3154e94fcab2b554a09637f6f | https://github.com/KaihuaTang/scene-graph-benchmark.pytorch/tree/45cd54f7465b81d3154e94fcab2b554a09637f6f |
HDRLoss | # 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... | CirilBohak/noise2noise-pytorch | HDRLoss | false | 8,908 | [
"MIT"
] | 0 | e517366248a62ce0b7e3710199b02b27261aa639 | https://github.com/CirilBohak/noise2noise-pytorch/tree/e517366248a62ce0b7e3710199b02b27261aa639 |
HuberLoss | # 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
i... | Haichao-Zhang/leap | HuberLoss | false | 8,196 | [
"MIT"
] | 36 | 4d75961ff2ff203d4412633cbeb12889de3c79b6 | https://github.com/Haichao-Zhang/leap/tree/4d75961ff2ff203d4412633cbeb12889de3c79b6 |
FilterNorm | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
from torch.nn.init import calculate_gain
import torch.nn.... | OutBreak-hui/ddfnet | FilterNorm | false | 5,712 | [
"MIT"
] | 1 | 65f67692352a2c083b5d7e003e320629a86e8460 | https://github.com/OutBreak-hui/ddfnet/tree/65f67692352a2c083b5d7e003e320629a86e8460 |
ResnetBlockInplaceNormShallowConv1d | # 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.... | taconite/MetaAvatar-release | ResnetBlockInplaceNormShallowConv1d | false | 16,525 | [
"MIT"
] | 60 | c9403a478ee82232633d25f65f108befd21d04e9 | https://github.com/taconite/MetaAvatar-release/tree/c9403a478ee82232633d25f65f108befd21d04e9 |
TorchSub | import torch
class TorchSub(torch.nn.Module):
def __init__(self):
super(TorchSub, self).__init__()
def forward(self, x, y):
return torch.sub(x, y)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | Ilyabasharov/torch2trt | TorchSub | false | 2,559 | [
"MIT"
] | 0 | 76bf298b3da408509665e23e2494922b131afb10 | https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10 |
PACRRConvMax2dModule | # 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... | gitter-badger/FlexNeuART | PACRRConvMax2dModule | false | 15,433 | [
"Apache-2.0"
] | 101 | f69e5421bdebe9db0d993b5470dace61872f90df | https://github.com/gitter-badger/FlexNeuART/tree/f69e5421bdebe9db0d993b5470dace61872f90df |
ChamferLoss | # 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
import torch.nn as nn
assert_... | GitMarco27/GitMarco | ChamferLoss | false | 9,249 | [
"MIT"
] | 0 | 2d9dd93a73a6d7b68d63222512a646cdd988909e | https://github.com/GitMarco27/GitMarco/tree/2d9dd93a73a6d7b68d63222512a646cdd988909e |
KdCeLoss | # 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
... | lonePatient/TorchBlocks | KdCeLoss | false | 15,969 | [
"MIT"
] | 82 | 4a65d746cc8a396cb7df73ed4644d97ddf843e29 | https://github.com/lonePatient/TorchBlocks/tree/4a65d746cc8a396cb7df73ed4644d97ddf843e29 |
LayerNorm | import torch
import torch.nn as nn
from torch.nn import Parameter
from torch.nn.parameter import Parameter
from torch.nn.modules.normalization import LayerNorm
from torch.optim.lr_scheduler import *
class LayerNorm(nn.Module):
def __init__(self, hidden_size, eps=0.0001):
super(LayerNorm, self).__init__()... | 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
from torch.nn import Parameter
from torch.nn.parameter im... | anlewy/mt-dnn | LayerNorm | false | 14,879 | [
"MIT"
] | 2,075 | eeb6f01ce0630e61a52b8c9c6f7537cd34978e45 | https://github.com/anlewy/mt-dnn/tree/eeb6f01ce0630e61a52b8c9c6f7537cd34978e45 |
BinaryLoss | import torch
import torch.nn as nn
import torch.nn.functional as F
class BinaryLoss(nn.Module):
def __init__(self):
super(BinaryLoss, self).__init__()
def forward(self, pos_score, neg_score):
pos_loss = -F.log_softmax(pos_score)[:, 1]
neg_loss = -F.log_softmax(neg_score)[:, 0]
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | Kitware/VAIME | BinaryLoss | false | 13,969 | [
"BSD-3-Clause"
] | 127 | 47b24b9d8a208cf8c621e5bb1088c61fcf507af6 | https://github.com/Kitware/VAIME/tree/47b24b9d8a208cf8c621e5bb1088c61fcf507af6 |
EqualizedWeight | import math
import torch
import numpy as np
from torch import nn
import torch.utils.data
from typing import List
import torch.nn.functional
import torch.autograd
class EqualizedWeight(nn.Module):
"""
<a id="equalized_weight"></a>
## Learning-rate Equalized Weights Parameter
This is based on equalize... | 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 numpy as np
from torch import nn
import torch.utils.data
from typing import List
import torch.nn.functional
import torch.... | techthiyanes/annotated_deep_learning_paper_implementations | EqualizedWeight | false | 16,550 | [
"MIT"
] | 3,714 | 8af24da2dd39a9a87482a4d18c2dc829bbd3fd47 | https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47 |
HSwish | # 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.utils.data
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guard... | HyperGAN/imgclsmob | HSwish | false | 17,669 | [
"MIT"
] | 9 | 88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3 | https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3 |
Atom_Wise_Convolution | # 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... | QMrpy/deepchem | Atom_Wise_Convolution | false | 2,739 | [
"MIT"
] | 0 | f38a21c71e7bc4fd1fa59601be2b79ce7d744bd6 | https://github.com/QMrpy/deepchem/tree/f38a21c71e7bc4fd1fa59601be2b79ce7d744bd6 |
ReduceMeanModule | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | mirecta/nncase | ReduceMeanModule | false | 4,178 | [
"Apache-2.0"
] | 0 | d2efa59677a26f4259b3b6a5b6ec05ea16d4e40c | https://github.com/mirecta/nncase/tree/d2efa59677a26f4259b3b6a5b6ec05ea16d4e40c |
GlobalAttention | import torch
import torch.nn as nn
import torch.cuda
def aeq(*args):
"""
Assert all arguments have the same value
"""
arguments = (arg for arg in args)
first = next(arguments)
assert all(arg == first for arg in arguments
), 'Not all arguments have the same value: ' + str(args)
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.... | FrameNetBrasil/OpenNMT-py | GlobalAttention | false | 9,063 | [
"MIT"
] | 0 | f14a8f325ec2e482ea9aa6e12fbf3544bc68631b | https://github.com/FrameNetBrasil/OpenNMT-py/tree/f14a8f325ec2e482ea9aa6e12fbf3544bc68631b |
SimpleOrModule | import torch
import torch.jit
import torch.onnx
import torch.nn
class SimpleOrModule(torch.nn.Module):
def __init__(self):
super(SimpleOrModule, self).__init__()
def forward(self, a, b):
c = torch.logical_or(a, b)
return torch.logical_or(c, c)
def get_inputs():
return [torch.ra... | 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.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | andreas-hommel/glow | SimpleOrModule | false | 3,346 | [
"Apache-2.0"
] | 0 | 2bbbf8188a2a941e85677c83f2146bbd076a262e | https://github.com/andreas-hommel/glow/tree/2bbbf8188a2a941e85677c83f2146bbd076a262e |
Policy | # 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_... | BenKang34/deep-reinforcement-learning-nanodegree | Policy | false | 153 | [
"MIT"
] | 0 | 17c9007f757dfb1217c869fdee51798c4a21ba92 | https://github.com/BenKang34/deep-reinforcement-learning-nanodegree/tree/17c9007f757dfb1217c869fdee51798c4a21ba92 |
MMDLoss | import torch
from torch import nn
import torch.nn.parallel
def gaussian_kernel(source, target, kernel_mul=2.0, kernel_num=5, fix_sigma
=None):
n_samples = int(source.size()[0]) + int(target.size()[0])
total = torch.cat([source, target], dim=0)
total0 = total.unsqueeze(0).expand(int(total.size(0)), int... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch import nn
import torch.nn.parallel
assert_size_stride = torch.... | DA4EVENT/home | MMDLoss | false | 17,184 | [
"MIT"
] | 5 | 18cc93a795ce132e05b886aa34565a102915b1c6 | https://github.com/DA4EVENT/home/tree/18cc93a795ce132e05b886aa34565a102915b1c6 |
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
import ... | clairecw/TD3 | Critic | false | 1,734 | [
"MIT"
] | 0 | 22840c0ee1620086c2495d859be2c3b7a4c70f3f | https://github.com/clairecw/TD3/tree/22840c0ee1620086c2495d859be2c3b7a4c70f3f |
Block | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
import t... | Alwaysproblem/examples-1 | Block | false | 82 | [
"MIT"
] | 0 | 9754fa63ed1931489a21ac1f5b299f945e369a5c | https://github.com/Alwaysproblem/examples-1/tree/9754fa63ed1931489a21ac1f5b299f945e369a5c |
Policy | import torch
import torch.nn.functional as F
from torch.autograd import Variable
class Policy(torch.nn.Module):
def __init__(self, x_size, g_size, u_size, hidden_size=64):
super(Policy, self).__init__()
self.fc1 = torch.nn.Linear(x_size + g_size, hidden_size)
self.fc2 = torch.nn.Linear(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.... | JoshuaHaustein/oracle_server | Policy | false | 2,440 | [
"BSD-3-Clause"
] | 0 | 9dc54cd03e28eee6d546b811ce32bcc4d16cec0c | https://github.com/JoshuaHaustein/oracle_server/tree/9dc54cd03e28eee6d546b811ce32bcc4d16cec0c |
Scaled_Dot_Product_Attention | import torch
import torch.nn as nn
import torch.nn.functional as F
class Scaled_Dot_Product_Attention(nn.Module):
"""Scaled Dot-Product Attention """
def __init__(self):
super(Scaled_Dot_Product_Attention, self).__init__()
def forward(self, Q, K, V, scale=None):
"""
Args:
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Moon-xm/Chinese-Text-Classification-Pytorch | Scaled_Dot_Product_Attention | false | 11,721 | [
"MIT"
] | 0 | 19fe64006418bf4296f884e4d1f038c17b34d3de | https://github.com/Moon-xm/Chinese-Text-Classification-Pytorch/tree/19fe64006418bf4296f884e4d1f038c17b34d3de |
IntegIndepenPathLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import numpy as np
import torch.utils.data
import torch
import torch.nn a... | KingOnTheStar/pytorch-CycleGAN-and-pix2pix | IntegIndepenPathLoss | false | 728 | [
"BSD-3-Clause"
] | 0 | 9016b98d09902975b49a07c394bb0d5066e2aa55 | https://github.com/KingOnTheStar/pytorch-CycleGAN-and-pix2pix/tree/9016b98d09902975b49a07c394bb0d5066e2aa55 |
BERTMultSelfOutput | # 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_... | Chriskuei/FedMatch | BERTMultSelfOutput | false | 18,356 | [
"Apache-2.0"
] | 4 | 305e8c4bbb398712b00c883a986dfec17b500f76 | https://github.com/Chriskuei/FedMatch/tree/305e8c4bbb398712b00c883a986dfec17b500f76 |
InitialSpanEncoder | # 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.... | cmdowney88/XLSLM | InitialSpanEncoder | false | 3,301 | [
"MIT"
] | 0 | 7fe266bd0f0ad8a79a30052a18104b974d1c32e8 | https://github.com/cmdowney88/XLSLM/tree/7fe266bd0f0ad8a79a30052a18104b974d1c32e8 |
GraphConvolution | from torch.nn import Module
import torch
from torch.nn import Parameter
from torch.nn import functional as F
import torch.multiprocessing
import torch.utils.data
from torch.nn.modules.module import Module
from torch.nn.parameter import Parameter
import torch.nn.modules.loss
class GraphConvolution(Module):
"""
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch.nn import Module
f... | cminusQAQ/graph4nlp | GraphConvolution | false | 15,044 | [
"Apache-2.0"
] | 1,269 | d980e897131f1b9d3766750c06316d94749904fa | https://github.com/cminusQAQ/graph4nlp/tree/d980e897131f1b9d3766750c06316d94749904fa |
ConcatConv2d | import torch
import torch.utils.data
import torch.nn as nn
class ConcatConv2d(nn.Module):
def __init__(self, dim_in, dim_out, ksize=3, stride=1, padding=0,
dilation=1, groups=1, bias=True, transpose=False):
super(ConcatConv2d, self).__init__()
module = nn.ConvTranspose2d if transpose 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
import torch.utils.data
import torch.nn as nn
assert_size_stride = torch._C._dyn... | TevenLeScao/BasicSR | ConcatConv2d | false | 18,000 | [
"Apache-2.0"
] | 4 | 1a7bd8754de00f3a9c9f2031acfc447350459ea0 | https://github.com/TevenLeScao/BasicSR/tree/1a7bd8754de00f3a9c9f2031acfc447350459ea0 |
ActFirstResBlock | import torch
from torch import nn
import torch.nn.functional as F
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
from torch im... | PredatorK9/GANwriting | ActFirstResBlock | false | 9,431 | [
"MIT"
] | 0 | 246d7e87152c98f0c6af999d619dc51190fad8ae | https://github.com/PredatorK9/GANwriting/tree/246d7e87152c98f0c6af999d619dc51190fad8ae |
SpatialAttention | import torch
import torch.nn as nn
class SpatialAttention(nn.Module):
def __init__(self, kernel_size=7):
super(SpatialAttention, self).__init__()
assert kernel_size in (3, 7), 'kernel size must be 3 or 7'
padding = 3 if kernel_size == 7 else 1
self.conv1 = nn.Conv2d(2, 1, kernel_s... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | Andyeyeye/MTANet | SpatialAttention | false | 16,915 | [
"MIT"
] | 8 | 65f5c356b18400bd1d1b80cffa1ec9f8c6570d2a | https://github.com/Andyeyeye/MTANet/tree/65f5c356b18400bd1d1b80cffa1ec9f8c6570d2a |
L1Norm | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import ... | oskyhn/CNNs-Without-Borders | L1Norm | false | 16,207 | [
"BSD-3-Clause"
] | 74 | 4fae1d8fd64c3c917f5c78c3513a60572af961b1 | https://github.com/oskyhn/CNNs-Without-Borders/tree/4fae1d8fd64c3c917f5c78c3513a60572af961b1 |
MultiLayeredConv1d | # 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... | karan-deepsync/FastSpeech2 | MultiLayeredConv1d | false | 15,781 | [
"Apache-2.0"
] | 148 | 84ad261db4a865536b2e15dfb8346644c3192704 | https://github.com/karan-deepsync/FastSpeech2/tree/84ad261db4a865536b2e15dfb8346644c3192704 |
Tacotron2Loss | # 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... | leijue222/tacotron2 | Tacotron2Loss | false | 15,891 | [
"BSD-3-Clause"
] | 93 | 5950728a91e7a9355f42f658e00db2a2aef94247 | https://github.com/leijue222/tacotron2/tree/5950728a91e7a9355f42f658e00db2a2aef94247 |
RegKappa | # 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.modules.loss i... | Ramstein/Retinopathy2 | RegKappa | false | 981 | [
"MIT"
] | 0 | 669e74206c466e6351d4e3df6087c6aa39b5c6c2 | https://github.com/Ramstein/Retinopathy2/tree/669e74206c466e6351d4e3df6087c6aa39b5c6c2 |
Decoder | import torch
from torch import nn
class Decoder(nn.Module):
def __init__(self, layer_sizes, latent_size, nlabels):
super(Decoder, self).__init__()
self.MLP = nn.Sequential()
input_size = latent_size + nlabels
for i, (in_size, out_size) in enumerate(zip([input_size] +
l... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | NREL/ml-combustion-pdf-models | Decoder | false | 17,735 | [
"Apache-2.0"
] | 6 | 0505b9c54ab4c1e2b7ef8ca9f59f76bfb2e3732d | https://github.com/NREL/ml-combustion-pdf-models/tree/0505b9c54ab4c1e2b7ef8ca9f59f76bfb2e3732d |
ArctanLayer | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import torch.nn
from abc import ABCMeta
from abc import a... | Isaac-Li-cn/certify_robustness | ArctanLayer | false | 568 | [
"BSD-3-Clause"
] | 0 | f904dc923afc6354e406c57a1c923d13fc39d315 | https://github.com/Isaac-Li-cn/certify_robustness/tree/f904dc923afc6354e406c57a1c923d13fc39d315 |
SEModule | import torch
import torch.nn as nn
import torch.nn.functional as F
class SEModule(nn.Module):
def __init__(self, channels, reduction):
super(SEModule, self).__init__()
self.fc1 = nn.Conv2d(channels, channels // reduction, kernel_size=1,
padding=0)
self.fc2 = nn.Conv2d(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
assert_... | Chaucergit/iNaturalist2019 | SEModule | false | 4,982 | [
"MIT"
] | 1 | 17ae07c959fd5edf5f4a9b93ef8c21e434fadbf8 | https://github.com/Chaucergit/iNaturalist2019/tree/17ae07c959fd5edf5f4a9b93ef8c21e434fadbf8 |
CoSirenModule | import math
import torch
import torch.nn
class CoSirenModule(torch.nn.Module):
def __init__(self, in_features, out_features, weight_multiplier=1.0):
super(CoSirenModule, self).__init__()
self.linear = torch.nn.Linear(in_features, out_features // 2)
init_bounds = math.sqrt(24 / in_features... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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
i... | ashwinpn/Computer-Vision | CoSirenModule | false | 6,257 | [
"MIT"
] | 1 | 9dc3abfe416385171b76e2bad6872e10f36a12b4 | https://github.com/ashwinpn/Computer-Vision/tree/9dc3abfe416385171b76e2bad6872e10f36a12b4 |
HSigmoid | # 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... | JasonZuu/Frame-Selection | HSigmoid | false | 5,380 | [
"BSD-3-Clause"
] | 1 | 3eb6ecdbf8e5695ba53752bdd8446def9c5cfbb9 | https://github.com/JasonZuu/Frame-Selection/tree/3eb6ecdbf8e5695ba53752bdd8446def9c5cfbb9 |
SplAtConv2d | from torch.nn import Module
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import Conv2d
from torch.nn import ReLU
from torch.nn.modules.utils import _pair
class DropBlock2D(object):
def __init__(self, *args, **kwargs):
raise NotImplementedError
class rSoftMax(nn.Modul... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | XuYongi/KiNet | SplAtConv2d | false | 12,041 | [
"MIT"
] | 0 | fab8865a09e3779baf0daf1db1bf59a9cfbde450 | https://github.com/XuYongi/KiNet/tree/fab8865a09e3779baf0daf1db1bf59a9cfbde450 |
DropConnect | # 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 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.triton_helpers import libdevice
assert_size_stride = torch._C._dynamo.guards.assert_si... | jack-willturner/nas-without-training | DropConnect | false | 12,544 | [
"MIT"
] | 0 | d5e915b5f391f51d902f33b1d4beedfe3b09d2e0 | https://github.com/jack-willturner/nas-without-training/tree/d5e915b5f391f51d902f33b1d4beedfe3b09d2e0 |
DenseSAGEConv | import math
import torch
import torch.nn.functional as F
from torch.nn import Parameter
import torch.utils.data
def uniform(size, tensor):
bound = 1.0 / math.sqrt(size)
if tensor is not None:
tensor.data.uniform_(-bound, bound)
class DenseSAGEConv(torch.nn.Module):
"""See :class:`torch_geometric... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import math
from torch.nn imp... | HenrryBryant/pytorch_geometric | DenseSAGEConv | false | 5,307 | [
"MIT"
] | 1 | 3c4466a3f38a2eba92073c730a09953ab5082c3d | https://github.com/HenrryBryant/pytorch_geometric/tree/3c4466a3f38a2eba92073c730a09953ab5082c3d |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.