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 |
|---|---|---|---|---|---|---|---|---|---|---|
GeLU | import math
import torch
from torch import nn
def gelu(x):
return x * 0.5 * (1.0 + torch.erf(x / math.sqrt(2.0)))
class GeLU(nn.Module):
def __init__(self):
super().__init__()
def forward(self, x):
return gelu(x)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import math
from torch import nn
assert_size_stride = torch._C._dynamo.guards.a... | HS-YN/PanoAVQA | GeLU | false | 17,356 | [
"MIT"
] | 3 | 657b83421ce64ea18b3e79fb580afc7034403ccc | https://github.com/HS-YN/PanoAVQA/tree/657b83421ce64ea18b3e79fb580afc7034403ccc |
MAPELoss | # 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
... | LongerVision/oidn | MAPELoss | false | 5,554 | [
"Apache-2.0"
] | 1 | 2f9e59f8b747b217f78c5c274f4f2bff347a03a7 | https://github.com/LongerVision/oidn/tree/2f9e59f8b747b217f78c5c274f4f2bff347a03a7 |
TwoLayerNet | import torch
class TwoLayerNet(torch.nn.Module):
"""
From the pytorch examples, a simjple 2-layer neural net.
https://pytorch.org/tutorials/beginner/pytorch_with_examples.html
"""
def __init__(self, d_in, hidden_size, d_out):
super(TwoLayerNet, self).__init__()
self.linear... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | GradyKurpasi/anfis-pytorch | TwoLayerNet | false | 9,085 | [
"MIT"
] | 0 | 4cce596193a8bc65e632405ca66d116c771033d7 | https://github.com/GradyKurpasi/anfis-pytorch/tree/4cce596193a8bc65e632405ca66d116c771033d7 |
PredictionHead | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data
class PredictionHead(nn.Module):
"""
Simple classification prediction-head block to plug ontop of the 4D
output of a CNN.
Args:
num_classes: the number of different classes that can be predicted.
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | pz-white/pykale | PredictionHead | false | 7,510 | [
"MIT"
] | 1 | de40d1e8a88aa824ffbd1e072b02fe92b57b7c69 | https://github.com/pz-white/pykale/tree/de40d1e8a88aa824ffbd1e072b02fe92b57b7c69 |
ResNetBlock | import torch
from torch import nn
import torch.utils.data
import torch.nn.parallel
import torch.utils.data.distributed
class ResNetBlock(nn.Module):
def __init__(self, in_channel, out_channel, stride, downsample, pad,
dilation):
super(ResNetBlock, self).__init__()
self.conv1 = nn.Conv2d(i... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
import torch.utils.data
import torch.nn.parallel
import tor... | Sarah20187/X-StereoLab | ResNetBlock | false | 14,387 | [
"MIT"
] | 192 | 9ae8c1413307e7df91b14a7f31e8a95f9e5754f9 | https://github.com/Sarah20187/X-StereoLab/tree/9ae8c1413307e7df91b14a7f31e8a95f9e5754f9 |
HSwishV2 | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import torch.nn.functional as F
assert_size_stride = torch._C._dyna... | imvladikon/pytorch-loss | HSwishV2 | false | 6,867 | [
"MIT"
] | 1 | 6cfaabe1be898e1ff000b3dffb46d0ef09096f6b | https://github.com/imvladikon/pytorch-loss/tree/6cfaabe1be898e1ff000b3dffb46d0ef09096f6b |
Critic | import torch
import numpy as np
import torch.nn.functional as F
import torch.nn as nn
def hidden_init(layer):
fan_in = layer.weight.data.size()[0]
lim = 1.0 / np.sqrt(fan_in)
return -lim, lim
class Critic(nn.Module):
"""Critic (Value) Model."""
def __init__(self, state_size, action_size, seed, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import numpy as np
import tor... | Odiurd/deep-reinforcement-learning-continuous-control | Critic | false | 2,750 | [
"MIT"
] | 0 | b1fb17ceab8cf23200dbdada21ba2ab0e33aa1a2 | https://github.com/Odiurd/deep-reinforcement-learning-continuous-control/tree/b1fb17ceab8cf23200dbdada21ba2ab0e33aa1a2 |
InceptionA | # 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... | vanthq/EarRecognition | InceptionA | false | 10,947 | [
"MIT"
] | 0 | 7decddc97c4b27cd8457308b3d3836388936e7a8 | https://github.com/vanthq/EarRecognition/tree/7decddc97c4b27cd8457308b3d3836388936e7a8 |
WeightNet | import torch
import torch.nn as nn
class WeightNet(nn.Module):
"""WeightNet in Temporal interlace module.
The WeightNet consists of two parts: one convolution layer
and a sigmoid function. Following the convolution layer, the sigmoid
function and rescale module can scale our output to the range (0, 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... | Viditagarwal7479/Video-Swin-Transformer | WeightNet | false | 18,057 | [
"Apache-2.0"
] | 9 | 37910ef3141c7b2eef76544f9ec8bdf26ec94c7d | https://github.com/Viditagarwal7479/Video-Swin-Transformer/tree/37910ef3141c7b2eef76544f9ec8bdf26ec94c7d |
BertAttention | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | noble6emc2/MoCo-SSPT | BertAttention | false | 12,850 | [
"MIT"
] | 0 | e6d7cf3f0a3b5a467318dfc32096e4929adbe646 | https://github.com/noble6emc2/MoCo-SSPT/tree/e6d7cf3f0a3b5a467318dfc32096e4929adbe646 |
LayerScaling1D | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.... | Ajk4/online-normalization | LayerScaling1D | false | 8,827 | [
"BSD-3-Clause"
] | 0 | 84895855fb8b099ad8c1266dc325bec41d72ecf5 | https://github.com/Ajk4/online-normalization/tree/84895855fb8b099ad8c1266dc325bec41d72ecf5 |
GCN | from torch.nn import Module
import math
import torch
import torch.nn as nn
import torch.nn.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
This class is mod... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | QHwan/GCIceNet | GCN | false | 2,746 | [
"MIT"
] | 0 | 5792f5fa7bd2989b54eddeae5c9f8fca3f004bb5 | https://github.com/QHwan/GCIceNet/tree/5792f5fa7bd2989b54eddeae5c9f8fca3f004bb5 |
BasicBlock | import torch
import torch.nn as nn
import torch.utils.data.distributed
def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1):
"""3x3 convolution with padding"""
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride,
padding=dilation, groups=groups, bias=False, dilation=dila... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | QiuhongAnnaWei/IBRNet | BasicBlock | false | 14,268 | [
"Apache-2.0"
] | 254 | 6c8b68e6d95eae04535ff0906387ec7899f5d5ce | https://github.com/QiuhongAnnaWei/IBRNet/tree/6c8b68e6d95eae04535ff0906387ec7899f5d5ce |
CustomizedLayer | import torch
import torch.nn as nn
import torch.utils.data
class CustomizedLayer(nn.Module):
def __init__(self, in_dim):
super().__init__()
self.in_dim = in_dim
self.scale = nn.Parameter(torch.Tensor(self.in_dim))
self.bias = nn.Parameter(torch.Tensor(self.in_dim))
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.triton_helpers import libdevice
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dy... | B06901052/Torch-Pruning | CustomizedLayer | false | 11,235 | [
"MIT"
] | 0 | 43c99e1ea6039c7641e01cd7527492d69bfce35a | https://github.com/B06901052/Torch-Pruning/tree/43c99e1ea6039c7641e01cd7527492d69bfce35a |
ContrastiveLoss | import torch
from torchvision.transforms import functional as F
import torch.nn as nn
import torch.nn.functional as F
class ContrastiveLoss(nn.Module):
"""
Contrastive loss function.
Based on: http://yann.lecun.com/exdb/publis/pdf/hadsell-chopra-lecun-06.pdf
"""
def __init__(self, margin: 'float'... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert... | Swall0w/cougar | ContrastiveLoss | false | 5,872 | [
"MIT"
] | 1 | 9161b2b1d0c256f4bb952ec190351684f28ec1b7 | https://github.com/Swall0w/cougar/tree/9161b2b1d0c256f4bb952ec190351684f28ec1b7 |
Conv2d | import torch
import torch.nn as nn
class Conv2d(nn.Module):
def __init__(self):
super(Conv2d, self).__init__()
self.conv2d = nn.Conv2d(16, 33, kernel_size=1, padding=1, stride=2)
def forward(self, x):
x = self.conv2d(x)
return x
def get_inputs():
return [torch.rand([4, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | yifanpu001/PytorchToCaffe | Conv2d | false | 4,726 | [
"MIT"
] | 0 | 37c1ebfc3547e93b1c174721036d03c831c60e48 | https://github.com/yifanpu001/PytorchToCaffe/tree/37c1ebfc3547e93b1c174721036d03c831c60e48 |
SimpleTypeasModel | # 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.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | opti-mix/glow | SimpleTypeasModel | false | 7,412 | [
"Apache-2.0"
] | 1 | 4ba074df5da9822986a23a6679ab592c22660f6d | https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d |
Joiner | from _paritybench_helpers import _mock_config
import torch
import torch.utils.data
import torch.utils
import torch.utils.checkpoint
class Joiner(torch.nn.Module):
def __init__(self, config):
super(Joiner, self).__init__()
self.tanh = torch.nn.Tanh()
self.num_outputs = config.num_tokens + ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | lorenlugosch/graves-transducers | Joiner | false | 7,123 | [
"Apache-2.0"
] | 1 | 489f46d58eba35d34163bb8b887c31d6e043c990 | https://github.com/lorenlugosch/graves-transducers/tree/489f46d58eba35d34163bb8b887c31d6e043c990 |
VGGLoss | import torch
import torch.nn as nn
import torch.fft
class VGGLoss(nn.Module):
def __init__(self):
super().__init__()
self.mse_loss = torch.nn.MSELoss()
def forward(self, x, y):
loss = torch.tensor(0.0, device=x[0].device)
input_features = x
output_features = y
... | 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 |
BatchMeanKLDivWithLogSoftmax | import torch
import torch.nn as nn
class BatchMeanKLDivWithLogSoftmax(nn.Module):
def forward(self, p, log_q, log_p):
return (p * log_p - p * log_q).sum(dim=1).mean(dim=0)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4]), torch.rand(
[4, 4, 4, 4])]
def get_init... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | cadurosar/graph_kd_dense_cifar100 | BatchMeanKLDivWithLogSoftmax | false | 1,629 | [
"MIT"
] | 0 | 84054ab4f8f61c9db3460993661ba7bf1d951b36 | https://github.com/cadurosar/graph_kd_dense_cifar100/tree/84054ab4f8f61c9db3460993661ba7bf1d951b36 |
Bandpass | import torch
import torch.nn as nn
class Bandpass(nn.Module):
def __init__(self, input_dim):
super().__init__()
self.mean = nn.Parameter(torch.randn(1, input_dim, dtype=torch.float32)
)
self.icov = nn.Parameter(torch.eye(input_dim, input_dim, dtype=
torch.float32) ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | tsumansapkota/Input-Invex-Neural-Network | Bandpass | false | 4,465 | [
"Apache-2.0"
] | 0 | 6a14ee12b33da1d231d231c8f9631851a7668997 | https://github.com/tsumansapkota/Input-Invex-Neural-Network/tree/6a14ee12b33da1d231d231c8f9631851a7668997 |
MaxPoolStride1 | # 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... | HongBeenKim/pams-skku | MaxPoolStride1 | false | 17,376 | [
"MIT"
] | 8 | 0a12b132e4bf42570b000f60b9a1fc2c65382174 | https://github.com/HongBeenKim/pams-skku/tree/0a12b132e4bf42570b000f60b9a1fc2c65382174 |
GraphEmbedding | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.a... | Lance0226/CIS700_Convex_Hull_RL | GraphEmbedding | false | 2,504 | [
"MIT"
] | 0 | 3c87e063209d535d75fde719bf17f20dd5e68635 | https://github.com/Lance0226/CIS700_Convex_Hull_RL/tree/3c87e063209d535d75fde719bf17f20dd5e68635 |
Encoding | # 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 math as tl_math
import torch.nn as nn
... | HusterRC/mmsegmentation | Encoding | false | 5,325 | [
"Apache-2.0"
] | 1 | c3e4dbc2e06de3f47f75098f76772b4ee7e91e35 | https://github.com/HusterRC/mmsegmentation/tree/c3e4dbc2e06de3f47f75098f76772b4ee7e91e35 |
NetVLAD | import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
from sklearn.neighbors import NearestNeighbors
class NetVLAD(nn.Module):
"""NetVLAD layer implementation"""
def __init__(self, num_clusters=64, dim=128, normalize_input=True,
vladv2=False, use_faiss=True):
"... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | leochien1110/Patch-NetVLAD | NetVLAD | false | 7,351 | [
"MIT"
] | 1 | 9282217dd2c9bcf0446a05400fd277e651cecf4e | https://github.com/leochien1110/Patch-NetVLAD/tree/9282217dd2c9bcf0446a05400fd277e651cecf4e |
GAT | import torch
import torch.nn as nn
import torch.nn.functional as F
class GraphAttentionLayer(nn.Module):
"""
Simple GAT layer, similar to https://arxiv.org/abs/1710.10903
"""
def __init__(self, in_features, out_features, dropout, alpha, concat=True):
super(GraphAttentionLayer, self).__init__(... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | dzb1998/pyGAT | GAT | false | 12,400 | [
"MIT"
] | 0 | b794c65683bd12d3211e62b97732a905a24b9940 | https://github.com/dzb1998/pyGAT/tree/b794c65683bd12d3211e62b97732a905a24b9940 |
PairwiseRankingLoss | # 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... | SilanHe/e-SNLI | PairwiseRankingLoss | false | 14,420 | [
"MIT"
] | 125 | 1c38981f50f931e45cf06146e693c588bc89b78d | https://github.com/SilanHe/e-SNLI/tree/1c38981f50f931e45cf06146e693c588bc89b78d |
AdaptiveInstanceNormPP | import torch
import torch.nn as nn
import torch.jit
import torch.nn
class AdaptiveInstanceNorm(nn.Module):
def __init__(self, in_size, ada_size):
super(AdaptiveInstanceNorm, self).__init__()
self.scale = nn.Linear(ada_size, in_size)
self.bias = nn.Linear(ada_size, in_size)
def forwar... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | ankmathur96/torchsupport | AdaptiveInstanceNormPP | false | 3,177 | [
"MIT"
] | 0 | 77bf4a90b8770a408665e2604428808c3ed2f979 | https://github.com/ankmathur96/torchsupport/tree/77bf4a90b8770a408665e2604428808c3ed2f979 |
LinearModel | # 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... | VVKot/mlinseconds-die-hard | LinearModel | false | 9,592 | [
"MIT"
] | 0 | dacbd448180bc992e0dab9e4b27bb594235d8c44 | https://github.com/VVKot/mlinseconds-die-hard/tree/dacbd448180bc992e0dab9e4b27bb594235d8c44 |
RegWeightedL1Loss | # 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
... | SaqibMamoon/GSDT | RegWeightedL1Loss | false | 5,799 | [
"MIT"
] | 1 | e11c52a67291e973016ed34c3c95659e0af32d48 | https://github.com/SaqibMamoon/GSDT/tree/e11c52a67291e973016ed34c3c95659e0af32d48 |
WeightedFeatureFusion | # 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.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C.... | ks1320/Traffic-Surveillance-System | WeightedFeatureFusion | false | 12,692 | [
"MIT"
] | 0 | fa1eb2a3a3d494c798fa2eeb0528ef48b1978332 | https://github.com/ks1320/Traffic-Surveillance-System/tree/fa1eb2a3a3d494c798fa2eeb0528ef48b1978332 |
Attention | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class Attention(nn.Module):
def __init__(self, embed_dim, hidden_dim=None, out_dim=None, n_head=1,
score_function='dot_product', dropout=0):
""" Attention Mechanism
:param embed_dim:
:param hidden_dim:
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | WeiLi9811/PyABSA | Attention | false | 11,957 | [
"MIT"
] | 0 | e1595784b8c978c1e91c0d8139a0a4dc36ac5965 | https://github.com/WeiLi9811/PyABSA/tree/e1595784b8c978c1e91c0d8139a0a4dc36ac5965 |
BerHuLoss | import torch
import torch.nn as nn
class BerHuLoss(nn.Module):
def __init__(self, scale=0.5, eps=1e-05):
super(BerHuLoss, self).__init__()
self.scale = scale
self.eps = eps
def forward(self, pred, gt):
img1 = torch.zeros_like(pred)
img2 = torch.zeros_like(gt)
... | 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... | ezxzeng/FFB6D | BerHuLoss | false | 15,332 | [
"MIT"
] | 145 | fd0ea6471532ab1dc68f9a58b52d9a63f8fb76f2 | https://github.com/ezxzeng/FFB6D/tree/fd0ea6471532ab1dc68f9a58b52d9a63f8fb76f2 |
MultiHeadedAttention | # 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.... | AlexShypula/joeynmt | MultiHeadedAttention | false | 8,869 | [
"Apache-2.0"
] | 0 | 045f86916dbebc4fbaccaaec17b8c7f665392194 | https://github.com/AlexShypula/joeynmt/tree/045f86916dbebc4fbaccaaec17b8c7f665392194 |
NormedConv2d | # 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... | LiuXiaoxuanPKU/mmdetection | NormedConv2d | false | 11,649 | [
"Apache-2.0"
] | 0 | 05b46eccbe5c4953d5a406f545fe529ce4e146d3 | https://github.com/LiuXiaoxuanPKU/mmdetection/tree/05b46eccbe5c4953d5a406f545fe529ce4e146d3 |
Bottleneck_v2 | import torch
import torch.nn as nn
import torch.cuda
import torch.backends.cudnn
import torch.backends.mkl
class Bottleneck_v2(nn.Module):
def __init__(self):
super(Bottleneck_v2, self).__init__()
self.conv = nn.Conv2d(64, 256, kernel_size=(1, 1), stride=(1, 1),
bias=True)
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
import ... | JudeDavis1/intel-extension-for-pytorch | Bottleneck_v2 | false | 2,597 | [
"Apache-2.0"
] | 0 | 364e34cb4917a709f5108c07d4005bf82f3d5067 | https://github.com/JudeDavis1/intel-extension-for-pytorch/tree/364e34cb4917a709f5108c07d4005bf82f3d5067 |
DoubleConv | import torch
import torch.nn as nn
import torch.nn.functional
class DoubleConv(nn.Module):
"""(convolution => [BN] => ReLU) * 2"""
def __init__(self, in_channels, out_channels, mid_channels=None):
super().__init__()
if not mid_channels:
mid_channels = out_channels
self.con... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | junyuchen245/TransMorph_Transformer_for_Medical_Image_Registration | DoubleConv | false | 15,747 | [
"MIT"
] | 82 | dfa24a47a564a000aa9b4eea95a6e83a24568359 | https://github.com/junyuchen245/TransMorph_Transformer_for_Medical_Image_Registration/tree/dfa24a47a564a000aa9b4eea95a6e83a24568359 |
PosNACLayer | import collections
import torch
import torch.utils.data
def sparsity_error(W):
W_error = torch.min(torch.abs(W), torch.abs(1 - torch.abs(W)))
return torch.max(W_error)
class SummaryWriterNamespaceNoLoggingScope:
def __init__(self, writer):
self._writer = writer
def __enter__(self):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import collections
import torch.utils.data
assert_size_stride = torch._C._dynamo... | hoedt/stable-nalu | PosNACLayer | false | 3,606 | [
"MIT"
] | 0 | 64b3d240db8bff4da857d955f213ef3c7e38e035 | https://github.com/hoedt/stable-nalu/tree/64b3d240db8bff4da857d955f213ef3c7e38e035 |
NICEMLPBlock | # 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.... | andrecianflone/wolf | NICEMLPBlock | false | 14,843 | [
"Apache-2.0"
] | 75 | 826bbedc58d4d29871110349356868066a3108e6 | https://github.com/andrecianflone/wolf/tree/826bbedc58d4d29871110349356868066a3108e6 |
RefineElasticPendulumModel | import torch
import numpy as np
import torch.nn as nn
class SirenLayer(nn.Module):
def __init__(self, in_f, out_f, w0=30, is_first=False, is_last=False):
super().__init__()
self.in_f = in_f
self.w0 = w0
self.linear = nn.Linear(in_f, out_f)
self.is_first = is_first
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | BoyuanChen/neural-state-variables | RefineElasticPendulumModel | false | 7,861 | [
"MIT"
] | 17 | 10483d93ac8c006f3786c434fb57d70d9ab465ec | https://github.com/BoyuanChen/neural-state-variables/tree/10483d93ac8c006f3786c434fb57d70d9ab465ec |
LinearActivation | from torch.nn import Module
import torch
import torch.nn as nn
class LinearActivation(Module):
def __init__(self, in_features, out_features, act='gelu', bias=True):
super(LinearActivation, self).__init__()
self.Linear = nn.Linear(in_features, out_features, bias=bias)
if act == 'relu':
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch.nn impor... | axiserr/Hetu | LinearActivation | false | 14,936 | [
"Apache-2.0"
] | 82 | 0052f727488db0570d6b37f63549b43b0920bc29 | https://github.com/axiserr/Hetu/tree/0052f727488db0570d6b37f63549b43b0920bc29 |
ConstantODE | # 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
@triton.j... | BoyanJIANG/4D-Compositional-Representation | ConstantODE | false | 7,826 | [
"Apache-2.0"
] | 12 | 64d5f4bbd6b8e6bc3bfd8f76736f6d468c71a73c | https://github.com/BoyanJIANG/4D-Compositional-Representation/tree/64d5f4bbd6b8e6bc3bfd8f76736f6d468c71a73c |
Conv2dStaticSamePadding | import math
import torch
from torch import nn
from torch.nn import functional as F
from torchvision.transforms import functional as F
class Conv2dStaticSamePadding(nn.Module):
"""
created by Zylo117
The real keras/tensorflow conv2d with same padding
"""
def __init__(self, in_channels, out_channel... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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... | NaCl-Ocean/Anchor_free_detection_rotation | Conv2dStaticSamePadding | false | 8,581 | [
"MIT"
] | 12 | 358d9f5df1beabc7a05a352d2cfa2283b17825a9 | https://github.com/NaCl-Ocean/Anchor_free_detection_rotation/tree/358d9f5df1beabc7a05a352d2cfa2283b17825a9 |
OrMixer | import torch
import torch.nn as nn
import torch.nn.functional as F
class MlpBlock(nn.Module):
def __init__(self, features, hidden_dim):
super().__init__()
self.hidden_dim = hidden_dim
self.features = features
self.fc1 = nn.Linear(self.features, self.hidden_dim)
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.triton_helpers import libdevice
import torch.nn as ... | amayuelas/NNKGReasoning | OrMixer | false | 6,220 | [
"MIT"
] | 1 | 0e3623b344fd4e3088ece897f898ddbb1f80888d | https://github.com/amayuelas/NNKGReasoning/tree/0e3623b344fd4e3088ece897f898ddbb1f80888d |
CompressionFM | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cu... | haophancs/TREQS | CompressionFM | false | 15,498 | [
"MIT"
] | 149 | 49e354ce2a08cf963ec139d99936020e0f80ced8 | https://github.com/haophancs/TREQS/tree/49e354ce2a08cf963ec139d99936020e0f80ced8 |
SelfAttentionBlock | # 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.... | zhangzhengde0225/SwinTrack | SelfAttentionBlock | false | 16,831 | [
"MIT"
] | 143 | 526be17f8ef266cb924c6939bd8dda23e9b73249 | https://github.com/zhangzhengde0225/SwinTrack/tree/526be17f8ef266cb924c6939bd8dda23e9b73249 |
ClassificationNet | # 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... | YIFEI-MA/MultiDigitRecognition | ClassificationNet | false | 12,000 | [
"MIT"
] | 0 | f1f9567c31102ccdc7464a35b8a7c533b5d46734 | https://github.com/YIFEI-MA/MultiDigitRecognition/tree/f1f9567c31102ccdc7464a35b8a7c533b5d46734 |
PairwiseBCELoss | import torch
from abc import abstractmethod
import torch.utils.data.dataloader
import torch.nn.functional as F
from torch import nn
import torch.nn
class SimilarityLoss(nn.Module):
def __init__(self):
super(SimilarityLoss, self).__init__()
@abstractmethod
def forward(self, inputs, targets):
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from abc im... | OatsProduction/flair | PairwiseBCELoss | false | 11,761 | [
"MIT"
] | 0 | 1cf2c9a9ae487e279dce9f6b92c41fa32c4563cf | https://github.com/OatsProduction/flair/tree/1cf2c9a9ae487e279dce9f6b92c41fa32c4563cf |
NeuralNetMultiplePositionalArguments | # 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
import torch.... | carefreekk/onnxruntime | NeuralNetMultiplePositionalArguments | false | 3,271 | [
"MIT"
] | 0 | 484e9de55c109dadbeb552cd6ede21bbdd63b830 | https://github.com/carefreekk/onnxruntime/tree/484e9de55c109dadbeb552cd6ede21bbdd63b830 |
ActorSAC | import torch
import torch.nn.functional as F
import torch.nn as nn
class ActorSAC(nn.Module):
def __init__(self, state_dim, hidden, min_log_std=-20, max_log_std=2):
super(ActorSAC, self).__init__()
self.fc1 = nn.Linear(state_dim, hidden)
self.fc2 = nn.Linear(hidden, hidden)
self.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
import torch.nn as nn
assert_... | victorkich/agaragan | ActorSAC | false | 4,493 | [
"MIT"
] | 0 | 64e312fc4fa42f5952f3ce997bafe674306a9419 | https://github.com/victorkich/agaragan/tree/64e312fc4fa42f5952f3ce997bafe674306a9419 |
SchedulerTestNet | import torch
from torch.nn import functional as F
class SchedulerTestNet(torch.nn.Module):
"""
adapted from: https://github.com/pytorch/pytorch/blob/master/test/test_optim.py
"""
def __init__(self):
super(SchedulerTestNet, self).__init__()
self.conv1 = torch.nn.Conv2d(1, 1, 1)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
assert_size_stride = torch._C... | bartolkaruza/pytorch-lightning-bolts | SchedulerTestNet | false | 9,999 | [
"Apache-2.0"
] | 0 | 2e903c333c37ea83394c7da2ce826de1b82fb356 | https://github.com/bartolkaruza/pytorch-lightning-bolts/tree/2e903c333c37ea83394c7da2ce826de1b82fb356 |
PlainRefiner | # 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_... | hejm37/mmediting | PlainRefiner | false | 12,487 | [
"Apache-2.0"
] | 0 | d4086aaf8a36ae830f1714aad585900d24ad1156 | https://github.com/hejm37/mmediting/tree/d4086aaf8a36ae830f1714aad585900d24ad1156 |
CDCM | # 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_... | ZitongYu/pidinet | CDCM | false | 18,205 | [
"MIT"
] | 5 | 15cdf9fb056549934877675bf7571b427f86db55 | https://github.com/ZitongYu/pidinet/tree/15cdf9fb056549934877675bf7571b427f86db55 |
Net1 | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data
import torch.utils.data.distributed
import torch.nn.parallel
import torch.optim
class Net1(nn.Module):
def __init__(self):
super(Net1, self).__init__()
self.conv1 = nn.Conv2d(1, 32, 3, 1)
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
import torch.nn as nn
import ... | RadhikaB-97/deep-learning-containers | Net1 | false | 11,804 | [
"Apache-2.0"
] | 0 | 85ad01742613401f42908d75bb4ca23d11895f6c | https://github.com/RadhikaB-97/deep-learning-containers/tree/85ad01742613401f42908d75bb4ca23d11895f6c |
ConvolutionLayer | # 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... | huak95/attacut | ConvolutionLayer | false | 15,537 | [
"MIT"
] | 54 | 100333931023cd009daeddec0cba4cdfce3d0b68 | https://github.com/huak95/attacut/tree/100333931023cd009daeddec0cba4cdfce3d0b68 |
GraphDiffusedAttentionLayer | import torch
import torch.nn as nn
import torch.nn.functional as F
class GraphDiffusedAttentionLayer(nn.Module):
"""
Simple GAT layer, similar to https://arxiv.org/abs/1710.10903
"""
def __init__(self, in_features, out_features, dropout, alpha):
super(GraphDiffusedAttentionLayer, self).__init... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Yindong-Zhang/myGAT | GraphDiffusedAttentionLayer | false | 18,161 | [
"MIT"
] | 6 | f69132f21785d3a6bf1ec014890adeb124c89e8d | https://github.com/Yindong-Zhang/myGAT/tree/f69132f21785d3a6bf1ec014890adeb124c89e8d |
AsymmetricLoss | import torch
import torch.nn as nn
import torch.nn.functional as F
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".
Return:
Tensor: Reduced loss tensor.
"""
... | 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... | David-19940718/mmclassification | AsymmetricLoss | false | 5,048 | [
"Apache-2.0"
] | 1 | 987dd45457e38c4787237ea468799849dce11ada | https://github.com/David-19940718/mmclassification/tree/987dd45457e38c4787237ea468799849dce11ada |
NasMaxPoolBlock | import torch
import torch.utils.data
import torch.nn as nn
class NasMaxPoolBlock(nn.Module):
"""
NASNet specific Max pooling layer with extra padding.
Parameters:
----------
extra_padding : bool, default False
Whether to use extra padding.
"""
def __init__(self, extra_padding=Fal... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.utils.data
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guard... | HyperGAN/imgclsmob | NasMaxPoolBlock | false | 17,684 | [
"MIT"
] | 9 | 88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3 | https://github.com/HyperGAN/imgclsmob/tree/88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3 |
LateralBlock | import torch
import torch.utils.data
import torch
from torch import nn
class LateralBlock(nn.Module):
def __init__(self, conv_dim, alpha):
super(LateralBlock, self).__init__()
self.conv = nn.Conv3d(conv_dim, conv_dim * 2, kernel_size=(5, 1, 1),
stride=(alpha, 1, 1), padding=(2, 0, 0),... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
import torch
from torch import nn
assert_size_stride = t... | PANBOHE/Humanpose-fight | LateralBlock | false | 5,701 | [
"Apache-2.0"
] | 1 | 36e6218db526d567922fa528fa7e11497c53ad60 | https://github.com/PANBOHE/Humanpose-fight/tree/36e6218db526d567922fa528fa7e11497c53ad60 |
BertPooler | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
import torch.utils.data
import torch
class BertPooler(nn.Module):
def __init__(self, config):
super(BertPooler, self).__init__()
self.dense = nn.Linear(config.hidden_size, config.hidden_size)
self.activation ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | Bhaskers-Blu-Org2/Distilled-Sentence-Embedding | BertPooler | false | 8,787 | [
"MIT"
] | 23 | 092b70830564c65a2efe8cadecd5da2d5dfdfba9 | https://github.com/Bhaskers-Blu-Org2/Distilled-Sentence-Embedding/tree/092b70830564c65a2efe8cadecd5da2d5dfdfba9 |
RandomShiftsAug | import torch
import torch.nn as nn
import torch.nn.functional as F
class RandomShiftsAug(nn.Module):
def __init__(self, pad):
super().__init__()
self.pad = pad
def forward(self, x):
n, _c, h, w = x.size()
assert h == w
padding = tuple([self.pad] * 4)
x = F.pad... | import torch
from torch import device
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._d... | emigmo/drqv2 | RandomShiftsAug | false | 10,058 | [
"MIT"
] | 0 | 76ca8a613f5c1ed3f07f0ddf8d7aa09469a1ce21 | https://github.com/emigmo/drqv2/tree/76ca8a613f5c1ed3f07f0ddf8d7aa09469a1ce21 |
OhemSphereLoss | # 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.... | ace19-dev/image-retrieval-pytorch | OhemSphereLoss | false | 18,222 | [
"MIT"
] | 9 | 19bd4ae5efea5b6184c345f693646bcd9a0fc8cf | https://github.com/ace19-dev/image-retrieval-pytorch/tree/19bd4ae5efea5b6184c345f693646bcd9a0fc8cf |
Analysis_net_17 | from torch.autograd import Function
import math
import torch
import torch.nn as nn
import torch.utils.data
class LowerBound(Function):
@staticmethod
def forward(ctx, inputs, bound):
b = torch.ones_like(inputs) * bound
ctx.save_for_backward(inputs, b)
return torch.max(inputs, 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
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Geunwoo-Jeon/iclr_17_compression | Analysis_net_17 | false | 13,795 | [
"MIT"
] | 56 | a28746b1f1c518d91125d8f289d9511cde488c77 | https://github.com/Geunwoo-Jeon/iclr_17_compression/tree/a28746b1f1c518d91125d8f289d9511cde488c77 |
MeanPooling | import torch
from torch import nn
class MeanPooling(nn.Module):
def __init__(self):
super(MeanPooling, self).__init__()
def forward(self, doc_state, entity_mapping, entity_lens):
entity_states = entity_mapping.unsqueeze(3) * doc_state.unsqueeze(1)
mean_pooled = torch.sum(entity_state... | 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... | mottled233/DFGN-pytorch | MeanPooling | false | 10,586 | [
"MIT"
] | 0 | 7d9f6a75404cfa429f1e2b57ec5055df382ed0a4 | https://github.com/mottled233/DFGN-pytorch/tree/7d9f6a75404cfa429f1e2b57ec5055df382ed0a4 |
BiaffineScorer | import torch
import torch.nn as nn
import torch.cuda
import torch.distributed
class BiaffineScorer(nn.Module):
def __init__(self, input1_size, input2_size, output_size):
super().__init__()
self.W_bilin = nn.Bilinear(input1_size + 1, input2_size + 1,
output_size)
self.W_bilin.w... | 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.cuda
import torch.distributed
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strid... | KaijuML/dtt-multi-branch | BiaffineScorer | false | 17,528 | [
"Apache-2.0"
] | 8 | a49850a95034e58d387b9d48c647cfc2b83c45b5 | https://github.com/KaijuML/dtt-multi-branch/tree/a49850a95034e58d387b9d48c647cfc2b83c45b5 |
ReLU | import torch
import torch.nn as nn
class ActivationFunction(nn.Module):
def __init__(self):
super().__init__()
self.name = self.__class__.__name__
self.config = {'name': self.name}
class ReLU(ActivationFunction):
def forward(self, x):
return x * (x > 0).float()
def get_in... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | jiwidi/lightning-tutorials | ReLU | false | 15,698 | [
"Apache-2.0"
] | 114 | 70ba437447f345d4d6ba089d5b30fd1da2cbc04b | https://github.com/jiwidi/lightning-tutorials/tree/70ba437447f345d4d6ba089d5b30fd1da2cbc04b |
conv_head_pooling | # 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... | tsubauaaa/d2go | conv_head_pooling | false | 4,505 | [
"Apache-2.0"
] | 0 | 9f746159ebf78ce79f644c405ca8695bc29d1075 | https://github.com/tsubauaaa/d2go/tree/9f746159ebf78ce79f644c405ca8695bc29d1075 |
LocalState | # 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.... | xvdp/demucs | LocalState | false | 11,089 | [
"MIT"
] | 0 | 0a5e3b72c6388801cf0086c2b84d09f6d73c389c | https://github.com/xvdp/demucs/tree/0a5e3b72c6388801cf0086c2b84d09f6d73c389c |
Conv2d_fw | # 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... | horsepurve/DeepVoro | Conv2d_fw | false | 3,628 | [
"MIT"
] | 0 | 1b67a8e0d51e1c966a2af96d4b6a495f8390f608 | https://github.com/horsepurve/DeepVoro/tree/1b67a8e0d51e1c966a2af96d4b6a495f8390f608 |
UpConv | # 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 ... | dong1015323606/LKVOLearner | UpConv | false | 15,205 | [
"BSD-3-Clause"
] | 237 | 6ac9fb5d3c22d6a81529063f8c52d6aa34166b2a | https://github.com/dong1015323606/LKVOLearner/tree/6ac9fb5d3c22d6a81529063f8c52d6aa34166b2a |
HardBinaryConv | import torch
import torch.nn as nn
import torch.nn.functional as F
class HardBinaryConv(nn.Module):
def __init__(self, in_chn, out_chn, kernel_size=3, stride=1, padding=1):
super(HardBinaryConv, self).__init__()
self.stride = stride
self.padding = padding
self.number_of_weights = ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | uzair789/pytorch-retinanet | HardBinaryConv | false | 10,964 | [
"Apache-2.0"
] | 0 | cabac159a9877825ef04ab06d3b9a63bdfa4f306 | https://github.com/uzair789/pytorch-retinanet/tree/cabac159a9877825ef04ab06d3b9a63bdfa4f306 |
InnerProductLayer | import torch
import torch.nn as nn
from sklearn.metrics import *
class InnerProductLayer(nn.Module):
"""InnerProduct Layer used in PNN that compute the element-wise
product or inner product between feature vectors.
Input shape
- a list of 3D tensor with shape: ``(batch_size,1,embedding_size)``.
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from sklearn.metrics import *
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = tor... | Fanxingye/DeepRS | InnerProductLayer | false | 14,024 | [
"Apache-2.0"
] | 1,770 | 06b98cf2cb2781656805eafc577fbd088f37d17d | https://github.com/Fanxingye/DeepRS/tree/06b98cf2cb2781656805eafc577fbd088f37d17d |
Log_Cosh_Loss | import torch
class Log_Cosh_Loss(torch.nn.Module):
def forward(self, logits, labels):
return torch.mean(torch.log(torch.cosh(labels - logits)))
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
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
assert_size... | ShengboWang1/wave-u-net-DEMAND28 | Log_Cosh_Loss | false | 11,867 | [
"MIT"
] | 0 | fe8b57220d885d5fdad33b303c0565f2286ba549 | https://github.com/ShengboWang1/wave-u-net-DEMAND28/tree/fe8b57220d885d5fdad33b303c0565f2286ba549 |
ConcatBlock | # 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.functional
assert_size_stride = torch._C._... | timothytancy/SSL4MIS | ConcatBlock | false | 13,034 | [
"MIT"
] | 0 | 7879ad3483223e31a2785f5112eac1d4fa36b66e | https://github.com/timothytancy/SSL4MIS/tree/7879ad3483223e31a2785f5112eac1d4fa36b66e |
TorchAdd | # 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.nn.parallel
import torch.optim
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.asser... | savan77/nni | TorchAdd | false | 4,279 | [
"MIT"
] | 0 | 510213393d9cae58c5a8cccd21f322f7bba4e0cf | https://github.com/savan77/nni/tree/510213393d9cae58c5a8cccd21f322f7bba4e0cf |
Attention | # 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.... | derwind/dmfont | Attention | false | 15,176 | [
"MIT"
] | 95 | 17a91a9cc1917d2485eaa8e92b68245578920c76 | https://github.com/derwind/dmfont/tree/17a91a9cc1917d2485eaa8e92b68245578920c76 |
MetaBilinear | # 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
reinterpret_tensor = torch._C._dynamo.guards._reinterp... | KIMGEONUNG/multi-memory-siren | MetaBilinear | false | 711 | [
"MIT"
] | 0 | b372e1b9abe2b3fb502d808eb3a47c2ad287ca3b | https://github.com/KIMGEONUNG/multi-memory-siren/tree/b372e1b9abe2b3fb502d808eb3a47c2ad287ca3b |
QGOODLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import torch.distributions
import torch.utils.data
assert... | AlexMeinke/Provable-OOD-Detection | QGOODLoss | false | 7,713 | [
"MIT"
] | 21 | 9a132aec994ff718c96b81885736ab866df60d87 | https://github.com/AlexMeinke/Provable-OOD-Detection/tree/9a132aec994ff718c96b81885736ab866df60d87 |
BetaVAE_H | import torch
import torch.nn as nn
def reparametrize(mu, logvar):
std = logvar.div(2).exp()
eps = std.data.new(std.size()).normal_()
return mu + std * eps
class Encoder_H(nn.Module):
def __init__(self, input_shape=(64, 64), z_dim=10, nc=3, padding=1):
super(Encoder_H, self).__init__()
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | KinWaiCheuk/Beta-VAE | BetaVAE_H | false | 5,531 | [
"MIT"
] | 1 | 57f538320fed76b54e8489656b11dc83c06d1584 | https://github.com/KinWaiCheuk/Beta-VAE/tree/57f538320fed76b54e8489656b11dc83c06d1584 |
MiniBatchStdDev | import torch
from torch import nn
import torch.utils.data
import torch.nn.functional
import torch.autograd
class MiniBatchStdDev(nn.Module):
"""
<a id="mini_batch_std_dev"></a>
### Mini-batch Standard Deviation
Mini-batch standard deviation calculates the standard deviation
across a mini-batch (... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
import torch.utils.data
import torch.nn.functional
import ... | Hadryan/nn | MiniBatchStdDev | false | 9,375 | [
"MIT"
] | 0 | b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d | https://github.com/Hadryan/nn/tree/b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d |
DiscriminatorLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch.nn import Module
import torch.utils.data
import torch.nn.functional
import tor... | ppvalluri09/annotated_deep_learning_paper_implementations | DiscriminatorLoss | false | 11,067 | [
"MIT"
] | 0 | 387b6dfd1ef1f6d295e9394c24b5798071d9a3e4 | https://github.com/ppvalluri09/annotated_deep_learning_paper_implementations/tree/387b6dfd1ef1f6d295e9394c24b5798071d9a3e4 |
ChannelAttention_a | # 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... | HT-hlf/mmdetection_miner-2.22.0 | ChannelAttention_a | false | 2,324 | [
"Apache-2.0"
] | 0 | 76eb94d6547f9f95cd58f41bb5c91941e82322b9 | https://github.com/HT-hlf/mmdetection_miner-2.22.0/tree/76eb94d6547f9f95cd58f41bb5c91941e82322b9 |
CustomNet | import torch
import torch.nn as nn
class CustomNet(nn.Module):
"""
A network with a fully connected layer followed by a sigmoid layer. This is
used for testing customized operation handles.
"""
def __init__(self, input_dim: 'int', output_dim: 'int') ->None:
super(CustomNet, self).__init__... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | Jennifer-Rigdon/fvcore | CustomNet | false | 5,386 | [
"Apache-2.0"
] | 1 | 7e800a86f2df93da017e07380543b4060ab88c94 | https://github.com/Jennifer-Rigdon/fvcore/tree/7e800a86f2df93da017e07380543b4060ab88c94 |
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... | zhanwenchen/Scene-Graph-Benchmark.pytorch | GCN | false | 4,659 | [
"MIT"
] | 0 | c86475bcbdaefcc1656a2890194355c2b32aa694 | https://github.com/zhanwenchen/Scene-Graph-Benchmark.pytorch/tree/c86475bcbdaefcc1656a2890194355c2b32aa694 |
SELayer | import torch
import torch.nn.functional as F
import torch.nn as nn
class SELayer(nn.Module):
def __init__(self, in_channels, reduction):
super().__init__()
mid_channels = in_channels // reduction
self.fc1 = nn.Linear(in_channels, mid_channels)
self.fc2 = nn.Linear(mid_channels, in... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | BrandonHanx/pytorch_image_classification | SELayer | false | 13,412 | [
"MIT"
] | 1,114 | 13f037c442f251c5cd938672245b39df157f1c98 | https://github.com/BrandonHanx/pytorch_image_classification/tree/13f037c442f251c5cd938672245b39df157f1c98 |
AvgPoolShortening | from torch.nn import Module
import torch
from torch import nn
import torch.utils.data
import torch.nn.functional
import torch.autograd
class AvgPoolShortening(Module):
"""
### Average pool shortening
This down-samples by a given factor with average pooling
"""
def __init__(self, k: 'int'):
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch.nn import Module
from torch import nn
import torch.utils.data
import torch.nn.functional
import torch.autograd
assert_size_stride... | mcx/annotated_deep_learning_paper_implementations | AvgPoolShortening | false | 7,187 | [
"MIT"
] | 1 | f169f3a71dd2d36eb28ad31062d3475efa367b88 | https://github.com/mcx/annotated_deep_learning_paper_implementations/tree/f169f3a71dd2d36eb28ad31062d3475efa367b88 |
LayerNorm | import torch
from torch import nn
from torch.nn import LayerNorm
import torch.utils.data
import torch.optim
class LayerNorm(nn.Module):
def __init__(self, channels, eps=0.0001):
super().__init__()
self.channels = channels
self.eps = eps
self.gamma = nn.Parameter(torch.ones(channel... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
import torch.utils.data
import torch.optim
assert_size_str... | Oktai15/NeMo | LayerNorm | false | 5,676 | [
"Apache-2.0"
] | 1 | 5b6dd3850129898be47cf0d65587897ec45a5b59 | https://github.com/Oktai15/NeMo/tree/5b6dd3850129898be47cf0d65587897ec45a5b59 |
PolarityInversion | # 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... | h0ngwen/torchaudio-augmentations | PolarityInversion | false | 6,774 | [
"MIT"
] | 1 | d044f9d020e12032ab9280acf5f34a337e72d212 | https://github.com/h0ngwen/torchaudio-augmentations/tree/d044f9d020e12032ab9280acf5f34a337e72d212 |
Self_Attn | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Aympab/DCGAN | Self_Attn | false | 8,875 | [
"Apache-2.0"
] | 0 | 2d5aeb62e33f31fc5bfcfdac8b951cd7ae144b96 | https://github.com/Aympab/DCGAN/tree/2d5aeb62e33f31fc5bfcfdac8b951cd7ae144b96 |
InformedSender | # 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.... | ptigas/EGG | InformedSender | false | 7,507 | [
"MIT"
] | 1 | 5319cc9de2c17bc72de717737cfbb5be2285c59b | https://github.com/ptigas/EGG/tree/5319cc9de2c17bc72de717737cfbb5be2285c59b |
Linear | import math
import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.parameter import Parameter
from torch.nn import Parameter
import torch.cuda
import torch.distributed
def quantize_weights(W, numbits=8):
W = W.clamp(-2 ** (numbits - 1), 2 ** (numbits - 1))
W = W.mu... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | csk7/CS550-NLP-McGill- | Linear | false | 9,959 | [
"MIT"
] | 0 | a6f295b88539015d8accdbd410357c42df7c4287 | https://github.com/csk7/CS550-NLP-McGill-/tree/a6f295b88539015d8accdbd410357c42df7c4287 |
MaxMin | # 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.multiprocessing
import torch.nn as nn
import torch.nn.parallel
import torch.... | ckodser/a_robust_subnetwork_hiddes | MaxMin | false | 1,714 | [
"Apache-2.0"
] | 0 | 171b43dc7b4446ba722a4c51c52bf561f77e5c55 | https://github.com/ckodser/a_robust_subnetwork_hiddes/tree/171b43dc7b4446ba722a4c51c52bf561f77e5c55 |
DiagGaussianActionHead | # 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
import torch.optim
import torch.nn as nn
import torch.nn.init... | galatolofederico/vel | DiagGaussianActionHead | false | 15,402 | [
"MIT"
] | 273 | 0473648cffb3f34fb784d12dbb25844ab58ffc3c | https://github.com/galatolofederico/vel/tree/0473648cffb3f34fb784d12dbb25844ab58ffc3c |
MMTMBi | import torch
import torch.nn as nn
from typing import Sequence
class MMTMBi(nn.Module):
"""
bi moludal fusion
"""
def __init__(self, dim_tab, dim_img, ratio=4):
"""
Parameters
----------
dim_tab: feature dimension of tabular data
dim_img: feature dimension of ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | ditannan/Multi-modal-Multi-instance-Learning | MMTMBi | false | 6,575 | [
"Apache-2.0"
] | 1 | 06aada1ff85784d5ed50aa528c506947c892d584 | https://github.com/ditannan/Multi-modal-Multi-instance-Learning/tree/06aada1ff85784d5ed50aa528c506947c892d584 |
NonoverlapReg | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
import torch.nn as nn
import torch.nn.parallel
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty... | devaansh100/pytorch_connectomics | NonoverlapReg | false | 6,556 | [
"MIT"
] | 1 | b1e4b16b0480546ea806d14876208080815ed964 | https://github.com/devaansh100/pytorch_connectomics/tree/b1e4b16b0480546ea806d14876208080815ed964 |
SimpleACosModule | import torch
import torch.jit
import torch.onnx
import torch.nn
class SimpleACosModule(torch.nn.Module):
def __init__(self):
super(SimpleACosModule, self).__init__()
def forward(self, a):
return torch.acos(a + a)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.jit
import torch.onnx
import torch.nn
assert_size_stride = torch._... | opti-mix/glow | SimpleACosModule | false | 7,381 | [
"Apache-2.0"
] | 1 | 4ba074df5da9822986a23a6679ab592c22660f6d | https://github.com/opti-mix/glow/tree/4ba074df5da9822986a23a6679ab592c22660f6d |
InfoNCE | # 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.... | RElbers/info-nce-pytorch | InfoNCE | false | 14,256 | [
"MIT"
] | 59 | 37ceef781b3fb89557c0d2b401a9fadf74be8791 | https://github.com/RElbers/info-nce-pytorch/tree/37ceef781b3fb89557c0d2b401a9fadf74be8791 |
DisparityConv | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.... | jiupinjia/neural-magic-eye | DisparityConv | false | 15,701 | [
"MIT"
] | 59 | ded1cd4fc2194fe031f76bc3a2c307e761f70d85 | https://github.com/jiupinjia/neural-magic-eye/tree/ded1cd4fc2194fe031f76bc3a2c307e761f70d85 |
FusedLeakyReLU | import torch
import torch.utils.data
import torch
import torch.nn as nn
import torch.nn.functional as F
def fused_leaky_relu(input, bias, negative_slope=0.2, scale=2 ** 0.5):
return F.leaky_relu(input + bias, negative_slope) * scale
class FusedLeakyReLU(nn.Module):
def __init__(self, channel, negative_slop... | 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
import torch.nn.functional as F
assert_size_stride = torch._C._dynamo.guards.asse... | bomtorazek/contrastive-unpaired-translation | FusedLeakyReLU | false | 12,182 | [
"BSD-3-Clause"
] | 0 | 07c048038375e1b9a4e464154b8dbc49f5e16ede | https://github.com/bomtorazek/contrastive-unpaired-translation/tree/07c048038375e1b9a4e464154b8dbc49f5e16ede |
Router | import torch
import warnings
import torch.nn as nn
class Router(nn.Module):
"""Convolution + Relu + Global Average Pooling + Sigmoid"""
def __init__(self, input_nc, input_width, input_height, kernel_size=28,
soft_decision=True, stochastic=False, **kwargs):
super(Router, self).__init__()
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import warnings
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guar... | yulinfeng000/AdaptiveNeuralTrees | Router | false | 13,153 | [
"MIT"
] | 0 | bbcb381b9cb0c91ae1af33ce43b43f352055041c | https://github.com/yulinfeng000/AdaptiveNeuralTrees/tree/bbcb381b9cb0c91ae1af33ce43b43f352055041c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.