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 |
|---|---|---|---|---|---|---|---|---|---|---|
SimpleNet | # 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.... | avizyt/PytorchMLDLStudy | SimpleNet | false | 3,156 | [
"MIT"
] | 0 | ccb552809e7ab4438576e6d3b7cd7ca3b73235ed | https://github.com/avizyt/PytorchMLDLStudy/tree/ccb552809e7ab4438576e6d3b7cd7ca3b73235ed |
decoderVH | import torch
import torch.nn as nn
import torch.nn.functional as F
class decoderVH(nn.Module):
def __init__(self):
super(decoderVH, self).__init__()
self.dconv0 = nn.Conv2d(in_channels=256, out_channels=128,
kernel_size=3, stride=1, padding=1, bias=True)
self.dgn0 = nn.GroupNo... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 | decoderVH | false | 14,077 | [
"MIT"
] | 91 | b81098a2d1882f5fd33fba6167d7258dbe02d6d2 | https://github.com/Miles629/TransparentShapeRealData/tree/b81098a2d1882f5fd33fba6167d7258dbe02d6d2 |
MLP | import torch
class MLP(torch.nn.Module):
def __init__(self, input_size, ouput_size=1) ->None:
super(MLP, self).__init__()
self.layer_1 = torch.nn.Linear(input_size, 2 * input_size)
self.layer_2 = torch.nn.Linear(2 * input_size, 2 * input_size)
self.layer_3 = torch.nn.Linear(2 * 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cu... | MohammadAminAlamalhoda/EEG-Classification | MLP | false | 9,317 | [
"MIT"
] | 0 | dcaf452ba48bc5fcf9a777f73f81bdec9b21592e | https://github.com/MohammadAminAlamalhoda/EEG-Classification/tree/dcaf452ba48bc5fcf9a777f73f81bdec9b21592e |
GELU | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | bubbliiiing/classification-pytorch | GELU | false | 14,973 | [
"MIT"
] | 88 | ee62c05bd3094c3fab48bada5a57cb2ed8b61c11 | https://github.com/bubbliiiing/classification-pytorch/tree/ee62c05bd3094c3fab48bada5a57cb2ed8b61c11 |
TensorClampOptionMax | import torch
class TensorClampOptionMax(torch.nn.Module):
def forward(self, x):
return x.clamp(max=0.1)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | Akababa/torch2trt | TensorClampOptionMax | false | 18,429 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
FeatureCorrelation | import torch
from torch import nn
class FeatureCorrelation(nn.Module):
def __init__(self):
super(FeatureCorrelation, self).__init__()
def forward(self, featureA, featureB):
b, c, h, w = featureA.size()
featureA = featureA.permute(0, 3, 2, 1).reshape(b, w * h, c)
featureB = fe... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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... | swpang/xray-align-AR | FeatureCorrelation | false | 13,015 | [
"MIT"
] | 0 | 43cb0173ada9d1d71a6a923d605cb6fdae4d27aa | https://github.com/swpang/xray-align-AR/tree/43cb0173ada9d1d71a6a923d605cb6fdae4d27aa |
DiagGaussianActor | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.gu... | Purple-PI/rlstructures | DiagGaussianActor | false | 14,241 | [
"MIT"
] | 281 | 9b201b083715bbda2f3534b010c84e11dfc0a1c7 | https://github.com/Purple-PI/rlstructures/tree/9b201b083715bbda2f3534b010c84e11dfc0a1c7 |
Vec2ArousalNet | # 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
asser... | jackvandrunen/hackuci18 | Vec2ArousalNet | false | 6,909 | [
"BSD-2-Clause"
] | 1 | fff3fd7d116a6a83f19229a17377b84922145ebd | https://github.com/jackvandrunen/hackuci18/tree/fff3fd7d116a6a83f19229a17377b84922145ebd |
LayerNorm2D | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | HarmanDotpy/Normalizations-in-Deep-Learning | LayerNorm2D | false | 527 | [
"MIT"
] | 0 | 3e1899837fb3ba625f515ef1a995f3573b65456d | https://github.com/HarmanDotpy/Normalizations-in-Deep-Learning/tree/3e1899837fb3ba625f515ef1a995f3573b65456d |
SequenceBias | import torch
import torch.nn as nn
import torch.utils.data
import torch.utils.data.distributed
import torch.nn.parallel
from torch.nn.parameter import Parameter
class SequenceBias(nn.Module):
"""
Adds one bias element to the end of the sequence.
so if the input has a shape ``(L, N, E)``, where
``L`` i... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.data
import torch.utils.data.distributed
import torch.nn.parallel
from torch.nn.parameter import Pa... | ffuuugor/opacus | SequenceBias | false | 6,690 | [
"Apache-2.0"
] | 1 | 2048a6e92902685c2a735e9fb7c0d48b4846b494 | https://github.com/ffuuugor/opacus/tree/2048a6e92902685c2a735e9fb7c0d48b4846b494 |
BCELoss | # 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... | ALISCIFP/mmpose | BCELoss | false | 2,053 | [
"Apache-2.0"
] | 0 | 2433e3dbcc44baa2253e2a7c748ba0216937933e | https://github.com/ALISCIFP/mmpose/tree/2433e3dbcc44baa2253e2a7c748ba0216937933e |
Analysis_prior_net | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import math
i... | wemozj/Image-Compression-based-GMM-and-Attention-Module | Analysis_prior_net | false | 4,574 | [
"Apache-2.0"
] | 0 | 93f804dbcea8ffc1621456f3d104d0342c75373b | https://github.com/wemozj/Image-Compression-based-GMM-and-Attention-Module/tree/93f804dbcea8ffc1621456f3d104d0342c75373b |
SEBlock | import torch
from torch import nn
import torch.nn.functional as F
class HardSigmoid(nn.Module):
def __init__(self, slope=0.2, offset=0.5):
super().__init__()
self.slope = slope
self.offset = offset
def forward(self, x):
x = self.slope * x + self.offset
x = F.threshold... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | gentlebreeze1/dbnet | SEBlock | false | 3,538 | [
"Apache-2.0"
] | 0 | be28a7ae835af7d6f8b7c2b636b875adc9fc187c | https://github.com/gentlebreeze1/dbnet/tree/be28a7ae835af7d6f8b7c2b636b875adc9fc187c |
DCGanGenerator | # 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.... | krylea/mine-pytorch | DCGanGenerator | false | 15,919 | [
"MIT"
] | 108 | a638ca3e46ff21a3b9dfebe25480eaed0e3304bc | https://github.com/krylea/mine-pytorch/tree/a638ca3e46ff21a3b9dfebe25480eaed0e3304bc |
Pow | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | CPJKU/kagglebirds2020 | Pow | false | 17,023 | [
"MIT"
] | 4 | f86b459389b1d0b0af96ebc9252ffc8496c272e8 | https://github.com/CPJKU/kagglebirds2020/tree/f86b459389b1d0b0af96ebc9252ffc8496c272e8 |
GLU | import torch
import torch.nn as nn
import torch.utils.model_zoo
class GLU(nn.Module):
def forward(self, x):
nc = x.size(1)
assert nc % 2 == 0, 'channels dont divide 2!'
nc = int(nc / 2)
return x[:, :nc] * torch.sigmoid(x[:, nc:])
def get_inputs():
return [torch.rand([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.nn as nn
import torch.utils.model_zoo
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | Aitical/ADspeech2face | GLU | false | 4,785 | [
"MIT"
] | 1 | 2e811ff8cc7333729f4b77d1b1067296253e8e38 | https://github.com/Aitical/ADspeech2face/tree/2e811ff8cc7333729f4b77d1b1067296253e8e38 |
AttentionLayer | import torch
import torch.nn.functional as F
import torch.utils.data
import torch.distributed
import torch.nn as nn
import torch.optim
import torch.optim.lr_scheduler
def Linear(in_features, out_features, bias=True, dropout=0):
"""Weight-normalized Linear layer (input: N x T x C)"""
m = nn.Linear(in_features,... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
im... | zsquaredz/XSum | AttentionLayer | false | 16,838 | [
"MIT"
] | 235 | 10f2fac2e70801e7a3973c864b5a24b61d3f8bfe | https://github.com/zsquaredz/XSum/tree/10f2fac2e70801e7a3973c864b5a24b61d3f8bfe |
Delta | # 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
from torchaudio import transforms
assert_size_stride = tor... | gcambara/s3prl | Delta | false | 15,424 | [
"MIT"
] | 856 | 33284ebde3a903ed8604d6dae85669d0174ae1d3 | https://github.com/gcambara/s3prl/tree/33284ebde3a903ed8604d6dae85669d0174ae1d3 |
compute_g_spa | # 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.... | fabro66/Online-Skeleton-based-Action-Recognition | compute_g_spa | false | 15,363 | [
"MIT"
] | 63 | de00cbf17ceea98a7d07f68bbbd966bfd02d3b40 | https://github.com/fabro66/Online-Skeleton-based-Action-Recognition/tree/de00cbf17ceea98a7d07f68bbbd966bfd02d3b40 |
Biaffine | import torch
import torch.nn as nn
class Biaffine(nn.Module):
"""
Biaffine layer for first-order scoring.
This function has a tensor of weights :math:`W` and bias terms if needed.
The score :math:`s(x, y)` of the vector pair :math:`(x, y)` is computed as :math:`x^T W y`,
in which :math:`x` and :m... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | ashim95/parser | Biaffine | false | 6,245 | [
"MIT"
] | 1 | 61e9cd6bf16dcf1aa2b9d51b3a6c04ed048b3199 | https://github.com/ashim95/parser/tree/61e9cd6bf16dcf1aa2b9d51b3a6c04ed048b3199 |
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
import torch.nn as nn
assert_... | aabobakr/adversarial-robustness-toolbox | Model | false | 9,653 | [
"MIT"
] | 0 | d62b2606132d6e6fd5946d6bdc8f1da940eb3282 | https://github.com/aabobakr/adversarial-robustness-toolbox/tree/d62b2606132d6e6fd5946d6bdc8f1da940eb3282 |
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.... | LiuXiaoxuanPKU/actnn-mmcls | MultiheadAttention | false | 5,555 | [
"Apache-2.0"
] | 1 | c97d1116d54ddb3f9b1e51baebe25ffb2b3f7b75 | https://github.com/LiuXiaoxuanPKU/actnn-mmcls/tree/c97d1116d54ddb3f9b1e51baebe25ffb2b3f7b75 |
Actor | import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
def hidden_init(layer):
fan_in = layer.weight.data.size()[0]
lim = 1.0 / np.sqrt(fan_in)
return -lim, lim
class Actor(nn.Module):
"""Actor (Policy) Model."""
def __init__(self, state_size, action_size, fc1_uni... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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
... | SriramPingali/P3_collaborate_complete | Actor | false | 11,900 | [
"MIT"
] | 0 | 66df22c9eb7577b15adcaa7bbc1796dbd333af2e | https://github.com/SriramPingali/P3_collaborate_complete/tree/66df22c9eb7577b15adcaa7bbc1796dbd333af2e |
GlobalAvgPool1d | # 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
from abc import abstractmethod
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = to... | lawwu/nni | GlobalAvgPool1d | false | 10,589 | [
"MIT"
] | 0 | b869dd48dfe36392e7b78c70ea35eb6d4b4779dc | https://github.com/lawwu/nni/tree/b869dd48dfe36392e7b78c70ea35eb6d4b4779dc |
SEModule | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | BHD233/PaddleOCR2Pytorch | SEModule | false | 13,378 | [
"Apache-2.0"
] | 364 | f114069b3e2669c6adf0adf9596756205f184c9c | https://github.com/BHD233/PaddleOCR2Pytorch/tree/f114069b3e2669c6adf0adf9596756205f184c9c |
AffineConstFlow | # 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 numpy as np
import torch.nn as nn
import torch.utils.data
assert_s... | mbaddar1/normalizing-flows | AffineConstFlow | false | 10,772 | [
"MIT"
] | 0 | d1409464a65234354b29ed9ea0ede2d12100440c | https://github.com/mbaddar1/normalizing-flows/tree/d1409464a65234354b29ed9ea0ede2d12100440c |
ContrastiveLoss | from torch.nn import Module
import torch
from torch.nn import LogSoftmax
from torch.nn.functional import cosine_similarity
class ContrastiveLoss(Module):
"""A contrastive loss adapted from SimCLR.
Link to SimCLR: https://arxiv.org/abs/2002.05709v3.
"""
def __init__(self, temperature: 'float'=1.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 libdevice, math as tl_math
from torch.... | rharish101/CIL-Project | ContrastiveLoss | false | 4,190 | [
"MIT"
] | 0 | fed1be8b22bb4228329b719a301f74459a7bf13b | https://github.com/rharish101/CIL-Project/tree/fed1be8b22bb4228329b719a301f74459a7bf13b |
OcclusionAwareSimilarity | # 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
@triton.jit
def triton_poi_fused_index_put_lift_fres... | nv-nguyen/template-pose | OcclusionAwareSimilarity | false | 4,095 | [
"MIT"
] | 0 | ce1ffead1887b54efc8031e8e2442ba884e512ec | https://github.com/nv-nguyen/template-pose/tree/ce1ffead1887b54efc8031e8e2442ba884e512ec |
Block | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
from torch.nn import functional as F
class RWKV_TimeMix(nn.Module):
def __init__(self, config, layer_id):
super().__init__()
assert config.n_attn % config.n_head == 0
self.layer_id = layer_id
self.ctx... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | YUASDS/AI-Writer | Block | false | 6,025 | [
"BSD-3-Clause"
] | 1 | 6ec1e9548802ed5b5a2f1fd297595a52cb605266 | https://github.com/YUASDS/AI-Writer/tree/6ec1e9548802ed5b5a2f1fd297595a52cb605266 |
CRN | # 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... | lulor/project_vg | CRN | false | 7,154 | [
"MIT"
] | 1 | 27b0c3b3038c5a666dde516a0a265ae8ddf2059f | https://github.com/lulor/project_vg/tree/27b0c3b3038c5a666dde516a0a265ae8ddf2059f |
CNN | import torch
import torch.nn as nn
import torch.nn.functional as F
class CNN(nn.Module):
"""
Convolutional Neural Network.
"""
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(1, 20, kernel_size=5, stride=1)
self.fc1 = nn.Linear(8 * 8 * 20, 64)
self.fc2 = ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Balandat/Ax | CNN | false | 2,028 | [
"MIT"
] | 0 | 6c7556165291a5329744b5075d5f95d2dec18938 | https://github.com/Balandat/Ax/tree/6c7556165291a5329744b5075d5f95d2dec18938 |
ContractingBlock | import torch
from torch import nn
class ContractingBlock(nn.Module):
def __init__(self, input_channels, use_bn=True, kernel_size=3,
activation='relu'):
super(ContractingBlock, self).__init__()
self.conv1 = nn.Conv2d(input_channels, input_channels * 2,
kernel_size=kernel_size, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | diegushko/CycleGAN | ContractingBlock | false | 12,264 | [
"MIT"
] | 0 | 630d1cd00cef3f09f036d3c734d31c772cc0a786 | https://github.com/diegushko/CycleGAN/tree/630d1cd00cef3f09f036d3c734d31c772cc0a786 |
GCN | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | seanli3/pygcn | GCN | false | 10,753 | [
"MIT"
] | 0 | 134a17f1dbd7737f8a8b7efca5f20f882ee97144 | https://github.com/seanli3/pygcn/tree/134a17f1dbd7737f8a8b7efca5f20f882ee97144 |
Triangle_transform | import torch
import torch.nn as nn
class Triangle_transform(nn.Module):
def __init__(self, output_dim):
"""
output dim is the number of t parameters in the triangle point transformation
"""
super().__init__()
self.output_dim = output_dim
self.t_param = torch.nn.Par... | 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
... | BorgwardtLab/TOGL | Triangle_transform | false | 17,001 | [
"BSD-3-Clause"
] | 6 | d0c986cf829ca6bbae1a23e5cdab1c99146503cd | https://github.com/BorgwardtLab/TOGL/tree/d0c986cf829ca6bbae1a23e5cdab1c99146503cd |
Conv2dZeroInit | import torch
import torch.nn as nn
class Conv2dZeroInit(nn.Conv2d):
def __init__(self, channels_in, channels_out, filter_size, stride=1,
padding=0, logscale=3.0):
super().__init__(channels_in, channels_out, filter_size, stride=
stride, padding=padding)
self.register_parameter(... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | Schwartz-Zha/My-invertible-resnet | Conv2dZeroInit | false | 1,031 | [
"MIT"
] | 0 | 5415975bb0d640f3bf3ef4a7b986563e84109270 | https://github.com/Schwartz-Zha/My-invertible-resnet/tree/5415975bb0d640f3bf3ef4a7b986563e84109270 |
MultiheadAttention | import torch
import torch.nn.functional as F
import torch.utils.data
from torch import nn
from torch.nn import Parameter
import torch.onnx.operators
import torch.optim
import torch.optim.lr_scheduler
class MultiheadAttention(nn.Module):
"""Multi-headed attention.
See "Attention Is All You Need" for more deta... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Novemser/fairseq | MultiheadAttention | false | 11,769 | [
"BSD-3-Clause"
] | 0 | b9e29a4711a6c0b7923879d5d59f3e879f0f228a | https://github.com/Novemser/fairseq/tree/b9e29a4711a6c0b7923879d5d59f3e879f0f228a |
Conv3BN | import torch
import torch.utils.data
import torch.nn as nn
import torch.backends.cudnn
def conv3x3(in_, out):
return nn.Conv2d(in_, out, 3, padding=1)
class Conv3BN(nn.Module):
def __init__(self, in_: 'int', out: 'int', bn=False):
super().__init__()
self.conv = conv3x3(in_, out)
sel... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | CalebEverett/fastai-dl2 | Conv3BN | false | 17,149 | [
"Apache-2.0"
] | 4 | 64d23592eddca6ca1f3647e73c319e97c8eb392b | https://github.com/CalebEverett/fastai-dl2/tree/64d23592eddca6ca1f3647e73c319e97c8eb392b |
GRU | import torch
import torch.nn as nn
class GRU(nn.Module):
def __init__(self, outfea):
super(GRU, self).__init__()
self.ff = nn.Linear(2 * outfea, 2 * outfea)
self.zff = nn.Linear(2 * outfea, outfea)
self.outfea = outfea
def forward(self, x, xh):
r, u = torch.split(torc... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | LMissher/STGNN | GRU | false | 8,485 | [
"MIT"
] | 26 | 9c35d994738ad768ca4385273235bd30e994b746 | https://github.com/LMissher/STGNN/tree/9c35d994738ad768ca4385273235bd30e994b746 |
SoftmaxLoss | # 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.... | gcambara/s3prl | SoftmaxLoss | false | 15,416 | [
"MIT"
] | 856 | 33284ebde3a903ed8604d6dae85669d0174ae1d3 | https://github.com/gcambara/s3prl/tree/33284ebde3a903ed8604d6dae85669d0174ae1d3 |
ContrastiveLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | maxgreat/dsve-loc | ContrastiveLoss | false | 16,025 | [
"BSD-3-Clause-Clear"
] | 56 | dd6807d02c0d5fd3e215be8e5c7a88e73102e561 | https://github.com/maxgreat/dsve-loc/tree/dd6807d02c0d5fd3e215be8e5c7a88e73102e561 |
rmse | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_c... | JamesLiao714/FullSubNet | rmse | false | 609 | [
"MIT"
] | 0 | dad740bac35b5d7544c97740ae59101455acdc40 | https://github.com/JamesLiao714/FullSubNet/tree/dad740bac35b5d7544c97740ae59101455acdc40 |
Decoder | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | lshoek/creative-evo-controller | Decoder | false | 10,454 | [
"MIT"
] | 0 | a5f1742c172255cca2338b76ae1c5b4db277bb0d | https://github.com/lshoek/creative-evo-controller/tree/a5f1742c172255cca2338b76ae1c5b4db277bb0d |
FieldEachTypeBilinear | import math
import torch
import torch.nn as nn
import torch.utils.data
from typing import Dict
from typing import Tuple
from abc import ABC
from abc import abstractmethod
class BaseLayer(nn.Module, ABC):
"""
Base Layer for the torecsys module
"""
def __init__(self, **kwargs):
"""
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 math
import torch.nn as nn
import torch.utils.data
from typing import Dic... | p768lwy3/torecsys | FieldEachTypeBilinear | false | 16,222 | [
"MIT"
] | 92 | 2251366268b4fbe6f8c3ab1628fa72a0db043dcd | https://github.com/p768lwy3/torecsys/tree/2251366268b4fbe6f8c3ab1628fa72a0db043dcd |
Attention | # 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.... | GrumpyZhou/pytorch_geometric | Attention | false | 5,239 | [
"MIT"
] | 1 | 88c54e72d3e26ad48e9ccd99e5696c7f19269d94 | https://github.com/GrumpyZhou/pytorch_geometric/tree/88c54e72d3e26ad48e9ccd99e5696c7f19269d94 |
Critic | import torch
import torch.nn as nn
class Critic(nn.Module):
def __init__(self, observation_size, action_size):
super().__init__()
self.fc1 = nn.Linear(observation_size + action_size, 256)
self.fc2 = nn.Linear(256, 256)
self.fc3 = nn.Linear(256, 1)
def forward(self, x, action)... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | SeanNobel/d4rl-pybullet | Critic | false | 14,379 | [
"MIT"
] | 130 | 9f2f56c63bb7a80ebcbc4217cd7689e446aafd41 | https://github.com/SeanNobel/d4rl-pybullet/tree/9f2f56c63bb7a80ebcbc4217cd7689e446aafd41 |
EncoderUnit | import math
import torch
from torch import nn
class ScaledDotProductAttention(nn.Module):
"""
Scaled Dot-Product Attention Layer
Attributes
----------
softmax : nn.Functional
softmax function applied at the last dimension
"""
def __init__(self, dropout=0.1):
super(ScaledD... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | dugusword/transformer | EncoderUnit | false | 6,633 | [
"MIT"
] | 1 | 7aa10968f0e60d545bbd17f1f8c1dfb7ee88c62b | https://github.com/dugusword/transformer/tree/7aa10968f0e60d545bbd17f1f8c1dfb7ee88c62b |
nin | # 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 ... | andiac/pixel-cnn-pp | nin | false | 6,211 | [
"MIT"
] | 1 | 3ba856320e40208cbb6e9cac3e66a739f148903e | https://github.com/andiac/pixel-cnn-pp/tree/3ba856320e40208cbb6e9cac3e66a739f148903e |
GCN | from torch.nn import Module
import math
import torch
from torch import nn
from torch.nn import functional as F
from torch.nn.parameter import Parameter
from torch.nn.modules.module import Module
class GraphConvolution(Module):
"""
Simple GCN layer, similar to https://arxiv.org/abs/1609.02907
Implementatio... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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
i... | IsmailKent/updown-baseline | GCN | false | 5,356 | [
"MIT"
] | 1 | 17a09a48e4f30a4a3edc7924f982eb129c583b41 | https://github.com/IsmailKent/updown-baseline/tree/17a09a48e4f30a4a3edc7924f982eb129c583b41 |
Highway | # 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_... | seo3650/Tacotron-pytorch | Highway | false | 10,838 | [
"MIT"
] | 0 | 223e4f39a3624c409484a1ad55edab1563cf8c87 | https://github.com/seo3650/Tacotron-pytorch/tree/223e4f39a3624c409484a1ad55edab1563cf8c87 |
AddNorm | import torch
import torch.nn as nn
class AddNorm(nn.Module):
"""
Applies LayerNorm, Dropout and adds to input. Standard AddNorm operations in Transformers
"""
def __init__(self, input_dim: 'int', dropout: 'float'):
super(AddNorm, self).__init__()
self.dropout = nn.Dropout(dropout)
... | 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_... | Actis92/pytorch_tabular | AddNorm | false | 4,802 | [
"MIT"
] | 1 | 78dabf5e7b97d8ff24db4bc83d9d0a2273941bbe | https://github.com/Actis92/pytorch_tabular/tree/78dabf5e7b97d8ff24db4bc83d9d0a2273941bbe |
LayerNormalization | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | CyberZHG/torch-layer-normalization | LayerNormalization | false | 17,166 | [
"MIT"
] | 9 | 89f405b60f53f85da6f03fe685c190ef394ce50c | https://github.com/CyberZHG/torch-layer-normalization/tree/89f405b60f53f85da6f03fe685c190ef394ce50c |
MultichannelIamge | # 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.functional as F
assert_size_st... | nhorton04/mobile_styletransfer | MultichannelIamge | false | 7,333 | [
"Apache-2.0"
] | 1 | db8b9a61b67fd58b9e4d61457ee58e36800cfbbe | https://github.com/nhorton04/mobile_styletransfer/tree/db8b9a61b67fd58b9e4d61457ee58e36800cfbbe |
Cat | # 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... | AbhinandanVellanki/yolact_edge | Cat | false | 1,955 | [
"MIT"
] | 0 | 06d6318cf70ef511b19aa1c14f0476e4ffac2722 | https://github.com/AbhinandanVellanki/yolact_edge/tree/06d6318cf70ef511b19aa1c14f0476e4ffac2722 |
TaylorNet | import math
import torch
import torch.nn as nn
class TaylorNet(nn.Module):
"""Applies a non-linear multiplicative transformation to the incoming data,
in order to generate output features that can be quadratic and linear in the
input features:
:math:`y = (x W_2^T) * (x W_1^T) + x W_1^T + b`
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | dalessioluca/TaylorNet | TaylorNet | false | 3,370 | [
"MIT"
] | 0 | 342bc0d9ee5dd81b7fe3baf9e457b56ef1df5879 | https://github.com/dalessioluca/TaylorNet/tree/342bc0d9ee5dd81b7fe3baf9e457b56ef1df5879 |
Attn | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class Attn(nn.Module):
def __init__(self, hidden):
super().__init__()
self.hidden = hidden
self.attn = nn.Linear(self.hidden * 2, hidden)
self.v = nn.Parameter(torch.rand(hidden))
stdv = 1.0 / m... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Eddie-Hwang/Co-Eye_Motion_Generation | Attn | false | 5,116 | [
"MIT"
] | 1 | 8e244680115fb63bc26018cb6b53bcfbd04e9683 | https://github.com/Eddie-Hwang/Co-Eye_Motion_Generation/tree/8e244680115fb63bc26018cb6b53bcfbd04e9683 |
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... | Aarsh2001/annotated_deep_learning_paper_implementations | Conv2d | false | 4,796 | [
"MIT"
] | 1 | ff0d5c065da1a46769f5f66fddc252c178f8fa37 | https://github.com/Aarsh2001/annotated_deep_learning_paper_implementations/tree/ff0d5c065da1a46769f5f66fddc252c178f8fa37 |
TVLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
import torch
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cud... | xyp8023/pytorch-CycleGAN-and-pix2pix | TVLoss | false | 13,125 | [
"BSD-3-Clause"
] | 0 | dce720d985a951a3cfed470ef4c2ef206c0e0817 | https://github.com/xyp8023/pytorch-CycleGAN-and-pix2pix/tree/dce720d985a951a3cfed470ef4c2ef206c0e0817 |
DW_PW_projection | import torch
import torch.nn as nn
class DW_PW_projection(nn.Module):
def __init__(self, c_in, c_out, kernel_size, bias=False, padding_mode=
'replicate'):
super(DW_PW_projection, self).__init__()
self.dw_conv1d = nn.Conv1d(in_channels=c_in, out_channels=c_in,
kernel_size=kerne... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | YexuZhou/TimeSeriesClassification_Transformer | DW_PW_projection | false | 6,015 | [
"MIT"
] | 1 | c20e00cfac4cfdb849e57e14c184f7d424257409 | https://github.com/YexuZhou/TimeSeriesClassification_Transformer/tree/c20e00cfac4cfdb849e57e14c184f7d424257409 |
_ImpalaBlock | # 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... | IBM/vsrl-framework | _ImpalaBlock | false | 8,285 | [
"MIT"
] | 44 | 42e0853bffb5efbb66cd97178aff9e10ad18c5a9 | https://github.com/IBM/vsrl-framework/tree/42e0853bffb5efbb66cd97178aff9e10ad18c5a9 |
Whitening2d | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | TranNhiem/MVAR_SSL | Whitening2d | false | 5,916 | [
"MIT"
] | 1 | 339964db4d40f06a92866675ff99ef67cd968cca | https://github.com/TranNhiem/MVAR_SSL/tree/339964db4d40f06a92866675ff99ef67cd968cca |
SelfOutput | # 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 ... | QuLiang132/nlp-notebook | SelfOutput | false | 5,729 | [
"MIT"
] | 1 | b7659867b967d1e541bee5617cee017b3b67d9ba | https://github.com/QuLiang132/nlp-notebook/tree/b7659867b967d1e541bee5617cee017b3b67d9ba |
GeM | # 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
from torch import nn
from to... | lulor/project_vg | GeM | false | 7,135 | [
"MIT"
] | 1 | 27b0c3b3038c5a666dde516a0a265ae8ddf2059f | https://github.com/lulor/project_vg/tree/27b0c3b3038c5a666dde516a0a265ae8ddf2059f |
CTCHead | import torch
from torch import nn
class CTCHead(nn.Module):
def __init__(self, in_channels, out_channels, fc_decay=0.0004, **kwargs):
super(CTCHead, self).__init__()
self.fc = nn.Linear(in_channels, out_channels)
self.softmax = nn.Softmax(dim=2)
self.out_channels = out_channels
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | DocYard-ai/UCR | CTCHead | false | 8,035 | [
"Apache-2.0"
] | 10 | 7618aa336f56e71d9fd8cdc2d591e3d138e3dc68 | https://github.com/DocYard-ai/UCR/tree/7618aa336f56e71d9fd8cdc2d591e3d138e3dc68 |
AgentModel | import torch
import torch.nn as nn
class AgentModel(nn.Module):
"""The model that computes one score per action"""
def __init__(self, n_observations, n_actions, n_hidden):
super().__init__()
self.linear = nn.Linear(n_observations, n_hidden)
self.linear2 = nn.Linear(n_hidden, n_actions... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Purple-PI/rlstructures | AgentModel | false | 14,254 | [
"MIT"
] | 281 | 9b201b083715bbda2f3534b010c84e11dfc0a1c7 | https://github.com/Purple-PI/rlstructures/tree/9b201b083715bbda2f3534b010c84e11dfc0a1c7 |
BertTextPooler | # 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_... | IMNearth/Curriculum-Learning-For-VLN | BertTextPooler | false | 18,368 | [
"MIT"
] | 8 | d2fe1286eb295dc8c63a0c886b35883f32481d85 | https://github.com/IMNearth/Curriculum-Learning-For-VLN/tree/d2fe1286eb295dc8c63a0c886b35883f32481d85 |
GlobalAveragePooling | import torch
import torch.nn as nn
class GlobalAveragePooling(nn.Module):
"""Global Average Pooling neck.
Note that we use `view` to remove extra channel after pooling. We do not
use `squeeze` as it will also remove the batch dimension when the tensor
has a batch dimension of size 1, which can lead t... | 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... | ALISCIFP/mmpose | GlobalAveragePooling | false | 2,050 | [
"Apache-2.0"
] | 0 | 2433e3dbcc44baa2253e2a7c748ba0216937933e | https://github.com/ALISCIFP/mmpose/tree/2433e3dbcc44baa2253e2a7c748ba0216937933e |
ChannelwiseAttention | # 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_... | farkoo/novel-seam-carving-method | ChannelwiseAttention | false | 3,495 | [
"MIT"
] | 0 | aa3e9a4e3d5e13872eed412444e5be519542f7e5 | https://github.com/farkoo/novel-seam-carving-method/tree/aa3e9a4e3d5e13872eed412444e5be519542f7e5 |
MidNet2 | import torch
import torch.nn as nn
class MidNet2(nn.Module):
def forward(self, x_in):
"""Network with dilation rate 2
:param x_in: input convolutional features
:returns: processed convolutional features
:rtype: Tensor
"""
x = self.lrelu(self.conv1... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | DevilMayNotCry/My_curl | MidNet2 | false | 9,128 | [
"BSD-3-Clause"
] | 0 | a8f65a3e58cbdeefb4679aa2f0c3d9d800b67381 | https://github.com/DevilMayNotCry/My_curl/tree/a8f65a3e58cbdeefb4679aa2f0c3d9d800b67381 |
ArcMarginProduct | import torch
from torch import nn
from torch.nn import functional as F
from torch.nn.modules.loss import *
from torch.nn.modules import *
from torch.optim import *
from torch.optim.lr_scheduler import *
import torch.distributed
import torch.multiprocessing
import torch.backends
class ArcMarginProduct(nn.Module):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Casyfill/catalyst | ArcMarginProduct | false | 9,006 | [
"Apache-2.0"
] | 0 | 7f63545dbc53902c3dd959463def28a67a16a989 | https://github.com/Casyfill/catalyst/tree/7f63545dbc53902c3dd959463def28a67a16a989 |
ChannelNorm | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch.nn import Module
from torch import nn
import torch.utils.data
import... | ppvalluri09/annotated_deep_learning_paper_implementations | ChannelNorm | false | 11,070 | [
"MIT"
] | 0 | 387b6dfd1ef1f6d295e9394c24b5798071d9a3e4 | https://github.com/ppvalluri09/annotated_deep_learning_paper_implementations/tree/387b6dfd1ef1f6d295e9394c24b5798071d9a3e4 |
LinearNet | # 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.... | OregonWebSells/ReAgent | LinearNet | false | 5,687 | [
"BSD-3-Clause"
] | 1 | 866f91785ca86db32fb67744aa063fe77791ff21 | https://github.com/OregonWebSells/ReAgent/tree/866f91785ca86db32fb67744aa063fe77791ff21 |
RewardCriterion | import torch
from torch import nn
import torch.nn.init
class RewardCriterion(nn.Module):
def __init__(self):
super(RewardCriterion, self).__init__()
def forward(self, input, seq, reward):
input = input.contiguous().view(-1)
reward = reward.contiguous().view(-1)
mask = (seq > ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
import torch.nn.init
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dyn... | KunpengLi1994/PsTuts | RewardCriterion | false | 17,537 | [
"Apache-2.0"
] | 4 | 2063bf0aac8d3fd13bf5a14b80ce05586b8365f9 | https://github.com/KunpengLi1994/PsTuts/tree/2063bf0aac8d3fd13bf5a14b80ce05586b8365f9 |
LanguageModelCriterion | import torch
import torch.nn as nn
class LanguageModelCriterion(nn.Module):
def __init__(self):
super(LanguageModelCriterion, self).__init__()
def forward(self, input, target, mask):
input = input.contiguous().view(-1, input.size(2))
target = target.contiguous().view(-1, 1)
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 import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | FYJNEVERFOLLOWS/hw_NLP | LanguageModelCriterion | false | 420 | [
"MIT"
] | 0 | c9d72804128dfed3a53e9df40e94b2d53cccacae | https://github.com/FYJNEVERFOLLOWS/hw_NLP/tree/c9d72804128dfed3a53e9df40e94b2d53cccacae |
DecoderLayer | import torch
import torch.nn as nn
import torch.nn.functional as F
class SPA(nn.Module):
""" Selective parallel attention """
def __init__(self, n_head: 'int'=8, d_v: 'int'=64):
super().__init__()
self.gap = nn.AdaptiveAvgPool1d(1)
self.sk = nn.Linear(d_v, n_head * d_v)
self.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
from torch._inductor.runtime.... | WOMMOW/AIT | DecoderLayer | false | 1,233 | [
"MIT"
] | 0 | 305fe7962bf9c5c24b6854e3ff0b7e2e669bf5a5 | https://github.com/WOMMOW/AIT/tree/305fe7962bf9c5c24b6854e3ff0b7e2e669bf5a5 |
SourceContextGate | # 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 ... | AndrewM1998/MultimodalNMT | SourceContextGate | false | 7,706 | [
"MIT"
] | 40 | b66d3a40ac9bc5c11ae124f51d1a9abf7cd6a04b | https://github.com/AndrewM1998/MultimodalNMT/tree/b66d3a40ac9bc5c11ae124f51d1a9abf7cd6a04b |
TripletLoss | # 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... | EmmaW8/EISNet | TripletLoss | false | 8,040 | [
"MIT"
] | 40 | 97c420d6763c5f825e88ed732edee4e75f3b947e | https://github.com/EmmaW8/EISNet/tree/97c420d6763c5f825e88ed732edee4e75f3b947e |
ConditionalEntropyLoss | import torch
import torch.nn.functional as F
class ConditionalEntropyLoss(torch.nn.Module):
def __init__(self, model):
super(ConditionalEntropyLoss, self).__init__()
def forward(self, x, weight):
loss = F.softmax(x, dim=1) * F.log_softmax(x, dim=1) * weight
loss = loss.sum(dim=1)
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
assert_size_stride = t... | tasfia/BMCoGAN | ConditionalEntropyLoss | false | 13,104 | [
"MIT"
] | 0 | 0d400c2c71dbfb69af422afc487f65afb98de8af | https://github.com/tasfia/BMCoGAN/tree/0d400c2c71dbfb69af422afc487f65afb98de8af |
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
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | TaoranJ/PC-RNN | PositionwiseFeedForward | false | 5,880 | [
"MIT"
] | 1 | f360b464cf68737fefd5e6093e55056838693b1b | https://github.com/TaoranJ/PC-RNN/tree/f360b464cf68737fefd5e6093e55056838693b1b |
FeedForward | import torch
import torch.nn.functional as F
import torch.nn as nn
class FeedForward(nn.Module):
def __init__(self, d_model, d_ff=2048, dropout=0.1):
super().__init__()
self.linear_1 = nn.Linear(d_model, d_ff)
self.dropout = nn.Dropout(dropout)
self.linear_2 = nn.Linear(d_ff, d_mo... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | Daniangio/pheno_phases | FeedForward | false | 11,324 | [
"MIT"
] | 0 | c7229f4ec56fea42988768b02e8deb8615f683fa | https://github.com/Daniangio/pheno_phases/tree/c7229f4ec56fea42988768b02e8deb8615f683fa |
TSAFusion | # 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
from to... | cyysc1998/EDVRDarts | TSAFusion | false | 6,582 | [
"MIT"
] | 1 | 201badbc8c6469b519647a8869c3782ebe1176cf | https://github.com/cyysc1998/EDVRDarts/tree/201badbc8c6469b519647a8869c3782ebe1176cf |
CmapPafHead | import torch
import torch.utils.data
import torch.nn
import torch.optim
class UpsampleCBR(torch.nn.Sequential):
def __init__(self, input_channels, output_channels, count=1, num_flat=0):
layers = []
for i in range(count):
if i == 0:
inch = input_channels
els... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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
import torch.optim
assert_size_stride = ... | Anqi-nus/trtpose | CmapPafHead | false | 4,863 | [
"MIT"
] | 1 | 723ec95df8b8414b9289af90fbfbc98756792a21 | https://github.com/Anqi-nus/trtpose/tree/723ec95df8b8414b9289af90fbfbc98756792a21 |
MidNet2 | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | deshwalmahesh/CURL---cpu-gpu | MidNet2 | false | 3,409 | [
"BSD-3-Clause"
] | 0 | f4e87275b6cce556b9e04a188cf7ae13d810d82a | https://github.com/deshwalmahesh/CURL---cpu-gpu/tree/f4e87275b6cce556b9e04a188cf7ae13d810d82a |
ScaledDotProductAttentionMemory | import torch
import numpy as np
from torch import nn
class ScaledDotProductAttentionMemory(nn.Module):
"""
Scaled dot-product attention with memory
"""
def __init__(self, d_model, d_k, d_v, h, m):
"""
:param d_model: Output dimensionality of the model
:param d_k: Dimensionalit... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | mandaltanmoy1938/VisualGPT | ScaledDotProductAttentionMemory | false | 16,005 | [
"MIT"
] | 86 | 9ba78948282fdca502d5030f4eccc3df562982c3 | https://github.com/mandaltanmoy1938/VisualGPT/tree/9ba78948282fdca502d5030f4eccc3df562982c3 |
VGGLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.fft
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo... | NejcHirci/material-addon | VGGLoss | false | 17,772 | [
"MIT"
] | 4 | c08e2081413c3319b712c2f7193ac8013f601382 | https://github.com/NejcHirci/material-addon/tree/c08e2081413c3319b712c2f7193ac8013f601382 |
SplitChannels | # 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... | Myyyr/segmentation | SplitChannels | false | 859 | [
"MIT"
] | 0 | 6b9423e327cff1eb23599404031b7fb8e9ecf75d | https://github.com/Myyyr/segmentation/tree/6b9423e327cff1eb23599404031b7fb8e9ecf75d |
Mul | import torch
class Mul(torch.nn.Module):
def __init__(self):
super(Mul, 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 | Mul | false | 2,568 | [
"MIT"
] | 0 | 76bf298b3da408509665e23e2494922b131afb10 | https://github.com/Ilyabasharov/torch2trt/tree/76bf298b3da408509665e23e2494922b131afb10 |
Conv3d | from torch.nn import Module
import math
import torch
from torch.nn import functional as F
import torch.utils.data
from torch.nn.parameter import Parameter
from torch.nn.functional import pad
from torch.nn.modules import Module
from torch.nn.modules.utils import _triple
import torch.nn.parallel
def conv3d_same_padding... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch.nn import Module
import math
from torch.nn import functional as F
imp... | AvrilCheng/LidarStereoNet | Conv3d | false | 7,753 | [
"MIT"
] | 27 | 96c7cd6d5edb9b2fd302e2edd0c05cbda1ed024e | https://github.com/AvrilCheng/LidarStereoNet/tree/96c7cd6d5edb9b2fd302e2edd0c05cbda1ed024e |
CrossNet | import torch
import torch.nn as nn
from sklearn.metrics import *
class CrossNet(nn.Module):
"""The Cross Network part of Deep&Cross Network model,
which leans both low and high degree cross feature.
Input shape
- 2D tensor with shape: ``(batch_size, units)``.
Output shape
- 2D tens... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from sklearn.metrics import *
assert_size_stride = torch._... | liyunrui/DeepCTR-Torch | CrossNet | false | 12,729 | [
"Apache-2.0"
] | 0 | 392fd6d39d9ca0ac854022136cdb4d5c68e3a592 | https://github.com/liyunrui/DeepCTR-Torch/tree/392fd6d39d9ca0ac854022136cdb4d5c68e3a592 |
Model | import torch
import torch.nn as nn
import torch._C
import torch.serialization
class Model(nn.Module):
def __init__(self):
super().__init__()
self.conv = nn.Conv2d(2, 2, 1)
def forward(self, x):
return self.conv(x)
def get_inputs():
return [torch.rand([4, 2, 64, 64])]
def get_... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch._C
import torch.serialization
assert_size_str... | devolfnn/mmsegmentation | Model | false | 9,987 | [
"Apache-2.0"
] | 0 | c0dccc1725b80b643419cc008cb93e8dcb4209c8 | https://github.com/devolfnn/mmsegmentation/tree/c0dccc1725b80b643419cc008cb93e8dcb4209c8 |
DownConv | import copy
import torch
from torch import nn
import torch.utils.data
def get_activation(activation):
if isinstance(activation, str):
if activation == 'relu':
return nn.ReLU()
elif activation == 'leaky':
return nn.LeakyReLU(negative_slope=0.1)
elif activation == 'pr... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import copy
from torch import... | ELEKTRONN/elektronn3 | DownConv | false | 13,627 | [
"MIT"
] | 124 | 19c751855dffc67b744cd43e757aa4a5bd577d9b | https://github.com/ELEKTRONN/elektronn3/tree/19c751855dffc67b744cd43e757aa4a5bd577d9b |
SelfAttention | import torch
import torch.nn as nn
class SelfAttention(nn.Module):
def __init__(self, input_dim):
super(SelfAttention, self).__init__()
self.pre_pooling_linear = nn.Linear(input_dim, input_dim)
self.pooling_linear = nn.Linear(input_dim, 1)
def forward(self, x):
self.pre_pooli... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
im... | JunKong5/WestBERT | SelfAttention | false | 9,168 | [
"MIT"
] | 0 | 8e0fc9aca290103698cd08239710193c36b06eff | https://github.com/JunKong5/WestBERT/tree/8e0fc9aca290103698cd08239710193c36b06eff |
ActionAttention | import torch
import numpy as np
import torch as th
import torch.nn as nn
class ActionAttention(nn.Module):
def __init__(self, model_dim, n_actions):
super(ActionAttention, self).__init__()
self.model_dim = model_dim
self.n_actions = n_actions
self.fcq = nn.Linear(model_dim, model_... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | footoredo/pymarl | ActionAttention | false | 3,504 | [
"Apache-2.0"
] | 0 | 9c62dda7a7ed984e020f2cafab93601342305af2 | https://github.com/footoredo/pymarl/tree/9c62dda7a7ed984e020f2cafab93601342305af2 |
AttentionHead | import torch
from torch import Tensor
import torch.optim.lr_scheduler
import torch.nn as nn
import torch.nn.functional as F
import torch.optim
import torch.onnx.operators
def scaled_dot_product_attention(query: 'Tensor', key: 'Tensor', value:
'Tensor') ->Tensor:
temp = query.bmm(key.transpose(1, 2))
scale... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | LogIntelligence/LogADEmpirical | AttentionHead | false | 8,491 | [
"MIT"
] | 11 | 48458aee65c1c84466b04dd4092fae79a7f341fd | https://github.com/LogIntelligence/LogADEmpirical/tree/48458aee65c1c84466b04dd4092fae79a7f341fd |
L2N | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | SamSweere/CV-PIRE | L2N | false | 2,804 | [
"MIT"
] | 0 | d857167b3058cb51d10662150c6a4ba3c85f2903 | https://github.com/SamSweere/CV-PIRE/tree/d857167b3058cb51d10662150c6a4ba3c85f2903 |
Classifier | import torch
import torch.nn as nn
class FCNet(nn.Module):
def __init__(self, in_size, out_size, activate=None, drop=0.0):
super(FCNet, self).__init__()
self.lin = nn.Linear(in_size, out_size)
self.drop_value = drop
self.drop = nn.Dropout(drop)
self.activate = activate.low... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | Ruiver/CTCNet | Classifier | false | 17,891 | [
"Apache-2.0"
] | 6 | 539e55ec9fed06028379d35dfd5cd4074755ffd8 | https://github.com/Ruiver/CTCNet/tree/539e55ec9fed06028379d35dfd5cd4074755ffd8 |
TwoMLPHead | # 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_... | Sense-GVT/BigPretrain | TwoMLPHead | false | 17,912 | [
"Apache-2.0"
] | 8 | d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e | https://github.com/Sense-GVT/BigPretrain/tree/d8d9b43d94dd1364c18c1e5ba21b85a31cdbba9e |
IrisClassifier | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.onnx
class IrisClassifier(nn.Module):
def __init__(self):
super(IrisClassifier, self).__init__()
self.fc1 = nn.Linear(4, 10)
self.fc2 = nn.Linear(10, 10)
self.fc3 = nn.Linear(10, 3)
def forward(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
import torch.nn as nn
import ... | ParikhKadam/mlflow | IrisClassifier | false | 2,723 | [
"Apache-2.0"
] | 0 | 21d64d45c6131b62bb956f77327aa1abd9df66b2 | https://github.com/ParikhKadam/mlflow/tree/21d64d45c6131b62bb956f77327aa1abd9df66b2 |
APL | import torch
from torch import nn
from torch.nn.parameter import Parameter
class APL(nn.Module):
"""
Implementation of APL (ADAPTIVE PIECEWISE LINEAR UNITS) unit:
.. math::
APL(x_i) = max(0,x) + \\sum_{s=1}^{S}{a_i^s * max(0, -x + b_i^s)}
with trainable parameters a and b, parameter... | 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
from torch.nn.parameter import Parameter
assert_size_stride = torch.... | Venkateshwar2506/Echo | APL | false | 1,185 | [
"MIT"
] | 0 | 5d236b25ee4900754f48e0a865e1bf1ae9183875 | https://github.com/Venkateshwar2506/Echo/tree/5d236b25ee4900754f48e0a865e1bf1ae9183875 |
MLP_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
import torch.nn as nn
import ... | WeihengXia0123/Machine_Learning_Service | MLP_model | false | 1,218 | [
"MIT"
] | 0 | 516d64ff780317ee96e18584001b77165ce6531c | https://github.com/WeihengXia0123/Machine_Learning_Service/tree/516d64ff780317ee96e18584001b77165ce6531c |
MlpLite | import torch
from torch import nn
class MlpLite(nn.Module):
def __init__(self, H, W, in_features, hidden_features=None,
out_features=None, act_layer=nn.GELU, drop=0.0):
super().__init__()
out_features = out_features or in_features
hidden_features = hidden_features or in_features
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import n... | likelyzhao/dino | MlpLite | false | 12,815 | [
"Apache-2.0"
] | 0 | ad019889b0e4c103f0471d085f79bba42c817d1b | https://github.com/likelyzhao/dino/tree/ad019889b0e4c103f0471d085f79bba42c817d1b |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.