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
SelfAttentive
# 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....
OLUWAMUYIWA/sent_analysis
SelfAttentive
false
9,402
[ "MIT" ]
0
16334d9f5f2bad1135763c6e8cbe3d7272237d73
https://github.com/OLUWAMUYIWA/sent_analysis/tree/16334d9f5f2bad1135763c6e8cbe3d7272237d73
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...
DenXX/fvcore
CustomNet
false
2,206
[ "Apache-2.0" ]
0
4b91cf092f4f5d379b2c93398780a3b5755e7179
https://github.com/DenXX/fvcore/tree/4b91cf092f4f5d379b2c93398780a3b5755e7179
FCNet
import torch import torch.nn as nn from torch.nn.utils import weight_norm import torch.utils.data class FCNet(nn.Module): def __init__(self, in_size, out_size, activate=None, drop=0.0): super(FCNet, self).__init__() self.lin = weight_norm(nn.Linear(in_size, out_size), dim=None) self.drop_...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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 ...
KaihuaTang/VQA2.0-Recent-Approachs-2018.pytorch
FCNet
false
13,937
[ "MIT" ]
298
52e1ba5a7f3b88c617115ccc755e2e7868e8de2b
https://github.com/KaihuaTang/VQA2.0-Recent-Approachs-2018.pytorch/tree/52e1ba5a7f3b88c617115ccc755e2e7868e8de2b
ResidualBlockNoBN
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn from to...
cyysc1998/EDVRDarts
ResidualBlockNoBN
false
6,548
[ "MIT" ]
1
201badbc8c6469b519647a8869c3782ebe1176cf
https://github.com/cyysc1998/EDVRDarts/tree/201badbc8c6469b519647a8869c3782ebe1176cf
C3D
# 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_...
gramuah/gui4lola
C3D
false
12,839
[ "MIT" ]
0
6924d681db3b14f9b10a53b115640a749a33e774
https://github.com/gramuah/gui4lola/tree/6924d681db3b14f9b10a53b115640a749a33e774
Encoding
import torch import torch.nn.functional as F import torch.nn as nn import torch._C import torch.serialization class Encoding(nn.Module): """Encoding Layer: a learnable residual encoder. Input is of shape (batch_size, channels, height, width). Output is of shape (batch_size, num_codes, channels). Ar...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
HusterRC/mmsegmentation
Encoding
false
5,325
[ "Apache-2.0" ]
1
c3e4dbc2e06de3f47f75098f76772b4ee7e91e35
https://github.com/HusterRC/mmsegmentation/tree/c3e4dbc2e06de3f47f75098f76772b4ee7e91e35
CnptAttention
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math from torch import nn a...
adonis704/ucas_2021_hc_15
CnptAttention
false
18,225
[ "MIT" ]
6
7308c3b32962ef5430d85ccfcb199ebe40bf4a7f
https://github.com/adonis704/ucas_2021_hc_15/tree/7308c3b32962ef5430d85ccfcb199ebe40bf4a7f
Encoder
import torch import torch.nn as nn import torch.nn.functional as F class Lambda(nn.Module): """An easy way to create a pytorch layer for a simple `func`.""" def __init__(self, func): """create a layer that simply calls `func` with `x`""" super().__init__() self.func = func def fo...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
BHD233/PaddleOCR2Pytorch
Encoder
false
13,377
[ "Apache-2.0" ]
364
f114069b3e2669c6adf0adf9596756205f184c9c
https://github.com/BHD233/PaddleOCR2Pytorch/tree/f114069b3e2669c6adf0adf9596756205f184c9c
AddNorm
import torch import torch.nn.functional as F import torch.nn as nn class TimeDistributedInterpolation(nn.Module): def __init__(self, output_size: 'int', batch_first: 'bool'=False, trainable: 'bool'=False): super().__init__() self.output_size = output_size self.batch_first = 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 import torch.nn.functional as F import torch.nn as nn assert_size_stride = torc...
JustinNeumann/pytorch-forecasting
AddNorm
false
705
[ "MIT" ]
0
4f6e449cb3788b856e66c4283398a5db201aa6ff
https://github.com/JustinNeumann/pytorch-forecasting/tree/4f6e449cb3788b856e66c4283398a5db201aa6ff
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 import functools impor...
AnonSubmission6150/submission6150
DiceLoss
false
8,993
[ "Apache-2.0" ]
0
571633d9a12b4fd7a9546947787fc068966dab04
https://github.com/AnonSubmission6150/submission6150/tree/571633d9a12b4fd7a9546947787fc068966dab04
EdgeGCN
from torch.nn import Module import torch from torch.nn.modules.module import Module import torch.nn as nn class EdgeGCN(Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907 """ def __init__(self, in_features, out_features, include_adj=True, bias=True): super(EdgeGCN, 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.triton_helpers import math as tl_math from torch.nn...
hou-yz/pygcn
EdgeGCN
false
3,629
[ "MIT" ]
0
26195954035c5eaae2d6e086cfec24cad2642f2e
https://github.com/hou-yz/pygcn/tree/26195954035c5eaae2d6e086cfec24cad2642f2e
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.triton_helpers import libdevice import numpy as np ...
rbak/deep-rl-udacity-project-3
Actor
false
12,930
[ "MIT" ]
0
4bf2aec6b0ef27636ebd11dfd4b442554208cffb
https://github.com/rbak/deep-rl-udacity-project-3/tree/4bf2aec6b0ef27636ebd11dfd4b442554208cffb
PositionwiseFeedForward
import torch import torch.nn as nn class PositionwiseFeedForward(nn.Module): """Implements FFN equation.""" def __init__(self, d_model, d_ff, dropout=0.1): super(PositionwiseFeedForward, self).__init__() self.w_1 = nn.Linear(d_model, d_ff) self.w_2 = nn.Linear(d_ff, d_model) s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
Aminah92/saint
PositionwiseFeedForward
false
16,886
[ "MIT" ]
7
e18f5d5d093dce458c7d427eed4a375021c05bb9
https://github.com/Aminah92/saint/tree/e18f5d5d093dce458c7d427eed4a375021c05bb9
Critic
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn import ...
cjlovering/EGG
Critic
false
10,055
[ "MIT" ]
0
cce146e035decbc410e981f8bc7ada32979f3b6d
https://github.com/cjlovering/EGG/tree/cce146e035decbc410e981f8bc7ada32979f3b6d
Conv2dSame
# 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....
ChenFengYe/relightable-nr
Conv2dSame
false
13,465
[ "MIT" ]
105
239a97406f4df01cf5786dcdde58e464395a682d
https://github.com/ChenFengYe/relightable-nr/tree/239a97406f4df01cf5786dcdde58e464395a682d
BinaryParamAdd
# 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 abc import inspect import warnings import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data from typ...
Johnsonms/NNI_master
BinaryParamAdd
false
11,573
[ "MIT" ]
0
e5e5c7aed89cf3189cffe1056464833c15eb54ff
https://github.com/Johnsonms/NNI_master/tree/e5e5c7aed89cf3189cffe1056464833c15eb54ff
AFTSimple
import torch from torch import nn class AFTSimple(nn.Module): def __init__(self, max_seqlen, dim, hidden_dim=64): super().__init__() """ max_seqlen: the maximum number of timesteps (sequence length) to be fed in dim: the embedding dimension of the tokens hidden_dim: the hi...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Datta0/aft-pytorch
AFTSimple
false
2,134
[ "MIT" ]
0
a0ebad01ea6616b00bde319b0c5e63bea467c400
https://github.com/Datta0/aft-pytorch/tree/a0ebad01ea6616b00bde319b0c5e63bea467c400
CoordConvSinAct
# 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 from torch im...
PeterouZh/CIPS-3D
CoordConvSinAct
false
14,162
[ "MIT" ]
308
9b8bfa0fb23f642af042e150ccd70408f9d137c6
https://github.com/PeterouZh/CIPS-3D/tree/9b8bfa0fb23f642af042e150ccd70408f9d137c6
MseCriterion
import torch import torch.nn.functional as F from torch.nn.modules.loss import _Loss from torch.optim.lr_scheduler import * class Criterion(_Loss): def __init__(self, alpha=1.0, name='criterion'): super().__init__() """Alpha is used to weight each loss term """ self.alpha = alpha ...
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.modules.loss import _Loss from torch.optim.lr_scheduler import * assert_siz...
chunhuililili/mt_dnn
MseCriterion
false
10,208
[ "MIT" ]
0
4c6efaf21724c7b8103a05e46b5b44d7b246225e
https://github.com/chunhuililili/mt_dnn/tree/4c6efaf21724c7b8103a05e46b5b44d7b246225e
VectorQuantizer
import torch from torch import nn from torch.nn import functional as F class VectorQuantizer(nn.Module): """ Reference: [1] https://github.com/deepmind/sonnet/blob/v2/sonnet/src/nets/vqvae.py """ def __init__(self, num_embeddings: 'int', embedding_dim: 'int', beta: 'float'=0.25): ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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...
threewisemonkeys-as/PyTorch-VAE
VectorQuantizer
false
4,433
[ "Apache-2.0" ]
0
4ed0fc7581d4792b435134aa9e06d5e35a5db118
https://github.com/threewisemonkeys-as/PyTorch-VAE/tree/4ed0fc7581d4792b435134aa9e06d5e35a5db118
encoder3
# 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....
SofiaValdiviesov/LinearStyleTransfer
encoder3
false
9,678
[ "BSD-2-Clause" ]
0
6837c6a9be16bb5981fa0744e5d23f61d08e6940
https://github.com/SofiaValdiviesov/LinearStyleTransfer/tree/6837c6a9be16bb5981fa0744e5d23f61d08e6940
NoNorm
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn import torch.utils.checkpoint assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
jxhe/unify-parameter-efficient-tuning
NoNorm
false
15,770
[ "Apache-2.0" ]
101
3222ce2c0079566a28043e22380eb4ab6ad14389
https://github.com/jxhe/unify-parameter-efficient-tuning/tree/3222ce2c0079566a28043e22380eb4ab6ad14389
ResidualBlock
import torch import torch.nn as nn class ResidualBlock(nn.Module): def __init__(self, channels): super(ResidualBlock, self).__init__() self.conv1 = nn.Conv2d(channels, channels, kernel_size=3, padding=1) self.in1 = nn.InstanceNorm2d(channels) self.prelu = nn.PReLU() self.c...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
generall/Torchlite
ResidualBlock
false
6,743
[ "MIT" ]
1
2eb3e2a20b7619bd58b0b0fca120e2aefca0e79a
https://github.com/generall/Torchlite/tree/2eb3e2a20b7619bd58b0b0fca120e2aefca0e79a
tofp16
# 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.functional import torch.nn.parallel import torch.utils.data import torch.optim import torch.utils.data...
DeanChan/apex
tofp16
false
9,016
[ "BSD-3-Clause" ]
0
a03267e5e1209f559a6671da56c479a216f418d1
https://github.com/DeanChan/apex/tree/a03267e5e1209f559a6671da56c479a216f418d1
Attention
import torch import torch.nn as nn class Attention(nn.Module): def __init__(self, feature_dim, maxlen=70): super().__init__() self.attention_fc = nn.Linear(feature_dim, 1) self.bias = nn.Parameter(torch.zeros(1, maxlen, 1, requires_grad=True)) def forward(self, rnn_output): "...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math im...
deepframwork/TorchBlocks
Attention
false
6,542
[ "MIT" ]
1
35f6e1bb83d2b9b05ba914a21fd365cb26ac4a32
https://github.com/deepframwork/TorchBlocks/tree/35f6e1bb83d2b9b05ba914a21fd365cb26ac4a32
ResidualBlock
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as ...
jonasvj/protein-generation
ResidualBlock
false
3,776
[ "MIT" ]
0
ad716f2dba6f6642a6d54571571e6f539cee3644
https://github.com/jonasvj/protein-generation/tree/ad716f2dba6f6642a6d54571571e6f539cee3644
BertLayer
from _paritybench_helpers import _mock_config import inspect import math import torch from torch import nn from typing import Callable from typing import List from typing import Set from typing import Tuple def find_pruneable_heads_and_indices(heads: 'List[int]', n_heads: 'int', head_size: 'int', already_pruned_h...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
RyanWangZf/SurvTRACE
BertLayer
false
18,392
[ "MIT" ]
8
d55299a28629d233f49ad1feaea7ed00835f0dd0
https://github.com/RyanWangZf/SurvTRACE/tree/d55299a28629d233f49ad1feaea7ed00835f0dd0
SA_block
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
reinforcementdriving/SA-Det3D
SA_block
false
16,327
[ "MIT" ]
134
682cbf5a3023bd580632435d1e4e0acb0ae08ab8
https://github.com/reinforcementdriving/SA-Det3D/tree/682cbf5a3023bd580632435d1e4e0acb0ae08ab8
HR2O_NL
import torch import torch.nn as nn class HR2O_NL(nn.Module): def __init__(self, hidden_dim=512, kernel_size=3, mlp_1x1=False): super(HR2O_NL, self).__init__() self.hidden_dim = hidden_dim padding = kernel_size // 2 self.conv_q = nn.Conv2d(hidden_dim, hidden_dim, kernel_size, ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
AlexandreDh/ACAR-Net
HR2O_NL
false
13,472
[ "Apache-2.0" ]
162
db28009388512e31cb6ff8e86725dc9b026886b6
https://github.com/AlexandreDh/ACAR-Net/tree/db28009388512e31cb6ff8e86725dc9b026886b6
LinearAdditiveUpsample
import torch import torch.utils.data import torch import torch.nn as nn class LinearAdditiveUpsample(nn.Module): """Bi/Trilinear Additive Upsample Upsampling strategy described in Wojna et al (https://doi.org/10.1007/s11263-019-01170-8) to avoid checkerboard patterns while keeping a better performance fo...
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 import torch.nn as nn assert_size_stride = torch._C....
giuliabaldini/Pix2PixNIfTI
LinearAdditiveUpsample
false
3,544
[ "BSD-3-Clause" ]
0
59ff825760f682d2734bd5e95503a03f80d32414
https://github.com/giuliabaldini/Pix2PixNIfTI/tree/59ff825760f682d2734bd5e95503a03f80d32414
MHA
from _paritybench_helpers import _mock_config import math import torch import torch.nn as nn class MHA(nn.Module): def __init__(self, config): super().__init__() self.num_attention_heads = config.num_attention_heads self.hidden_size = config.hidden_size self.attention_head_size = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
qinyiwei/MuTual
MHA
false
4,168
[ "MIT" ]
0
3bdd13c1388d6136b8944666dfd434870760cc93
https://github.com/qinyiwei/MuTual/tree/3bdd13c1388d6136b8944666dfd434870760cc93
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 import ...
jcolekaplan/computer_vision
Net
false
12,603
[ "MIT" ]
0
48d39b081a7b6b699019052eeae36ab703bb34eb
https://github.com/jcolekaplan/computer_vision/tree/48d39b081a7b6b699019052eeae36ab703bb34eb
BCEDiceLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math from torch ...
ha55anali/pytorch-nested-unet
BCEDiceLoss
false
10,189
[ "MIT" ]
0
444dbd0ff7764478de662723b211c23bd65d99f9
https://github.com/ha55anali/pytorch-nested-unet/tree/444dbd0ff7764478de662723b211c23bd65d99f9
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....
JiangengDong/ECE276C
Actor
false
5,395
[ "MIT" ]
1
2338b5226d6fed8858402e8d67db7f2eead98221
https://github.com/JiangengDong/ECE276C/tree/2338b5226d6fed8858402e8d67db7f2eead98221
TwoHiddenLayerFc
# 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_...
jasonyanglu/fedavgpy
TwoHiddenLayerFc
false
6,927
[ "MIT" ]
1
cefbe5854f02d3df1197d849872286439c86e949
https://github.com/jasonyanglu/fedavgpy/tree/cefbe5854f02d3df1197d849872286439c86e949
PoswiseFeedForwardNet
# 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 ...
bage79/transformer-evolution-bage
PoswiseFeedForwardNet
false
6,315
[ "Apache-2.0" ]
1
715bdf61421dc19e21fb0f66bfa4b564305987f8
https://github.com/bage79/transformer-evolution-bage/tree/715bdf61421dc19e21fb0f66bfa4b564305987f8
TensorMax
import torch def tensor_max(input, dim, keepdim=False): if isinstance(dim, int): return torch.max(input, dim=dim, keepdim=keepdim)[0] else: if isinstance(dim, tuple): dim = list(dim) for d in dim: input = torch.max(input, dim=d, keepdim=keepdim)[0] retur...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
Minyus/kedex
TensorMax
false
9,692
[ "Apache-2.0" ]
0
92f952eed3cb6109bc783f449051f2bd13579d2a
https://github.com/Minyus/kedex/tree/92f952eed3cb6109bc783f449051f2bd13579d2a
orientation_neuron
# 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...
AgamChopra/simulation-in-a-box
orientation_neuron
false
11,173
[ "MIT" ]
0
2a346a2fc83d79e542b64f1bd45c338d27a1934d
https://github.com/AgamChopra/simulation-in-a-box/tree/2a346a2fc83d79e542b64f1bd45c338d27a1934d
moving_avg
# 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...
MAZiqing/FEDformer
moving_avg
false
17,649
[ "MIT" ]
7
7914d39df829494a8172afb9676982c3789d491d
https://github.com/MAZiqing/FEDformer/tree/7914d39df829494a8172afb9676982c3789d491d
FeedForwardNeuralNetModel
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn assert_size_stride = torch._C._dynamo.guards.assert_size_st...
Hedingber/demos
FeedForwardNeuralNetModel
false
13,776
[ "Apache-2.0" ]
64
6d1433ada6d44166cfcd11646276f2fffeff2fc0
https://github.com/Hedingber/demos/tree/6d1433ada6d44166cfcd11646276f2fffeff2fc0
DPLSTMCell
import math import torch import torch.nn as nn import torch.utils.data import torch.utils.data.distributed import torch.nn.parallel from typing import Tuple class LSTMLinear(nn.Linear): """ This function is the same as a nn.Linear layer, except that in the backward pass the grad_samples get accumulated (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._inductor.runtime.triton_helpers import libdevice import math import ...
madhavajay/opacus
DPLSTMCell
false
10,482
[ "Apache-2.0" ]
0
7ae098764b4cf2388c66e263dd8d56bca0a290d0
https://github.com/madhavajay/opacus/tree/7ae098764b4cf2388c66e263dd8d56bca0a290d0
TestModel
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn import torch.fx assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo....
NVIDIA/Torch-TensorRT
TestModel
false
14,086
[ "BSD-3-Clause" ]
430
1a22204fecec690bc3c2a318dab4f57b98c57f05
https://github.com/NVIDIA/Torch-TensorRT/tree/1a22204fecec690bc3c2a318dab4f57b98c57f05
DistanceWiseRKD
import torch from torch import nn import torch.nn.functional as F def euclidean_distance(pred, squared=False, eps=1e-12): """Calculate the Euclidean distance between the two examples in the output representation space. Args: pred (torch.Tensor): The prediction of the teacher or student with ...
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 import ...
HIT-cwh/mmrazor
DistanceWiseRKD
false
13,742
[ "Apache-2.0" ]
553
2dad24044d7f1dad88f20221f8fc071dd40fdd4f
https://github.com/HIT-cwh/mmrazor/tree/2dad24044d7f1dad88f20221f8fc071dd40fdd4f
MultiHeadAttention
import math import torch import torch.nn as nn import torch.nn.functional as F def attention(q, k, v, d_k, mask=None, dropout=None): scores = torch.matmul(q, k.transpose(-2, -1)) / math.sqrt(d_k) if mask is not None: mask = mask.unsqueeze(1) scores = scores.masked_fill(mask == 0, -1000000000.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 from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
AviVarma/torchASN-Transformer
MultiHeadAttention
false
107
[ "MIT" ]
0
55bccf4cdb099cd8e9ac99f5f87f989ce2add983
https://github.com/AviVarma/torchASN-Transformer/tree/55bccf4cdb099cd8e9ac99f5f87f989ce2add983
EuclideanDistance
import torch import torch as th import torch.nn as nn class EuclideanDistance(nn.Module): def __init__(self): super(EuclideanDistance, self).__init__() self.m = nn.Sigmoid() def forward(self, i, j): i_norm = self.m(i) j_norm = self.m(j) return th.sqrt(th.sum((i_norm -...
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_...
IBM/aihn-ucsd
EuclideanDistance
false
8,281
[ "Apache-2.0" ]
20
6c6a56d11c704b529a31868418e350e9760ff9d9
https://github.com/IBM/aihn-ucsd/tree/6c6a56d11c704b529a31868418e350e9760ff9d9
Decoder3
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
MingSun-Tse/Collaborative-Distillation
Decoder3
false
14,030
[ "MIT" ]
172
915712674af82ff91d926d922c14988cce0430f3
https://github.com/MingSun-Tse/Collaborative-Distillation/tree/915712674af82ff91d926d922c14988cce0430f3
PLU
import torch import torch.nn as nn class PLU(nn.Module): def __init__(self): super(PLU, self).__init__() self.w1 = torch.nn.Parameter(torch.ones(1)) self.w2 = torch.nn.Parameter(torch.ones(1)) def forward(self, x): return self.w1 * torch.max(x, torch.zeros_like(x) ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride emp...
craigxchen/Reinforcement-Learning-Function-Approximation
PLU
false
6,486
[ "MIT" ]
1
09c4df1dd44c6a76a3f574bebc959a19b141f3fe
https://github.com/craigxchen/Reinforcement-Learning-Function-Approximation/tree/09c4df1dd44c6a76a3f574bebc959a19b141f3fe
StableBCELoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = t...
GenoM87/hubmap
StableBCELoss
false
2,273
[ "MIT" ]
0
4acd11c373c6bb136ea9c6627a174ff02afa5986
https://github.com/GenoM87/hubmap/tree/4acd11c373c6bb136ea9c6627a174ff02afa5986
par_start_encoder
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch import 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynam...
GerbenBeintema/deepSI
par_start_encoder
false
8,205
[ "BSD-3-Clause" ]
12
580711210398064bb7f01e41d08b7a248a88b35b
https://github.com/GerbenBeintema/deepSI/tree/580711210398064bb7f01e41d08b7a248a88b35b
GaussionConvD
import torch import torch.nn.functional as F import torch.nn as nn class GaussionConvD(nn.Module): """The subsequent layer in `RobustGCN` that takes node distribution (mean, var) as input""" def __init__(self, in_features, out_features, bias=False, gamma=1.0): super().__init__() self.in_featu...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
EdisonLeeeee/Graphgallery
GaussionConvD
false
5,105
[ "MIT" ]
1
8ae9ef57d44f073d0ceaf3f33a3a998546f960a8
https://github.com/EdisonLeeeee/Graphgallery/tree/8ae9ef57d44f073d0ceaf3f33a3a998546f960a8
KeyValueAttention
import torch import torch.nn as nn from torch.autograd import Variable import torch.nn.functional as F import torch.utils.data import torch.nn.init class KeyValueAttention(nn.Module): def __init__(self, query_size, key_size, value_size, hid_size, init_range): super(KeyValueAttention, 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....
msft-shahins/ConvLab-2
KeyValueAttention
false
12,818
[ "Apache-2.0" ]
0
ad74c0e9e021916f9330af11e046ed72914b7740
https://github.com/msft-shahins/ConvLab-2/tree/ad74c0e9e021916f9330af11e046ed72914b7740
MyLinear
import torch from torch import nn from torch.nn import functional as F import torchvision.transforms.functional as F import torch.nn.functional as F class MyLinear(nn.Module): """Linear layer with equalized learning rate and custom learning rate multiplier.""" def __init__(self, input_size, output_size, gain...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import 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...
AnimeshKoratana/blurryface
MyLinear
false
601
[ "Apache-2.0" ]
0
c6cb5feec02f6d5af3acb1678336800390715d65
https://github.com/AnimeshKoratana/blurryface/tree/c6cb5feec02f6d5af3acb1678336800390715d65
CopyChannels
import torch class CopyChannels(torch.nn.Module): def __init__(self, multiple=3, dim=1): super(CopyChannels, self).__init__() self.multiple = multiple self.dim = dim def forward(self, x): return torch.cat([x for _ in range(self.multiple)], dim=self.dim) 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 assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda reinterpret...
NehzUx/autodl
CopyChannels
false
8,578
[ "Apache-2.0" ]
25
c80fdc4b297ed1ec2b9e6911d313f1fe31d83cb9
https://github.com/NehzUx/autodl/tree/c80fdc4b297ed1ec2b9e6911d313f1fe31d83cb9
BertAttention
from _paritybench_helpers import _mock_config import math import torch from torch import nn class BertLayerNorm(nn.Module): """ LayerNorm层 """ def __init__(self, hidden_size, eps=1e-12): super(BertLayerNorm, self).__init__() self.gamma = nn.Parameter(torch.ones(hidden_size)) s...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
kalanile/JDQA
BertAttention
false
7,017
[ "MIT" ]
1
68e1d0259d316b3577a1f2fafa773b50f1885762
https://github.com/kalanile/JDQA/tree/68e1d0259d316b3577a1f2fafa773b50f1885762
VAE
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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...
zyzisyz/torch-practice
VAE
false
4,684
[ "Apache-2.0" ]
0
92f2b7f1a01bbabd1a2cf2a4dd9099a0eeb9cf00
https://github.com/zyzisyz/torch-practice/tree/92f2b7f1a01bbabd1a2cf2a4dd9099a0eeb9cf00
ResBlock1D
import torch import torch.nn as nn import torch.nn.functional as F class ResBlock1D(nn.Module): def __init__(self, inplanes, planes, seq_len, stride=1, downsample=None): super(ResBlock1D, self).__init__() self.conv1 = nn.Conv1d(inplanes, planes, kernel_size=3, stride= stride, padding=...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
liuruoze/mini-AlphaStar
ResBlock1D
false
15,933
[ "Apache-2.0" ]
108
cf9de2507d526a5fb8ef67676aab2ffb92738640
https://github.com/liuruoze/mini-AlphaStar/tree/cf9de2507d526a5fb8ef67676aab2ffb92738640
DRS
import torch import torch.nn as nn class DRS(nn.Module): """ DRS non-learnable setting hyperparameter O , additional training paramters X """ def __init__(self, delta): super(DRS, self).__init__() self.relu = nn.ReLU() self.delta = delta self.global_max_pool = nn....
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...
manideep1108/DRS
DRS
false
15,991
[ "MIT" ]
62
0858c3ffea310e9d504b7c2b06db5f281273df56
https://github.com/manideep1108/DRS/tree/0858c3ffea310e9d504b7c2b06db5f281273df56
Actor
import torch import torch.nn as nn import torch.nn.functional as F class Actor(nn.Module): def __init__(self, obs_dim, action_dim): super(Actor, self).__init__() self.obs_dim = obs_dim self.action_dim = action_dim self.linear1 = nn.Linear(self.obs_dim, 512) self.linear2 = ...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
AYUSHKABIRVERMA/Multi-agent-reinforcement-learning
Actor
false
13,247
[ "MIT" ]
62
cd7c13d723cd74dc278939d81d5dd1b0906cee7c
https://github.com/AYUSHKABIRVERMA/Multi-agent-reinforcement-learning/tree/cd7c13d723cd74dc278939d81d5dd1b0906cee7c
IdentityPadding
import torch import torch.nn as nn import torch.utils.data.distributed import torch.nn.functional as F class IdentityPadding(nn.Module): def __init__(self, in_channels, out_channels, stride=1): super(IdentityPadding, self).__init__() if stride == 2: self.pooling = nn.AvgPool2d(kernel_...
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.distributed assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda...
Crisescode/Distributed-DL-Example
IdentityPadding
false
7,908
[ "Apache-2.0" ]
19
a7ff2b4a6c07a126c30eaa886cc6e8cd02a83949
https://github.com/Crisescode/Distributed-DL-Example/tree/a7ff2b4a6c07a126c30eaa886cc6e8cd02a83949
FixedSubnetConv
import math import torch import torch.multiprocessing import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import torch.nn.functional as F class FixedSubnetConv(nn.Conv2d): def __init__(self, *args, **kwargs): super().__init__(*args...
import torch from torch._inductor.select_algorithm import extern_kernels import 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.multiprocessing import torch.nn as nn import torch.nn.p...
adityakusupati/LLC-2.0
FixedSubnetConv
false
18,218
[ "MIT" ]
10
38608bbaa425b15dcf5c971000b7a1b08120fb5c
https://github.com/adityakusupati/LLC-2.0/tree/38608bbaa425b15dcf5c971000b7a1b08120fb5c
Route
import torch import torch.nn as nn class Route(nn.Module): def __init__(self): super(Route, self).__init__() def forward(self, x1, x2): """ x1 means previous output; x2 means current output """ out = torch.cat((x2, x1), dim=1) return out 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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
CV-YYDS/YOLOv3
Route
false
11,275
[ "MIT" ]
0
a433064721dfc932509aaed6cb44a785b24bc768
https://github.com/CV-YYDS/YOLOv3/tree/a433064721dfc932509aaed6cb44a785b24bc768
Ceil
import torch import torch.onnx import torch.nn as nn class Ceil(nn.Module): def forward(self, x): return torch.ceil(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 import torch.onnx import torch.nn as nn assert_size_stride = torch._C._dynamo.g...
mil-tokyo/webdnn
Ceil
false
16,060
[ "MIT" ]
1,967
38a60fd3e1a4e72bc01108189a3aa51e0752aecd
https://github.com/mil-tokyo/webdnn/tree/38a60fd3e1a4e72bc01108189a3aa51e0752aecd
IndexedSegmentationMap
import torch import torch.nn as nn class IndexedSegmentationMap(nn.Module): """ Takes the raw logits from the n-channel output convolution and uses argmax to convert to an indexed output map. """ def __init__(self): super().__init__() def forward(self, x: 'torch.Tensor') ->torch.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 import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torch._C._dynamo.guards._empty_st...
HalestormAI/efficientnet-unet
IndexedSegmentationMap
false
2,336
[ "MIT" ]
0
b6d5ec86d667ce7ac1f689bc16269dca83a079f0
https://github.com/HalestormAI/efficientnet-unet/tree/b6d5ec86d667ce7ac1f689bc16269dca83a079f0
BinaryDiceLoss
# 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...
cnuzh/CSNet
BinaryDiceLoss
false
6,463
[ "MIT" ]
1
a6c3163624f55dc294ec2e5a6de020d77bd4ff91
https://github.com/cnuzh/CSNet/tree/a6c3163624f55dc294ec2e5a6de020d77bd4ff91
FocalLoss
import torch import torch.nn as nn class FocalLoss(nn.Module): """ Softmax and sigmoid focal loss. copy from https://github.com/lonePatient/TorchBlocks """ def __init__(self, num_labels, activation_type='softmax', gamma=2.0, alpha=0.25, epsilon=1e-09): super(FocalLoss, self).__ini...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
gitabtion/BertBasedCscModels
FocalLoss
false
15,449
[ "Apache-2.0" ]
158
1daf505d109c5922eeedb6674edbb1b73db21e45
https://github.com/gitabtion/BertBasedCscModels/tree/1daf505d109c5922eeedb6674edbb1b73db21e45
rec_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....
gzerveas/TransformChrome
rec_attention
false
6,784
[ "MIT" ]
1
ab1046009aff2ec863aa65223dcfcd750d41ab86
https://github.com/gzerveas/TransformChrome/tree/ab1046009aff2ec863aa65223dcfcd750d41ab86
ConvRelu
# 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...
jmargutt/automated-building-detection
ConvRelu
false
15,714
[ "MIT" ]
48
e1668a470b94252040f27d26098826c293fbb46d
https://github.com/jmargutt/automated-building-detection/tree/e1668a470b94252040f27d26098826c293fbb46d
TransformerDecoderLayer
import torch import torch.nn as nn import torch.nn.functional as F def _get_activation_fn(activation): if activation == 'relu': return F.relu elif activation == 'gelu': return F.gelu raise RuntimeError('activation should be relu/gelu, not {}'.format( activation)) class DotProduct...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
amazon-research/long-short-term-transformer
TransformerDecoderLayer
false
14,847
[ "Apache-2.0" ]
52
a425be4b52ab68fddd85c91d26571e4cdfe8379a
https://github.com/amazon-research/long-short-term-transformer/tree/a425be4b52ab68fddd85c91d26571e4cdfe8379a
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....
Lttcc/Olympics
Actor
false
791
[ "MIT" ]
0
97411244073d127e83e84bf61b1b0a1d6718c31c
https://github.com/Lttcc/Olympics/tree/97411244073d127e83e84bf61b1b0a1d6718c31c
FocalLoss
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
AnassBenBouazza/Project-calibration-temperature_scaling
FocalLoss
false
13,263
[ "MIT" ]
724
cf96350f5e4349404fa092a97a71baf2bb7686ec
https://github.com/AnassBenBouazza/Project-calibration-temperature_scaling/tree/cf96350f5e4349404fa092a97a71baf2bb7686ec
PositionwiseFeedForward
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math import ...
EddieMG/LateTemporalModeling3DCNN
PositionwiseFeedForward
false
2,285
[ "MIT" ]
0
94c87dc1d31d09bc310d0e735a2e55453976cb0d
https://github.com/EddieMG/LateTemporalModeling3DCNN/tree/94c87dc1d31d09bc310d0e735a2e55453976cb0d
StoppingNetwork
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch import device from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers impo...
bennzo/DT-RAM-PyTorch
StoppingNetwork
false
1,535
[ "MIT" ]
0
b364662ab7650ffd26cf129673752521e004b13a
https://github.com/bennzo/DT-RAM-PyTorch/tree/b364662ab7650ffd26cf129673752521e004b13a
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....
dashstander/glide-text2im
MultiheadAttention
false
1,806
[ "MIT" ]
0
58f03a871ee0567e27fccc40df98203e675a9b8e
https://github.com/dashstander/glide-text2im/tree/58f03a871ee0567e27fccc40df98203e675a9b8e
interaction
import torch import torch.nn as nn class interaction(nn.Module): def __init__(self, conf): super().__init__() def forward(self, p, h): p = p.unsqueeze(2) h = h.unsqueeze(1) return p * h def get_inputs(): return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])] def ...
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...
aditya140/NoveltyDetectionResearch
interaction
false
6,078
[ "MIT" ]
1
f9b27e6e8d9c23f85d4d91241ee5d050ecd6b6ef
https://github.com/aditya140/NoveltyDetectionResearch/tree/f9b27e6e8d9c23f85d4d91241ee5d050ecd6b6ef
FeedForward
# 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_...
AviVarma/torchASN-Transformer
FeedForward
false
88
[ "MIT" ]
0
55bccf4cdb099cd8e9ac99f5f87f989ce2add983
https://github.com/AviVarma/torchASN-Transformer/tree/55bccf4cdb099cd8e9ac99f5f87f989ce2add983
TensorLog
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import math as tl_math assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_str...
Minyus/pipelinex
TensorLog
false
14,038
[ "Apache-2.0" ]
188
f35c524ec9c50751ee27d9a42d98317e16f1c544
https://github.com/Minyus/pipelinex/tree/f35c524ec9c50751ee27d9a42d98317e16f1c544
classifier
import torch import torch.nn as nn import torch.nn.functional as F class classifier(nn.Module): def __init__(self, ef_dim, z_dim, class_num, voxel_size): super(classifier, self).__init__() self.ef_dim = ef_dim self.z_dim = z_dim self.class_num = class_num self.voxel_size =...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
czq142857/DECOR-GAN
classifier
false
15,118
[ "MIT" ]
55
79c80fc202b8af982989a3e3bb3afe85e606b71f
https://github.com/czq142857/DECOR-GAN/tree/79c80fc202b8af982989a3e3bb3afe85e606b71f
LanguageModelCriterion
# AOT ID: ['0_inference'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _al...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream import torch.nn as nn from torch.autograd import * assert_size_stride = torch._C._dynamo.guards.assert_size_stride empty_strided_cuda = torc...
anonymous2021hello/transformer-cil
LanguageModelCriterion
false
3,117
[ "MIT" ]
0
aed4017b61afaf4d9d21d40a078eefb4c7031cd1
https://github.com/anonymous2021hello/transformer-cil/tree/aed4017b61afaf4d9d21d40a078eefb4c7031cd1
PositionWiseFeedForward
import torch import torch.nn as nn import torch.nn.init as init class LayerNorm(nn.Module): def __init__(self, d_hid, eps=1e-06): super(LayerNorm, self).__init__() self.gamma = nn.Parameter(torch.ones(d_hid)) self.beta = nn.Parameter(torch.zeros(d_hid)) self.eps = eps def for...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from 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....
Lhx94As/PHO-LID
PositionWiseFeedForward
false
5,540
[ "MIT" ]
1
44843b25b977dd6e0b77b520dbe3f2ff1ea633cd
https://github.com/Lhx94As/PHO-LID/tree/44843b25b977dd6e0b77b520dbe3f2ff1ea633cd
MedianPool2d
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.modules.utils import _pair from torch.nn.modules.utils import _quadruple class MedianPool2d(nn.Module): """ Median pool (usable as median filter when stride=1) module. Args: kernel_size: size of pooling kernel, 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._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn from torch.nn.modules.utils import _pair from torch...
Zhang-Jack/adversarial_yolo2
MedianPool2d
false
18,193
[ "MIT" ]
8
91c2a4793047f656482cebf0309984db823e8030
https://github.com/Zhang-Jack/adversarial_yolo2/tree/91c2a4793047f656482cebf0309984db823e8030
SageLayer
# 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_...
HKUST-KnowComp/CSKB-Population
SageLayer
false
8,164
[ "MIT" ]
13
7b1b2d25fbd0095b0cf009b933cfd5a62feadd58
https://github.com/HKUST-KnowComp/CSKB-Population/tree/7b1b2d25fbd0095b0cf009b933cfd5a62feadd58
WasLoss
import torch import torch.nn as nn class WasLoss(nn.Module): def __init__(self): super(WasLoss, self).__init__() self.MSEls = torch.nn.BCEWithLogitsLoss() def forward(self, true_data, fake_data): SLX, _ = torch.sort(true_data, 0) SLG, _ = torch.sort(fake_data, 0) retu...
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...
Johnson-yue/RS-GAN
WasLoss
false
8,372
[ "MIT" ]
26
8e8723045d63d8f9a4b510800cd909e7a6e3d195
https://github.com/Johnson-yue/RS-GAN/tree/8e8723045d63d8f9a4b510800cd909e7a6e3d195
LinearWithConstraint
# 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 ...
jiuney/XAI606-EEGNet
LinearWithConstraint
false
6,967
[ "MIT" ]
1
45ff28630ed1b09d0853f2cfb148a5dd2693e5ab
https://github.com/jiuney/XAI606-EEGNet/tree/45ff28630ed1b09d0853f2cfb148a5dd2693e5ab
CReLU_IN
import torch import torch.nn as nn import torch.nn.functional as F class CReLU_IN(nn.Module): def __init__(self, channels): super(CReLU_IN, self).__init__() self.bn = nn.InstanceNorm2d(channels * 2, eps=1e-05, momentum=0.1, affine=True) def forward(self, x): cat = torch.c...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import torch.nn as nn assert_size_stride = torch._C._dynamo.guards.assert_size_...
cnzeki/PSENet
CReLU_IN
false
3,305
[ "Apache-2.0" ]
0
c7e0785404e12866171e9da678736abae9cdb8cb
https://github.com/cnzeki/PSENet/tree/c7e0785404e12866171e9da678736abae9cdb8cb
ContextGate
# 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.cuda assert_size_stride = torch._C._dynamo.gu...
AndrewM1998/MultimodalNMT
ContextGate
false
7,718
[ "MIT" ]
40
b66d3a40ac9bc5c11ae124f51d1a9abf7cd6a04b
https://github.com/AndrewM1998/MultimodalNMT/tree/b66d3a40ac9bc5c11ae124f51d1a9abf7cd6a04b
Expand
# 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...
Aditya239233/MDP
Expand
false
16,906
[ "MIT" ]
4
87491e1d67e547c11f4bdd5d784d120473429eae
https://github.com/Aditya239233/MDP/tree/87491e1d67e547c11f4bdd5d784d120473429eae
NetVLAD
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime....
ByungHeeCha/visual_localization
NetVLAD
false
17,431
[ "BSD-3-Clause" ]
3
787fb8f6ee5c6e69ece9e83a016d15596e5524bc
https://github.com/ByungHeeCha/visual_localization/tree/787fb8f6ee5c6e69ece9e83a016d15596e5524bc
RSoftmax
import torch import torch.nn as nn import torch.nn.functional as F class RSoftmax(nn.Module): """Radix Softmax module in ``SplitAttentionConv2d``. Args: radix (int): Radix of input. groups (int): Groups of input. """ def __init__(self, radix, groups): super().__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 import triton_helpers from torch._inductor.runtime.triton_helpers import math as tl_math import torch.nn as nn ...
David-19940718/mmclassification
RSoftmax
false
5,050
[ "Apache-2.0" ]
1
987dd45457e38c4787237ea468799849dce11ada
https://github.com/David-19940718/mmclassification/tree/987dd45457e38c4787237ea468799849dce11ada
DQN
# 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_...
arifmujib/MIT-Machine-Learning-Projects
DQN
false
9,728
[ "MIT" ]
0
445f2dddf4441bf8248166e6eb15a0716444ab21
https://github.com/arifmujib/MIT-Machine-Learning-Projects/tree/445f2dddf4441bf8248166e6eb15a0716444ab21
CrossEntropyLoss
import torch import torch.utils.cpp_extension class CrossEntropyLoss(torch.nn.Module): def __init__(self): super(CrossEntropyLoss, self).__init__() self.ce_loss = torch.nn.CrossEntropyLoss() def forward(self, cls_output, label, **_): return self.ce_loss(cls_output, label).mean() de...
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.cpp...
hugobloem/PyTorch-StudioGAN
CrossEntropyLoss
false
12,668
[ "MIT" ]
0
3deab27c0774adba5a94c7f452d32d4cbc3b117c
https://github.com/hugobloem/PyTorch-StudioGAN/tree/3deab27c0774adba5a94c7f452d32d4cbc3b117c
MLPAttention
# 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....
Nickeilf/pysimt
MLPAttention
false
9,503
[ "MIT" ]
0
05c8de92d0e2b930e40939ad3695d8d2c2954dda
https://github.com/Nickeilf/pysimt/tree/05c8de92d0e2b930e40939ad3695d8d2c2954dda
ChannelReplicate
import torch import torch.nn as nn class ChannelReplicate(nn.Module): def __init__(self, factor=3): super(ChannelReplicate, self).__init__() self.factor = factor def forward(self, input): template = input for i in range(0, self.factor - 1): input = torch.cat((temp...
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...
YingqiLiulll/scrips_for_SR
ChannelReplicate
false
1,250
[ "MIT" ]
0
04fa6fdaf157e913d3e2521cd80315a10a2ccedc
https://github.com/YingqiLiulll/scrips_for_SR/tree/04fa6fdaf157e913d3e2521cd80315a10a2ccedc
LayerNorm
import math import torch from torch import Tensor import torch.nn as nn from torch.nn import Parameter from torch.autograd import Variable class LayerNorm(nn.Module): """ Layer Normalization based on Ba & al.: 'Layer Normalization' https://arxiv.org/pdf/1607.06450.pdf """ def __init__(self, i...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime.triton_helpers import libdevice import math from torch import Tensor import torch.nn as nn from torch.nn import...
alex-kj-chin/universal-computation
LayerNorm
false
12,076
[ "MIT" ]
0
a41cc7d685a3e0c56c11bc346c25394464da2e06
https://github.com/alex-kj-chin/universal-computation/tree/a41cc7d685a3e0c56c11bc346c25394464da2e06
MyNeural
# 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 assert_size_s...
med-boubekri/Covid-Fact-Checker
MyNeural
false
12,774
[ "MIT" ]
0
7869bcd830f33aefe4afeb5b75808f479e8094f2
https://github.com/med-boubekri/Covid-Fact-Checker/tree/7869bcd830f33aefe4afeb5b75808f479e8094f2
GatedFusion
# 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...
qinyan-li/DocEE
GatedFusion
false
7,516
[ "MIT" ]
1
e8d2202a44907df5f12f9a67180d849a54421ab7
https://github.com/qinyan-li/DocEE/tree/e8d2202a44907df5f12f9a67180d849a54421ab7
SAC
# 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....
Luoxd1996/SCPM-Net
SAC
false
8,487
[ "MIT" ]
26
2039ea5253ec831dcae79c2f0caa6e5d2641a1f9
https://github.com/Luoxd1996/SCPM-Net/tree/2039ea5253ec831dcae79c2f0caa6e5d2641a1f9
BartClassificationHead
import torch from torch import nn import torch.utils.checkpoint class BartClassificationHead(nn.Module): """Head for sentence-level classification tasks.""" def __init__(self, input_dim: 'int', inner_dim: 'int', num_classes: 'int', pooler_dropout: 'float'): super().__init__() self.den...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language 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...
Clemens123/transformers
BartClassificationHead
false
11,488
[ "Apache-2.0" ]
0
22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
https://github.com/Clemens123/transformers/tree/22abe7bbc587c16ec30f9d1aa549dcbeba6e9e26
PredictionConvolutions
# AOT ID: ['0_forward'] from ctypes import c_void_p, c_long, c_int import torch import math import random import os import tempfile from math import inf, nan from torch._inductor.hooks import run_intermediate_hooks from torch._inductor.utils import maybe_profile from torch._inductor.codegen.memory_planning import _alig...
import torch from torch._inductor.select_algorithm import extern_kernels import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch import nn from itertools import product as product import torch.optim...
aarashfeizi/a-PyTorch-Tutorial-to-Object-Detection
PredictionConvolutions
false
1,444
[ "MIT" ]
0
a9e1f3092d4b8c094bff5cd0897e0e3c1e0bc9c2
https://github.com/aarashfeizi/a-PyTorch-Tutorial-to-Object-Detection/tree/a9e1f3092d4b8c094bff5cd0897e0e3c1e0bc9c2
ContrastiveLoss
import torch import torch.nn.functional as F import torch.utils.data import torch.nn.parallel import torch.optim class ContrastiveLoss(torch.nn.Module): def __init__(self, margin=2.0): super(ContrastiveLoss, self).__init__() self.margin = margin def forward(self, output1, output2, label): ...
import torch import triton import triton.language as tl from torch._inductor.runtime.triton_heuristics import grid from torch._C import _cuda_getCurrentRawStream as get_raw_stream from torch._inductor.runtime import triton_helpers from torch._inductor.runtime.triton_helpers import libdevice import torch.utils.data impo...
wenqingchu/Semantic-CariGANs
ContrastiveLoss
false
16,731
[ "BSD-3-Clause" ]
50
d6c2fc2046ee62b42dd70fa8892775e33337bbdf
https://github.com/wenqingchu/Semantic-CariGANs/tree/d6c2fc2046ee62b42dd70fa8892775e33337bbdf
TokenLearnedEncoding
import torch from torch import nn class TokenLearnedEncoding(nn.Module): """ Learned additive img/word/action token encoding implemented on top of nn.Embedding """ def __init__(self, d_model, vocab_size=3, init_range=0.1): super().__init__() self.emb = nn.Embedding(vocab_size, d_model...
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...
ishikasingh/teach
TokenLearnedEncoding
false
15,618
[ "MIT" ]
54
5554f02f55c22abfe5c2a749dbb24c13377726c8
https://github.com/ishikasingh/teach/tree/5554f02f55c22abfe5c2a749dbb24c13377726c8