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 |
|---|---|---|---|---|---|---|---|---|---|---|
Disc | import torch
from torch import nn
from torch.nn import functional as F
class MLP(nn.Module):
"""
Multi-Layer Perceptron
:param in_dim: int, size of input feature
:param n_classes: int, number of output classes
:param hidden_dim: int, size of hidden vector
:param dropout: fl... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
from torch.nn import functional as F
assert_size_stride = t... | bigdata-ustc/DisenQNet | Disc | false | 6,367 | [
"MIT"
] | 1 | 908fadeb9b8d278450213deff70205703bd91da6 | https://github.com/bigdata-ustc/DisenQNet/tree/908fadeb9b8d278450213deff70205703bd91da6 |
RobertaMaskLeanerHead | # 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.... | a1600012888/fairseq | RobertaMaskLeanerHead | false | 3,004 | [
"MIT"
] | 0 | dbd2cd08fc396f919d2e737513095fcb966896c0 | https://github.com/a1600012888/fairseq/tree/dbd2cd08fc396f919d2e737513095fcb966896c0 |
LAM_Gconv | import torch
import torch.nn as nn
class LAM_Gconv(nn.Module):
def __init__(self, in_features, out_features, activation=nn.ReLU(
inplace=True)):
super(LAM_Gconv, self).__init__()
self.fc = nn.Linear(in_features=in_features, out_features=out_features)
self.activation = 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
from torch._inductor.runtime.... | zhaoweixi/GraFormer | LAM_Gconv | false | 16,818 | [
"BSD-2-Clause"
] | 384 | 0a0a04014cdf157c11ab8e952862efa27c6a1980 | https://github.com/zhaoweixi/GraFormer/tree/0a0a04014cdf157c11ab8e952862efa27c6a1980 |
ClassHead | import torch
import torch.nn as nn
from itertools import product as product
class ClassHead(nn.Module):
def __init__(self, inchannels=512, num_anchors=3):
super(ClassHead, self).__init__()
self.num_anchors = num_anchors
self.conv1x1 = nn.Conv2d(inchannels, self.num_anchors * 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
import torch.nn as nn
from itertools import product as product
assert_size_strid... | FacePerceiver/facer | ClassHead | false | 8,143 | [
"MIT"
] | 12 | cbb01dc457f3713050e89af7b2c9c0d98663842c | https://github.com/FacePerceiver/facer/tree/cbb01dc457f3713050e89af7b2c9c0d98663842c |
rSoftMax | import torch
import torch.nn as nn
import torch.nn.functional as F
class rSoftMax(nn.Module):
def __init__(self, radix, cardinality):
super().__init__()
self.radix = radix
self.cardinality = cardinality
def forward(self, x):
batch = x.size(0)
if self.radix > 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.nn as nn
... | XuYongi/KiNet | rSoftMax | false | 11,978 | [
"MIT"
] | 0 | fab8865a09e3779baf0daf1db1bf59a9cfbde450 | https://github.com/XuYongi/KiNet/tree/fab8865a09e3779baf0daf1db1bf59a9cfbde450 |
PatchEmbedding | # 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 ... | HrithikNambiar/vformer | PatchEmbedding | false | 552 | [
"MIT"
] | 0 | 5bd902a45e5cae70ab001ca6c217f12f923561f1 | https://github.com/HrithikNambiar/vformer/tree/5bd902a45e5cae70ab001ca6c217f12f923561f1 |
L2Norm | # 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
import torch.nn as nn
assert... | KarthikGanesan88/stonne | L2Norm | false | 9,269 | [
"MIT"
] | 0 | f228ade67120b9dafac8ea99d201e269b2ad7099 | https://github.com/KarthikGanesan88/stonne/tree/f228ade67120b9dafac8ea99d201e269b2ad7099 |
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)
def se... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | AndrewM1998/MultimodalNMT | GlobalAttention | false | 7,701 | [
"MIT"
] | 40 | b66d3a40ac9bc5c11ae124f51d1a9abf7cd6a04b | https://github.com/AndrewM1998/MultimodalNMT/tree/b66d3a40ac9bc5c11ae124f51d1a9abf7cd6a04b |
IBNbConvBlock | # 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.... | HyperGAN/imgclsmob | IBNbConvBlock | false | 17,677 | [
"MIT"
] | 9 | 88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3 | https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3 |
ActNorm | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | tonyduan/hybrid-models | ActNorm | false | 16,596 | [
"MIT"
] | 238 | a29bff4756d8306cd24515f2fb825763a71c3d90 | https://github.com/tonyduan/hybrid-models/tree/a29bff4756d8306cd24515f2fb825763a71c3d90 |
ToRGB | import math
import torch
from torch import nn
from torch.nn import functional as F
def make_kernel(k):
k = torch.tensor(k, dtype=torch.float32)
if k.ndim == 1:
k = k[None, :] * k[:, None]
k /= k.sum()
return k
def upfirdn2d_native(input, kernel, up_x, up_y, down_x, down_y, pad_x0,
pad_x1... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
from torch import nn
from torch.nn import functional as F
assert_siz... | ishine/GANsNRoses | ToRGB | false | 15,634 | [
"MIT"
] | 969 | 414e9e77c3df47d4ecf7941b5dcfdffec67403ee | https://github.com/ishine/GANsNRoses/tree/414e9e77c3df47d4ecf7941b5dcfdffec67403ee |
MultiHeadedAttention | import math
import torch
from typing import Optional
from typing import Tuple
from torch import nn
class MultiHeadedAttention(nn.Module):
"""Multi-Head Attention layer.
Args:
n_head (int): The number of heads.
n_feat (int): The number of features.
dropout_rate (float): Dropout rate.
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Honghe/wenet | MultiHeadedAttention | false | 5,320 | [
"Apache-2.0"
] | 1 | 4421790bec3778df591816d69f0449930a9be321 | https://github.com/Honghe/wenet/tree/4421790bec3778df591816d69f0449930a9be321 |
DepthwiseSeparableConv | # 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... | Dauriel/weather4cast2021 | DepthwiseSeparableConv | false | 354 | [
"Apache-2.0"
] | 0 | 29e818c4bcd488ec84b51558bf5392e4a887db70 | https://github.com/Dauriel/weather4cast2021/tree/29e818c4bcd488ec84b51558bf5392e4a887db70 |
CapsuleLoss | import torch
from torch import nn
import torch.nn.functional as F
class CapsuleLoss(nn.Module):
def __init__(self):
super(CapsuleLoss, self).__init__()
def forward(self, output, target):
class_loss = (target * F.relu(0.9 - output) + 0.5 * (1 - target) *
F.relu(output - 0.1)).mean... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | WdBlink/AugMix-3DOCUNet-Brats2019 | CapsuleLoss | false | 5,952 | [
"MIT"
] | 1 | 125c6c8682b51a550eeac9173d13d0a211576abc | https://github.com/WdBlink/AugMix-3DOCUNet-Brats2019/tree/125c6c8682b51a550eeac9173d13d0a211576abc |
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 import triton_helpers
import torch.nn as nn
assert_... | linzzzzzz/jacobian_regularizer | MLP | false | 3,921 | [
"MIT"
] | 0 | c74d5b13e670f3ad1fd5a7cec225bca3853b3565 | https://github.com/linzzzzzz/jacobian_regularizer/tree/c74d5b13e670f3ad1fd5a7cec225bca3853b3565 |
MLP | import torch
import torch.nn as nn
class MLP(nn.Module):
def __init__(self, num_actions):
super(MLP, self).__init__()
self.fc = nn.Linear(4, 128)
self.logits = nn.Linear(128, num_actions)
self.value = nn.Linear(128, 1)
def forward(self, x):
x = torch.relu(self.fc(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_... | XFFXFF/endorphin | MLP | false | 18,077 | [
"Apache-2.0"
] | 5 | a29d6faf76284e5346d900dfd4fdeda82c710744 | https://github.com/XFFXFF/endorphin/tree/a29d6faf76284e5346d900dfd4fdeda82c710744 |
PFLDLoss | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
from typing import *
class PFLDLoss(nn.Module):
"""Weighted loss of L2 distance with the pose angle for PFLD."""
def __init__(self):
super(PFLDLoss, self).__init__()
def forward(self, landmark_... | 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 ... | Markus92/nni | PFLDLoss | false | 5,582 | [
"MIT"
] | 1 | 2641c7343f4b411b002bea4f5648941268194ed7 | https://github.com/Markus92/nni/tree/2641c7343f4b411b002bea4f5648941268194ed7 |
LayerNorm | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import numpy as np
assert_size_stride = torch._C._dynamo.guards.assert_size_str... | Sobsz/uberduck-ml-dev | LayerNorm | false | 1,078 | [
"Apache-2.0"
] | 0 | f099238f6f2e3f600d72d89dea3c883c59d91387 | https://github.com/Sobsz/uberduck-ml-dev/tree/f099238f6f2e3f600d72d89dea3c883c59d91387 |
DistMultLayer | # 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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C.... | Brickser/cogdl | DistMultLayer | false | 2,262 | [
"MIT"
] | 0 | 3952dd11075634cc0f3b669996cfc780635ce026 | https://github.com/Brickser/cogdl/tree/3952dd11075634cc0f3b669996cfc780635ce026 |
decoder3 | import torch
from torch import nn
class decoder3(nn.Module):
def __init__(self):
super(decoder3, self).__init__()
self.reflecPad7 = nn.ReflectionPad2d((1, 1, 1, 1))
self.conv7 = nn.Conv2d(256, 128, 3, 1, 0)
self.relu7 = nn.ReLU(inplace=True)
self.unpool = nn.UpsamplingNear... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Holmes-Alan/RefVAE | decoder3 | false | 8,301 | [
"MIT"
] | 13 | 836b8f1168f1b0f923b609a48e202ace7806f79c | https://github.com/Holmes-Alan/RefVAE/tree/836b8f1168f1b0f923b609a48e202ace7806f79c |
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 ... | chenbq1234/CityLearn | Critic | false | 6,426 | [
"MIT"
] | 1 | baa162435954ecd58e7f4769a46fa9046f4d2cf6 | https://github.com/chenbq1234/CityLearn/tree/baa162435954ecd58e7f4769a46fa9046f4d2cf6 |
_MCLSTMCell | from _paritybench_helpers import _mock_config
import torch
from typing import Tuple
import torch.nn as nn
class _Gate(nn.Module):
"""Utility class to implement a standard sigmoid gate"""
def __init__(self, in_features: 'int', out_features: 'int'):
super(_Gate, self).__init__()
self.fc = nn.Li... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | DavidChoi76/neuralhydrology | _MCLSTMCell | false | 15,216 | [
"BSD-3-Clause"
] | 144 | a4c284b92934ee973c8b3fedf8a60df60c8feae1 | https://github.com/DavidChoi76/neuralhydrology/tree/a4c284b92934ee973c8b3fedf8a60df60c8feae1 |
MultiheadAttention | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | dbanys/glide-text2im | MultiheadAttention | false | 3,402 | [
"MIT"
] | 0 | 5177545ec62f1fddc3075a8a69b63df3eb2256a5 | https://github.com/dbanys/glide-text2im/tree/5177545ec62f1fddc3075a8a69b63df3eb2256a5 |
DAGNNConv | import torch
import torch.nn as nn
class DAGNNConv(nn.Module):
def __init__(self, in_features, out_features=1, K=10, bias=False):
super().__init__()
assert out_features == 1, "'out_features' must be 1"
self.in_features = in_features
self.out_features = out_features
self.li... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | EdisonLeeeee/GraphGallery | DAGNNConv | false | 13,640 | [
"MIT"
] | 300 | 4eec9c5136bda14809bd22584b26cc346cdb633b | https://github.com/EdisonLeeeee/GraphGallery/tree/4eec9c5136bda14809bd22584b26cc346cdb633b |
MultiHeadAttention | from torch.nn import Module
import torch
import numpy as np
from torch import nn
class ScaledDotProductAttention(nn.Module):
"""
Scaled dot-product attention
"""
def __init__(self, d_model, d_k, d_v, h):
"""
:param d_model: Output dimensionality of the model
:param d_k: Dimens... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | jmhessel/meshed-memory-transformer | MultiHeadAttention | false | 10,338 | [
"BSD-3-Clause"
] | 0 | b502da2522f2e25d602fba547ed6ebf7968857a9 | https://github.com/jmhessel/meshed-memory-transformer/tree/b502da2522f2e25d602fba547ed6ebf7968857a9 |
InvConvNear | # 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
import torch.utils.data
assert_size_stride = torch._C._dyna... | AndreHe02/glow-tts | InvConvNear | false | 2,051 | [
"MIT"
] | 0 | 683f68f17790f2f46c23e9d3eadbcac352d82e2b | https://github.com/AndreHe02/glow-tts/tree/683f68f17790f2f46c23e9d3eadbcac352d82e2b |
UpSampleConv | # 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... | ChiragCD/NR-GAN | UpSampleConv | false | 13,485 | [
"MIT"
] | 54 | fc455c6219b09bc8bf605715504b78b2bb801e48 | https://github.com/ChiragCD/NR-GAN/tree/fc455c6219b09bc8bf605715504b78b2bb801e48 |
Model | # 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.... | clam004/docker-pytorch-api | Model | false | 3,298 | [
"MIT"
] | 0 | 2ba390ea581c774e8bdfa1ad434b42181376430f | https://github.com/clam004/docker-pytorch-api/tree/2ba390ea581c774e8bdfa1ad434b42181376430f |
MatrixConv2dMultiResblock | import torch
import torch.nn as nn
import torch.autograd
class MatrixConv2dMultiResblock(nn.Module):
def __init__(self, weight_shape, stride=1, padding=0, with_batchnorm=
False, act_func='ReLU'):
super(MatrixConv2dMultiResblock, self).__init__()
self.conv1 = nn.Conv2d(weight_shape[3], wei... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | RyusukeYamano/nngen | MatrixConv2dMultiResblock | false | 14,350 | [
"Apache-2.0"
] | 207 | 9ed1f7fb83908794aa94d70287d89545d45fe875 | https://github.com/RyusukeYamano/nngen/tree/9ed1f7fb83908794aa94d70287d89545d45fe875 |
InterModalityUpdate | # 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.... | TranTony/DFAF-for-VQA.pytorch | InterModalityUpdate | false | 11,963 | [
"MIT"
] | 0 | eba1a893e8e5d3d8bf85078611b0bcf4d56eea86 | https://github.com/TranTony/DFAF-for-VQA.pytorch/tree/eba1a893e8e5d3d8bf85078611b0bcf4d56eea86 |
Coskx | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_... | jiaj15/SAIL | Coskx | false | 10,415 | [
"MIT"
] | 0 | 734be06a2b0ae70801f59c191b86332592da97cf | https://github.com/jiaj15/SAIL/tree/734be06a2b0ae70801f59c191b86332592da97cf |
StyleAdaptiveLayerNorm | # 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
fro... | DanielLin94144/StyleSpeech | StyleAdaptiveLayerNorm | false | 5,056 | [
"MIT"
] | 1 | 809e8ead55bea2c63f714fdc19bf24d80f0f546c | https://github.com/DanielLin94144/StyleSpeech/tree/809e8ead55bea2c63f714fdc19bf24d80f0f546c |
SelfAttentive | # 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.... | Dio990521/LSTM_emo_classifier | SelfAttentive | false | 5,192 | [
"MIT"
] | 1 | aaf2bf2d6a3e60c1acfcff5b82ab256f86ba0dbc | https://github.com/Dio990521/LSTM_emo_classifier/tree/aaf2bf2d6a3e60c1acfcff5b82ab256f86ba0dbc |
Encoder | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | jinyeom/ga-plastic-models | Encoder | false | 3,754 | [
"MIT"
] | 0 | e38b245ae51c35a5f32679cc9f215463a3d58f1a | https://github.com/jinyeom/ga-plastic-models/tree/e38b245ae51c35a5f32679cc9f215463a3d58f1a |
L2Norm | import torch
import torch.nn as nn
from math import sqrt as sqrt
from itertools import product as product
import torch.nn.init as init
class L2Norm(nn.Module):
def __init__(self, n_channels, scale):
super(L2Norm, self).__init__()
self.n_channels = n_channels
self.gamma = scale or None
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
from math import sqrt as sqrt
from itertools import produ... | AbhiprayaDash/models | L2Norm | false | 11,160 | [
"Apache-2.0"
] | 0 | ed679a701ccb5891ca4a02f9379c636c50cb9209 | https://github.com/AbhiprayaDash/models/tree/ed679a701ccb5891ca4a02f9379c636c50cb9209 |
CrossEntropyLoss | # 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
... | Fanzhongjie/ARFE | CrossEntropyLoss | false | 442 | [
"Apache-2.0"
] | 0 | 4b96b8c5bc0895d3d30acec2a490f81a860fe860 | https://github.com/Fanzhongjie/ARFE/tree/4b96b8c5bc0895d3d30acec2a490f81a860fe860 |
LocationLayer | import torch
import torch.utils.data
from torch import nn
class LinearNorm(torch.nn.Module):
def __init__(self, in_dim, out_dim, bias=True, w_init_gain='linear'):
super(LinearNorm, self).__init__()
self.linear_layer = torch.nn.Linear(in_dim, out_dim, bias=bias)
torch.nn.init.xavier_unifor... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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._dyna... | FadyKhalaf/tacotron2 | LocationLayer | false | 463 | [
"BSD-3-Clause"
] | 0 | d9bf28a6d286aab42bce46df9f26a9a3d7c2f01f | https://github.com/FadyKhalaf/tacotron2/tree/d9bf28a6d286aab42bce46df9f26a9a3d7c2f01f |
StdLoss | import torch
import numpy as np
from torch import nn
from torch.nn import functional
class GrayscaleLayer(nn.Module):
def __init__(self):
super(GrayscaleLayer, self).__init__()
def forward(self, x):
return torch.mean(x, 1, keepdim=True)
class StdLoss(nn.Module):
def __init__(self):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import numpy as np
from torch import nn
assert_size_stride = torch._C._dynamo.gu... | GuYuanjie/Deep-Retinex-fusion | StdLoss | false | 17,359 | [
"MIT"
] | 5 | ffa2a1689fd512c8820fd87cbf665c09bcb142b4 | https://github.com/GuYuanjie/Deep-Retinex-fusion/tree/ffa2a1689fd512c8820fd87cbf665c09bcb142b4 |
Conv2d | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils
assert_size_stride = torch._C._dynamo.g... | lorylei/DARTS-et | Conv2d | false | 7,137 | [
"Apache-2.0"
] | 1 | f22cfd53c14afd6ba602b8ecfbff9cdf77fc2ff8 | https://github.com/lorylei/DARTS-et/tree/f22cfd53c14afd6ba602b8ecfbff9cdf77fc2ff8 |
InnerProductLoss | import torch
import torch.nn as nn
import torch.nn.functional as F
class InnerProductLoss(nn.Module):
"""This is the inner-product loss used in CFKG for optimization.
"""
def __init__(self):
super(InnerProductLoss, self).__init__()
def forward(self, anchor, positive, negative):
pos_s... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.gu... | Ahren09/RecBole | InnerProductLoss | false | 1,925 | [
"MIT"
] | 0 | b3921818dfbc1b81f9eda8d5e9f05bc9d9114089 | https://github.com/Ahren09/RecBole/tree/b3921818dfbc1b81f9eda8d5e9f05bc9d9114089 |
CenterLoss | # 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... | bysen32/WS-DAN.PyTorch | CenterLoss | false | 9,873 | [
"MIT"
] | 0 | de206591f037ea82fc52eaf6915de7f64375e0c9 | https://github.com/bysen32/WS-DAN.PyTorch/tree/de206591f037ea82fc52eaf6915de7f64375e0c9 |
squeeze | import torch
import torch.nn as nn
import torch.utils.data
class squeeze(nn.Module):
def __init__(self, block_size):
super(squeeze, self).__init__()
self.block_size = block_size
self.block_size_sq = block_size * block_size
def inverse(self, input):
output = input.permute(0, 2... | 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C.... | XinZhang525/fGAIL | squeeze | false | 18,104 | [
"MIT"
] | 4 | 682d70286685612558e072d9a1668779b8ae325b | https://github.com/XinZhang525/fGAIL/tree/682d70286685612558e072d9a1668779b8ae325b |
IOU | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | DoJing/BASNet | IOU | false | 2,162 | [
"MIT"
] | 0 | 46bd3462326e6c7a02c90273c15da6fa71cec0e2 | https://github.com/DoJing/BASNet/tree/46bd3462326e6c7a02c90273c15da6fa71cec0e2 |
HouseHolderFlow | # 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 nn
assert_size_stride = torch._C._dyn... | gpoesia/variational-item-response-theory-public | HouseHolderFlow | false | 12,465 | [
"MIT"
] | 0 | 6a0db81068695422dddec8832ce353879c5acb82 | https://github.com/gpoesia/variational-item-response-theory-public/tree/6a0db81068695422dddec8832ce353879c5acb82 |
MultiHeadedAttention | import torch
import numpy as np
import torch.utils.data
class ScaledDotProductAttention(torch.nn.Module):
"""
Scaled, softmax attention module for Transformer as defined by
Attention(Q, K, V) on pg 4. Returns the final attention vectors as well as
the attention matrices (pairwise scores). """
def... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | hengwei-chan/protein_transformer | MultiHeadedAttention | false | 15,521 | [
"BSD-3-Clause"
] | 77 | 988bb0fcbb94b37e5a02071bd345ea073ad605f8 | https://github.com/hengwei-chan/protein_transformer/tree/988bb0fcbb94b37e5a02071bd345ea073ad605f8 |
OrientedIOUloss | import torch
import torch.nn as nn
import torch.utils.data
class OrientedIOUloss(nn.Module):
def __init__(self, reduction='none', loss_type='iou'):
super(OrientedIOUloss, self).__init__()
self.reduction = reduction
self.loss_type = loss_type
self.loss_mse = nn.MSELoss(reduction=re... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dynamo.guard... | kuazhangxiaoai/YOLOX | OrientedIOUloss | false | 3,856 | [
"Apache-2.0"
] | 0 | 7aff49b25a8a80c4c33e941da416500eda72b1a2 | https://github.com/kuazhangxiaoai/YOLOX/tree/7aff49b25a8a80c4c33e941da416500eda72b1a2 |
ActorCritic | # 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.... | ImmanuelXIV/ppo-self-play | ActorCritic | false | 17,445 | [
"MIT"
] | 7 | 21c000492b2450628b5a506d4101b7b12e5755e0 | https://github.com/ImmanuelXIV/ppo-self-play/tree/21c000492b2450628b5a506d4101b7b12e5755e0 |
TransformerGPTEncoderLayer | import math
import torch
import torch.nn as nn
import torch.cuda
import torch.distributed
def gelu(x):
return 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 *
torch.pow(x, 3))))
def generate_relative_positions_matrix(length, max_relative_positions,
cache=False):
"""Generate the... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | pltrdy/encoder-agnostic-adaptation | TransformerGPTEncoderLayer | false | 12,920 | [
"MIT"
] | 0 | e45d157f84804696e109e5952957570fd781e9b7 | https://github.com/pltrdy/encoder-agnostic-adaptation/tree/e45d157f84804696e109e5952957570fd781e9b7 |
VNMaxPool | # 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
import torch.utils.data
import torch
import torch.nn.paral... | Tiamat-Tech/vnn | VNMaxPool | false | 14,508 | [
"MIT"
] | 280 | f3197e210022b5f0015e0da6456adf66bd0cd73e | https://github.com/Tiamat-Tech/vnn/tree/f3197e210022b5f0015e0da6456adf66bd0cd73e |
CrossEntropyLossIIT | # 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
... | atticusg/cs224u | CrossEntropyLossIIT | false | 1,493 | [
"Apache-2.0"
] | 0 | 66e0f2714e246dcb8836f706ae9ff5613c51ed34 | https://github.com/atticusg/cs224u/tree/66e0f2714e246dcb8836f706ae9ff5613c51ed34 |
DiscriReceiver | # 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 ... | eugene-kharitonov/EGG | DiscriReceiver | false | 10,086 | [
"MIT"
] | 0 | 714958f24ac23bc18cc7fac395e1aae0afbcabe0 | https://github.com/eugene-kharitonov/EGG/tree/714958f24ac23bc18cc7fac395e1aae0afbcabe0 |
ISub | import torch
class ISub(torch.nn.Module):
def __init__(self):
super(ISub, self).__init__()
def forward(self, x, y):
x -= y
return x
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
@triton.jit
def triton_poi_fused_sub_0(in_ptr0, in_ptr1, out_ptr1, xnumel,... | bunderhi/torch2trt | ISub | false | 1,596 | [
"MIT"
] | 0 | fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d | https://github.com/bunderhi/torch2trt/tree/fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d |
PreNet | # 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... | karavik18/Federated_Learning_for_Missing_MRI_Sequence | PreNet | false | 7,012 | [
"Apache-2.0"
] | 1 | 42924f8475f354e6b429d05867f99530aa485b96 | https://github.com/karavik18/Federated_Learning_for_Missing_MRI_Sequence/tree/42924f8475f354e6b429d05867f99530aa485b96 |
BertAttention | # 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.... | IsaacChanghau/ReLoCLNet | BertAttention | false | 8,797 | [
"MIT"
] | 31 | 56cb666ce516cce9acbcfce78fb4e95d81e11e54 | https://github.com/IsaacChanghau/ReLoCLNet/tree/56cb666ce516cce9acbcfce78fb4e95d81e11e54 |
DiscShiftLoss | # 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... | akimotty877/mmediting | DiscShiftLoss | false | 3,061 | [
"Apache-2.0"
] | 0 | cae872d6f3e867ba144c7c0dbc29a0ee1a29e5a6 | https://github.com/akimotty877/mmediting/tree/cae872d6f3e867ba144c7c0dbc29a0ee1a29e5a6 |
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.... | LithiumH/cs224u-final-project | ScaledDotProductAttention | false | 771 | [
"Apache-2.0"
] | 0 | 6049ccca3a2c33a77d9a6d5f44b2755301e18891 | https://github.com/LithiumH/cs224u-final-project/tree/6049ccca3a2c33a77d9a6d5f44b2755301e18891 |
Net | import torch
import torch.nn as nn
import torch.nn.functional as F
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.fc1 = nn.Linear(3 * 28 * 28, 512)
self.fc2 = nn.Linear(512, 512)
self.fc3 = nn.Linear(512, 1)
def forward(self, x):
x = x.view... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | DavyMorgan/invariant-risk-minimization | Net | false | 13,580 | [
"MIT"
] | 77 | d0fe48e75329561e6b2d47dbc97042aa740f77c2 | https://github.com/DavyMorgan/invariant-risk-minimization/tree/d0fe48e75329561e6b2d47dbc97042aa740f77c2 |
ConvertPointsFromHomogeneous | import torch
import torch.nn as nn
def convert_points_from_homogeneous(points):
"""Function that converts points from homogeneous to Euclidean space.
See :class:`~torchgeometry.ConvertPointsFromHomogeneous` for details.
Examples::
>>> input = torch.rand(2, 4, 3) # BxNx3
>>> output = tg... | 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... | Paultool/frankmocap | ConvertPointsFromHomogeneous | false | 14,149 | [
"BSD-3-Clause"
] | 1,612 | b8bb7b587c0841b9292edb147729de581c66054c | https://github.com/Paultool/frankmocap/tree/b8bb7b587c0841b9292edb147729de581c66054c |
UpConv2x2 | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.data
from torch.cuda import *
assert_si... | jabae/detectEM | UpConv2x2 | false | 6,912 | [
"MIT"
] | 1 | 2d1a5116164d0bed0a8ea767a227d05a8970a448 | https://github.com/jabae/detectEM/tree/2d1a5116164d0bed0a8ea767a227d05a8970a448 |
SpatialLogMeanExp | import torch
import numpy as np
import torch.nn as nn
def _lme(x, alpha, dim=-1, keepdim=False):
"""
Apply log-mean-exp pooling with sharpness `alpha` across dimension `dim`.
"""
if x.shape[dim] <= 1:
return x if keepdim else x.squeeze(dim)
if not torch.is_tensor(alpha) and alpha == 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 numpy as np
imp... | CPJKU/kagglebirds2020 | SpatialLogMeanExp | false | 17,030 | [
"MIT"
] | 4 | f86b459389b1d0b0af96ebc9252ffc8496c272e8 | https://github.com/CPJKU/kagglebirds2020/tree/f86b459389b1d0b0af96ebc9252ffc8496c272e8 |
L1GradientLoss | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import init as init
from torch.nn.modules.loss import _Loss
class Gradient(nn.Module):
def __init__(self):
super(Gradient, self).__init__()
kernel_v = [[0, -1, 0], [0, 0, 0], [0, 1, 0]]
kernel_h = [[0, 0, 0],... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | RunqiuBao/Event_ESTRNN | L1GradientLoss | false | 14,351 | [
"MIT"
] | 180 | 6d156cc42a3a33bd0b4b7c4c4be98f943ff53acb | https://github.com/RunqiuBao/Event_ESTRNN/tree/6d156cc42a3a33bd0b4b7c4c4be98f943ff53acb |
RobertaMaskLeanerHead | # 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.... | ChanLiang/MAP-BERT | RobertaMaskLeanerHead | false | 275 | [
"MIT"
] | 0 | c3f95a925002061463dbb68608ff7c67ff353b5d | https://github.com/ChanLiang/MAP-BERT/tree/c3f95a925002061463dbb68608ff7c67ff353b5d |
StableBCELoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.utils.dat... | GOPIKA-0204/Clothing-Detection-and-Recolouring | StableBCELoss | false | 9,069 | [
"MIT"
] | 0 | b5d436a981b854228314729b41874f31948a33ba | https://github.com/GOPIKA-0204/Clothing-Detection-and-Recolouring/tree/b5d436a981b854228314729b41874f31948a33ba |
NoiseInjection | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.model_zoo
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | Aitical/ADspeech2face | NoiseInjection | false | 4,795 | [
"MIT"
] | 1 | 2e811ff8cc7333729f4b77d1b1067296253e8e38 | https://github.com/Aitical/ADspeech2face/tree/2e811ff8cc7333729f4b77d1b1067296253e8e38 |
WeldonPooling | # 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... | debayan/dsve-loc | WeldonPooling | false | 3,406 | [
"BSD-3-Clause-Clear"
] | 0 | 21b1e1837668b6daa0881514d0756e9bec039fcb | https://github.com/debayan/dsve-loc/tree/21b1e1837668b6daa0881514d0756e9bec039fcb |
TransformerLinearXMCHead | import torch
import numpy as np
import torch.nn as nn
class TransformerLinearXMCHead(nn.Module):
"""XMC head for Transformers
Containing label weight embeddings and label bias embeddings
"""
def __init__(self, hidden_size, num_labels):
super().__init__()
self.label_pad = num_labels
... | 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 numpy as np
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dyna... | cjhsieh/pecos | TransformerLinearXMCHead | false | 3,300 | [
"Apache-2.0",
"BSD-3-Clause"
] | 0 | 22e88ee544d5a5e891a1d23a578881fdf26dfcf7 | https://github.com/cjhsieh/pecos/tree/22e88ee544d5a5e891a1d23a578881fdf26dfcf7 |
Residual | import torch
import torch.nn as nn
class Residual(nn.Module):
def __init__(self, channels, filter=3, stride=1, padding=1, activation=
nn.ReLU):
super(Residual, self).__init__()
self.conv = nn.Conv2d(channels, channels, filter, stride, padding)
self.activation = activation()
d... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | limberc/HyperGAN | Residual | false | 15,901 | [
"MIT"
] | 889 | b074e74abf0ed9b81bd52084706e3707a47e0fe2 | https://github.com/limberc/HyperGAN/tree/b074e74abf0ed9b81bd52084706e3707a47e0fe2 |
l2normalization | import torch
import torch.nn as nn
class l2normalization(nn.Module):
def __init__(self, scale):
super(l2normalization, self).__init__()
self.scale = scale
def forward(self, x, dim=1):
"""out = scale * x / sqrt(\\sum x_i^2)"""
return self.scale * x * x.pow(2).sum(dim).clamp(mi... | 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... | tommy90191/Find_Tiny_but_Important_Image_Changes | l2normalization | false | 4,443 | [
"MIT"
] | 0 | 429d679606f96f32db4cddf167a9cfb963d3df26 | https://github.com/tommy90191/Find_Tiny_but_Important_Image_Changes/tree/429d679606f96f32db4cddf167a9cfb963d3df26 |
InnerProductDecoder | import torch
import torch.fx
import torch.utils.data
class InnerProductDecoder(torch.nn.Module):
"""The inner product decoder from the `"Variational Graph Auto-Encoders"
<https://arxiv.org/abs/1611.07308>`_ paper
.. math::
\\sigma(\\mathbf{Z}\\mathbf{Z}^{\\top})
where :math:`\\mathbf{Z} \\in... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.fx
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynam... | JinheonBaek/pytorch_geometric | InnerProductDecoder | false | 17,501 | [
"MIT"
] | 4 | dfd32d08a3d8191d6290e53458d4eda515d04fd6 | https://github.com/JinheonBaek/pytorch_geometric/tree/dfd32d08a3d8191d6290e53458d4eda515d04fd6 |
VAE | # 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 import device
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | peterfeifanchen/scGNN | VAE | false | 16,247 | [
"MIT"
] | 60 | 4ef9013ad0f44f9f51708e9bb60e5138f5706593 | https://github.com/peterfeifanchen/scGNN/tree/4ef9013ad0f44f9f51708e9bb60e5138f5706593 |
FourierFeatures | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.... | corajr/diffusion_gen | FourierFeatures | false | 12,228 | [
"MIT"
] | 0 | 724377c8e244120cbd1caa75d474e3e14ded9bfa | https://github.com/corajr/diffusion_gen/tree/724377c8e244120cbd1caa75d474e3e14ded9bfa |
FeatureMap | import torch
from torch import nn
import torch.nn.functional as F
class FeatureMap(nn.Module):
def __init__(self, n, m, amount_of_division, batch_size):
super(FeatureMap, self).__init__()
self.m = m
self.n = n
self.amount_of_division = amount_of_division
self.batch_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
from torch import nn
assert_s... | AndresOtero/TensorDecompositionMachineLearning | FeatureMap | false | 16,911 | [
"MIT"
] | 3 | 455f16b405ec9d031999b0ebf9c5a68d3c20b233 | https://github.com/AndresOtero/TensorDecompositionMachineLearning/tree/455f16b405ec9d031999b0ebf9c5a68d3c20b233 |
TemporallyBatchedAdditiveAttention | import torch
import torch.nn as nn
import torch.nn.functional as F
class AdditiveAttention(nn.Module):
def __init__(self, encoder_hidden_state_dim, decoder_hidden_state_dim,
internal_dim=None):
super(AdditiveAttention, self).__init__()
if internal_dim is None:
internal_dim = i... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Vision-CAIR/HalentNet | TemporallyBatchedAdditiveAttention | false | 18,062 | [
"MIT"
] | 4 | dedef73c57c63aa580fc497fa42d512f4241a64b | https://github.com/Vision-CAIR/HalentNet/tree/dedef73c57c63aa580fc497fa42d512f4241a64b |
RelationCrossing | # 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
... | Xinstein3033/OpenHGNN | RelationCrossing | false | 1,254 | [
"Apache-2.0"
] | 0 | a9ca499834523419ecdaaa09e4b42f640486f262 | https://github.com/Xinstein3033/OpenHGNN/tree/a9ca499834523419ecdaaa09e4b42f640486f262 |
Conv3BN | # 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 ... | ArmenGhambaryan/kaggle_carvana_segmentation | Conv3BN | false | 13,288 | [
"MIT"
] | 447 | 648a6b5c807cb69011316fe6501241dacc027db2 | https://github.com/ArmenGhambaryan/kaggle_carvana_segmentation/tree/648a6b5c807cb69011316fe6501241dacc027db2 |
conv_layer | import torch
from torch import nn
class conv_layer(nn.Module):
"""Standard convolutional layer. Possible to return pre-activations."""
def __init__(self, in_planes, out_planes, kernel_size=3, stride=1,
padding=1, drop=0, batch_norm=False, nl=nn.ReLU(), bias=True, gated
=False):
super(... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | GMvandeVen/progressive-learning-pytorch | conv_layer | false | 17,288 | [
"MIT"
] | 4 | 165645b2d7595d94d036f765c9a311d505e667a3 | https://github.com/GMvandeVen/progressive-learning-pytorch/tree/165645b2d7595d94d036f765c9a311d505e667a3 |
eca_channel | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils
assert_size_stride = torch._C._dynamo.g... | closest-git/QuantumFold | eca_channel | false | 1,725 | [
"Apache-2.0"
] | 0 | 2dc6afa96cdee91b58f66543b440a2d7a8d32a8a | https://github.com/closest-git/QuantumFold/tree/2dc6afa96cdee91b58f66543b440a2d7a8d32a8a |
Temporal_Attention | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
class Temporal_Attention(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=1, stride=1,
padding=0, groups=1, bias=False, refinement=False):
super(Temporal_Attention, 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.triton_helpers import math as tl_math
import torch.... | Herrccc/DR-TANet | Temporal_Attention | false | 8,242 | [
"MIT"
] | 12 | 37cc3929833d61451b2fa4a92ccd4286cfc4fd34 | https://github.com/Herrccc/DR-TANet/tree/37cc3929833d61451b2fa4a92ccd4286cfc4fd34 |
Resample | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
from typing import Optional
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch.... | IusztinPaul/yacht | Resample | false | 17,449 | [
"Apache-2.0"
] | 5 | c68ab7c66bde860bb91534c29e97772ba328adb5 | https://github.com/IusztinPaul/yacht/tree/c68ab7c66bde860bb91534c29e97772ba328adb5 |
GumbelSigmoid | # 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 import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_ma... | zdaxie/SpatiallyAdaptiveInference-Detection | GumbelSigmoid | false | 16,806 | [
"Apache-2.0"
] | 55 | 323801deac6f0641d00ecb23f6885df8483cc447 | https://github.com/zdaxie/SpatiallyAdaptiveInference-Detection/tree/323801deac6f0641d00ecb23f6885df8483cc447 |
Qux | import torch
import torch.jit
import torch.onnx
import torch.nn
class Qux(torch.nn.Module):
def __init__(self, x):
super(Qux, self).__init__()
self.x = x
def forward(self, a, b):
return a - b - self.x
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 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.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | YaronBenAtar/glow | Qux | false | 14,638 | [
"Apache-2.0"
] | 2,838 | a13706a4239fa7eaf059c670dc573e3eb0768f86 | https://github.com/YaronBenAtar/glow/tree/a13706a4239fa7eaf059c670dc573e3eb0768f86 |
FCDiscriminator | import torch
import torch.nn as nn
class FCDiscriminator(nn.Module):
def __init__(self, num_classes, ndf=64):
super(FCDiscriminator, self).__init__()
self.conv1 = nn.Conv2d(num_classes, ndf, kernel_size=4, stride=2,
padding=1)
self.conv2 = nn.Conv2d(ndf, ndf * 2, kernel_size=4... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | Siddharth-Shrivastava7/DANNet | FCDiscriminator | false | 14,426 | [
"Apache-2.0"
] | 61 | 8db10056a4e445d24fc899505923615457cae5b7 | https://github.com/Siddharth-Shrivastava7/DANNet/tree/8db10056a4e445d24fc899505923615457cae5b7 |
BinaryCrossEntropy2D | # 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... | JHalili/KidneySegQuicknat | BinaryCrossEntropy2D | false | 580 | [
"MIT"
] | 0 | 4ddc30f2cf935045bf6482a73a3e86e2d8da3696 | https://github.com/JHalili/KidneySegQuicknat/tree/4ddc30f2cf935045bf6482a73a3e86e2d8da3696 |
Convlayer | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
assert_size_s... | bruchano/ImageStyler | Convlayer | false | 9,925 | [
"MIT"
] | 0 | 7bde13bc954566088c477065adb5c4e4214c28bb | https://github.com/bruchano/ImageStyler/tree/7bde13bc954566088c477065adb5c4e4214c28bb |
ReinforcedReceiver | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.parallel
import torch.utils.data
from torch.distributions import Bernoulli
import torch.distributions
class ReinforcedReceiver(nn.Module):
def __init__(self, n_bits, n_hidden):
super(ReinforcedReceiver, self).__init__()
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.nn.parallel
import torch.utils.data
import to... | Slowika/GameBias-EmeCom2020 | ReinforcedReceiver | false | 17,965 | [
"MIT"
] | 5 | 5b94c47559f8202bca99c26fc1bcb078dd0509a6 | https://github.com/Slowika/GameBias-EmeCom2020/tree/5b94c47559f8202bca99c26fc1bcb078dd0509a6 |
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.... | Jincheng-Sun/Kylearn-pytorch | ScaledDotProductAttention | false | 641 | [
"MIT"
] | 0 | e72f2ab45a3f4724e843a27bec37664d3612fdca | https://github.com/Jincheng-Sun/Kylearn-pytorch/tree/e72f2ab45a3f4724e843a27bec37664d3612fdca |
SpatialDepthWiseConvolution | # 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.nn import Module
import math
from torch import nn
import torch.utils.data
import torch.nn.functional
import torch.autograd
assert... | techthiyanes/annotated_deep_learning_paper_implementations | SpatialDepthWiseConvolution | false | 16,572 | [
"MIT"
] | 3,714 | 8af24da2dd39a9a87482a4d18c2dc829bbd3fd47 | https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47 |
ILN | import torch
import torch.nn as nn
import torch.utils.cpp_extension
class ILN(nn.Module):
def __init__(self, channels, resl, eps=1e-08):
super().__init__()
self.rho = nn.Parameter(torch.Tensor(1, channels, 1, 1))
self.rho.data.fill_(0.0)
self.instance_norm = nn.InstanceNorm2d(chan... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import torch.utils.cpp_extension
assert_size_stride = tor... | STomoya/animeface | ILN | false | 15,296 | [
"MIT"
] | 61 | 37b3cd26097d7874559d4c152e41e5712b7a1a42 | https://github.com/STomoya/animeface/tree/37b3cd26097d7874559d4c152e41e5712b7a1a42 |
Critic | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | LeonLester/Machin-title-in-progress- | Critic | false | 11,648 | [
"MIT"
] | 0 | 777479d47b520dcdc6b09c247591b5fe1d6cbe8c | https://github.com/LeonLester/Machin-title-in-progress-/tree/777479d47b520dcdc6b09c247591b5fe1d6cbe8c |
MultiHeadAttention | import torch
import torch.nn as nn
import torch.nn.functional as F
class ScaledDotProductAttention(nn.Module):
""" Scaled Dot-Product Attention """
def __init__(self, temperature, attn_dropout=0.1):
super().__init__()
self.temperature = temperature
self.dropout = nn.Dropout(attn_dropo... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Rajathbharadwaj/algorithmic-efficiency | MultiHeadAttention | false | 14,274 | [
"Apache-2.0"
] | 49 | 47d2928836e0574bc54cc3ad58860dd4daf86cce | https://github.com/Rajathbharadwaj/algorithmic-efficiency/tree/47d2928836e0574bc54cc3ad58860dd4daf86cce |
AdaIn | import torch
import torch.nn as nn
class AdaIn(nn.Module):
def __init__(self):
super(AdaIn, self).__init__()
self.eps = 1e-05
def forward(self, x, mean_style, std_style):
B, C, H, W = x.shape
feature = x.view(B, C, -1)
std_feat = (torch.std(feature, dim=2) + self.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.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | andy6804tw/talking-hands-API | AdaIn | false | 1,439 | [
"MIT"
] | 0 | 4895c980565082b0fdcabbc704ee871855e6d5f5 | https://github.com/andy6804tw/talking-hands-API/tree/4895c980565082b0fdcabbc704ee871855e6d5f5 |
TestNet2 | # 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_... | jjmachan/Cifar-pytorch | TestNet2 | false | 6,988 | [
"Apache-2.0"
] | 1 | 11268af2f9f5230b721ac554a2ce83496c41d06c | https://github.com/jjmachan/Cifar-pytorch/tree/11268af2f9f5230b721ac554a2ce83496c41d06c |
equalized_conv2d | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from torch.nn.init import normal
import torch.utils.data
a... | mingo-x/pggan-pytorch | equalized_conv2d | false | 7,232 | [
"MIT"
] | 1 | a1dde73cd4df52476fe7c948d81fa9caea8070a5 | https://github.com/mingo-x/pggan-pytorch/tree/a1dde73cd4df52476fe7c948d81fa9caea8070a5 |
FrameMaxPool | import torch
import torch.nn.parallel
import torch.nn as nn
import torch.utils.data
import torch.backends.cudnn
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)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | EGO4D/episodic-memory | FrameMaxPool | false | 8,076 | [
"MIT"
] | 27 | 2a3464882cd4f665c358c1b05a6397339e33c2e1 | https://github.com/EGO4D/episodic-memory/tree/2a3464882cd4f665c358c1b05a6397339e33c2e1 |
TorchDiv | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | NVIDIA-AI-IOT-private/torch2trt | TorchDiv | false | 10,537 | [
"MIT"
] | 0 | 953d60039e0c81e90eea467c3df2e6e3f7040242 | https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242 |
MaskedL1 | import torch
import torch.nn as nn
class MaskedL1(nn.Module):
l1 = nn.L1Loss()
def forward(self, pred, target, mask):
pred = torch.mul(pred, mask)
target = torch.mul(target, mask)
return self.l1(pred, target)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([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
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | vegetablejuiceftw/soft-pointer-networks | MaskedL1 | false | 11,080 | [
"MIT"
] | 0 | 9705d9688b6b69db3948172771df4c367165c948 | https://github.com/vegetablejuiceftw/soft-pointer-networks/tree/9705d9688b6b69db3948172771df4c367165c948 |
GeneratorBlock | # 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... | uthree/pg-gan | GeneratorBlock | false | 13,070 | [
"MIT"
] | 0 | 7a72a9f3487a66ddc6c8c51a774e3d8128369b2a | https://github.com/uthree/pg-gan/tree/7a72a9f3487a66ddc6c8c51a774e3d8128369b2a |
OnnxHardSigmoid | import torch
from torch import nn
class OnnxToTorchModule:
"""
Marker class for onnx2torch modules.
"""
pass
class OnnxHardSigmoid(nn.Module, OnnxToTorchModule):
def __init__(self, alpha: 'float'=0.2, beta: 'float'=0.5):
super().__init__()
self.alpha = alpha
self.beta = ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | ENOT-AutoDL/onnx2torch | OnnxHardSigmoid | false | 13,617 | [
"Apache-2.0"
] | 144 | 2391987b3349bed1670ac3c1bc9062a37323abe3 | https://github.com/ENOT-AutoDL/onnx2torch/tree/2391987b3349bed1670ac3c1bc9062a37323abe3 |
HDRLoss | import torch
import torch.nn as nn
class HDRLoss(nn.Module):
def __init__(self):
super().__init__()
def forward(self, out_img, ref_img):
return torch.mean((out_img - ref_img) ** 2)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | Galaxies99/NHDRRNet-pytorch | HDRLoss | false | 17,279 | [
"MIT"
] | 10 | b20aae987e586a6cf9c9c52fc07b0884ce6fdf37 | https://github.com/Galaxies99/NHDRRNet-pytorch/tree/b20aae987e586a6cf9c9c52fc07b0884ce6fdf37 |
AdaptiveConcatPool2d | import torch
import torch.nn as nn
from typing import *
class AdaptiveConcatPool2d(nn.Module):
def __init__(self, sz=1):
super().__init__()
self.output_size = sz
self.ap = nn.AdaptiveAvgPool2d(sz)
self.mp = nn.AdaptiveMaxPool2d(sz)
def forward(self, x):
return torch.c... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
from typing import *
assert_size_stride = torch._C._dynamo.guards.a... | Cedric-Perauer/DL_from_Foundations | AdaptiveConcatPool2d | false | 11,280 | [
"Apache-2.0"
] | 0 | c53722216a088cc9f67a2e1bf955d043023e6a85 | https://github.com/Cedric-Perauer/DL_from_Foundations/tree/c53722216a088cc9f67a2e1bf955d043023e6a85 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.