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 |
|---|---|---|---|---|---|---|---|---|---|---|
PermEqui2_mean | import torch
import torch.nn as nn
class PermEqui2_mean(nn.Module):
def __init__(self, in_dim, out_dim):
super(PermEqui2_mean, self).__init__()
self.Gamma = nn.Linear(in_dim, out_dim)
self.Lambda = nn.Linear(in_dim, out_dim, bias=False)
def forward(self, x):
xm = x.mean(1, ke... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | haoruilee/DeepSets | PermEqui2_mean | false | 15,495 | [
"Apache-2.0"
] | 213 | b405dd6b51a34fb1ef622e25e6685b417b7b7cbb | https://github.com/haoruilee/DeepSets/tree/b405dd6b51a34fb1ef622e25e6685b417b7b7cbb |
MegatronFastGelu | # 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
import torch.onnx
import torch.utils.checkpoint
assert_size_str... | almiliMSFT/onnxruntime | MegatronFastGelu | false | 14,800 | [
"MIT"
] | 6,036 | c002dc86a364852859ca9642698fcfc5edf22c9d | https://github.com/almiliMSFT/onnxruntime/tree/c002dc86a364852859ca9642698fcfc5edf22c9d |
HighwayNetwork | import torch
import torch.nn as nn
import torch.nn.functional as F
class HighwayNetwork(nn.Module):
def __init__(self, size):
super().__init__()
self.W1 = nn.Linear(size, size)
self.W2 = nn.Linear(size, size)
self.W1.bias.data.fill_(0.0)
def forward(self, x):
x1 = 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.nn as nn
assert_... | NarutoUA/WaveRNN | HighwayNetwork | false | 9,400 | [
"MIT"
] | 0 | ed80c3f092b9c086d42af51a7f2545727ed1610c | https://github.com/NarutoUA/WaveRNN/tree/ed80c3f092b9c086d42af51a7f2545727ed1610c |
SAM | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_st... | cooked-sashimi/Yet-Another-YOLOv4-Pytorch | SAM | false | 15,078 | [
"MIT"
] | 133 | c884ef8849987a75b0e17eba1b739c22d3782e90 | https://github.com/cooked-sashimi/Yet-Another-YOLOv4-Pytorch/tree/c884ef8849987a75b0e17eba1b739c22d3782e90 |
ContrastivePairwiseEmbeddingLoss | # 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.... | Dokholyan/catalyst | ContrastivePairwiseEmbeddingLoss | false | 378 | [
"Apache-2.0"
] | 0 | de8e681676d76741fdb722d4cd77274ba616915d | https://github.com/Dokholyan/catalyst/tree/de8e681676d76741fdb722d4cd77274ba616915d |
BCEDiceLoss | import torch
from torch import nn
def flatten(tensor):
"""Flattens a given tensor such that the channel axis is first.
The shapes are transformed as follows:
(N, C, D, H, W) -> (C, N * D * H * W)
"""
C = tensor.size(1)
axis_order = (1, 0) + tuple(range(2, tensor.dim()))
transposed = 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 libdevice, math as tl_math
from torch ... | YinanZYN/pytorch-3dunet | BCEDiceLoss | false | 11,997 | [
"MIT"
] | 0 | d1494f421a836af54c3dde65c54e3e62d5c00800 | https://github.com/YinanZYN/pytorch-3dunet/tree/d1494f421a836af54c3dde65c54e3e62d5c00800 |
UpConv | import torch
import torch.nn as nn
import torchvision.transforms.functional as TF
class UpConv(nn.Module):
def __init__(self, in_channels, out_channels):
super().__init__()
self.tconv = nn.ConvTranspose2d(in_channels=in_channels,
out_channels=out_channels, kernel_size=2, stride=2)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | gandhisamay/Drone-Cam-Segmentation | UpConv | false | 3,547 | [
"MIT"
] | 0 | 7e93b6bb65300aea94dd5e35bb8ca3bd1efbe043 | https://github.com/gandhisamay/Drone-Cam-Segmentation/tree/7e93b6bb65300aea94dd5e35bb8ca3bd1efbe043 |
UnfoldTemporalWindows | # 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... | Siujohnjai/MS-G3D | UnfoldTemporalWindows | false | 11,876 | [
"MIT"
] | 0 | 615b1002ba1780f6d1fc4f7b93c9525c07aeed6a | https://github.com/Siujohnjai/MS-G3D/tree/615b1002ba1780f6d1fc4f7b93c9525c07aeed6a |
AdaptiveInstanceNorm | import torch
import torch.nn as nn
from math import sqrt
def equal_lr(module, name='weight'):
EqualLR.apply(module, name)
return module
class EqualLR:
def __init__(self, name):
self.name = name
def compute_weight(self, module):
weight = getattr(module, self.name + '_orig')
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | mmhnoaccount/DeepChroma_128 | AdaptiveInstanceNorm | false | 7,262 | [
"MIT"
] | 1 | 337ec961bfc4ee44f48cb84e624c293ee2805b62 | https://github.com/mmhnoaccount/DeepChroma_128/tree/337ec961bfc4ee44f48cb84e624c293ee2805b62 |
ChanNorm | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | Asha-Gutlapalli/StyleGAN2-Art | ChanNorm | false | 16,949 | [
"MIT"
] | 4 | 5a8a8ad61183e82abafe587d755a7fbce28aa8f0 | https://github.com/Asha-Gutlapalli/StyleGAN2-Art/tree/5a8a8ad61183e82abafe587d755a7fbce28aa8f0 |
Sign | import torch
import torch.onnx
import torch.nn as nn
class Sign(nn.Module):
def forward(self, x):
return torch.sign(x)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.onnx
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynam... | mil-tokyo/webdnn | Sign | false | 16,072 | [
"MIT"
] | 1,967 | 38a60fd3e1a4e72bc01108189a3aa51e0752aecd | https://github.com/mil-tokyo/webdnn/tree/38a60fd3e1a4e72bc01108189a3aa51e0752aecd |
LossL1 | # 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
... | MECLabTUDA/OOD-Gen | LossL1 | false | 17,630 | [
"MIT"
] | 5 | f85ea9106ae1425f18e34c9d82fa3ca4925d8d9e | https://github.com/MECLabTUDA/OOD-Gen/tree/f85ea9106ae1425f18e34c9d82fa3ca4925d8d9e |
TimeBlock | # 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_... | Kelang-Tian/ST-MGAT | TimeBlock | false | 17,534 | [
"MIT"
] | 8 | f527cb5748d022d9c3b4eddd3481cf641bb0dae3 | https://github.com/Kelang-Tian/ST-MGAT/tree/f527cb5748d022d9c3b4eddd3481cf641bb0dae3 |
_ResLayer | # 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 ... | KyleDavisSA/pde-surrogate | _ResLayer | false | 13,978 | [
"MIT"
] | 62 | 41ad2c9eb73c323e389174080f4b3df6cbd3c900 | https://github.com/KyleDavisSA/pde-surrogate/tree/41ad2c9eb73c323e389174080f4b3df6cbd3c900 |
BertSelfOutput | from _paritybench_helpers import _mock_config
import torch
from torch import nn
class BertLayerNorm(nn.Module):
def __init__(self, hidden_size, eps=1e-12):
"""Construct a layernorm module in the TF style (epsilon inside the square root).
"""
super(BertLayerNorm, self).__init__()
s... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import n... | BIT-ENGD/eeqa | BertSelfOutput | false | 14,919 | [
"MIT"
] | 142 | 2995abbaff1fb47131246a247ee7ed62aa94f4c3 | https://github.com/BIT-ENGD/eeqa/tree/2995abbaff1fb47131246a247ee7ed62aa94f4c3 |
HardSwish | import torch
import torch.nn.functional as F
from torch import nn
class HardSwish(nn.Module):
def forward(self, x):
return x * F.hardtanh(x + 3, 0.0, 6.0, True) / 6.0
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | Cris-zj/mmdetection | HardSwish | false | 8,915 | [
"Apache-2.0"
] | 0 | ede648b93e7ba2562f835f338b778f3e705f7119 | https://github.com/Cris-zj/mmdetection/tree/ede648b93e7ba2562f835f338b778f3e705f7119 |
TimeEncode | import torch
import numpy as np
class TimeEncode(torch.nn.Module):
def __init__(self, dimension):
super(TimeEncode, self).__init__()
self.dimension = dimension
self.w = torch.nn.Linear(1, dimension)
self.w.weight = torch.nn.Parameter(torch.from_numpy(1 / 10 ** np.
lins... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | linhthi/tgn | TimeEncode | false | 12,711 | [
"Apache-2.0"
] | 0 | bb83f82d89aba07d07da3b173803fb0df32ebbbc | https://github.com/linhthi/tgn/tree/bb83f82d89aba07d07da3b173803fb0df32ebbbc |
KdLoss | import torch
import torch.nn.functional as F
import torch.utils
import torch.utils.data.distributed
class KdLoss(torch.nn.Module):
def __init__(self, alpha=0.9, T=5):
super(KdLoss, self).__init__()
self.alpha = alpha
self.T = T
self.criterion = torch.nn.KLDivLoss()
def forwar... | 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... | CQUlearningsystemgroup/LearningToBinarize | KdLoss | false | 4,949 | [
"MIT"
] | 1 | 1ecad897145af65ff52323bf2ec64a2154dc87d6 | https://github.com/CQUlearningsystemgroup/LearningToBinarize/tree/1ecad897145af65ff52323bf2ec64a2154dc87d6 |
Sparsemax | import torch
import torch.nn as nn
class Sparsemax(nn.Module):
"""Sparsemax function."""
def __init__(self, dim=None):
"""Initialize sparsemax activation
Args:
dim (int, optional): The dimension over which to apply the sparsemax function.
"""
super(Sparsem... | import torch
from torch import device
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guar... | Max-luo-song/fs-map-project | Sparsemax | false | 5,591 | [
"Apache-2.0"
] | 1 | 4e9d86e182d9a4b969e86b12d72f227e4fd4fd09 | https://github.com/Max-luo-song/fs-map-project/tree/4e9d86e182d9a4b969e86b12d72f227e4fd4fd09 |
CA_Block | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import 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... | Mhaiyang/CVPR2021_PFNet | CA_Block | false | 8,556 | [
"BSD-3-Clause"
] | 24 | 2c4cab0730e6a0619fad79092f0b34f71c3b56c4 | https://github.com/Mhaiyang/CVPR2021_PFNet/tree/2c4cab0730e6a0619fad79092f0b34f71c3b56c4 |
CeilModule | # 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... | MichaelZhero/nncase | CeilModule | false | 11,930 | [
"Apache-2.0"
] | 0 | 0fae6ce90d7adff386e1a286cd2b42422f4b850a | https://github.com/MichaelZhero/nncase/tree/0fae6ce90d7adff386e1a286cd2b42422f4b850a |
TAM | # 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 ... | YvanG/action-recognition-pytorch | TAM | false | 6,024 | [
"Apache-2.0"
] | 1 | cc05fb63c7f21e9c033cbe984b9c020625136aa9 | https://github.com/YvanG/action-recognition-pytorch/tree/cc05fb63c7f21e9c033cbe984b9c020625136aa9 |
PlainRefiner | import torch
import torch.nn as nn
class PlainRefiner(nn.Module):
"""Simple refiner from Deep Image Matting.
Args:
conv_channels (int): Number of channels produced by the three main
convolutional layer.
loss_refine (dict): Config of the loss of the refiner. Default: None.
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | hejm37/mmediting | PlainRefiner | false | 12,487 | [
"Apache-2.0"
] | 0 | d4086aaf8a36ae830f1714aad585900d24ad1156 | https://github.com/hejm37/mmediting/tree/d4086aaf8a36ae830f1714aad585900d24ad1156 |
Complex_nn | # 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.... | urbanriskmap/timeseries-analysis | Complex_nn | false | 10,903 | [
"MIT"
] | 0 | 6b9a8d1a916ff784cb0de93d6997cd072d1ca6ae | https://github.com/urbanriskmap/timeseries-analysis/tree/6b9a8d1a916ff784cb0de93d6997cd072d1ca6ae |
PixelNorm | import torch
import torch.utils.data
from torch import nn
class PixelNorm(nn.Module):
def __init__(self, epsilon=1e-08):
super(PixelNorm, self).__init__()
self.epsilon = epsilon
def forward(self, x):
tmp = torch.mul(x, x)
tmp1 = torch.rsqrt(torch.mean(tmp, dim=1, keepdim=True... | 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.utils.data
from torch import nn
assert_size_stride = torch._C._dyn... | Archjbald/PoseStylizer | PixelNorm | false | 1,974 | [
"BSD-3-Clause"
] | 0 | 95aae02d1f4ac83536d91b8db5f78d12e7830f97 | https://github.com/Archjbald/PoseStylizer/tree/95aae02d1f4ac83536d91b8db5f78d12e7830f97 |
DownSample | import torch
from torch import nn
import torch.nn.functional as F
import torch.utils.data
import torch.nn.functional
import torch.autograd
class Smooth(nn.Module):
"""
<a id="smooth"></a>
### Smoothing Layer
This layer blurs each channel
"""
def __init__(self):
super().__init__()
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
import t... | Hadryan/nn | DownSample | false | 9,379 | [
"MIT"
] | 0 | b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d | https://github.com/Hadryan/nn/tree/b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d |
FCMinibatchStd | # 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 math
from to... | ishine/GANsNRoses | FCMinibatchStd | false | 15,623 | [
"MIT"
] | 969 | 414e9e77c3df47d4ecf7941b5dcfdffec67403ee | https://github.com/ishine/GANsNRoses/tree/414e9e77c3df47d4ecf7941b5dcfdffec67403ee |
DepthwiseSeparableConvolution | import torch
from torch import nn
class DepthwiseSeparableConvolution(nn.Module):
def __init__(self, in_ch, out_ch, kernel_size=3, stride=1, padding=1):
super().__init__()
"""
input : N*C1
output : N*C1
groups = C1
"""
self.depthwise_conv = nn.C... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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... | LiChengChen666/DetectDee | DepthwiseSeparableConvolution | false | 9,807 | [
"Apache-2.0"
] | 0 | 1e6aaa0d15b1fc12d1342d8a922004e372b5f437 | https://github.com/LiChengChen666/DetectDee/tree/1e6aaa0d15b1fc12d1342d8a922004e372b5f437 |
BertLayer | from _paritybench_helpers import _mock_config
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class BertSelfAttention(nn.Module):
def __init__(self, config):
super().__init__()
self.num_attention_heads = config.num_attention_heads
self.attention_head_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.... | brendon-boldt/minbert-assignment | BertLayer | false | 12,274 | [
"Apache-2.0"
] | 0 | 0b562d791d34a40fd3c0383a0a32b4eeb2171cb5 | https://github.com/brendon-boldt/minbert-assignment/tree/0b562d791d34a40fd3c0383a0a32b4eeb2171cb5 |
AdaptiveConcatPool2d | import torch
from torch import nn
import torch.optim
class AdaptiveConcatPool2d(nn.Module):
def __init__(self, sz=1):
super().__init__()
self.output_size = sz or 1
self.ap = nn.AdaptiveAvgPool2d(self.output_size)
self.mp = nn.AdaptiveMaxPool2d(self.output_size)
def forward(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._inductor.runtime import triton_helpers
from torch import nn
import torch.optim
assert_size_stride = torch._C._dynamo.guards.asse... | DrHB/PANDA-2nd-place-solution | AdaptiveConcatPool2d | false | 8,011 | [
"MIT"
] | 17 | 44ab72780f9e3594811f2a7520456de7a9e677db | https://github.com/DrHB/PANDA-2nd-place-solution/tree/44ab72780f9e3594811f2a7520456de7a9e677db |
TransformerLayer | import torch
import torch.nn as nn
class TransformerLayer(nn.Module):
def __init__(self, c, num_heads):
super().__init__()
self.q = nn.Linear(c, c, bias=False)
self.k = nn.Linear(c, c, bias=False)
self.v = nn.Linear(c, c, bias=False)
self.ma = nn.MultiheadAttention(embed_d... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | LTTBasic/lecttue-diagonosis | TransformerLayer | false | 760 | [
"MIT"
] | 0 | a9573f79da1fa8dcdd649bfd819ffad67ecad309 | https://github.com/LTTBasic/lecttue-diagonosis/tree/a9573f79da1fa8dcdd649bfd819ffad67ecad309 |
Conv3D_Block | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | Ohyeon5/SQM_basis | Conv3D_Block | false | 5,700 | [
"Apache-2.0"
] | 1 | a04662f1a4520128dd347b1e84d14717feb0655a | https://github.com/Ohyeon5/SQM_basis/tree/a04662f1a4520128dd347b1e84d14717feb0655a |
LayerNorm | import torch
class LayerNorm(torch.nn.Module):
def __init__(self, input_dim):
super(LayerNorm, self).__init__()
self.gamma = torch.nn.Parameter(torch.ones(input_dim))
self.beta = torch.nn.Parameter(torch.zeros(input_dim))
self.eps = 1e-06
def forward(self, x, mask):
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 libdevice
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_c... | ydai94/TextWorld-Coin-Collector | LayerNorm | false | 4,627 | [
"MIT"
] | 0 | 71d5c535b1ab60636d941fba9061e4066772bc40 | https://github.com/ydai94/TextWorld-Coin-Collector/tree/71d5c535b1ab60636d941fba9061e4066772bc40 |
FC_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_... | saksham36/LangGrounding | FC_Decoder | false | 4,252 | [
"MIT"
] | 0 | 89ee9e5b8090e61e6bf7bf2b3e1dd45edf9664b7 | https://github.com/saksham36/LangGrounding/tree/89ee9e5b8090e61e6bf7bf2b3e1dd45edf9664b7 |
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
from torch._inductor.runtime.... | zhan0903/cerl | Critic | false | 4,671 | [
"Apache-2.0"
] | 0 | 6fb8aca9cb78b72947237edf2b9ed8362bd43829 | https://github.com/zhan0903/cerl/tree/6fb8aca9cb78b72947237edf2b9ed8362bd43829 |
TReLU | # 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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | FightingSrain/ColorRL | TReLU | false | 5,156 | [
"MIT"
] | 1 | 2576304d56c2337e2c1cb8fba93888d984ed701b | https://github.com/FightingSrain/ColorRL/tree/2576304d56c2337e2c1cb8fba93888d984ed701b |
Grounding | # 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.parallel
import torch.optim
import torch.u... | necla-ml/ML-Vision | Grounding | false | 7,377 | [
"BSD-3-Clause"
] | 1 | 66229b29fc0f67c75dbe6304cdb8c5e93fe0bacf | https://github.com/necla-ml/ML-Vision/tree/66229b29fc0f67c75dbe6304cdb8c5e93fe0bacf |
NetVLAD | # 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.... | AlessandroRigoli/project_vg | NetVLAD | false | 11,565 | [
"MIT"
] | 0 | cb1323bee60cdb4108fe0aab68791321c7974832 | https://github.com/AlessandroRigoli/project_vg/tree/cb1323bee60cdb4108fe0aab68791321c7974832 |
_Hsigmoid | import torch
import torch.nn as nn
class _Hsigmoid(nn.Module):
def __init__(self, inplace=True):
super(_Hsigmoid, self).__init__()
self.relu6 = nn.ReLU6(inplace)
def forward(self, x):
return self.relu6(x + 3.0) / 6.0
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get... | 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... | hzwangjl/Lightweight-Segmentation | _Hsigmoid | false | 12,705 | [
"Apache-2.0"
] | 0 | 3a476719bdfee653ac1e1617c22714b7ee932cef | https://github.com/hzwangjl/Lightweight-Segmentation/tree/3a476719bdfee653ac1e1617c22714b7ee932cef |
ConvModel | # 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_... | chetanseth/pytorch | ConvModel | false | 9,906 | [
"MIT"
] | 0 | 001aaf56ee72e0a8b4df5fe8ad84fda6354a084c | https://github.com/chetanseth/pytorch/tree/001aaf56ee72e0a8b4df5fe8ad84fda6354a084c |
ResidualPointnet | # 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... | StructuralNeurobiologyLab/LightConvPoint | ResidualPointnet | false | 14,467 | [
"Apache-2.0"
] | 58 | 3f353f45e9e910fa390a74520dfd478e3e88f104 | https://github.com/StructuralNeurobiologyLab/LightConvPoint/tree/3f353f45e9e910fa390a74520dfd478e3e88f104 |
MSELoss | import torch
import torch.nn as nn
class MSELoss(nn.Module):
def __init__(self):
super(MSELoss, self).__init__()
def forward(self, outputs, target, *args):
val_pixels = torch.ne(target, 0).float()
loss = target * val_pixels - outputs * val_pixels
return torch.sum(loss ** 2) /... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | anglixjtu/MSG_CHN_WACV20 | MSELoss | false | 14,849 | [
"Apache-2.0"
] | 61 | 6910894cf3caed2ffde27586f96b132b0c1d1a98 | https://github.com/anglixjtu/MSG_CHN_WACV20/tree/6910894cf3caed2ffde27586f96b132b0c1d1a98 |
Decoder | import torch
import torch.nn as nn
class Decoder(nn.Module):
def __init__(self, M, H, D):
super().__init__()
self.D = D
self.M = M
self.H = H
self.dec1 = nn.Linear(in_features=self.M, out_features=self.H)
self.dec2 = nn.Linear(in_features=self.H, out_features=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.... | le0x99/deep-generative-modeling | Decoder | false | 7,071 | [
"MIT"
] | 1 | 40ffd1640dc3e5a6a2b4ba16a1d767034f081475 | https://github.com/le0x99/deep-generative-modeling/tree/40ffd1640dc3e5a6a2b4ba16a1d767034f081475 |
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.nn import Module
i... | IsmailKent/updown-baseline | GCN | false | 5,356 | [
"MIT"
] | 1 | 17a09a48e4f30a4a3edc7924f982eb129c583b41 | https://github.com/IsmailKent/updown-baseline/tree/17a09a48e4f30a4a3edc7924f982eb129c583b41 |
Linear_2L_KFRA | import torch
import torch.nn as nn
import torch.utils.data
def sample_K_laplace_MN(MAP, upper_Qinv, lower_HHinv):
Z = MAP.data.new(MAP.size()).normal_(mean=0, std=1)
all_mtx_sample = MAP + torch.matmul(torch.matmul(lower_HHinv, Z),
upper_Qinv)
weight_mtx_sample = all_mtx_sample[:, :-1]
bias_mt... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | JavierAntoran/Bayesain-Neural-Networks | Linear_2L_KFRA | false | 13,881 | [
"MIT"
] | 1,299 | 1f867a5bcbd1abfecede99807eb0b5f97ed8be7c | https://github.com/JavierAntoran/Bayesain-Neural-Networks/tree/1f867a5bcbd1abfecede99807eb0b5f97ed8be7c |
ContrastiveLoss | import torch
from torch import nn
import torch.nn.functional as F
class ContrastiveLoss(nn.Module):
"""
contrastive loss
L2 distance:
L(a1,a2,y) = y * d(a1, a2) + (1-y)*max(0, m - d(a1, a2))
cosine distance:
L(a1, a2, y) = y * (1 - d(a1,a2)) + (1-y) * max(0, d(a1,a2) -m)
where y=1 if (a1,... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | TuBui/deep_image_comparator | ContrastiveLoss | false | 1,153 | [
"MIT"
] | 0 | 2dea7738d794b91a960ee9f41461a4e3ffcd5e44 | https://github.com/TuBui/deep_image_comparator/tree/2dea7738d794b91a960ee9f41461a4e3ffcd5e44 |
WassersteinGeneratorLoss | # 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... | shi-weili/torchgan | WassersteinGeneratorLoss | false | 12,973 | [
"MIT"
] | 0 | 28ffd4026b8c0db2217b667d30a222d6758bfc41 | https://github.com/shi-weili/torchgan/tree/28ffd4026b8c0db2217b667d30a222d6758bfc41 |
ToRGB | import math
import torch
import torch.utils.data
import torch
import torch.nn as nn
import torch.nn.functional as F
def make_kernel(k):
k = torch.tensor(k, dtype=torch.float32)
if len(k.shape) == 1:
k = k[None, :] * k[:, None]
k /= k.sum()
return k
def upfirdn2d_native(input, kernel, up_x, u... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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.utils.data
import torch
import torch.nn as nn
import to... | bronemos/contrastive-unpaired-translation-focal | ToRGB | false | 3,251 | [
"BSD-3-Clause"
] | 0 | 50b9008d08a86439ede081a910d02df5da8e32df | https://github.com/bronemos/contrastive-unpaired-translation-focal/tree/50b9008d08a86439ede081a910d02df5da8e32df |
CNNCifar | from _paritybench_helpers import _mock_config
import torch
import torch.nn.functional as F
from torch import nn
class CNNCifar(nn.Module):
def __init__(self, args):
super(CNNCifar, self).__init__()
self.conv1 = nn.Conv2d(3, 6, 5)
self.pool = nn.MaxPool2d(2, 2)
self.conv2 = nn.Conv... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | FANJIYU0825/federated-learning | CNNCifar | false | 1,874 | [
"MIT"
] | 0 | 5772ca0a321a222eae5d5e29b70fb4a468c28374 | https://github.com/FANJIYU0825/federated-learning/tree/5772ca0a321a222eae5d5e29b70fb4a468c28374 |
NoiseInjection | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | KUMartin77/AAA738_StyleGAN_pytorch | NoiseInjection | false | 11,597 | [
"BSD-2-Clause"
] | 0 | ed0689102c922d336f53e374e8be2ab532a84ccd | https://github.com/KUMartin77/AAA738_StyleGAN_pytorch/tree/ed0689102c922d336f53e374e8be2ab532a84ccd |
Conv2dBlock | # 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.functional as... | Alikfp/research-GANwriting | Conv2dBlock | false | 7,637 | [
"MIT"
] | 41 | 2190954218a733deac52c929f51bb85bca5d7216 | https://github.com/Alikfp/research-GANwriting/tree/2190954218a733deac52c929f51bb85bca5d7216 |
ReRegualizedLinearNACLayer | # 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 collections
import mat... | wlm2019/Neural-Arithmetic-Units | ReRegualizedLinearNACLayer | false | 16,726 | [
"MIT"
] | 147 | f9de9d004bb2dc2ee28577cd1760d0a00c185836 | https://github.com/wlm2019/Neural-Arithmetic-Units/tree/f9de9d004bb2dc2ee28577cd1760d0a00c185836 |
Normalize | import torch
import torch.utils.data
import torch
import torch.nn as nn
class Normalize(nn.Module):
def __init__(self, power=2):
super(Normalize, self).__init__()
self.power = power
def forward(self, x):
norm = x.pow(self.power).sum(1, keepdim=True).pow(1.0 / self.power)
out ... | 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.utils.data
import torch
import torch.nn as nn
assert_size_stride =... | a11isonliu/contrastive-unpaired-translation | Normalize | false | 9,850 | [
"BSD-3-Clause"
] | 0 | 67651ed9877cae121d9398f46094ce8dbc678802 | https://github.com/a11isonliu/contrastive-unpaired-translation/tree/67651ed9877cae121d9398f46094ce8dbc678802 |
SoftTree | # 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 numpy as np
assert_size_stride = torch._C._dynamo.guards.assert_size_stri... | alper111/symbol-emergence | SoftTree | false | 1,422 | [
"MIT"
] | 0 | a4abd5d26b6fb36fe1ab3d6304a257df29be8e2c | https://github.com/alper111/symbol-emergence/tree/a4abd5d26b6fb36fe1ab3d6304a257df29be8e2c |
ExpPool | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch import nn
a... | DavidChenL/Chexpert | ExpPool | false | 13,570 | [
"Apache-2.0"
] | 202 | 0300057d3a51301cff35a65f79729436678b4a79 | https://github.com/DavidChenL/Chexpert/tree/0300057d3a51301cff35a65f79729436678b4a79 |
Net | import torch
import torch.nn as nn
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.fc1 = nn.Linear(4, 64)
self.fc2 = nn.Linear(64, 64)
self.fc3 = nn.Linear(64, 2)
def forward(self, x):
x = torch.tanh(self.fc1(x))
x = torch.tanh(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 ... | dongminlee94/Samsung-DRL-Code | Net | false | 15,193 | [
"MIT"
] | 116 | c96f8739a09cfd708c265954ee8ecf0ea3b67395 | https://github.com/dongminlee94/Samsung-DRL-Code/tree/c96f8739a09cfd708c265954ee8ecf0ea3b67395 |
PairwiseNorm | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_... | vzinche/inferno | PairwiseNorm | false | 4,508 | [
"Apache-2.0"
] | 0 | 91b22dfcd1b6a9ec415f0bbb6ae66caea42f4034 | https://github.com/vzinche/inferno/tree/91b22dfcd1b6a9ec415f0bbb6ae66caea42f4034 |
GramLoss | # 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.triton_helpers import math as tl_math
import torch.... | Dimlife/pytorch-CycleGAN-and-pix2pix | GramLoss | false | 9,068 | [
"BSD-3-Clause"
] | 0 | 7f43282e8f816d103e3c0e9e5df008a463cdfdc4 | https://github.com/Dimlife/pytorch-CycleGAN-and-pix2pix/tree/7f43282e8f816d103e3c0e9e5df008a463cdfdc4 |
SoftCrossEntropyLoss | # 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... | Jingkang50/ICCV21_SCOOD | SoftCrossEntropyLoss | false | 8,364 | [
"MIT"
] | 34 | 51204e3788a9e81aa334611072bef106fd9d13ad | https://github.com/Jingkang50/ICCV21_SCOOD/tree/51204e3788a9e81aa334611072bef106fd9d13ad |
ConcatSquashLinear | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dyn... | musyoku/ffjord | ConcatSquashLinear | false | 7,300 | [
"MIT"
] | 1 | 9e431e122e59fa9a71f3f301dec8fdd3db51e0ce | https://github.com/musyoku/ffjord/tree/9e431e122e59fa9a71f3f301dec8fdd3db51e0ce |
ConvModule | import torch
import torch.utils.data.distributed
from torch import nn
import torch.utils.data
class ConvModule(nn.Module):
def __init__(self, input_dim, kernel_size, dropout_rate, causal=False):
super(ConvModule, self).__init__()
self.layer_norm = nn.LayerNorm(input_dim)
self.pw_conv_1 = ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Five-Hundred-Years-Ago/StreamingTransformer | ConvModule | false | 9,091 | [
"Apache-2.0"
] | 0 | fdaace64ed786bbdaeea2b9f44e96f9403ef98fe | https://github.com/Five-Hundred-Years-Ago/StreamingTransformer/tree/fdaace64ed786bbdaeea2b9f44e96f9403ef98fe |
CodeLoss | # 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
... | KMU-AELAB/Active_Learning | CodeLoss | false | 2,450 | [
"MIT"
] | 0 | bc569c16b5f12b58989a8f3db59b7eb4e35cce1b | https://github.com/KMU-AELAB/Active_Learning/tree/bc569c16b5f12b58989a8f3db59b7eb4e35cce1b |
Normalizer | # 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... | simonverret/deep_continuation | Normalizer | false | 4,347 | [
"MIT"
] | 0 | 986bfba7f6806dc4869a023ff1fc1d0d18324b25 | https://github.com/simonverret/deep_continuation/tree/986bfba7f6806dc4869a023ff1fc1d0d18324b25 |
CrossAttN_v8 | # 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.... | Holmes-Alan/TxST | CrossAttN_v8 | false | 9,237 | [
"MIT"
] | 0 | c5b59a12bbb9e62244c3b608581d5cb9606525e0 | https://github.com/Holmes-Alan/TxST/tree/c5b59a12bbb9e62244c3b608581d5cb9606525e0 |
Categorical | import torch
import torch.nn as nn
from matplotlib.font_manager import *
class Categorical(nn.Module):
def __init__(self):
super().__init__()
def forward(self, log_p):
return torch.multinomial(log_p.exp(), 1).long().squeeze(1)
def get_inputs():
return [torch.rand([4, 4])]
def get_ini... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
from matplotlib.font_manager import *
assert_size_s... | zifeiyu0531/TSP_DRL_PtrNet | Categorical | false | 4,686 | [
"MIT"
] | 0 | c62fab73347556173d301c1561edf927e6fbe1d7 | https://github.com/zifeiyu0531/TSP_DRL_PtrNet/tree/c62fab73347556173d301c1561edf927e6fbe1d7 |
MnistMLP | import torch
from torch import nn
from torch.nn import functional as F
import torch.onnx
from torch.optim.lr_scheduler import *
class MnistMLP(nn.Module):
def __init__(self, hidden_size=500):
super(MnistMLP, self).__init__()
self.hidden_size = hidden_size
self.fc1 = nn.Linear(784, hidden_... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
import t... | IST-DASLab/ACDC | MnistMLP | false | 17,455 | [
"Apache-2.0"
] | 6 | ac53210b6adc1f2506ff909de08172ed9cad25d5 | https://github.com/IST-DASLab/ACDC/tree/ac53210b6adc1f2506ff909de08172ed9cad25d5 |
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_... | debayan/dsve-loc | ContrastiveLoss | false | 3,423 | [
"BSD-3-Clause-Clear"
] | 0 | 21b1e1837668b6daa0881514d0756e9bec039fcb | https://github.com/debayan/dsve-loc/tree/21b1e1837668b6daa0881514d0756e9bec039fcb |
DecoderLayer | import torch
import torch.nn.functional as F
import torch.nn as nn
class ScaledDotProductAttention(nn.Module):
""" Scaled Dot-Product Attention """
def __init__(self, temperature, attn_dropout=0.1):
super().__init__()
self.temperature = temperature
self.dropout = nn.Dropout(attn_dropo... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | AbubakrHassan/attention-is-all-you-need-pytorch | DecoderLayer | false | 11,184 | [
"MIT"
] | 0 | 2bf9a477dea6271b082556069f3665ffed2745cd | https://github.com/AbubakrHassan/attention-is-all-you-need-pytorch/tree/2bf9a477dea6271b082556069f3665ffed2745cd |
TanhDeepLiftModel | # 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_... | Europium248/captum | TanhDeepLiftModel | false | 426 | [
"BSD-3-Clause"
] | 0 | ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc | https://github.com/Europium248/captum/tree/ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc |
InnerProductModel | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
reinterpret... | SamuelGong/plato | InnerProductModel | false | 2,813 | [
"Apache-2.0"
] | 0 | 726f965620e63dfe18cc2edf07cc010a751f0231 | https://github.com/SamuelGong/plato/tree/726f965620e63dfe18cc2edf07cc010a751f0231 |
EDMLoss | # 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... | DazhiZhong/NIMA | EDMLoss | false | 8,999 | [
"MIT"
] | 0 | 82655ac762414ef2a980feba8b6978c605c66a4d | https://github.com/DazhiZhong/NIMA/tree/82655ac762414ef2a980feba8b6978c605c66a4d |
MMDLoss | # 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.optim
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dyna... | Fyy10/UESTC-Thesis-DA | MMDLoss | false | 474 | [
"MIT"
] | 0 | 6cb16efd1f80aa569c90874a806a62dec8afaec4 | https://github.com/Fyy10/UESTC-Thesis-DA/tree/6cb16efd1f80aa569c90874a806a62dec8afaec4 |
SpectralConvergengeLoss | import torch
import torch.utils.data
class SpectralConvergengeLoss(torch.nn.Module):
"""Spectral convergence loss module."""
def __init__(self):
"""Initilize spectral convergence loss module."""
super(SpectralConvergengeLoss, self).__init__()
def forward(self, x_mag, y_mag):
"""C... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.utils.data
asse... | tebin/Fre-GAN-pytorch | SpectralConvergengeLoss | false | 10,871 | [
"MIT"
] | 0 | e2f51317ae3953f10b8a0d112fc14991a02ebe91 | https://github.com/tebin/Fre-GAN-pytorch/tree/e2f51317ae3953f10b8a0d112fc14991a02ebe91 |
ProtoNN | import torch
import numpy as np
import torch.nn as nn
import torch.onnx
from itertools import product as product
class ProtoNN(nn.Module):
def __init__(self, inputDimension, projectionDimension, numPrototypes,
numOutputLabels, gamma, W=None, B=None, Z=None):
"""
Forward computation graph ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | Shenzhen-Cloudatawalk-Technology-Co-Ltd/EdgeML | ProtoNN | false | 14,415 | [
"MIT"
] | 719 | ef9f8a77f096acbdeb941014791f8eda1c1bc35b | https://github.com/Shenzhen-Cloudatawalk-Technology-Co-Ltd/EdgeML/tree/ef9f8a77f096acbdeb941014791f8eda1c1bc35b |
GlobalAvgPool2d | import torch
import torch.nn as nn
class GlobalAvgPool2d(nn.Module):
def forward(self, inputs):
return inputs.mean(-1).mean(-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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | synxlin/mini-torchpack | GlobalAvgPool2d | false | 4,400 | [
"MIT"
] | 0 | 3ea5bca75992941e4346102d99e789a88417d7c1 | https://github.com/synxlin/mini-torchpack/tree/3ea5bca75992941e4346102d99e789a88417d7c1 |
ResidualBlock_noBN | import torch
import torch.utils.data
import torch.nn.functional as F
import torch.nn as nn
import torch.nn.init as init
def initialize_weights(net_l, scale=1):
if not isinstance(net_l, list):
net_l = [net_l]
for net in net_l:
for m in net.modules():
if isinstance(m, nn.Conv2d):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | EvgeneyZ/TMNet | ResidualBlock_noBN | false | 13,685 | [
"Apache-2.0"
] | 90 | 8a42754747c2fa575e9108c13b5018a884f46099 | https://github.com/EvgeneyZ/TMNet/tree/8a42754747c2fa575e9108c13b5018a884f46099 |
fire | import torch
from itertools import product as product
import torch.nn as nn
class fire(nn.Module):
def __init__(self, inplanes, squeeze_planes, expand_planes, st=1):
super(fire, self).__init__()
self.conv1 = nn.Conv2d(inplanes, squeeze_planes, kernel_size=1,
stride=1)
self.rel... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 itertools import product... | suiguoxin/Pytorch_Retinaface | fire | false | 4,388 | [
"MIT"
] | 0 | d9393bad43103635261b4ec5b03f20e79931d0da | https://github.com/suiguoxin/Pytorch_Retinaface/tree/d9393bad43103635261b4ec5b03f20e79931d0da |
ESA | # 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_... | wwjfsfs/wwjyyds | ESA | false | 13,121 | [
"MIT"
] | 0 | 80cd6267fde7cd98838078a0d5178a557ceb7414 | https://github.com/wwjfsfs/wwjyyds/tree/80cd6267fde7cd98838078a0d5178a557ceb7414 |
AdversarialNetwork | import torch
import torch.nn as nn
class AdversarialNetwork(nn.Module):
def __init__(self, in_feature):
super(AdversarialNetwork, self).__init__()
self.ad_layer1 = nn.Linear(in_feature, 1024)
self.ad_layer2 = nn.Linear(1024, 1024)
self.ad_layer3 = nn.Linear(1024, 1)
self.a... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | caozhangjie/kinetics_i3d_pytorch | AdversarialNetwork | false | 9,917 | [
"MIT"
] | 0 | 237713bb76cf71b6d60d1a4df98f00df3a489cc3 | https://github.com/caozhangjie/kinetics_i3d_pytorch/tree/237713bb76cf71b6d60d1a4df98f00df3a489cc3 |
ResidualLinear | # 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_... | ashutosh1919/neuro-symbolic-sudoku-solver | ResidualLinear | false | 14,910 | [
"Apache-2.0"
] | 52 | ecb4274ff66d3b6a86f64584e0a767bf785f107f | https://github.com/ashutosh1919/neuro-symbolic-sudoku-solver/tree/ecb4274ff66d3b6a86f64584e0a767bf785f107f |
INDeConv | # 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.... | samsgood0310/Unsupervised-Defect-Segmentation | INDeConv | false | 7,602 | [
"Apache-2.0"
] | 1 | 66af32506cd6e60c356890616e28d679622fd8e6 | https://github.com/samsgood0310/Unsupervised-Defect-Segmentation/tree/66af32506cd6e60c356890616e28d679622fd8e6 |
LocalSnrLoss | # 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 import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | Rikorose/DeepFilterNet | LocalSnrLoss | false | 14,305 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 54 | afe6bfb53efae70207e18df7ed372c2cfe337fee | https://github.com/Rikorose/DeepFilterNet/tree/afe6bfb53efae70207e18df7ed372c2cfe337fee |
GT | # 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... | bunderhi/torch2trt | GT | false | 1,594 | [
"MIT"
] | 0 | fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d | https://github.com/bunderhi/torch2trt/tree/fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d |
MockOpposite | # 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... | blagojce95/ai-research-mamo-framework | MockOpposite | false | 1,552 | [
"Apache-2.0"
] | 0 | 7f3b5a5a9fb8b19c9eef453b81b03b6046a33bf2 | https://github.com/blagojce95/ai-research-mamo-framework/tree/7f3b5a5a9fb8b19c9eef453b81b03b6046a33bf2 |
Baz | # 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.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guar... | geoffberry/glow | Baz | false | 12,417 | [
"Apache-2.0"
] | 0 | 24b2827c830eb58af56a0704e899968026832e9c | https://github.com/geoffberry/glow/tree/24b2827c830eb58af56a0704e899968026832e9c |
GAT | # 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.... | HecatePhy/directed_graphsage | GAT | false | 17,394 | [
"MIT"
] | 6 | 0e35f8971d44b8b3477fd7339225e1a69da4456a | https://github.com/HecatePhy/directed_graphsage/tree/0e35f8971d44b8b3477fd7339225e1a69da4456a |
AvgPoolPad | import torch
import torch.nn as nn
class AvgPoolPad(nn.Module):
def __init__(self, stride=2, padding=1):
super(AvgPoolPad, self).__init__()
self.pad = nn.ZeroPad2d((1, 0, 1, 0))
self.pool = nn.AvgPool2d(3, stride=stride, padding=padding,
count_include_pad=False)
def forwa... | 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... | Danish-VSL/deep-person-reid | AvgPoolPad | false | 13,547 | [
"MIT"
] | 244 | 2e3a4b6706b84c77203f9905683b917ab0871b93 | https://github.com/Danish-VSL/deep-person-reid/tree/2e3a4b6706b84c77203f9905683b917ab0871b93 |
ConvGLU | import torch
from torch import nn
import torch.utils.data
import torch.optim
def str2act(txt):
"""Translates text to neural network activation"""
return {'sigmoid': nn.Sigmoid(), 'relu': nn.ReLU(), 'none': nn.
Sequential(), 'lrelu': nn.LeakyReLU(0.2), 'selu': nn.SELU()}[txt.
lower()]
class C... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
import torch.utils.data
import torch.optim
assert_size_stri... | Royeqiu/Nemo_ASR | ConvGLU | false | 17,874 | [
"Apache-2.0"
] | 10 | 12b91b06dc5e4d0aa29d43bc7e701a93ee5eec4e | https://github.com/Royeqiu/Nemo_ASR/tree/12b91b06dc5e4d0aa29d43bc7e701a93ee5eec4e |
_DynamicGates | # 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... | NHoose/neuralhydrology | _DynamicGates | false | 1,898 | [
"BSD-3-Clause"
] | 0 | f320b417fe747a923ff8ef685ad33fd8b34effad | https://github.com/NHoose/neuralhydrology/tree/f320b417fe747a923ff8ef685ad33fd8b34effad |
MinibatchStdDev | # 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.nn import Module
assert_size_stride = torch._C._dynamo.guards.assert... | akanimax/open-styleganv2-pytorch | MinibatchStdDev | false | 18,248 | [
"MIT"
] | 7 | 243f12e335698293a0008d60c8b136d9f80cdacf | https://github.com/akanimax/open-styleganv2-pytorch/tree/243f12e335698293a0008d60c8b136d9f80cdacf |
ConvBlock | # 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 copy
from torch import... | ELEKTRONN/elektronn3 | ConvBlock | false | 13,624 | [
"MIT"
] | 124 | 19c751855dffc67b744cd43e757aa4a5bd577d9b | https://github.com/ELEKTRONN/elektronn3/tree/19c751855dffc67b744cd43e757aa4a5bd577d9b |
GaussianKernel | import torch
import torch.nn as nn
class GaussianKernel(nn.Module):
"""
Gaussian kernel module.
:param mu: Float, mean of the kernel.
:param sigma: Float, sigma of the kernel.
Examples:
>>> import torch
>>> kernel = GaussianKernel()
>>> x = torch.randn(4, 5, 10)
>... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | ThuYShao/MatchZoo-py | GaussianKernel | false | 11,965 | [
"Apache-2.0"
] | 0 | dd8ff1328af58d3d14aacd1a7d56d79bbf847c15 | https://github.com/ThuYShao/MatchZoo-py/tree/dd8ff1328af58d3d14aacd1a7d56d79bbf847c15 |
MultiHeadAttention | import torch
from torch import nn
class MultiHeadAttention(nn.Module):
def __init__(self, dim_self, dim_ref, num_heads, bias=True, dropout=0.0):
super().__init__()
self.num_heads = num_heads
head_dim = dim_self // num_heads
self.scale = head_dim ** -0.5
self.to_queries = n... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | JAVI897/CLIP_prefix_caption | MultiHeadAttention | false | 623 | [
"MIT"
] | 0 | f4569891d01a5a790e9cdf850fb7feda3a0affc7 | https://github.com/JAVI897/CLIP_prefix_caption/tree/f4569891d01a5a790e9cdf850fb7feda3a0affc7 |
GroupNormAct | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import... | Alicegaz/torchok | GroupNormAct | false | 16,934 | [
"Apache-2.0"
] | 8 | 7b8f95df466a25b1ad8ee93bed1a3c7516440cf4 | https://github.com/Alicegaz/torchok/tree/7b8f95df466a25b1ad8ee93bed1a3c7516440cf4 |
Net | import torch
from torch import nn
import torch.nn.functional as F
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.conv1 = nn.Conv2d(in_channels=3, out_channels=10, kernel_size=
(7, 3))
self.pool = nn.MaxPool2d(kernel_size=(1, 3))
self.conv2 =... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | elliottwaissbluth/tensor-hero | Net | false | 6,655 | [
"MIT"
] | 1 | be99ca4380a5ec59c0826e5fc8a87ec0f8956201 | https://github.com/elliottwaissbluth/tensor-hero/tree/be99ca4380a5ec59c0826e5fc8a87ec0f8956201 |
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... | zhangzhengde0225/SwinTrack | BCELoss | false | 16,795 | [
"MIT"
] | 143 | 526be17f8ef266cb924c6939bd8dda23e9b73249 | https://github.com/zhangzhengde0225/SwinTrack/tree/526be17f8ef266cb924c6939bd8dda23e9b73249 |
SiLU | import torch
import torch as th
import torch.nn as nn
class SiLU(nn.Module):
def forward(self, x):
return x * th.sigmoid(x)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | AranKomat/Diff-DALLE | SiLU | false | 13,266 | [
"MIT"
] | 53 | 9418e98e97b599c5c65f16ee168fedf76a29095f | https://github.com/AranKomat/Diff-DALLE/tree/9418e98e97b599c5c65f16ee168fedf76a29095f |
AngularMarginLoss | import torch
import torch.nn.functional as F
import torch.nn as nn
class MetricLearningLoss(nn.Module):
"""
Generic loss function to be used in a metric learning setting
"""
def __init__(self, embedding_size, n_classes, device='cpu', *args, **kwargs
):
super(MetricLearningLoss, 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.... | Wadaboa/titanet | AngularMarginLoss | false | 18,082 | [
"MIT"
] | 4 | b07e3074e79ea8c1129fb0adb8315e06bb4943ea | https://github.com/Wadaboa/titanet/tree/b07e3074e79ea8c1129fb0adb8315e06bb4943ea |
GraphLearner | from torch.nn import Module
import torch
from torch.nn.modules.module import Module
import torch.nn as nn
import torch.nn.functional as F
class GraphLearner(Module):
def __init__(self, in_feature_dim, combined_feature_dim, K, dropout=0.0):
super(GraphLearner, self).__init__()
"""
## Varia... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | aimbrain/vqa-project | GraphLearner | false | 14,822 | [
"Apache-2.0"
] | 145 | 341122a267293017b55db4f033fbe81445af03ea | https://github.com/aimbrain/vqa-project/tree/341122a267293017b55db4f033fbe81445af03ea |
Generator | # 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.... | KimGroup/AQT | Generator | false | 17,536 | [
"MIT"
] | 4 | b3440f04c1fb4cb44c30569bc6bf07103ac2553c | https://github.com/KimGroup/AQT/tree/b3440f04c1fb4cb44c30569bc6bf07103ac2553c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.