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
Net
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_...
dylan-albertazzi/Berkely_DeepRL
Net
false
12,330
[ "MIT" ]
0
997d066df7b429f6ad365dca8105490dae8f978e
https://github.com/dylan-albertazzi/Berkely_DeepRL/tree/997d066df7b429f6ad365dca8105490dae8f978e
Interpolate
# 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...
vietnhatthai/3d-vehicle-tracking
Interpolate
false
16,668
[ "BSD-3-Clause" ]
603
8ee189f6792897651bb56bb2950ce07c9629a89d
https://github.com/vietnhatthai/3d-vehicle-tracking/tree/8ee189f6792897651bb56bb2950ce07c9629a89d
Actor
# 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....
ChenShawn/Adapted_TD3_Robustness_Certification
Actor
false
13,469
[ "MIT" ]
91
6b28b031b098a2f0a49f2945f8a669205f09c4fe
https://github.com/ChenShawn/Adapted_TD3_Robustness_Certification/tree/6b28b031b098a2f0a49f2945f8a669205f09c4fe
IMDModule_speed
import torch import torch.nn as nn import torch.utils.model_zoo def activation(act_type, inplace=True, neg_slope=0.05, n_prelu=1): act_type = act_type.lower() if act_type == 'relu': layer = nn.ReLU(inplace) elif act_type == 'lrelu': layer = nn.LeakyReLU(neg_slope, inplace) elif act_typ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.model_zoo assert_size_stride = torch._C...
Liang-ZX/EDSR-PyTorch
IMDModule_speed
false
785
[ "MIT" ]
0
a245d02fa1c3d799402aeadf7320f1c8a116e86a
https://github.com/Liang-ZX/EDSR-PyTorch/tree/a245d02fa1c3d799402aeadf7320f1c8a116e86a
Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import numpy as np import tor...
akashkmr27089/ReinforcementLearning_Udacity_Deep_Reinforcemnt_Learning
Critic
false
3,094
[ "MIT" ]
0
b7dc13b0116898848d8d0b8a95b7af182982bd6b
https://github.com/akashkmr27089/ReinforcementLearning_Udacity_Deep_Reinforcemnt_Learning/tree/b7dc13b0116898848d8d0b8a95b7af182982bd6b
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.utils.data impor...
guyii54/Contrastive-I2I
Conv2dBlock
false
6,763
[ "BSD-3-Clause" ]
1
e73daa0f9d3770c2280a304c39678d5b22440647
https://github.com/guyii54/Contrastive-I2I/tree/e73daa0f9d3770c2280a304c39678d5b22440647
GEGLU
import torch from torch import nn import torch.nn.functional as F class GEGLU(nn.Module): def forward(self, x): x, gates = x.chunk(2, dim=-1) return F.gelu(gates) * 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 from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
Steffen-Wolf/vit-pytorch
GEGLU
false
9,607
[ "MIT" ]
0
4f590b9bd570091d9070a039ad33301516caa341
https://github.com/Steffen-Wolf/vit-pytorch/tree/4f590b9bd570091d9070a039ad33301516caa341
LayerNorm1D
import torch import torch.nn as nn class LayerNorm1D(nn.Module): def __init__(self, num_outputs, eps=1e-05, affine=True): super(LayerNorm1D, self).__init__() self.eps = eps self.weight = nn.Parameter(torch.ones(1, num_outputs)) self.bias = nn.Parameter(torch.zeros(1, num_outputs))...
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_...
codeislife99/pytorch-meta-optimizer
LayerNorm1D
false
9,941
[ "MIT" ]
0
24f00be05e6e173efa67fe953e466bdf1dcb50e9
https://github.com/codeislife99/pytorch-meta-optimizer/tree/24f00be05e6e173efa67fe953e466bdf1dcb50e9
Correlation
import torch import torch.nn as nn import torch.optim class Correlation(nn.Module): """Correlation Congruence for Knowledge Distillation, ICCV 2019. The authors nicely shared the code with me. I restructured their code to be compatible with my running framework. Credits go to the original author""" ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn import torch.optim assert_size_stride = torch._C._d...
RylanSchaeffer/RepDistiller
Correlation
false
5,806
[ "BSD-2-Clause" ]
1
3612d9d8f6f913527c7aaec7e5ea557e72ed7c5e
https://github.com/RylanSchaeffer/RepDistiller/tree/3612d9d8f6f913527c7aaec7e5ea557e72ed7c5e
GatedLinearUnit
# 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...
OneToolsCollection/4paradigm-AutoX
GatedLinearUnit
false
9,339
[ "Apache-2.0" ]
0
f8e838021354de17f5bb9bc44e9d68d12dda6427
https://github.com/OneToolsCollection/4paradigm-AutoX/tree/f8e838021354de17f5bb9bc44e9d68d12dda6427
D_concat
import torch import torch.utils.data import torch.nn as nn def add_layer(seq, ix, n_inputs, n_outputs, nonlin, normalization): seq.add_module('L' + str(ix), nn.Linear(n_inputs, n_outputs)) if ix > 0 and normalization: if normalization == 'LN': seq.main.add_module('A' + str(ix), nn.LayerNor...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.utils.data import torch.nn as nn assert_size_stride = torch._C._dyn...
Bhaskers-Blu-Org1/SIC
D_concat
false
7,790
[ "Apache-2.0" ]
12
c4e45d7736da6e6faabdc56bfc1336445df99204
https://github.com/Bhaskers-Blu-Org1/SIC/tree/c4e45d7736da6e6faabdc56bfc1336445df99204
UpdateFunc
from torch.nn import Module import torch import torch.nn as nn from torch.nn.modules.module import Module class UpdateFunc(Module): """Implements a Message function""" def __init__(self, sa_dim, n_agents, hidden_size): super(UpdateFunc, self).__init__() self.fv = nn.Linear(hidden_size + sa_di...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch.nn import Module import torch.nn as nn from torch.nn.modules.module i...
HAXRD/PIC
UpdateFunc
false
8,197
[ "MIT" ]
28
658b4dd6b01e64413d5f8f0107d9167f1bd78546
https://github.com/HAXRD/PIC/tree/658b4dd6b01e64413d5f8f0107d9167f1bd78546
BertAttention
from _paritybench_helpers import _mock_config import math import torch import torch.nn import torch.nn as nn class BertAttention(nn.Module): """BERT attention layer. Based on: BERT (pytorch-transformer) https://github.com/huggingface/transformers """ def __init__(self, config) ->None: sup...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Project-MONAI/MONAI
BertAttention
false
15,862
[ "Apache-2.0" ]
2,971
2bab12c67c3cc1d54a4847628ce1e879064be11c
https://github.com/Project-MONAI/MONAI/tree/2bab12c67c3cc1d54a4847628ce1e879064be11c
ExtResNetBlock
# 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 ...
BioTrillion/pytorch-3dunet
ExtResNetBlock
false
4,928
[ "MIT" ]
1
217781197dd94211ee7fe5d53a8b404f0b8391a6
https://github.com/BioTrillion/pytorch-3dunet/tree/217781197dd94211ee7fe5d53a8b404f0b8391a6
Discriminator2
import torch import torch.nn as nn import torch.utils.data class Discriminator2(nn.Module): def __init__(self, n_h): super(Discriminator2, self).__init__() self.f_k = nn.Bilinear(n_h, n_h, 1) for m in self.modules(): self.weights_init(m) def weights_init(self, 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 import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C....
Shen-Lab/GraphCL
Discriminator2
false
14,404
[ "MIT" ]
275
1d43f79d7f33f8133f9d4b4b8254d8aaeb09a615
https://github.com/Shen-Lab/GraphCL/tree/1d43f79d7f33f8133f9d4b4b8254d8aaeb09a615
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 assert_size_stride = torch._C._dynamo.guards....
carefreekk/onnxruntime
MegatronFastGelu
false
3,259
[ "MIT" ]
0
484e9de55c109dadbeb552cd6ede21bbdd63b830
https://github.com/carefreekk/onnxruntime/tree/484e9de55c109dadbeb552cd6ede21bbdd63b830
SRCNN
import logging import torch import torchvision import warnings from collections import OrderedDict from torch.utils import model_zoo from torch.nn import functional as F import torch.nn as nn def get_root_logger(log_file=None, log_level=logging.INFO): """Get the root logger. The logger will be initialized if...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Jason-Khan/mmediting
SRCNN
false
1,025
[ "Apache-2.0" ]
0
d187f95a675dff3eb975a575bd9278d643b5b645
https://github.com/Jason-Khan/mmediting/tree/d187f95a675dff3eb975a575bd9278d643b5b645
CFReLU
import torch import torch.nn as nn import torch.nn.functional as F class CFReLU(nn.Module): """ Custom FReLU cfrelu(x) = relu(x + a) + b see psychXRF.activation.FReLU Shape: -Input: (N, *) -Output: (N, *), same shape as the input Parameters: -a: trai...
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...
RosarioAndolina/psychXRF
CFReLU
false
1,000
[ "MIT" ]
0
e2adadbd17664d7f74c10304f84b3751c571226e
https://github.com/RosarioAndolina/psychXRF/tree/e2adadbd17664d7f74c10304f84b3751c571226e
CAM_Use
# 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...
jbcnrlz/san
CAM_Use
false
3,847
[ "MIT" ]
0
1eab20f83d3c7dba5607e22d1c70768905b62b12
https://github.com/jbcnrlz/san/tree/1eab20f83d3c7dba5607e22d1c70768905b62b12
DiceLoss
import functools import torch import numpy as np import torch.nn.functional as F import torch.nn as nn import torch._C import torch.serialization def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import functools impor...
AnonSubmission6150/submission6150
DiceLoss
false
8,993
[ "Apache-2.0" ]
0
571633d9a12b4fd7a9546947787fc068966dab04
https://github.com/AnonSubmission6150/submission6150/tree/571633d9a12b4fd7a9546947787fc068966dab04
AlphaVectorMultiplication
# 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 numpy as np from torch import nn from typing import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_c...
HughMun/MultiBench
AlphaVectorMultiplication
false
13,791
[ "MIT" ]
148
d5712a0815a9486b0e0c76b54cd63c880188fc8e
https://github.com/HughMun/MultiBench/tree/d5712a0815a9486b0e0c76b54cd63c880188fc8e
DiceLoss
# 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 i...
ilcessadecalcular/segmentation
DiceLoss
false
10,601
[ "MIT" ]
0
24ba499a399efdba212ec5e2235b72ed8270cc24
https://github.com/ilcessadecalcular/segmentation/tree/24ba499a399efdba212ec5e2235b72ed8270cc24
LinearRegression
import torch from torch import nn class LinearRegression(nn.Module): def __init__(self, in_features: 'int', out_features: 'int', bias: 'bool'=True): super().__init__() self.weights = nn.Parameter(torch.randn(out_features, in_features)) self.bias = bias if bias: ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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...
GaspardLeMarque/Competition-Models
LinearRegression
false
483
[ "MIT" ]
0
3bd0b75de369420ac3a3011659f1de5942a867e1
https://github.com/GaspardLeMarque/Competition-Models/tree/3bd0b75de369420ac3a3011659f1de5942a867e1
RMSELoss
# 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 from torch import nn assert_...
Connormcc3/ludwig
RMSELoss
false
8,990
[ "Apache-2.0" ]
0
5d562cbc0c4fed3e607969e18611f34240eef177
https://github.com/Connormcc3/ludwig/tree/5d562cbc0c4fed3e607969e18611f34240eef177
EPE
import torch import torch.nn as nn class EPE(nn.Module): def __init__(self): super(EPE, self).__init__() def forward(self, flow, gt, loss_mask): loss_map = (flow - gt.detach()) ** 2 loss_map = (loss_map.sum(1, True) + 1e-06) ** 0.5 return loss_map * loss_mask def get_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.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
Conrekatsu/arXiv2020-RIFE
EPE
false
11,306
[ "MIT" ]
0
15cb7f2389ccd93e8b8946546d4665c9b41541a3
https://github.com/Conrekatsu/arXiv2020-RIFE/tree/15cb7f2389ccd93e8b8946546d4665c9b41541a3
SquaredErrorBayesRisk
# 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.nn import Module import torch.utils.data import torch.nn.functional import torch.autograd assert_size_stride = torch._C._dynamo.g...
techthiyanes/annotated_deep_learning_paper_implementations
SquaredErrorBayesRisk
false
16,587
[ "MIT" ]
3,714
8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
https://github.com/techthiyanes/annotated_deep_learning_paper_implementations/tree/8af24da2dd39a9a87482a4d18c2dc829bbd3fd47
SFT_torch
import torch import torch.nn as nn import torch.nn.functional as F from torchvision.transforms import * class SFT_torch(nn.Module): def __init__(self, sigma=0.1, *args, **kwargs): super(SFT_torch, self).__init__(*args, **kwargs) self.sigma = sigma def forward(self, emb_org): emb_org_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
CoinCheung/SFT-ReID
SFT_torch
false
8,186
[ "MIT" ]
22
2df67554732393df5a231b7281e12fc3435f1e8c
https://github.com/CoinCheung/SFT-ReID/tree/2df67554732393df5a231b7281e12fc3435f1e8c
GroupNorm32
import torch import torch.nn.functional as F import torch.nn as nn class GroupNorm32(nn.GroupNorm): def __init__(self, num_groups, num_channels, swish, eps=1e-05): super().__init__(num_groups=num_groups, num_channels=num_channels, eps=eps) self.swish = swish def forward(self, x):...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
GastonMazzei/escher-project-website
GroupNorm32
false
17,293
[ "MIT" ]
5
b3861eeeca11a7c31502f539ded9ae718f3d9e2e
https://github.com/GastonMazzei/escher-project-website/tree/b3861eeeca11a7c31502f539ded9ae718f3d9e2e
UpsamplerModel
import torch import numpy as np import torch.nn as nn class UpsamplerModel(nn.Module): def __init__(self, output_shape, factor): assert output_shape[0] % factor == 0 assert output_shape[1] % factor == 0 super(UpsamplerModel, self).__init__() self.output_shape = output_shape ...
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 numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.ass...
GuYuanjie/DeepFusionPrior
UpsamplerModel
false
5,235
[ "MIT" ]
1
a7126e073ed8c49b6a9a662492b64aaeee56cc01
https://github.com/GuYuanjie/DeepFusionPrior/tree/a7126e073ed8c49b6a9a662492b64aaeee56cc01
attention2d
# 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....
PengJingchao/DFNet
attention2d
false
954
[ "MIT" ]
0
49e83501f81515aebca211351e315896da7afc54
https://github.com/PengJingchao/DFNet/tree/49e83501f81515aebca211351e315896da7afc54
SparsemaxBisect
# 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.autograd import Function import torch.nn as nn assert_size_stride = torch._C._...
mtreviso/entmax
SparsemaxBisect
false
10,645
[ "MIT" ]
0
5b029d07fe00d7aacc77c8e684a5796d29287575
https://github.com/mtreviso/entmax/tree/5b029d07fe00d7aacc77c8e684a5796d29287575
LayerNorm
import torch import torch.nn as nn import torch.optim class LayerNorm(nn.Module): """Construct a layernorm module in the OpenAI style (epsilon inside the square root).""" def __init__(self, n_state, e=1e-05): super(LayerNorm, self).__init__() self.g = nn.Parameter(torch.ones(n_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._inductor.runtime.triton_helpers import libdevice import torch.nn as nn import torch.optim assert_size_stride = torch._C._dynamo....
LouisCastricato/comet-commonsense
LayerNorm
false
9,274
[ "Apache-2.0" ]
0
dd27c0f1f4a5cc75a11329611721a21a0f5a049f
https://github.com/LouisCastricato/comet-commonsense/tree/dd27c0f1f4a5cc75a11329611721a21a0f5a049f
GlobalAttentionGeneral
import torch import torch.nn as nn import torch.nn.parallel def conv1x1(in_planes, out_planes, bias=False): """1x1 convolution with padding""" return nn.Conv2d(in_planes, out_planes, kernel_size=1, stride=1, padding=0, bias=bias) class GlobalAttentionGeneral(nn.Module): def __init__(self, idf, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
comtalyst/multi-gan-material-defects
GlobalAttentionGeneral
false
15,079
[ "MIT" ]
112
aa1c9d4b918b5b5ad7f5fe03fdceec91a66e1007
https://github.com/comtalyst/multi-gan-material-defects/tree/aa1c9d4b918b5b5ad7f5fe03fdceec91a66e1007
Upsample2d
from _paritybench_helpers import _mock_config import torch import numpy as np import torch.nn as nn import torch.nn.functional as F def _setup_kernel(k): k = np.asarray(k, dtype=np.float32) if k.ndim == 1: k = np.outer(k, k) k /= np.sum(k) assert k.ndim == 2 assert k.shape[0] == k.shape[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 import numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
Iceland-Leo/StyleGAN2_PyTorch
Upsample2d
false
5,617
[ "MIT" ]
1
3621f5e4ba1c7fde7e2fae1f4700d050656a0b02
https://github.com/Iceland-Leo/StyleGAN2_PyTorch/tree/3621f5e4ba1c7fde7e2fae1f4700d050656a0b02
LoRALayer
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.nn.parallel import torch.utils.data assert_siz...
mojishoki/LoRA
LoRALayer
false
7,268
[ "MIT" ]
1
556225e776b4e2c5f77d332db15f0c712c13fe0e
https://github.com/mojishoki/LoRA/tree/556225e776b4e2c5f77d332db15f0c712c13fe0e
LFF
# 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 numpy ...
Ugness/CIPS_SR
LFF
false
14,539
[ "MIT" ]
172
abce872f5bc1b84afb9634a7dd1991e8c74d7616
https://github.com/Ugness/CIPS_SR/tree/abce872f5bc1b84afb9634a7dd1991e8c74d7616
CrossEntropy
import torch import torch.nn as nn from torch.nn import functional as F import torch.optim class CrossEntropy(nn.Module): def __init__(self, ignore_label=-1, weight=None, reduction='mean'): super(CrossEntropy, self).__init__() self.ignore_label = ignore_label self.criterion = nn.CrossEntr...
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 ...
TotalVariation/Flattenet
CrossEntropy
false
18,007
[ "MIT" ]
3
828d1f95f6f77dd0b681318f2a544e84cf4be834
https://github.com/TotalVariation/Flattenet/tree/828d1f95f6f77dd0b681318f2a544e84cf4be834
VanillaGenerativeAdversarialLoss
import torch import torch.nn as nn import torch.utils.data class VanillaGenerativeAdversarialLoss(nn.Module): """ Loss for `Vanilla Generative Adversarial Network <https://arxiv.org/abs/1406.2661>`_ Args: reduction (str, optional): Specifies the reduction to apply to the output: ``'none...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math import torc...
XianyuanLiu/Transfer-Learning-Library
VanillaGenerativeAdversarialLoss
false
10,141
[ "MIT" ]
0
25f83f32437032df88ca6101ecd1f63ec7a0aa2c
https://github.com/XianyuanLiu/Transfer-Learning-Library/tree/25f83f32437032df88ca6101ecd1f63ec7a0aa2c
PatchMerging
import torch import torch.nn.functional as F import torch.nn as nn class PatchMerging(nn.Module): """ Patch Merging Layer Args: dim (int): Number of input channels. norm_layer (nn.Module, optional): Normalization layer. Default: nn.LayerNorm """ def __init__(self, dim, norm_layer=nn....
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
Viditagarwal7479/Video-Swin-Transformer
PatchMerging
false
18,058
[ "Apache-2.0" ]
9
37910ef3141c7b2eef76544f9ec8bdf26ec94c7d
https://github.com/Viditagarwal7479/Video-Swin-Transformer/tree/37910ef3141c7b2eef76544f9ec8bdf26ec94c7d
SplitAndConcat
import torch import torch.nn as nn import torch.quantization.quantize_fx import torch.utils.data class SplitAndConcat(nn.Module): """Split the data from split_dim and concatenate in concat_dim. @param split_dim from which axis the data will be chunk @param concat_dim to which axis the data will be concat...
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.quantization.quantize_fx import torch.utils.data assert_size_stride = torch._C._dynamo.guards.assert_size...
ananthsub/d2go
SplitAndConcat
false
18,318
[ "Apache-2.0" ]
3
8c3618d9e73518d32350ab4e6d0fb6509c9e08b6
https://github.com/ananthsub/d2go/tree/8c3618d9e73518d32350ab4e6d0fb6509c9e08b6
LogSumExpPooling1d
import torch from torch import nn as nn class LogSumExpPooling1d(nn.Module): """Applies a 1D LogSumExp pooling over an input signal composed of several input planes. LogSumExp is a smooth approximation of the max function. Examples: >>> m = LogSumExpPooling1d() >>> input = autograd.Variable(torch...
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 as nn assert_size_stride = torch._C._dynamo.guards.a...
UKPLab/coling2018-graph-neural-networks-question-answering
LogSumExpPooling1d
false
14,522
[ "Apache-2.0" ]
164
389558d6570195debea570834944507de4f21d65
https://github.com/UKPLab/coling2018-graph-neural-networks-question-answering/tree/389558d6570195debea570834944507de4f21d65
DummyNet
import torch import torch.nn as nn import torch.nn.functional as F class DummyNet(nn.Module): def __init__(self): super(DummyNet, self).__init__() self.conv1 = nn.Conv2d(3, 10, kernel_size=5, padding=2) self.conv2 = nn.Conv2d(10, 5, kernel_size=5, padding=2) self.softmax = nn.Soft...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
LendelTheGreat/weak-segmentation
DummyNet
false
5,514
[ "MIT" ]
1
0ff6015f1af741cfb50ef8fb6f55cea822f68f7a
https://github.com/LendelTheGreat/weak-segmentation/tree/0ff6015f1af741cfb50ef8fb6f55cea822f68f7a
EuclideanGMM
import math import torch import torch.nn as nn def gaussian_prob_density(x, mu, sigma, normalized=False): if normalized: k = mu.shape[-1] scaler = (2 * math.pi) ** (-k / 2) sigma_det = torch.prod(sigma, dim=-1) ** -0.5 bias = (x - mu).unsqueeze(-2) sigma_inv = torch.diag_embed(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.triton_helpers import math as tl_math import math i...
ownzonefeng/Graph-based-text-representations
EuclideanGMM
false
7,456
[ "MIT" ]
1
4ddac6980d2741284474778dae2c2afa0adb5cda
https://github.com/ownzonefeng/Graph-based-text-representations/tree/4ddac6980d2741284474778dae2c2afa0adb5cda
ReOrgLayer
import torch import torch.nn as nn import torch.utils.data import torch.utils.data.distributed import torch._utils class ReOrgLayer(nn.Module): def __init__(self, stride=2): super(ReOrgLayer, self).__init__() self.stride = stride def forward(self, x): assert x.data.dim() == 4 ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.utils.data import torch.utils.data.distributed import torch._utils assert_size_stride = torch._C._dynamo....
Sarathismg/Pose-Estimator-Old-Version
ReOrgLayer
false
1,023
[ "Apache-2.0" ]
0
ecaa03769323b94a4d7222e2d3606d1ce92a2fae
https://github.com/Sarathismg/Pose-Estimator-Old-Version/tree/ecaa03769323b94a4d7222e2d3606d1ce92a2fae
MaskL1Loss
# 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 ...
pasan1992/Human-Pose-Transfer
MaskL1Loss
false
16,231
[ "MIT" ]
64
a7febc632d4fbf627ba05740d2048accb25575f2
https://github.com/pasan1992/Human-Pose-Transfer/tree/a7febc632d4fbf627ba05740d2048accb25575f2
AE_3D_small
# 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 ...
gitter-badger/HEPAutoencoders
AE_3D_small
false
12,424
[ "Apache-2.0" ]
0
43010cd66fa4335a04b30b87926148e1c8d92de9
https://github.com/gitter-badger/HEPAutoencoders/tree/43010cd66fa4335a04b30b87926148e1c8d92de9
SpatialAttention
# 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_...
Andyeyeye/MTANet
SpatialAttention
false
16,915
[ "MIT" ]
8
65f5c356b18400bd1d1b80cffa1ec9f8c6570d2a
https://github.com/Andyeyeye/MTANet/tree/65f5c356b18400bd1d1b80cffa1ec9f8c6570d2a
MLP
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from typing import Optional f...
HiroakiMikami/mlprogram
MLP
false
17,370
[ "MIT" ]
9
573e94c567064705fa65267dd83946bf183197de
https://github.com/HiroakiMikami/mlprogram/tree/573e94c567064705fa65267dd83946bf183197de
CLSTMCell
import torch import torch.nn as nn from torch.autograd import Variable class CLSTMCell(nn.Module): def __init__(self, input_channels, hidden_channels, kernel_size, bias=True ): super(CLSTMCell, self).__init__() assert hidden_channels % 2 == 0 self.input_channels = input_channels ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Rehan-Ahmar/UNet-Zoo
CLSTMCell
false
14,282
[ "MIT" ]
345
630f9290d487fda828e7118a3d953575b27a2686
https://github.com/Rehan-Ahmar/UNet-Zoo/tree/630f9290d487fda828e7118a3d953575b27a2686
FeatLoss
import torch import torch.utils.data import torch.nn as nn from sklearn import * class FeatLoss(nn.Module): """ This criterion is a implemenation of Focal Loss, which is proposed in Focal Loss for Dense Object Detection. Loss(x, class) = - \\alpha (1-softmax(x)[class])^gamma \\log(sof...
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...
CityU-AIM-Group/SIGMA
FeatLoss
false
17,408
[ "MIT" ]
5
19f89777db8d42f750a9b87756d3326c7efd18f5
https://github.com/CityU-AIM-Group/SIGMA/tree/19f89777db8d42f750a9b87756d3326c7efd18f5
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 import torch.onnx import torch import torch.nn as nn import torch.utils.data ass...
IrohXu/Infant-Pose-pytorch
ConvBlock
false
5,367
[ "MIT" ]
1
148c43fbfefe06ec2fffa7055049c3ff341154f8
https://github.com/IrohXu/Infant-Pose-pytorch/tree/148c43fbfefe06ec2fffa7055049c3ff341154f8
MaxPoolStride1
import torch import torch.nn as nn import torch.utils.data import torch.utils.data.distributed import torch.nn.functional as F import torch._utils class MaxPoolStride1(nn.Module): def __init__(self, kernel_size): super(MaxPoolStride1, self).__init__() self.kernel_size = kernel_size self.p...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.data import torch.utils.data.distributed import ...
tiahflorens/AlphaPose
MaxPoolStride1
false
13,033
[ "Apache-2.0" ]
0
84b844eff543eaa619d994ea0b15cb6caf69950d
https://github.com/tiahflorens/AlphaPose/tree/84b844eff543eaa619d994ea0b15cb6caf69950d
CrossEntropyLossTF
from torch.nn import Module import torch import torch.nn as nn import torch.nn from torch.nn.modules.module import Module def _assert_no_grad(variable): msg = ( "nn criterions don't compute the gradient w.r.t. targets - please mark these variables as not requiring gradients" ) assert not varia...
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.nn import M...
ClashLuke/memcnn
CrossEntropyLossTF
false
302
[ "MIT" ]
0
1d48132282c02506ca3d35540f819c4c9130eab4
https://github.com/ClashLuke/memcnn/tree/1d48132282c02506ca3d35540f819c4c9130eab4
cosine
import torch import torch as tr import torch.nn as nn class cosine(nn.Module): def __init__(self): super(cosine, self).__init__() def forward(self, x: 'tr.Tensor'): return tr.cos(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 from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert...
pierreglaser/MMD-gradient-flow
cosine
false
10,694
[ "BSD-3-Clause" ]
0
43591137e1d04bed5153887a364fae72621b01ae
https://github.com/pierreglaser/MMD-gradient-flow/tree/43591137e1d04bed5153887a364fae72621b01ae
Classifier
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
lukeahwilson/udacity-final-project
Classifier
false
12,738
[ "MIT" ]
0
c5df25e2135b1dfdb3458d82c562979432480f5d
https://github.com/lukeahwilson/udacity-final-project/tree/c5df25e2135b1dfdb3458d82c562979432480f5d
MultiheadAttention
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
Ivan-Dimitrov/ml_systems_code_pruning
MultiheadAttention
false
9,208
[ "BSD-3-Clause" ]
0
54cc9f35a87e52c1fef870b7cb54cb03239d5c96
https://github.com/Ivan-Dimitrov/ml_systems_code_pruning/tree/54cc9f35a87e52c1fef870b7cb54cb03239d5c96
ConvWS2d
# 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 ...
AllenPeng0209/SaccadeNet
ConvWS2d
false
7,649
[ "Apache-2.0" ]
30
0fce4266cbffc9a2c5f70335efa636da849ce70c
https://github.com/AllenPeng0209/SaccadeNet/tree/0fce4266cbffc9a2c5f70335efa636da849ce70c
TripletLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import torch.utils.data assert_size_stride = torch._C._dynamo.guard...
DanIulian/minigrid_rl
TripletLoss
false
333
[ "MIT" ]
0
d7b59fd1d1e62fc99d5134c89f59c6ad16246cfa
https://github.com/DanIulian/minigrid_rl/tree/d7b59fd1d1e62fc99d5134c89f59c6ad16246cfa
BinaryReg
import torch import torch.utils.data import torch.nn as nn class BinaryReg(nn.Module): """Regularization for encouraging the outputs to be binary. """ def __init__(self, alpha=0.1): super().__init__() self.alpha = alpha def forward(self, pred): diff = pred - 0.5 diff ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.utils.dat...
matinraayai/pytorch_connectomics
BinaryReg
false
3,980
[ "MIT" ]
0
b11a2f7e71a8d1442fb05f7a6edfaaaa7b0d9205
https://github.com/matinraayai/pytorch_connectomics/tree/b11a2f7e71a8d1442fb05f7a6edfaaaa7b0d9205
DeiTEmbeddings
from _paritybench_helpers import _mock_config import collections import torch from torch import nn import torch.utils.checkpoint import collections.abc def to_2tuple(x): if isinstance(x, collections.abc.Iterable): return x return x, x class PatchEmbeddings(nn.Module): """ Image to Patch Embe...
import torch from torch._inductor.select_algorithm import extern_kernels import 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 from torch import nn import torch.utils.checkpoint import col...
ncoop57/transformers
DeiTEmbeddings
false
4,059
[ "Apache-2.0" ]
0
d7e156bd1ae2467e9ea1dbc44f31da0ed2296aee
https://github.com/ncoop57/transformers/tree/d7e156bd1ae2467e9ea1dbc44f31da0ed2296aee
L2Softmax
import math import torch from torch.nn import functional as F from torch.nn.modules.loss import _WeightedLoss class L2Softmax(_WeightedLoss): """L2Softmax from `"L2-constrained Softmax Loss for Discriminative Face Verification" <https://arxiv.org/abs/1703.09507>`_ paper. Parameters ---------- ...
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 math...
sailfish009/torch-toolbox
L2Softmax
false
7,594
[ "BSD-3-Clause" ]
1
80dfc22c697b9f323e097de72af04f0e5435d7b4
https://github.com/sailfish009/torch-toolbox/tree/80dfc22c697b9f323e097de72af04f0e5435d7b4
Divide
import torch import torch.nn import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 class Divide(torch.nn.Module): """ Divide module for a functional divide""" def forward(self, x, y): """ Forward-pass routine for divide op """ ...
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 import torch.utils.data import torch.utils.tensorboard._pytorch_graph import torch.onnx.symbolic_caffe2 assert_size_stride =...
Rohan-Chaudhury/aimet
Divide
false
17,960
[ "BSD-3-Clause" ]
3
1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
https://github.com/Rohan-Chaudhury/aimet/tree/1c38cac8cc0fd32dca40ce5e39940805d29f7a4a
WNConv2d
import torch from torch import nn class WNConv2d(nn.Module): def __init__(self, in_channel, out_channel, kernel_size, stride=1, padding=0, bias=True, activation=None): super().__init__() self.conv = nn.utils.weight_norm(nn.Conv2d(in_channel, out_channel, kernel_size, stride=st...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
eric11220/vq-vae-2-pytorch
WNConv2d
false
12,369
[ "MIT" ]
0
ac455ec8873428e16a361d49bf1dda30472ece13
https://github.com/eric11220/vq-vae-2-pytorch/tree/ac455ec8873428e16a361d49bf1dda30472ece13
MultConst
# 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...
czczup/URST
MultConst
false
15,090
[ "Apache-2.0" ]
119
000ec9f7728f12ffad989ec1d07b1dd579514133
https://github.com/czczup/URST/tree/000ec9f7728f12ffad989ec1d07b1dd579514133
DQN_xy5
# 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 ...
CoAxLab/azad
DQN_xy5
false
17,189
[ "MIT" ]
6
d1498069dd8856e93ae077b34dd7c9f1c7ce80e6
https://github.com/CoAxLab/azad/tree/d1498069dd8856e93ae077b34dd7c9f1c7ce80e6
WassersteinLoss
# 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 functools import torch.utils.data import torch.nn as n...
JiahuaWU/fastai
WassersteinLoss
false
13,892
[ "Apache-2.0" ]
59
13a2df812d875abf0558004283392ab40d9bdea1
https://github.com/JiahuaWU/fastai/tree/13a2df812d875abf0558004283392ab40d9bdea1
MSELoss
# 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 functools import torch.nn as nn import torch.cuda.comm from torch.nn import functi...
JasonBoy1/mmhuman3d
MSELoss
false
5,383
[ "Apache-2.0" ]
1
79b2665191115f3ed905e6afdf09990a8d484362
https://github.com/JasonBoy1/mmhuman3d/tree/79b2665191115f3ed905e6afdf09990a8d484362
CNN_decoder_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....
jonathangomesselman/graph-generation
CNN_decoder_attention
false
7,011
[ "MIT" ]
1
72a8be30d54a414fcca9ea0fad1a62e38b85ee2f
https://github.com/jonathangomesselman/graph-generation/tree/72a8be30d54a414fcca9ea0fad1a62e38b85ee2f
Hswish
import torch import torch.nn as nn from torch.quantization import QuantStub from torch.quantization import DeQuantStub class Hsigmoid(nn.Module): def __init__(self, inplace=True, add_stub=False): super().__init__() self.float_op = nn.quantized.FloatFunctional() self.relu6 = nn.ReLU6(inpla...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from torch.quantization import QuantStub from torch.quantization im...
Leslie-Fang/incubator-tvm
Hswish
false
9,291
[ "Apache-2.0" ]
0
aa035f4650926f5e714b02cbab6d974f0a17352f
https://github.com/Leslie-Fang/incubator-tvm/tree/aa035f4650926f5e714b02cbab6d974f0a17352f
resblock
# 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...
AnimeshKoratana/blurryface
resblock
false
50
[ "Apache-2.0" ]
0
c6cb5feec02f6d5af3acb1678336800390715d65
https://github.com/AnimeshKoratana/blurryface/tree/c6cb5feec02f6d5af3acb1678336800390715d65
SimpleEmbed
# 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...
rainwangphy/AutoDL-Projects
SimpleEmbed
false
16,308
[ "MIT" ]
923
1a40948255ac3c16ee529d94144a39bf26e89bfa
https://github.com/rainwangphy/AutoDL-Projects/tree/1a40948255ac3c16ee529d94144a39bf26e89bfa
GSAHelper
# 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....
VKCOM/TopicsDataset
GSAHelper
false
5,925
[ "MIT" ]
1
149919321ba61a8f17b22f62f60f4aedec43d72b
https://github.com/VKCOM/TopicsDataset/tree/149919321ba61a8f17b22f62f60f4aedec43d72b
stack_pool
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
ahhaa/crowdcount-stackpool
stack_pool
false
6,133
[ "MIT" ]
1
b849b72e88d5e53a9f6b5dbc93014668aee43fb4
https://github.com/ahhaa/crowdcount-stackpool/tree/b849b72e88d5e53a9f6b5dbc93014668aee43fb4
RefineModelReLU
# 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_...
BoyuanChen/neural-state-variables
RefineModelReLU
false
7,854
[ "MIT" ]
17
10483d93ac8c006f3786c434fb57d70d9ab465ec
https://github.com/BoyuanChen/neural-state-variables/tree/10483d93ac8c006f3786c434fb57d70d9ab465ec
Discriminator
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
syuntoku14/flow
Discriminator
false
13,016
[ "MIT" ]
0
3a1157cde31d0b7d6a3cc2f91eef0ec9ea53575e
https://github.com/syuntoku14/flow/tree/3a1157cde31d0b7d6a3cc2f91eef0ec9ea53575e
Model4
import torch from torch import nn class Model4(nn.Module): def __init__(self, input_dim, output_dim, hidden=64): super(Model4, self).__init__() self.fc1 = nn.Linear(input_dim, hidden) self.relu1 = nn.ReLU() self.fc2 = nn.Linear(hidden, hidden) self.relu2 = nn.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 import triton_helpers from torch import nn assert_s...
TonyMTH/Resume-Ranking
Model4
false
9,595
[ "MIT" ]
0
6f560f7219848ddc7ee4bdbfabbd980905af4642
https://github.com/TonyMTH/Resume-Ranking/tree/6f560f7219848ddc7ee4bdbfabbd980905af4642
MSE_cont
import torch import torch.nn as nn class MSE_cont(nn.Module): def __init__(self, theta=1 / 10): super(MSE_cont, self).__init__() self.theta = theta def forward(self, x, labels): loss = (x - labels) ** 2 mask = loss.gt(self.theta).float() loss = loss * mask ret...
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...
Sampson-Lee/SIB-Net
MSE_cont
false
2,824
[ "MIT" ]
0
650399082e9237327fa38168ccfc7d48153a1db5
https://github.com/Sampson-Lee/SIB-Net/tree/650399082e9237327fa38168ccfc7d48153a1db5
MinibatchStdDev
from torch.nn import Module import torch from torch import Tensor from typing import List class MinibatchStdDev(Module): """ Minibatch standard deviation layer for the discriminator Args: group_size: Size of each group into which the batch is split num_new_features: number of additional fe...
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
TwoLayerNet
import torch class TwoLayerNet(torch.nn.Module): def __init__(self, D_in, H, D_out): super(TwoLayerNet, self).__init__() self.linear1 = torch.nn.Linear(D_in, H) self.linear2 = torch.nn.Linear(H, D_out) def forward(self, x): h_relu = self.linear1(x).clamp(min=0) y_pred...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
KentonMurray/ProxGradPytorch
TwoLayerNet
false
8,431
[ "MIT" ]
27
c534a49142ac9ec149ca67de24bb0487fde1607b
https://github.com/KentonMurray/ProxGradPytorch/tree/c534a49142ac9ec149ca67de24bb0487fde1607b
EPE
import torch from torch import nn import torch.utils.cpp_extension class EPE(nn.Module): def __init__(self): super(EPE, self).__init__() def forward(self, flow, gt, loss_mask): loss_map = (flow - gt.detach()) ** 2 loss_map = (loss_map.sum(1, True) + 1e-06) ** 0.5 return loss_...
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.cpp_extension assert_size_stride = torc...
P2Oileen/oh-my-face
EPE
false
15,031
[ "MIT" ]
45
b73cb8ea713205bbf2bc1408145fa668c715359b
https://github.com/P2Oileen/oh-my-face/tree/b73cb8ea713205bbf2bc1408145fa668c715359b
EncoderImageWeightNormPrecomp
import torch from collections import OrderedDict import torch.nn as nn import torch.nn.init from torch.nn.utils.weight_norm import weight_norm def l2norm(X, dim, eps=1e-08): """L2-normalize columns of X """ norm = torch.pow(X, 2).sum(dim=dim, keepdim=True).sqrt() + eps X = torch.div(X, norm) retur...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 collections im...
devilslot/SCAN
EncoderImageWeightNormPrecomp
false
15,177
[ "Apache-2.0" ]
428
01812aa98e2ebe39695c8906589b6fe66b2a0d6e
https://github.com/devilslot/SCAN/tree/01812aa98e2ebe39695c8906589b6fe66b2a0d6e
GAB
import torch import torch.nn as nn import torch._utils class GAB(nn.Module): def __init__(self, input_dim, reduction=4): super(GAB, self).__init__() self.global_avgpool = nn.AdaptiveAvgPool2d(1) self.conv1 = nn.Conv2d(input_dim, input_dim // reduction, kernel_size=1, stride=1)...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
Bhaskers-Blu-Org2/seismic-deeplearning
GAB
false
158
[ "MIT" ]
0
15d45fb8c9cef463fd01fae2e087ba62c98cb799
https://github.com/Bhaskers-Blu-Org2/seismic-deeplearning/tree/15d45fb8c9cef463fd01fae2e087ba62c98cb799
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 import numpy as np import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
HuXiao-THU/Crane-Group-Control
Critic
false
570
[ "MIT" ]
0
ea71bc9b1e3957fd755312ceb52bda1be8244f5a
https://github.com/HuXiao-THU/Crane-Group-Control/tree/ea71bc9b1e3957fd755312ceb52bda1be8244f5a
DiceLoss
# 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.optim assert_size_stride = torch._C._dynamo.guards.ass...
Bobholamovic/SimpleCV
DiceLoss
false
7,798
[ "MIT" ]
44
f4edacf088d0155725a469e227de847820bdfa53
https://github.com/Bobholamovic/SimpleCV/tree/f4edacf088d0155725a469e227de847820bdfa53
ResidualAttentionBlock
# 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....
Jinsu-L/KELIP
ResidualAttentionBlock
false
5,426
[ "Apache-2.0" ]
1
d3261cbb9ba3c3ad474dd560a5add8b69ed78477
https://github.com/Jinsu-L/KELIP/tree/d3261cbb9ba3c3ad474dd560a5add8b69ed78477
PixelNormLayer
# 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_...
ferngonzalezp/turbulence-GAN
PixelNormLayer
false
6,688
[ "MIT" ]
1
a215a3c5af2dc9a723f95c344e295ecc08954f26
https://github.com/ferngonzalezp/turbulence-GAN/tree/a215a3c5af2dc9a723f95c344e295ecc08954f26
BMNLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch from torch import device import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_ma...
Alexis-Fab/mmaction2
BMNLoss
false
11,226
[ "Apache-2.0" ]
0
6f76bb465a7164f907318cf58f77fc3d613f8f0f
https://github.com/Alexis-Fab/mmaction2/tree/6f76bb465a7164f907318cf58f77fc3d613f8f0f
BertSelfOutput
from _paritybench_helpers import _mock_config import torch import torch.nn as nn import torch.utils.checkpoint class BertSelfOutput(nn.Module): def __init__(self, config, twin=False, merge=False): super().__init__() self.LayerNorm = nn.LayerNorm(config.hidden_size, eps=config. layer_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.triton_helpers import libdevice import torch.nn as ...
christophschuhmann/BLIP
BertSelfOutput
false
12,218
[ "BSD-3-Clause" ]
0
498f963762db65e7290eea02573e1749f955b3d0
https://github.com/christophschuhmann/BLIP/tree/498f963762db65e7290eea02573e1749f955b3d0
GlobalAvgPool2d
import torch import torch.nn as nn import torch.utils class GlobalAvgPool2d(nn.Module): def __init__(self): """Global average pooling over the input's spatial dimensions""" super(GlobalAvgPool2d, self).__init__() def forward(self, inputs): in_size = inputs.size() inputs = inp...
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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dyna...
songzijiang/FasterSeg
GlobalAvgPool2d
false
16,484
[ "MIT" ]
334
1a14ef6dd665afd229a16ab43b532b5a406512f8
https://github.com/songzijiang/FasterSeg/tree/1a14ef6dd665afd229a16ab43b532b5a406512f8
JointsMSELossNoReduction
# 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 import torch.utils.data.distributed assert_size_st...
NiteshBharadwaj/ignoringhumanpose
JointsMSELossNoReduction
false
920
[ "MIT" ]
0
1fb7a063fded9cff18f7de4e1d71845983077256
https://github.com/NiteshBharadwaj/ignoringhumanpose/tree/1fb7a063fded9cff18f7de4e1d71845983077256
GlobalAvgPool2d
# 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...
Anikily/CDinkNet
GlobalAvgPool2d
false
16,908
[ "MIT" ]
4
490736855475a51bb2984412e88ac7d50d817a3c
https://github.com/Anikily/CDinkNet/tree/490736855475a51bb2984412e88ac7d50d817a3c
AffineChannel2d
# 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.utils.data from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._...
BUPT-PRIV/detectron2
AffineChannel2d
false
11,227
[ "Apache-2.0" ]
0
3163664cd5f43d50ea1966f410dc82410b9ccbf4
https://github.com/BUPT-PRIV/detectron2/tree/3163664cd5f43d50ea1966f410dc82410b9ccbf4
EncoderImageWeightNormPrecomp
import torch from collections import OrderedDict import torch.nn as nn import torch.nn.init from torch.nn.utils.weight_norm import weight_norm def l2norm(X, dim, eps=1e-08): """L2-normalize columns of X """ norm = torch.pow(X, 2).sum(dim=dim, keepdim=True).sqrt() + eps X = torch.div(X, norm) retur...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 collections im...
Ballester/SCAN
EncoderImageWeightNormPrecomp
false
2,019
[ "Apache-2.0" ]
0
4a003f60d3e45e5dd16969745e4b182fe705e758
https://github.com/Ballester/SCAN/tree/4a003f60d3e45e5dd16969745e4b182fe705e758
GatedConv1d
# 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 assert_size_stride = torch._C._dynamo.guar...
EmilSkaaning/DeepStruc
GatedConv1d
false
8,047
[ "Apache-2.0" ]
11
4de0233caba11523b8f5deead53e1c70c05b346b
https://github.com/EmilSkaaning/DeepStruc/tree/4de0233caba11523b8f5deead53e1c70c05b346b
MeanStdExtractor
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_s...
YangXuanyue/Neural-Unaligned-Phoneme-Sequence-Prediction
MeanStdExtractor
false
18,160
[ "BSD-3-Clause" ]
5
91ef1c95478367f5b421da125f07660cfc9bed98
https://github.com/YangXuanyue/Neural-Unaligned-Phoneme-Sequence-Prediction/tree/91ef1c95478367f5b421da125f07660cfc9bed98
BertPredictionHead
from _paritybench_helpers import _mock_config import math import torch import torch.utils.data import torch.nn as nn import torch import torch.nn.parallel def gelu(x): """Implementation of the gelu activation function. For information: OpenAI GPT"s gelu is slightly different (and gives slightly different ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
IsmaelElsharkawi/new_pororo_repo
BertPredictionHead
false
8,818
[ "MIT" ]
19
4617083b420615b8a3eb0f44d02e4e91a8f407f7
https://github.com/IsmaelElsharkawi/new_pororo_repo/tree/4617083b420615b8a3eb0f44d02e4e91a8f407f7
TotalVariationLoss
# 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...
aksh-ai/image-super-resolution
TotalVariationLoss
false
6,143
[ "MIT" ]
1
b3f2e48707db702dcd57733a8bcbf97ba87bb8a9
https://github.com/aksh-ai/image-super-resolution/tree/b3f2e48707db702dcd57733a8bcbf97ba87bb8a9
PrimaryCaps
import torch import torch.nn as nn class PrimaryCaps(nn.Module): """Creates a primary convolutional capsule layer that outputs a pose matrix and an activation. Note that for computation convenience, pose matrix are stored in first part while the activations are stored in the second part. Arg...
import torch from torch._inductor.select_algorithm import extern_kernels import 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...
yl-1993/Matrix-Capsules-EM-PyTorch
PrimaryCaps
false
16,772
[ "MIT" ]
97
ca4cd7f45a4234ddf49efe9db34c9ff645378437
https://github.com/yl-1993/Matrix-Capsules-EM-PyTorch/tree/ca4cd7f45a4234ddf49efe9db34c9ff645378437
NormalizationLayer
# 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_...
AnetaKaczynska/video-GAN
NormalizationLayer
false
30
[ "BSD-3-Clause" ]
0
e30e54c18265c658a65b1b26b57b4f499b58bfc6
https://github.com/AnetaKaczynska/video-GAN/tree/e30e54c18265c658a65b1b26b57b4f499b58bfc6
ImageEncoderV4
# 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...
KH-Kyle/rmp_nav
ImageEncoderV4
false
8,454
[ "MIT" ]
30
d598fe70664a4cdc0e9b9dd4b52e84aa3de1b551
https://github.com/KH-Kyle/rmp_nav/tree/d598fe70664a4cdc0e9b9dd4b52e84aa3de1b551