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 |
|---|---|---|---|---|---|---|---|---|---|---|
BasicBlock | import torch
import torch.utils.data
import torch.nn as nn
def conv3x3(in_planes, out_planes, dilation=1, stride=1):
"""3x3 convolution with padding"""
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride,
padding=int(dilation * (3 - 1) / 2), dilation=dilation, bias=False)
class Basi... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | ZurMaD/DAIN | BasicBlock | false | 3,013 | [
"MIT"
] | 0 | 22570e51e84f7dfd48ba4f88e6ee7c9ff1b0b123 | https://github.com/ZurMaD/DAIN/tree/22570e51e84f7dfd48ba4f88e6ee7c9ff1b0b123 |
NoiseInjection | import torch
from torch import nn
class NoiseInjection(nn.Module):
def __init__(self):
super().__init__()
self.weight = nn.Parameter(torch.zeros(1))
def forward(self, image, noise=None):
if noise is None:
batch, _, height, width = image.shape
noise = image.new... | 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... | Dolorousrtur/style-people | NoiseInjection | false | 8,044 | [
"MIT"
] | 15 | c48b12b245cc50f8230c0654dffe40016f2a69f1 | https://github.com/Dolorousrtur/style-people/tree/c48b12b245cc50f8230c0654dffe40016f2a69f1 |
PositionwiseFeedForward | # 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... | WangYueFt/prnet | PositionwiseFeedForward | false | 14,564 | [
"MIT"
] | 105 | ffceaf1a891286f5ac8a452fca737dd3c44202fd | https://github.com/WangYueFt/prnet/tree/ffceaf1a891286f5ac8a452fca737dd3c44202fd |
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
... | SeHwanJoo/mmsegmentation_body | Encoding | false | 1,044 | [
"Apache-2.0"
] | 0 | 31c4bf27c3dc0a84bfbb06a0c017c5908c17f0ac | https://github.com/SeHwanJoo/mmsegmentation_body/tree/31c4bf27c3dc0a84bfbb06a0c017c5908c17f0ac |
Discriminator | import torch
import numpy as np
import torch.nn as nn
from torch.nn import functional as F
class Discriminator(nn.Module):
def __init__(self, img_shape, hidden_dim=1024):
super().__init__()
in_dim = int(np.prod(img_shape))
self.fc1 = nn.Linear(in_dim, hidden_dim)
self.fc2 = nn.Lin... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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.g... | jfrancis71/pytorch-lightning-bolts | Discriminator | false | 3,838 | [
"Apache-2.0"
] | 0 | 8a4cf8f61644c28d6df54ccffe3a52d6f5fce5a6 | https://github.com/jfrancis71/pytorch-lightning-bolts/tree/8a4cf8f61644c28d6df54ccffe3a52d6f5fce5a6 |
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
assert_size_stride = torch._C... | bengisug/multiagent-particle-envs | MLP | false | 1,538 | [
"MIT"
] | 0 | c87280f18fbaf885932fe6da4d600ab474fd83fe | https://github.com/bengisug/multiagent-particle-envs/tree/c87280f18fbaf885932fe6da4d600ab474fd83fe |
IAdd | import torch
class IAdd(torch.nn.Module):
def __init__(self):
super(IAdd, 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_add_0(in_ptr0, in_ptr1, out_ptr1, xnumel,... | bunderhi/torch2trt | IAdd | false | 1,597 | [
"MIT"
] | 0 | fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d | https://github.com/bunderhi/torch2trt/tree/fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d |
my_MaxPool2d | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch.nn import Module
from torch.nn.modules.module import Module
from torch.nn.modu... | likun97/Low_quality_classification_with_mobilenetv3 | my_MaxPool2d | false | 10,439 | [
"Apache-2.0"
] | 0 | a9e6f66caad937fc7c8e101cddb76f116219b255 | https://github.com/likun97/Low_quality_classification_with_mobilenetv3/tree/a9e6f66caad937fc7c8e101cddb76f116219b255 |
FocalLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | dixit-dude7/LDAM-DRW | FocalLoss | false | 12,284 | [
"MIT"
] | 0 | 6366f4756d3ac0c6b6db784b7f20e16066967ed4 | https://github.com/dixit-dude7/LDAM-DRW/tree/6366f4756d3ac0c6b6db784b7f20e16066967ed4 |
Upsample | import torch
import torch.nn as nn
import torch.nn.functional as F
class Upsample(nn.Module):
""" nn.Upsample is deprecated """
def __init__(self, scale_factor, mode='linear'):
super(Upsample, self).__init__()
self.scale_factor = scale_factor
self.mode = mode
def forward(self, x)... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | Leo-xxx/lighttrack | Upsample | false | 5,503 | [
"MIT"
] | 1 | bc12f53c621c42038066a1af7499838b571b0c76 | https://github.com/Leo-xxx/lighttrack/tree/bc12f53c621c42038066a1af7499838b571b0c76 |
PA | import torch
from torch import nn
class PA(nn.Module):
def __init__(self, dim):
super().__init__()
self.pa_conv = nn.Conv2d(dim, dim, 3, 1, 1, groups=dim)
def forward(self, x):
return x * self.pa_conv(x).sigmoid()
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_in... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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... | EmanuelNk/semantic-segmentation | PA | false | 2,187 | [
"MIT"
] | 0 | 20ff16da49691fb407724909d9c7e84b47e2fee0 | https://github.com/EmanuelNk/semantic-segmentation/tree/20ff16da49691fb407724909d9c7e84b47e2fee0 |
BoxEncoder | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import n... | BigkoalaZhu/SCORES | BoxEncoder | false | 7,781 | [
"MIT"
] | 16 | 8332733c375ee85c02bd34c2adce6a3213aad3c4 | https://github.com/BigkoalaZhu/SCORES/tree/8332733c375ee85c02bd34c2adce6a3213aad3c4 |
UGRNNLRCell | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | adityakusupati/EdgeML | UGRNNLRCell | false | 3,029 | [
"MIT"
] | 0 | 65933a6fdfc38945f4311043a62e120784b2b0bf | https://github.com/adityakusupati/EdgeML/tree/65933a6fdfc38945f4311043a62e120784b2b0bf |
BasicGraphConvolutionLayer | import torch
from torch.nn.parameter import Parameter
class BasicGraphConvolutionLayer(torch.nn.Module):
def __init__(self, in_channels, out_channels):
super().__init__()
self.in_channels = in_channels
self.out_channels = out_channels
self.W2 = Parameter(torch.rand((in_channels, o... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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.parameter import Parameter
assert_size_stride = torch._C._dynamo.g... | mbrukman/machine-learning-book | BasicGraphConvolutionLayer | false | 7,183 | [
"MIT"
] | 1 | f29a0f8aafa63a77081f3bcec68866e33dd41776 | https://github.com/mbrukman/machine-learning-book/tree/f29a0f8aafa63a77081f3bcec68866e33dd41776 |
BboxHead | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from itertools import product as product
import torch.nn as nn
assert_size_strid... | BossunWang/Pytorch_Retinaface | BboxHead | false | 8,987 | [
"MIT"
] | 0 | 01ec6cfbcced1e8cc8802084e4e566ccaf2513a8 | https://github.com/BossunWang/Pytorch_Retinaface/tree/01ec6cfbcced1e8cc8802084e4e566ccaf2513a8 |
Swish | # 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.distributed
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C... | shnhrtkyk/PointFlow | Swish | false | 12,975 | [
"MIT"
] | 0 | 26b8fac79bf3e71533f5c8b12f90cf5f9a385a99 | https://github.com/shnhrtkyk/PointFlow/tree/26b8fac79bf3e71533f5c8b12f90cf5f9a385a99 |
Conv2d | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import n... | Hadryan/nn | Conv2d | false | 9,372 | [
"MIT"
] | 0 | b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d | https://github.com/Hadryan/nn/tree/b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d |
BabyUnet | import torch
from torch import nn
import torch.nn.functional as F
class ConvBlock(nn.Module):
def __init__(self, in_channels, out_channels, dropout=False, norm=None,
residual=True, activation='leakyrelu', in_place_activation=True,
transpose=False, reflectpad=True):
super(ConvBlock, self).... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | royerloic/aydin | BabyUnet | false | 16,393 | [
"BSD-3-Clause"
] | 78 | f9c61a24030891d008c318b250da5faec69fcd7d | https://github.com/royerloic/aydin/tree/f9c61a24030891d008c318b250da5faec69fcd7d |
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_... | Lttcc/Olympics | Critic | false | 781 | [
"MIT"
] | 0 | 97411244073d127e83e84bf61b1b0a1d6718c31c | https://github.com/Lttcc/Olympics/tree/97411244073d127e83e84bf61b1b0a1d6718c31c |
MLPLayer | # 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 ... | BDBC-KG-NLP/MixCSE_AAAI2022 | MLPLayer | false | 6,692 | [
"MIT"
] | 1 | 884145e24a5258c044fedb658df9999f012df875 | https://github.com/BDBC-KG-NLP/MixCSE_AAAI2022/tree/884145e24a5258c044fedb658df9999f012df875 |
FF | import torch
import torch.nn as nn
def conv(in_channels, out_channels, kernel_size, bias=False, stride=1):
return nn.Conv2d(in_channels, out_channels, kernel_size, padding=
kernel_size // 2, bias=bias, stride=stride)
class FF(nn.Module):
def __init__(self, n_feat, kernel_size=3, bias=True):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | noxsine/WTSDNet | FF | false | 7,355 | [
"MIT"
] | 1 | 7f25fb62c705c730c4d2fab6c86f9cf3535e6d80 | https://github.com/noxsine/WTSDNet/tree/7f25fb62c705c730c4d2fab6c86f9cf3535e6d80 |
ProposalNet | # 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... | mobulan/NTS-Net | ProposalNet | false | 10,704 | [
"MIT"
] | 0 | 9246c33b9e9aed2514f53fd0aef48c8ed3eb91d3 | https://github.com/mobulan/NTS-Net/tree/9246c33b9e9aed2514f53fd0aef48c8ed3eb91d3 |
FullyConnected | # 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... | AntoBcc/benchmarking-gnns | FullyConnected | false | 2,024 | [
"MIT"
] | 0 | c5750054b2f4ba0822f203fa18d382f6a3b16542 | https://github.com/AntoBcc/benchmarking-gnns/tree/c5750054b2f4ba0822f203fa18d382f6a3b16542 |
PyTorchLHUC | # 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 as pt
import torch.distributed
import torch.distributed.elastic.multiprocessing.errors
assert_size_stride = torch._C._dynamo.gu... | SamuelLarkin/sockeye | PyTorchLHUC | false | 9,533 | [
"Apache-2.0"
] | 0 | 7fcf6c96b15a887897aa712903ecf93c665ebddf | https://github.com/SamuelLarkin/sockeye/tree/7fcf6c96b15a887897aa712903ecf93c665ebddf |
Symmetric | import torch
from torch import nn
class NonSquareError(ValueError):
def __init__(self, name, size):
super().__init__(
'The {} parametrization can just be applied to square matrices. Got a tensor of size {}'
.format(name, size))
class VectorError(ValueError):
def __init__(se... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | vishalbelsare/geotorch | Symmetric | false | 16,675 | [
"MIT"
] | 422 | ba38d406c245d609fee4b4dac3f6427bf6d73a8e | https://github.com/vishalbelsare/geotorch/tree/ba38d406c245d609fee4b4dac3f6427bf6d73a8e |
mlpblock | # 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 ... | coallaoh/WhitenBlackBox | mlpblock | false | 15,050 | [
"MIT"
] | 46 | 816363c59a11248e79ffed70f1a14510b0967dab | https://github.com/coallaoh/WhitenBlackBox/tree/816363c59a11248e79ffed70f1a14510b0967dab |
SpatialAttentionGate | # 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... | Diyago/Automatic-salt-deposits-segmentation | SpatialAttentionGate | false | 7,999 | [
"MIT"
] | 20 | fedfc7f1d9878674382eeb16a820b5f16791f4ab | https://github.com/Diyago/Automatic-salt-deposits-segmentation/tree/fedfc7f1d9878674382eeb16a820b5f16791f4ab |
Autoencoder | import torch
import torch.nn as nn
import torch.nn.functional as F
class Autoencoder(nn.Module):
def __init__(self, input_length, output_length=None, neuron_multiplier=
1, sigmoid=False, drop=False, drop_pct=0.3):
"""
Dense autoencoder.
Args:
input_length (in... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | mariajmolina/ML-for-S2S | Autoencoder | false | 10,558 | [
"MIT"
] | 0 | 3de32e72042ba7e8b37a433579fa9c5630246d8c | https://github.com/mariajmolina/ML-for-S2S/tree/3de32e72042ba7e8b37a433579fa9c5630246d8c |
ContrastiveLoss | import torch
import torch.nn.functional as F
class ContrastiveLoss(torch.nn.Module):
def __init__(self, margin=0.99):
super(ContrastiveLoss, self).__init__()
self.margin = margin
def forward(self, output1, output2, label):
euclidean_distance = F.pairwise_distance(output1, output2)
... | 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
assert_size_stride = torch._... | AssassionXY/HOR | ContrastiveLoss | false | 63 | [
"Apache-2.0"
] | 0 | a4c91d90a59eb2b144d827afff626b7eac907320 | https://github.com/AssassionXY/HOR/tree/a4c91d90a59eb2b144d827afff626b7eac907320 |
CRF_S | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.nn.init
assert_size_stride = torch._C._dynamo... | ahmadshabbir2468/LM-LSTM-CRF | CRF_S | false | 14,756 | [
"Apache-2.0"
] | 877 | 99f157590b9efdcecff03d3cdd3a4500cd715ece | https://github.com/ahmadshabbir2468/LM-LSTM-CRF/tree/99f157590b9efdcecff03d3cdd3a4500cd715ece |
aeEncoder | import torch
from torch import nn
import torch.nn.functional as F
class aeEncoder(nn.Module):
def __init__(self, capacity, channel):
super(aeEncoder, self).__init__()
self.c = capacity
self.channel = channel
self.conv1 = nn.Conv2d(in_channels=self.channel, out_channels=self.
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | XiaoyuanGuo/TEND_MedicalNoveltyDetection | aeEncoder | false | 1,264 | [
"MIT"
] | 0 | 5c2144f0592373d814540cc0fa8e60197ea51756 | https://github.com/XiaoyuanGuo/TEND_MedicalNoveltyDetection/tree/5c2144f0592373d814540cc0fa8e60197ea51756 |
SameBlock2d | # 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.... | KangweiiLiu/Thin-Plate-Spline-Motion-Model | SameBlock2d | false | 5,430 | [
"MIT"
] | 1 | 0ec14f6c06f5beeef159340142ec5182a1be9bc7 | https://github.com/KangweiiLiu/Thin-Plate-Spline-Motion-Model/tree/0ec14f6c06f5beeef159340142ec5182a1be9bc7 |
SysModel | # 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_... | LuckierDodge/ROS_Dockerfiles | SysModel | false | 2,604 | [
"MIT"
] | 0 | 42fd0e7ecfef86d792fcc29197fcd79dcb789122 | https://github.com/LuckierDodge/ROS_Dockerfiles/tree/42fd0e7ecfef86d792fcc29197fcd79dcb789122 |
F1Loss | # 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._C
import torch.serialization
from torch import nn
import torch.nn.functional as F
from typing import *
assert_size_stride = to... | shuaizzZ/mmsegmentation | F1Loss | false | 4,331 | [
"Apache-2.0"
] | 0 | a6c6b348dbf8c4a0a39ffbdb832a1e82309c533c | https://github.com/shuaizzZ/mmsegmentation/tree/a6c6b348dbf8c4a0a39ffbdb832a1e82309c533c |
TverskyLoss | # 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 numpy as np
imp... | AlexanderDokuchaev/mmsegmentation | TverskyLoss | false | 11,197 | [
"Apache-2.0"
] | 0 | 0c443ee370cce6227661b802184072174c4e3f64 | https://github.com/AlexanderDokuchaev/mmsegmentation/tree/0c443ee370cce6227661b802184072174c4e3f64 |
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.... | QiuhongAnnaWei/IBRNet | ScaledDotProductAttention | false | 14,255 | [
"Apache-2.0"
] | 254 | 6c8b68e6d95eae04535ff0906387ec7899f5d5ce | https://github.com/QiuhongAnnaWei/IBRNet/tree/6c8b68e6d95eae04535ff0906387ec7899f5d5ce |
BasicBlock_ins | import torch
import torch.nn as nn
import torch.multiprocessing
import torch.onnx
def conv3x3(in_planes, out_planes, stride=1):
"""3x3 convolution with padding"""
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride,
padding=1, bias=False)
class BasicBlock_ins(nn.Module):
expansi... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | cvmlarun/RANet | BasicBlock_ins | false | 6,517 | [
"Apache-2.0"
] | 1 | 3f67a3f36aaacd9cc7fb98ec79f77db8f1ebdc60 | https://github.com/cvmlarun/RANet/tree/3f67a3f36aaacd9cc7fb98ec79f77db8f1ebdc60 |
AttentionLayer | import torch
import torch.nn as nn
class AttentionLayer(nn.Module):
def __init__(self, embed_dim, num_heads, dropout_rate=0.1,
feedforward_size=256):
"""The core module with both spatial attention module and
temporal attention model embedded within it.
"""
super(Attent... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | jhbed/fairmotion | AttentionLayer | false | 10,310 | [
"BSD-3-Clause"
] | 0 | 949683d628b389a1e4f241b21e88f5d57f3a488e | https://github.com/jhbed/fairmotion/tree/949683d628b389a1e4f241b21e88f5d57f3a488e |
SiQU | # 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... | krylea/ocp | SiQU | false | 10,493 | [
"MIT"
] | 0 | 00fc1df29731d70ff1b5cf8e9323d1d2f1f8e540 | https://github.com/krylea/ocp/tree/00fc1df29731d70ff1b5cf8e9323d1d2f1f8e540 |
NoiseLayer | # 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
import 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... | justinpinkney/ganspace | NoiseLayer | false | 10,459 | [
"Apache-2.0"
] | 0 | 7dc76d1d2ddad21d946a7ceb375efe5d5316fb3f | https://github.com/justinpinkney/ganspace/tree/7dc76d1d2ddad21d946a7ceb375efe5d5316fb3f |
LinearBlock | # 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 ... | CBIIT/NCI-DOE-Collab-Pilot2-Autoencoder_MD_Simulation_Data | LinearBlock | false | 13,435 | [
"MIT"
] | 51 | 2b1213f944cf5f2c60799099a469989a1f0a6d3a | https://github.com/CBIIT/NCI-DOE-Collab-Pilot2-Autoencoder_MD_Simulation_Data/tree/2b1213f944cf5f2c60799099a469989a1f0a6d3a |
SimpleLogModule | # 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.jit
import torch.onnx
import torch.nn
assert_size_stride = t... | opti-mix/glow | SimpleLogModule | false | 7,401 | [
"Apache-2.0"
] | 1 | 4ba074df5da9822986a23a6679ab592c22660f6d | https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d |
MatrixVectorScaledDotProductAttention | # 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
... | Aunsiels/qagnn | MatrixVectorScaledDotProductAttention | false | 11,312 | [
"MIT"
] | 0 | d89a3dd650ac4b8b8aae34e0cce7cfc698892d80 | https://github.com/Aunsiels/qagnn/tree/d89a3dd650ac4b8b8aae34e0cce7cfc698892d80 |
IAdd | import torch
class IAdd(torch.nn.Module):
def __init__(self):
super(IAdd, 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_add_0(in_ptr0, in_ptr1, out_ptr1, xnumel,... | Akababa/torch2trt | IAdd | false | 18,417 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
ResidualBlock | # 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 ... | vanthq/EarRecognition | ResidualBlock | false | 10,942 | [
"MIT"
] | 0 | 7decddc97c4b27cd8457308b3d3836388936e7a8 | https://github.com/vanthq/EarRecognition/tree/7decddc97c4b27cd8457308b3d3836388936e7a8 |
MSELead | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | yhy489275918/Electrocardio-Panorama | MSELead | false | 4,618 | [
"MIT"
] | 0 | 1acdbb43d873ce98a0350b7912b6b190e026d3db | https://github.com/yhy489275918/Electrocardio-Panorama/tree/1acdbb43d873ce98a0350b7912b6b190e026d3db |
TAGConv | # 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... | EdisonLeeeee/Graphgallery | TAGConv | false | 5,114 | [
"MIT"
] | 1 | 8ae9ef57d44f073d0ceaf3f33a3a998546f960a8 | https://github.com/EdisonLeeeee/Graphgallery/tree/8ae9ef57d44f073d0ceaf3f33a3a998546f960a8 |
Sub | import torch
class Sub(torch.nn.Module):
def __init__(self):
super(Sub, self).__init__()
def forward(self, x, y):
return 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... | PogChamper/torch2trt | Sub | false | 14,221 | [
"MIT"
] | 3,363 | 43b12627ec0de4d212efb6d02b07570205085ccc | https://github.com/PogChamper/torch2trt/tree/43b12627ec0de4d212efb6d02b07570205085ccc |
FusionLayer | import torch
import torch.nn as nn
class FusionLayer(nn.Module):
"""
vector based fusion
m(x, y) = W([x, y, x * y, x - y]) + b
g(x, y) = w([x, y, x * y, x - y]) + b
:returns g(x, y) * m(x, y) + (1 - g(x, y)) * x
"""
def __init__(self, input_dim):
super(FusionLayer, 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 libdevice
import torch.nn as ... | hgrhgy/NumSeq2SQL | FusionLayer | false | 10,228 | [
"MIT"
] | 0 | 6f22fdf108736f979afa2dbd3af14aa9ad4718aa | https://github.com/hgrhgy/NumSeq2SQL/tree/6f22fdf108736f979afa2dbd3af14aa9ad4718aa |
encoderDepth | import torch
import torch.nn as nn
import torch.nn.functional as F
class encoderDepth(nn.Module):
def __init__(self):
super(encoderDepth, self).__init__()
self.conv1 = nn.Conv2d(in_channels=13, out_channels=64, kernel_size
=4, stride=2, padding=1, bias=True)
self.gn1 = nn.Grou... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Miles629/TransparentShapeRealData | encoderDepth | false | 14,095 | [
"MIT"
] | 91 | b81098a2d1882f5fd33fba6167d7258dbe02d6d2 | https://github.com/Miles629/TransparentShapeRealData/tree/b81098a2d1882f5fd33fba6167d7258dbe02d6d2 |
LocalResponseNorm | from torch.nn import Module
import torch
import torch.optim
from torch.nn.modules.module import Module
from torch.nn.functional import *
class LocalResponseNorm(Module):
def __init__(self, size, alpha=0.0001, beta=0.75, k=1):
"""Applies local response normalization over an input signal composed
o... | 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.nn import Module
import torch.optim
from torch.nn.modules.module imp... | leoshine/Spherical_Regression | LocalResponseNorm | false | 15,942 | [
"BSD-2-Clause-FreeBSD"
] | 133 | d19bc2f6f52982d4d58f5ddabe4231381d7facd7 | https://github.com/leoshine/Spherical_Regression/tree/d19bc2f6f52982d4d58f5ddabe4231381d7facd7 |
LINEAR_LOGSOFTMAX_CLASSIFIER | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | IacoSimoncini/tfvaegan | LINEAR_LOGSOFTMAX_CLASSIFIER | false | 11,495 | [
"MIT"
] | 0 | 157b526d65d0b0d5412f4be6fed02fc7d6325827 | https://github.com/IacoSimoncini/tfvaegan/tree/157b526d65d0b0d5412f4be6fed02fc7d6325827 |
Feedforward | import torch
class Feedforward(torch.nn.Module):
def __init__(self, input_size, hidden_size=100):
super(Feedforward, self).__init__()
self.input_size = input_size
self.hidden_size = hidden_size
self.fc1 = torch.nn.Linear(self.input_size, self.hidden_size)
self.relu = torch... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | jacob-parnell-rozetta/longformer_coverage | Feedforward | false | 10,215 | [
"Apache-2.0"
] | 0 | 59268bc7ae7eeb962c43080e524eaf1e62100b6c | https://github.com/jacob-parnell-rozetta/longformer_coverage/tree/59268bc7ae7eeb962c43080e524eaf1e62100b6c |
SELayer | import torch
import torch.nn.functional as F
import torch.nn as nn
class SELayer(nn.Module):
def __init__(self, in_channels, reduction):
super().__init__()
mid_channels = in_channels // reduction
self.fc1 = nn.Linear(in_channels, mid_channels)
self.fc2 = nn.Linear(mid_channels, in... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | LEGO999/pytorch_image_classification | SELayer | false | 2,477 | [
"MIT"
] | 0 | 2b9901fdff0620e39becad4db6adb6f88d251352 | https://github.com/LEGO999/pytorch_image_classification/tree/2b9901fdff0620e39becad4db6adb6f88d251352 |
ChannelSqueezeAndSpatialExcitation | # 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.modules.loss import *
from torch.nn.modules ... | YaLTeR/catalyst | ChannelSqueezeAndSpatialExcitation | false | 9,671 | [
"Apache-2.0"
] | 0 | 4b875b50b3c63ac2dac1f19399af0c016dfb4e2f | https://github.com/YaLTeR/catalyst/tree/4b875b50b3c63ac2dac1f19399af0c016dfb4e2f |
DenseCrossEntropy_smooth | # 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
... | LichenYang-Jeffrey/DCL-with-Efficient-B7 | DenseCrossEntropy_smooth | false | 17,571 | [
"MIT"
] | 4 | 84940c96a8c7926c630a7a6d5bfd5c6e52a57c2e | https://github.com/LichenYang-Jeffrey/DCL-with-Efficient-B7/tree/84940c96a8c7926c630a7a6d5bfd5c6e52a57c2e |
ncm_output | import torch
import torch.nn as nn
class ncm_output(nn.Module):
def __init__(self, indim, outdim):
super(ncm_output, self).__init__()
self.linear = nn.Linear(indim, outdim)
def forward(self, x):
return -1 * torch.norm(x.reshape(x.shape[0], 1, -1) - self.linear.
weight.tra... | 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_... | RafLaf/easy | ncm_output | false | 8,687 | [
"MIT"
] | 25 | 3e3603aef7dfb1cf469820330d695b93ba76dfd4 | https://github.com/RafLaf/easy/tree/3e3603aef7dfb1cf469820330d695b93ba76dfd4 |
EncoderNet | # 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 ... | hk19960522/2018-DL-Final | EncoderNet | false | 3,605 | [
"MIT"
] | 0 | cbc70260aa22d7df366a1d28bee472f1fc5b82c7 | https://github.com/hk19960522/2018-DL-Final/tree/cbc70260aa22d7df366a1d28bee472f1fc5b82c7 |
hyperedge_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.triton_helpers import libdevice
import torch.nn as ... | iMoonLab/HHDTI | hyperedge_encoder | false | 6,842 | [
"MIT"
] | 1 | b2dd0e78818888e676afc91af1425dada5b3258a | https://github.com/iMoonLab/HHDTI/tree/b2dd0e78818888e676afc91af1425dada5b3258a |
RobustScannerFusionLayer | # 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... | SamDM/mmocr | RobustScannerFusionLayer | false | 9,499 | [
"Apache-2.0"
] | 0 | 4cb69141ff8d28c8b1437bf28242e368a0e6ec4f | https://github.com/SamDM/mmocr/tree/4cb69141ff8d28c8b1437bf28242e368a0e6ec4f |
SlideNet | # 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_... | JHorcasitas/cnn_document_binarization | SlideNet | false | 17,474 | [
"MIT"
] | 9 | 075f76aed375ca14a53011f4dfeb12379debb5b3 | https://github.com/JHorcasitas/cnn_document_binarization/tree/075f76aed375ca14a53011f4dfeb12379debb5b3 |
SoftmaxLoss | import torch
import torch.nn as nn
class SoftmaxLoss(nn.Module):
def __init__(self, hidden_dim, speaker_num, **kwargs):
"""
Softmax Loss
"""
super(SoftmaxLoss, self).__init__()
self.fc = nn.Linear(hidden_dim, speaker_num)
self.loss = nn.CrossEntropyLoss()
def ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | B06901052/s3prl | SoftmaxLoss | false | 119 | [
"MIT"
] | 0 | 5f63d2df043d2d7c81580cd042fa2cea34746f48 | https://github.com/B06901052/s3prl/tree/5f63d2df043d2d7c81580cd042fa2cea34746f48 |
Conv2d | import torch
import torch.utils.data
from torch import nn
from torch.nn import Conv2d
class Conv2d(nn.Conv2d):
"""
:param in_channels: Scalar
:param out_channels: Scalar
:param kernel_size: Scalar
:param activation_fn: activation function
:param drop_rate: Scalar. dropout rate
:param strid... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
from torch import nn
assert_size_stride = torch._C._dyna... | AstraliteHeart/cookietts | Conv2d | false | 7,747 | [
"BSD-3-Clause"
] | 25 | c871f5f7b5790656d5b57bcd9e63946a2da52f0f | https://github.com/AstraliteHeart/cookietts/tree/c871f5f7b5790656d5b57bcd9e63946a2da52f0f |
NotEqual | import torch
class NotEqual(torch.nn.Module):
def __init__(self):
super(NotEqual, self).__init__()
def forward(self, x, y):
return 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 | NotEqual | false | 2,554 | [
"MIT"
] | 0 | 76bf298b3da408509665e23e2494922b131afb10 | https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10 |
PartialConv | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
import torch.nn as nn
import torch.nn.parallel
import torch.utils.da... | labcontext/image-inpainting-oldpaper | PartialConv | false | 3,879 | [
"Apache-2.0"
] | 0 | da4683a2c58d662e443ea24ab93fd9d8fcb96bda | https://github.com/labcontext/image-inpainting-oldpaper/tree/da4683a2c58d662e443ea24ab93fd9d8fcb96bda |
GaussianFocalLoss | import functools
import torch
import torch.nn.functional as F
import torch.nn as nn
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".
Return:
Tensor: Reduced loss ten... | 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... | CvlabAssignment/AlignPS | GaussianFocalLoss | false | 13,535 | [
"Apache-2.0"
] | 144 | 297f4166921d2095f9381e38e04129a103069406 | https://github.com/CvlabAssignment/AlignPS/tree/297f4166921d2095f9381e38e04129a103069406 |
MAECriterion | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
assert_size_stride = t... | Dolorousrtur/style-people | MAECriterion | false | 8,004 | [
"MIT"
] | 15 | c48b12b245cc50f8230c0654dffe40016f2a69f1 | https://github.com/Dolorousrtur/style-people/tree/c48b12b245cc50f8230c0654dffe40016f2a69f1 |
UpSample | import torch
import torch.nn.functional as F
import torch.nn as nn
class UpSample(nn.Sequential):
def __init__(self, skip_input, output_features):
super(UpSample, self).__init__()
self.convA = nn.Conv2d(skip_input, output_features, kernel_size=3,
stride=1, padding=1)
self.leak... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | kimtaehyeong/msnnff | UpSample | false | 12,680 | [
"MIT"
] | 0 | 75586be601bbdbfafcdf4038bc08f239e119b417 | https://github.com/kimtaehyeong/msnnff/tree/75586be601bbdbfafcdf4038bc08f239e119b417 |
PositionwiseFeedForward | import torch
import torch.nn as nn
class LayerNorm(nn.Module):
"""
Layer Normalization class
"""
def __init__(self, features, eps=1e-06):
super(LayerNorm, self).__init__()
self.a_2 = nn.Parameter(torch.ones(features))
self.b_2 = nn.Parameter(torch.zeros(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 import triton_helpers
from torch._inductor.runtime.... | ZfSangkuan/ASER | PositionwiseFeedForward | false | 14,728 | [
"MIT"
] | 256 | c34d6f2432b181bae9f4ee4fa70ce270dbc1dee7 | https://github.com/ZfSangkuan/ASER/tree/c34d6f2432b181bae9f4ee4fa70ce270dbc1dee7 |
ResBlock | import torch
import torch.nn as nn
import torch.nn.functional as F
class ResBlock(nn.Module):
def __init__(self, in_channel, out_channel, ker_size, stri, pad):
super(ResBlock, self).__init__()
self.conv1 = nn.Conv2d(in_channel, out_channel, 3, 1, 1)
self.conv2 = nn.Conv2d(out_channel, out... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | NJUVISION/AWnet | ResBlock | false | 8,575 | [
"MIT"
] | 16 | f47a1692819a778b513b882d36ed727f7732d37b | https://github.com/NJUVISION/AWnet/tree/f47a1692819a778b513b882d36ed727f7732d37b |
Attention | import math
import torch
from torch import nn
from torch.nn import functional as F
class Attention(nn.Module):
def __init__(self, hidden_size):
super(Attention, self).__init__()
self.hidden_size = hidden_size
self.attn = nn.Linear(self.hidden_size * 2, hidden_size)
self.v = nn.Par... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | alexarnimueller/smiles-transformer | Attention | false | 9,673 | [
"MIT"
] | 0 | 4584a0bd043d6659a941589677951b2c6823cd2a | https://github.com/alexarnimueller/smiles-transformer/tree/4584a0bd043d6659a941589677951b2c6823cd2a |
discriminator | # 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... | czq142857/DECOR-GAN | discriminator | false | 15,107 | [
"MIT"
] | 55 | 79c80fc202b8af982989a3e3bb3afe85e606b71f | https://github.com/czq142857/DECOR-GAN/tree/79c80fc202b8af982989a3e3bb3afe85e606b71f |
SkipConnection | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
import torch.nn as nn
assert_size_stride = torch._C._dyn... | xyc1207/benchmarking-gnns | SkipConnection | false | 16,751 | [
"MIT"
] | 1,809 | 9ba25a2825e8c155a93730d6e8f8752090292942 | https://github.com/xyc1207/benchmarking-gnns/tree/9ba25a2825e8c155a93730d6e8f8752090292942 |
FocalLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torc... | Latterlig96/DCUnet | FocalLoss | false | 8,455 | [
"MIT"
] | 11 | 87d1c137a60177d6daf1dfff0483678d5580fda0 | https://github.com/Latterlig96/DCUnet/tree/87d1c137a60177d6daf1dfff0483678d5580fda0 |
Encoder5 | # 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.... | MingSun-Tse/Collaborative-Distillation | Encoder5 | false | 14,115 | [
"MIT"
] | 172 | 915712674af82ff91d926d922c14988cce0430f3 | https://github.com/MingSun-Tse/Collaborative-Distillation/tree/915712674af82ff91d926d922c14988cce0430f3 |
AlbertAttention | # 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.... | Clemens123/transformers | AlbertAttention | false | 13,226 | [
"Apache-2.0"
] | 0 | 22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26 | https://github.com/Clemens123/transformers/tree/22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26 |
FastStyle | # 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.... | RicCu/NeuralStyle | FastStyle | false | 5,809 | [
"MIT"
] | 1 | 97dc6aec6b2072a9a187276e047aea885566e1be | https://github.com/RicCu/NeuralStyle/tree/97dc6aec6b2072a9a187276e047aea885566e1be |
TensorLog | import torch
class TensorLog(torch.nn.Module):
def forward(self, input):
return torch.log(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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_str... | Minyus/kedex | TensorLog | false | 9,682 | [
"Apache-2.0"
] | 0 | 92f952eed3cb6109bc783f449051f2bd13579d2a | https://github.com/Minyus/kedex/tree/92f952eed3cb6109bc783f449051f2bd13579d2a |
TernaryLinear | # 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
from torch.nn import init
assert_size_stride = torch._C._dy... | C-SUNSHINE/TOQ-Nets-PyTorch-Release | TernaryLinear | false | 17,145 | [
"MIT"
] | 6 | 05e06bf633fb3c6b610dda9a5126ecd7af1db02f | https://github.com/C-SUNSHINE/TOQ-Nets-PyTorch-Release/tree/05e06bf633fb3c6b610dda9a5126ecd7af1db02f |
SoftmaxRegression | # 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.... | kbrezinski/stat-453-deep-learning | SoftmaxRegression | false | 3,817 | [
"BSD-3-Clause"
] | 0 | b10240b5c3a970231dcea9221d3d179d26fc197d | https://github.com/kbrezinski/stat-453-deep-learning/tree/b10240b5c3a970231dcea9221d3d179d26fc197d |
torch_uint8_to_float | # 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... | ozendelait/pytorch-semseg | torch_uint8_to_float | false | 7,440 | [
"MIT"
] | 1 | 200491febd653bd26befcd5b3d52c614aa832b7e | https://github.com/ozendelait/pytorch-semseg/tree/200491febd653bd26befcd5b3d52c614aa832b7e |
TensorMean | # 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... | Minyus/pipelinex | TensorMean | false | 14,055 | [
"Apache-2.0"
] | 188 | f35c524ec9c50751ee27d9a42d98317e16f1c544 | https://github.com/Minyus/pipelinex/tree/f35c524ec9c50751ee27d9a42d98317e16f1c544 |
C2 | import torch
import torch.nn as nn
from collections import OrderedDict
class C2(nn.Module):
def __init__(self):
super(C2, self).__init__()
self.c2 = nn.Sequential(OrderedDict([('c2', nn.Conv2d(6, 16,
kernel_size=(5, 5))), ('relu2', nn.ReLU()), ('s2', nn.MaxPool2d
(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
from co... | ConstantinSeibold/SGL | C2 | false | 17,124 | [
"MIT"
] | 7 | fab4d2df515608c2a6a89b2ac8c2655ce8e08b1a | https://github.com/ConstantinSeibold/SGL/tree/fab4d2df515608c2a6a89b2ac8c2655ce8e08b1a |
PrecomputedNorm | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | chiluen/s3prl | PrecomputedNorm | false | 1,690 | [
"Apache-2.0"
] | 0 | c81838f6414d3c4767de355144449e40f86c7066 | https://github.com/chiluen/s3prl/tree/c81838f6414d3c4767de355144449e40f86c7066 |
SE | import torch
import torch.nn as nn
import torch.nn.functional as F
def swish(x):
return x * x.sigmoid()
class SE(nn.Module):
"""Squeeze-and-Excitation block with Swish."""
def __init__(self, in_planes, se_planes):
super(SE, self).__init__()
self.se1 = nn.Conv2d(in_planes, se_planes, ker... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | adarsh-kr/CVModelsBenchmark | SE | false | 3,019 | [
"MIT"
] | 0 | 85aeb76c7c796d86baa97e1272aea83d734665b5 | https://github.com/adarsh-kr/CVModelsBenchmark/tree/85aeb76c7c796d86baa97e1272aea83d734665b5 |
RankingLoss | import torch
from abc import abstractmethod
import torch.utils.data.dataloader
import torch.nn.functional as F
import torch.nn as nn
import torch.nn
class SimilarityLoss(nn.Module):
def __init__(self):
super(SimilarityLoss, self).__init__()
@abstractmethod
def forward(self, inputs, targets):
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from abc import abstractmethod
import torch.utils.data.dataloader
import torch.nn as nn
i... | FranziskaKuhls/flair | RankingLoss | false | 2,257 | [
"MIT"
] | 0 | 2bd9e72c961651c7c020076cb8fd80cbbb36da7c | https://github.com/FranziskaKuhls/flair/tree/2bd9e72c961651c7c020076cb8fd80cbbb36da7c |
RelationalTransformerEncoderLayer | # 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.... | mfk3138/jiant | RelationalTransformerEncoderLayer | false | 4,204 | [
"MIT"
] | 0 | 6e67ff1ecb1bb98533c1019a86af4ad2c04c6a64 | https://github.com/mfk3138/jiant/tree/6e67ff1ecb1bb98533c1019a86af4ad2c04c6a64 |
LinearWithChannel | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.a... | adam-coogan/swyft | LinearWithChannel | false | 1,365 | [
"MIT"
] | 0 | c54bdd9f77ddf02fda857e26640df012cbe545fc | https://github.com/adam-coogan/swyft/tree/c54bdd9f77ddf02fda857e26640df012cbe545fc |
SpatialGatherModule | import torch
import torch.nn.functional as F
import torch.nn as nn
import torch._C
import torch.serialization
class SpatialGatherModule(nn.Module):
"""Aggregate the context features according to the initial predicted
probability distribution.
Employ the soft-weighted method to aggregate the context.
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | AnonSubmission6150/submission6150 | SpatialGatherModule | false | 8,992 | [
"Apache-2.0"
] | 0 | 571633d9a12b4fd7a9546947787fc068966dab04 | https://github.com/AnonSubmission6150/submission6150/tree/571633d9a12b4fd7a9546947787fc068966dab04 |
CoreNetwork | import torch
import torch.nn as nn
import torch.nn.functional as F
class CoreNetwork(nn.Module):
"""The core network.
An RNN that maintains an internal state by integrating
information extracted from the history of past observations.
It encodes the agent's knowledge of the environment through
a 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_... | SmirnovKol/recurrent-visual-attention | CoreNetwork | false | 14,432 | [
"MIT"
] | 463 | 4cb8d9e768ae35f38439278bb8a7b4d6b253a537 | https://github.com/SmirnovKol/recurrent-visual-attention/tree/4cb8d9e768ae35f38439278bb8a7b4d6b253a537 |
ConditionalBatchNorm2d | import torch
import torch.nn as nn
from torch.nn import Parameter
def l2normalize(v, eps=0.0001):
return v / (v.norm() + eps)
class SpectralNorm(nn.Module):
def __init__(self, module, name='weight', power_iterations=1):
super(SpectralNorm, self).__init__()
self.module = module
self.... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | samuelemarro/anne | ConditionalBatchNorm2d | false | 4,267 | [
"MIT"
] | 0 | 918022eb029a46fbfd1589369e9817f570d5651c | https://github.com/samuelemarro/anne/tree/918022eb029a46fbfd1589369e9817f570d5651c |
ResidualConvUnit | # 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.fft
import torch.utils.cpp_extension
import t... | autonomousvision/stylegan_xl | ResidualConvUnit | false | 14,965 | [
"MIT"
] | 214 | 8c76531bcbf0931c295ecd1d32f75af998d1411f | https://github.com/autonomousvision/stylegan_xl/tree/8c76531bcbf0931c295ecd1d32f75af998d1411f |
AbsModel | from torch.nn import Module
import torch
from torch import Tensor
from torch.nn import Identity
from torch.nn.modules import Module
import torch.optim.lr_scheduler
class AbsLayer(Module):
def forward(self, x: 'Tensor') ->Tensor:
return torch.abs(x).reshape((-1, 1))
class AbsModel(Module):
"""Fake m... | 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.nn import Module
from torch import Tensor
from torch.nn import... | coreylowman/avalanche | AbsModel | false | 6,477 | [
"MIT"
] | 1 | 9c1e7765f1577c400ec0c57260221bcffd9566a2 | https://github.com/coreylowman/avalanche/tree/9c1e7765f1577c400ec0c57260221bcffd9566a2 |
HighwayConv1d | # 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 ... | CookiePPP/mellotron | HighwayConv1d | false | 9,055 | [
"BSD-3-Clause"
] | 0 | 488425981c19cd0eddddea13d1348da4bfef8d26 | https://github.com/CookiePPP/mellotron/tree/488425981c19cd0eddddea13d1348da4bfef8d26 |
Expand | import torch
import torch.nn as nn
class Expand(nn.Module):
def __init__(self, gain=2):
super().__init__()
self.gain = gain
def forward(self, x):
b, c, h, w = x.size()
s = self.gain
x = x.view(b, s, s, c // s ** 2, h, w)
x = x.permute(0, 3, 4, 1, 5, 2).contigu... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | Lalihoo/yolov5-detect | Expand | false | 9,606 | [
"MIT"
] | 0 | 265c3137ea3586d913541501a1562488fbe59e9e | https://github.com/Lalihoo/yolov5-detect/tree/265c3137ea3586d913541501a1562488fbe59e9e |
TimeIntervalMultiHeadAttention | # 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.... | Yingting-dev/ReChorus | TimeIntervalMultiHeadAttention | false | 2,992 | [
"MIT"
] | 0 | a16bc1e42f3e90e889133d7476c52ada44db573b | https://github.com/Yingting-dev/ReChorus/tree/a16bc1e42f3e90e889133d7476c52ada44db573b |
multi_pool | # 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... | ahhaa/crowdcount-stackpool | multi_pool | false | 6,124 | [
"MIT"
] | 1 | b849b72e88d5e53a9f6b5dbc93014668aee43fb4 | https://github.com/ahhaa/crowdcount-stackpool/tree/b849b72e88d5e53a9f6b5dbc93014668aee43fb4 |
VirtualBatchNorm | import torch
import torch.nn as nn
class VirtualBatchNorm(nn.Module):
"""Virtual Batch Normalization Module as proposed in the paper
`"Improved Techniques for Training GANs by Salimans et. al." <https://arxiv.org/abs/1805.08318>`_
Performs Normalizes the features of a batch based on the statistics collec... | 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_... | torchgan/torchgan | VirtualBatchNorm | false | 16,610 | [
"MIT"
] | 1,300 | f4139537ac2d3d8609d5aecc859a6fb797b107a1 | https://github.com/torchgan/torchgan/tree/f4139537ac2d3d8609d5aecc859a6fb797b107a1 |
FastestBlock | # 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_... | becauseofAI/DemoHub | FastestBlock | false | 3,187 | [
"Apache-2.0"
] | 0 | 2b7fdd1f1c6f229ba326e8c1b78c4e7f5982f3da | https://github.com/becauseofAI/DemoHub/tree/2b7fdd1f1c6f229ba326e8c1b78c4e7f5982f3da |
GeneralSoftmax | import enum
import functools
import torch
import torch.nn as nn
import torch.nn.functional as F
def _canonize_enum_value(value):
if type(value) is str:
value = value.lower()
return value
def masked_softmax(logits, mask=None, dim=-1):
eps = 1e-20
probs = F.softmax(logits, dim=dim)
if mask... | 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 enum
import fun... | ashutosh1919/neuro-symbolic-sudoku-solver | GeneralSoftmax | false | 14,908 | [
"Apache-2.0"
] | 52 | ecb4274ff66d3b6a86f64584e0a767bf785f107f | https://github.com/ashutosh1919/neuro-symbolic-sudoku-solver/tree/ecb4274ff66d3b6a86f64584e0a767bf785f107f |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.