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 |
|---|---|---|---|---|---|---|---|---|---|---|
LogVarLayer | import torch
import torch.nn as nn
class LogVarLayer(nn.Module):
"""
The log variance layer: calculates the log variance of the data along given 'dim'
(natural logarithm)
"""
def __init__(self, dim):
super(LogVarLayer, self).__init__()
self.dim = dim
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 import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | High-East/BCI-ToolBox | LogVarLayer | false | 17,377 | [
"MIT"
] | 10 | 57015ae5fd008e8636889b9afba49c64c3a35ff3 | https://github.com/High-East/BCI-ToolBox/tree/57015ae5fd008e8636889b9afba49c64c3a35ff3 |
MV_Softmax | # 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.... | Capetian/FaceX-Zoo | MV_Softmax | false | 4,975 | [
"Apache-2.0"
] | 1 | 029786c40d8aba15d891d33973de25fcd7e5399a | https://github.com/Capetian/FaceX-Zoo/tree/029786c40d8aba15d891d33973de25fcd7e5399a |
FocalDiceLoss | # 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
import torch.nn as nn
assert... | xuyangcao/AttD2UNet | FocalDiceLoss | false | 11,046 | [
"MIT"
] | 0 | b76ed8104a4183140b3cbd7f9671ca99d36e3b3e | https://github.com/xuyangcao/AttD2UNet/tree/b76ed8104a4183140b3cbd7f9671ca99d36e3b3e |
AddSubNet | # 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 import nn
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._... | funny000/python_project | AddSubNet | false | 3,507 | [
"MIT"
] | 0 | 190289765d0bdd908ce289c78969b3702a2c4292 | https://github.com/funny000/python_project/tree/190289765d0bdd908ce289c78969b3702a2c4292 |
WMAE | import torch
import torch.nn as nn
class WMAE(nn.Module):
def __init__(self):
super().__init__()
self.weight = [300, 1, 200]
def forward(self, pred, gt):
diff = torch.abs(pred - gt)
loss = 0
for i in range(3):
loss += torch.sum(diff[:, i] * self.weight[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 math as tl_math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert... | j1a0m0e4sNTU/MachineLearning2019 | WMAE | false | 3,680 | [
"MIT"
] | 0 | 44a7a3387837e53134bcf5eb8fcf95daf4dff48d | https://github.com/j1a0m0e4sNTU/MachineLearning2019/tree/44a7a3387837e53134bcf5eb8fcf95daf4dff48d |
Conv2 | # 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 ... | jonojace/WaveRNN | Conv2 | false | 10,288 | [
"MIT"
] | 0 | 5ac72d5ed10262132f016f8e523bc663faa991da | https://github.com/jonojace/WaveRNN/tree/5ac72d5ed10262132f016f8e523bc663faa991da |
SpeakNet | # 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.... | Guaguago/Persona-Dialogue-Generation | SpeakNet | false | 13,737 | [
"MIT"
] | 258 | 0d4526ec8eddff62751a70666e14d72103906f44 | https://github.com/Guaguago/Persona-Dialogue-Generation/tree/0d4526ec8eddff62751a70666e14d72103906f44 |
PatchEmbedOverlap | # 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... | sithu31296/image_classification | PatchEmbedOverlap | false | 16,467 | [
"MIT"
] | 57 | 6b8cbce96100225621cee3166a73e852ba216cc3 | https://github.com/sithu31296/image_classification/tree/6b8cbce96100225621cee3166a73e852ba216cc3 |
AspectMean | # 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... | williamSYSU/ABSA-william | AspectMean | false | 4,538 | [
"MIT"
] | 0 | 84ccd3dca00e84c7fefadb9f5835216b2c4fe1df | https://github.com/williamSYSU/ABSA-william/tree/84ccd3dca00e84c7fefadb9f5835216b2c4fe1df |
Net5 | import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
class Net5(nn.Module):
def __init__(self, n_in, n_out, dropout_p=0.0):
super(Net5, self).__init__()
self.insize = n_in
self.outsize = n_out
self.drop = dropout_p
if self.drop != 0.0:
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import numpy as np
import tor... | derangedhk417/ML-Lessons | Net5 | false | 9,993 | [
"MIT"
] | 0 | 3433e3fa6324791b74771fcfd8a6c5361ba69c53 | https://github.com/derangedhk417/ML-Lessons/tree/3433e3fa6324791b74771fcfd8a6c5361ba69c53 |
PositionalEncoding | # 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
import t... | ananthsub/ReAgent | PositionalEncoding | false | 6,197 | [
"BSD-3-Clause"
] | 1 | 92f223a135b8fbc0942a217acb117ad0935897a3 | https://github.com/ananthsub/ReAgent/tree/92f223a135b8fbc0942a217acb117ad0935897a3 |
myCustomModel | import logging
import torch
import numpy as np
import torch.nn as nn
from torch.nn import functional as F
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
class BaseModel(nn.Module):
"""
Base class for all models
All models require an initialization a... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | awoloshuk/NephNet | myCustomModel | false | 6,302 | [
"MIT"
] | 1 | 562431364874fef1680069c7a5235c67b96504b8 | https://github.com/awoloshuk/NephNet/tree/562431364874fef1680069c7a5235c67b96504b8 |
DenseAtt | # 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.optim
import torch.nn.modules.loss
assert_siz... | Dee-chen/scGCN | DenseAtt | false | 7,938 | [
"MIT"
] | 24 | 604818fbaf32ef2fd6ee7bd601f4fe8eff26ac94 | https://github.com/Dee-chen/scGCN/tree/604818fbaf32ef2fd6ee7bd601f4fe8eff26ac94 |
ScaledDotProduct | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | ConnollyLeon/recommenders | ScaledDotProduct | false | 319 | [
"MIT"
] | 0 | 6ada3b6b71380660fec353c11db752b4637aebf5 | https://github.com/ConnollyLeon/recommenders/tree/6ada3b6b71380660fec353c11db752b4637aebf5 |
LearnedPositionalEmbedding | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | qinwang-ai/Contact-Distil | LearnedPositionalEmbedding | false | 4,153 | [
"Apache-2.0"
] | 0 | 5e98389de70e0d9c4d16bd91ca1326689dc220a6 | https://github.com/qinwang-ai/Contact-Distil/tree/5e98389de70e0d9c4d16bd91ca1326689dc220a6 |
DistillKL | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.parallel
import torch.optim
import torch.utils.data
from typing import *
class DistillKL(nn.Module):
"""Distilling the Knowledge in a Neural Network"""
def __init__(self, T):
super(DistillKL, self).__init__()
s... | 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... | Johnsonms/NNI_master | DistillKL | false | 11,575 | [
"MIT"
] | 0 | e5e5c7aed89cf3189cffe1056464833c15eb54ff | https://github.com/Johnsonms/NNI_master/tree/e5e5c7aed89cf3189cffe1056464833c15eb54ff |
AppendClsToken | # 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
from functools import partial
import torch.utils.cpp_extension
assert_size_stride = torch._C._dynamo.guards.assert_siz... | STomoya/animeface | AppendClsToken | false | 14,364 | [
"MIT"
] | 61 | 37b3cd26097d7874559d4c152e41e5712b7a1a42 | https://github.com/STomoya/animeface/tree/37b3cd26097d7874559d4c152e41e5712b7a1a42 |
Actor | import torch
import torch.nn as nn
import torch.nn.functional as F
class Actor(nn.Module):
def __init__(self, state_dim, action_dim, max_action):
super(Actor, self).__init__()
self.l1 = nn.Linear(state_dim, 400)
self.l2 = nn.Linear(400, 300)
self.l3 = nn.Linear(300, action_dim)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | ChenShawn/Adapted_TD3_Robustness_Certification | Actor | false | 13,469 | [
"MIT"
] | 91 | 6b28b031b098a2f0a49f2945f8a669205f09c4fe | https://github.com/ChenShawn/Adapted_TD3_Robustness_Certification/tree/6b28b031b098a2f0a49f2945f8a669205f09c4fe |
LayerNormChan | import torch
from torch import nn
class LayerNormChan(nn.Module):
def __init__(self, dim, eps=1e-05):
super().__init__()
self.eps = eps
self.g = nn.Parameter(torch.ones(1, dim, 1, 1))
self.b = nn.Parameter(torch.zeros(1, dim, 1, 1))
def forward(self, x):
var = torch.v... | 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... | ryok/nuwa-pytorch | LayerNormChan | false | 10,748 | [
"MIT"
] | 0 | 6bde90ee6d87bdce8c9aa52c6bbb2ad15a1f5f54 | https://github.com/ryok/nuwa-pytorch/tree/6bde90ee6d87bdce8c9aa52c6bbb2ad15a1f5f54 |
AgentA2C | # 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_... | onimaru/Reinforcement_Learning | AgentA2C | false | 7,363 | [
"MIT"
] | 1 | 4c45b51a095cb0cb3c18f6a1542befdcab8a58a4 | https://github.com/onimaru/Reinforcement_Learning/tree/4c45b51a095cb0cb3c18f6a1542befdcab8a58a4 |
SoftArgmax2D | # 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
... | danyayay/ynet_adaptive | SoftArgmax2D | false | 1,792 | [
"MIT"
] | 0 | f1daea6f3d5ec8a7349c2ee72bf742df83786103 | https://github.com/danyayay/ynet_adaptive/tree/f1daea6f3d5ec8a7349c2ee72bf742df83786103 |
RayAngEncoder | # 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
import numpy as np
import to... | liruilong940607/A-NeRF | RayAngEncoder | false | 15,914 | [
"MIT"
] | 110 | 19cb6c4fd389266214ac0d7215a44011cb1bebf5 | https://github.com/liruilong940607/A-NeRF/tree/19cb6c4fd389266214ac0d7215a44011cb1bebf5 |
DQNMLPBase | # 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 ... | KMarino/hrl-ep3 | DQNMLPBase | false | 8,791 | [
"MIT"
] | 17 | f1ad0c936d271955f4899a3a830023e1a2cffda3 | https://github.com/KMarino/hrl-ep3/tree/f1ad0c936d271955f4899a3a830023e1a2cffda3 |
ClassicalFC1 | import torch
import torch.nn.functional as F
import torch.nn as nn
import torch.nn.utils.prune
import torch.backends.cudnn
import torch.cuda
import torch.nn
import torch.utils.data
class ClassicalFC1(nn.Module):
def __init__(self):
super().__init__()
self.fc1 = nn.Linear(784, 1024)
self.f... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | mit-han-lab/pytorch-quantum | ClassicalFC1 | false | 16,094 | [
"MIT"
] | 98 | 05cf000d689307f6b1fe02d12744ad455685935b | https://github.com/mit-han-lab/pytorch-quantum/tree/05cf000d689307f6b1fe02d12744ad455685935b |
CatModel | import torch
import torch.nn.functional
class CatModel(torch.nn.Module):
def __init__(self):
super(CatModel, self).__init__()
def forward(self, x):
return torch.cat([x, x])
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn.functional
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._emp... | elad-c/model_optimization | CatModel | false | 10,643 | [
"Apache-2.0"
] | 0 | b0ecf41c3f9434008d57d7fe724ff8585e19d4cc | https://github.com/elad-c/model_optimization/tree/b0ecf41c3f9434008d57d7fe724ff8585e19d4cc |
Contract | # 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... | HarryPham0123/FPT_data_centric_competition | Contract | false | 5,303 | [
"Apache-2.0"
] | 1 | 3fa1e0ac48fdae2649b639229d9a74f75e461878 | https://github.com/HarryPham0123/FPT_data_centric_competition/tree/3fa1e0ac48fdae2649b639229d9a74f75e461878 |
DiagGaussian | # 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
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import numpy as np
import torch.nn as nn
import ... | arc82/normalizing-flows | DiagGaussian | false | 3,123 | [
"MIT"
] | 0 | f43df979267eb69b066606177c61d3b2bad0a5b5 | https://github.com/arc82/normalizing-flows/tree/f43df979267eb69b066606177c61d3b2bad0a5b5 |
ChannelNorm2D | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | ali-zafari/high-fidelity-generative-compression | ChannelNorm2D | false | 9,774 | [
"Apache-2.0"
] | 0 | 37ab8d6727df48f8ebf4577db0986ccd0ffe404b | https://github.com/ali-zafari/high-fidelity-generative-compression/tree/37ab8d6727df48f8ebf4577db0986ccd0ffe404b |
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.... | jmhessel/meshed-memory-transformer | MultiHeadAttention | false | 10,338 | [
"BSD-3-Clause"
] | 0 | b502da2522f2e25d602fba547ed6ebf7968857a9 | https://github.com/jmhessel/meshed-memory-transformer/tree/b502da2522f2e25d602fba547ed6ebf7968857a9 |
PositionwiseFeedForward | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | LinXueyuanStdio/scRNN-seq | PositionwiseFeedForward | false | 2,543 | [
"Apache-2.0"
] | 0 | 87e11a56acb18a86fa4fb309d33a1bc02bf38b39 | https://github.com/LinXueyuanStdio/scRNN-seq/tree/87e11a56acb18a86fa4fb309d33a1bc02bf38b39 |
UpSample | import torch
from torch import nn
import torch.nn.functional as F
import torch.utils.data
import torch.nn.functional
import torch.autograd
class Smooth(nn.Module):
"""
<a id="smooth"></a>
### Smoothing Layer
This layer blurs each channel
"""
def __init__(self):
super().__init__()
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
import t... | Hadryan/nn | UpSample | false | 9,384 | [
"MIT"
] | 0 | b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d | https://github.com/Hadryan/nn/tree/b10e3dea2c7e1f6569bfdf8e1a48f8d48b5a645d |
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 import triton_helpers
import torch.nn as nn
assert_... | Vahe1994/ThreeDLAPGAN | Discriminator | false | 18,029 | [
"MIT"
] | 6 | 7e8f20be9216bc741bbe22ed2a13c261f78db521 | https://github.com/Vahe1994/ThreeDLAPGAN/tree/7e8f20be9216bc741bbe22ed2a13c261f78db521 |
ResizeTransform | import torch
import torch.nn as nn
import torch.nn.functional as nnf
class ResizeTransform(nn.Module):
"""
Resize a transform, which involves resizing the vector field *and* rescaling it.
"""
def __init__(self, vel_resize, ndims):
super().__init__()
self.factor = 1.0 / vel_resize
... | 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... | Zer0-00/voxelmorph | ResizeTransform | false | 12,028 | [
"Apache-2.0"
] | 0 | ed2e0384cf22d19f7e57bea5887fc197d55f60bc | https://github.com/Zer0-00/voxelmorph/tree/ed2e0384cf22d19f7e57bea5887fc197d55f60bc |
DistilledLoss | import torch
from torch import nn
import torch.nn.functional as F
class DistilledLoss(nn.Module):
"""
Intended for use with a DistillationTrainer.
Combines vanilla cross entropy loss with a modified form of KL divergence loss.
Attempts to minimize the KL divergence between the student and distilled lo... | 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 ... | Graeme22/VisionTransformer-Pytorch | DistilledLoss | false | 17,311 | [
"Apache-2.0"
] | 5 | 4e8abecf27e92dffd8d00f3d9b5ad4a21079cd0e | https://github.com/Graeme22/VisionTransformer-Pytorch/tree/4e8abecf27e92dffd8d00f3d9b5ad4a21079cd0e |
RKDAngleLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | NeelayS/KD_Lib | RKDAngleLoss | false | 2,677 | [
"MIT"
] | 0 | c3f8c7cef76772d14862260e61c1d1c52c58f58e | https://github.com/NeelayS/KD_Lib/tree/c3f8c7cef76772d14862260e61c1d1c52c58f58e |
cls_pos | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torc... | FrancesC0de/Pedestron | cls_pos | false | 9,097 | [
"Apache-2.0"
] | 0 | 9ef6a408f97f8c8af98096b7945df18c9d3656ca | https://github.com/FrancesC0de/Pedestron/tree/9ef6a408f97f8c8af98096b7945df18c9d3656ca |
BasicBlock1 | import torch
import torch.nn as nn
class BasicBlock1(nn.Module):
def __init__(self, input_dim, output_dim):
super(BasicBlock1, self).__init__()
self.ID = input_dim
self.conv = nn.Conv2d(in_channels=input_dim, out_channels=
output_dim, kernel_size=1, padding=0, 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
assert_... | Houseqin/PytorchToCaffe | BasicBlock1 | false | 9,112 | [
"MIT"
] | 0 | e94224ba6414e76369f191e7e3d9731c12ce2bd7 | https://github.com/Houseqin/PytorchToCaffe/tree/e94224ba6414e76369f191e7e3d9731c12ce2bd7 |
Conv | import torch
import torch.nn as nn
class Conv(nn.Module):
"""
Convolution Module
"""
def __init__(self, in_channels, out_channels, kernel_size=1, stride=1,
padding=0, dilation=1, bias=True, w_init='linear'):
"""
:param in_channels: dimension of input
:param out_channel... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | FarisHijazi/klaam | Conv | false | 13,677 | [
"MIT"
] | 119 | 380b3cbf167bd4288cf5f3476e51f0939dff9e2c | https://github.com/FarisHijazi/klaam/tree/380b3cbf167bd4288cf5f3476e51f0939dff9e2c |
LearnableSinusoidEncoding | # 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.... | ExpectationMax/Translational-Equivariant-Performers | LearnableSinusoidEncoding | false | 8,071 | [
"MIT"
] | 10 | c7a55af3b581426512eb4a57d3a13eb20e93fbd6 | https://github.com/ExpectationMax/Translational-Equivariant-Performers/tree/c7a55af3b581426512eb4a57d3a13eb20e93fbd6 |
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
... | nikitajz/google-landmarks | FocalLoss | false | 7,345 | [
"MIT"
] | 1 | 2051462be4450c193c98b237fc7ebdae783e2b28 | https://github.com/nikitajz/google-landmarks/tree/2051462be4450c193c98b237fc7ebdae783e2b28 |
SEModule | import torch
import torch.nn as nn
import torch.nn.functional as F
def hard_sigmoid(x, slope=0.1666667, offset=0.5):
return torch.clamp(slope * x + offset, 0.0, 1.0)
class SEModule(nn.Module):
def __init__(self, in_channels, reduction=4, name=''):
super(SEModule, self).__init__()
self.avg_p... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | verages/PaddleOCR2Pytorch | SEModule | false | 4,665 | [
"Apache-2.0"
] | 0 | 201f0d5d6007f49620c49af7d222c3b220eb3e70 | https://github.com/verages/PaddleOCR2Pytorch/tree/201f0d5d6007f49620c49af7d222c3b220eb3e70 |
LDS | # 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
from math import sqrt as sqrt
from itertools import product as prod... | vaesl/LRF-Net | LDS | false | 16,653 | [
"MIT"
] | 180 | e44b120dd55288c02852f8e58cda31313525d748 | https://github.com/vaesl/LRF-Net/tree/e44b120dd55288c02852f8e58cda31313525d748 |
Sentence_Maxpool | # 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_... | ErinZhang1998/howto100m-erin | Sentence_Maxpool | false | 2,203 | [
"Apache-2.0"
] | 0 | 1152ea0fe328d20fcf2218a1d548644881632656 | https://github.com/ErinZhang1998/howto100m-erin/tree/1152ea0fe328d20fcf2218a1d548644881632656 |
Minimum | import torch
import torch.nn as nn
from torch import optim as optim
class Minimum(nn.Module):
def forward(self, x, y):
return torch.minimum(x, y)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
from torch import optim as optim
assert_size_stride = torch._C._dyn... | pgruening/ConvNeXt | Minimum | false | 12,878 | [
"MIT"
] | 0 | e9a1beaf312f3a724f0c21d098efbe7db872b049 | https://github.com/pgruening/ConvNeXt/tree/e9a1beaf312f3a724f0c21d098efbe7db872b049 |
AMCLoss | # 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.... | GatorSense/LACE | AMCLoss | false | 5,198 | [
"MIT"
] | 1 | ee8194bc443886642f22c2317f5bdef23bba5147 | https://github.com/GatorSense/LACE/tree/ee8194bc443886642f22c2317f5bdef23bba5147 |
VirtualBatchNorm | import torch
import torch.nn as nn
class VirtualBatchNorm(nn.Module):
"""Virtual Batch Normalization Module as proposed in the paper
`"Improved Techniques for Training GANs by Salimans et. al." <https://arxiv.org/abs/1805.08318>`_
Performs Normalizes the features of a batch based on the statistics collec... | 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_... | shi-weili/torchgan | VirtualBatchNorm | false | 12,967 | [
"MIT"
] | 0 | 28ffd4026b8c0db2217b667d30a222d6758bfc41 | https://github.com/shi-weili/torchgan/tree/28ffd4026b8c0db2217b667d30a222d6758bfc41 |
Actor | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim
import torch.autograd
class Actor(nn.Module):
def __init__(self, input_size, output_size):
super(Actor, self).__init__()
self.fc1 = nn.Linear(input_size, 128)
self.fc2 = nn.Linear(128, 256)
self.... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | ChangQingAAS/Deep-Reinforcement-Learning | Actor | false | 249 | [
"MIT"
] | 0 | 3bc1381c632b1730a48e63e972aea62086c4287c | https://github.com/ChangQingAAS/Deep-Reinforcement-Learning/tree/3bc1381c632b1730a48e63e972aea62086c4287c |
StdConv2d | # 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 ... | HazyResearch/domino | StdConv2d | false | 5,297 | [
"Apache-2.0"
] | 1 | 76ef413a9f9ee4a5d9c3fc044d8a0a0ea0cc4dc2 | https://github.com/HazyResearch/domino/tree/76ef413a9f9ee4a5d9c3fc044d8a0a0ea0cc4dc2 |
Conv2d_fw | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim
class Conv2d_fw(nn.Conv2d):
def __init__(self, in_channels, out_channels, kernel_size, stride=1,
padding=0, bias=True):
super(Conv2d_fw, self).__init__(in_channels, out_channels,
kernel_size, stride=... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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.optim
assert_size_stride = torch._C._dynamo.g... | DingYuan0118/Meta-Fine-Tuning | Conv2d_fw | false | 373 | [
"MIT"
] | 0 | 531b7418420c072844216ec5217f1f03f6419a79 | https://github.com/DingYuan0118/Meta-Fine-Tuning/tree/531b7418420c072844216ec5217f1f03f6419a79 |
ParallelPolarizedSelfAttention | # 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.... | rushirajsherlocked/External-Attention-pytorch | ParallelPolarizedSelfAttention | false | 4,299 | [
"MIT"
] | 0 | 7d6814b2d90909adf81c62f3f8a89e30a59d6481 | https://github.com/rushirajsherlocked/External-Attention-pytorch/tree/7d6814b2d90909adf81c62f3f8a89e30a59d6481 |
Policy | import torch
from torch import nn
from torch.nn import functional as F
class Policy(nn.Module):
def __init__(self, act_dim, obs_dim):
super(Policy, self).__init__()
self.fc0 = nn.Linear(act_dim, 128)
self.fc1 = nn.Linear(128, obs_dim)
def forward(self, x):
x = x.type_as(self.... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | TommeyChang/CS294-Homework | Policy | false | 1,143 | [
"MIT"
] | 0 | 17b525bf4366034b45c4febd89f1053d44550237 | https://github.com/TommeyChang/CS294-Homework/tree/17b525bf4366034b45c4febd89f1053d44550237 |
LocalMultiHeadAttention | import torch
import torch.nn as nn
import torch.nn.functional as F
class Linear(nn.Linear):
def __init__(self, in_features, out_features, bias=True):
super(Linear, self).__init__(in_features=in_features, out_features=
out_features, bias=bias)
self.noise = None
self.vn_std = No... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | debasish-mihup/EfficientConformer | LocalMultiHeadAttention | false | 10,352 | [
"Apache-2.0"
] | 0 | bddd927cebcde044a999aaa7766fa6d44dc20576 | https://github.com/debasish-mihup/EfficientConformer/tree/bddd927cebcde044a999aaa7766fa6d44dc20576 |
TorchDiv | import torch
class TorchDiv(torch.nn.Module):
def __init__(self):
super(TorchDiv, self).__init__()
def forward(self, x, y):
return torch.div(x, y)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | NVIDIA-AI-IOT-private/torch2trt | TorchDiv | false | 10,537 | [
"MIT"
] | 0 | 953d60039e0c81e90eea467c3df2e6e3f7040242 | https://github.com/NVIDIA-AI-IOT-private/torch2trt/tree/953d60039e0c81e90eea467c3df2e6e3f7040242 |
SENet | # 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 ... | Hcnaeg/DI-engine | SENet | false | 2,389 | [
"Apache-2.0"
] | 0 | aba0c629f87649854091e9e59d948f83962e3e1e | https://github.com/Hcnaeg/DI-engine/tree/aba0c629f87649854091e9e59d948f83962e3e1e |
CrossAttention | # 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.... | DartingMelody/perceiver-io | CrossAttention | false | 358 | [
"Apache-2.0"
] | 0 | fb818b1763f61e259b23b8b014df2ac01c303a54 | https://github.com/DartingMelody/perceiver-io/tree/fb818b1763f61e259b23b8b014df2ac01c303a54 |
cnn_4layer | import torch
import torch.nn as nn
import torch.nn.functional as F
class cnn_4layer(nn.Module):
def __init__(self, in_ch, in_dim, width=2, linear_size=256):
super(cnn_4layer, self).__init__()
self.conv1 = nn.Conv2d(in_ch, 4 * width, 4, stride=2, padding=1)
self.conv2 = nn.Conv2d(4 * width... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | Mahoumaru/auto_LiRPA | cnn_4layer | false | 11,679 | [
"BSD-3-Clause"
] | 0 | b03a6c36eb1b921726778359d6d2b94e0cd7e480 | https://github.com/Mahoumaru/auto_LiRPA/tree/b03a6c36eb1b921726778359d6d2b94e0cd7e480 |
ConvWS2d | import torch
import torch.nn as nn
import torch.nn.functional as F
def conv_ws_2d(input, weight, bias=None, stride=1, padding=0, dilation=1,
groups=1, eps=1e-05):
c_in = weight.size(0)
weight_flat = weight.view(c_in, -1)
mean = weight_flat.mean(dim=1, keepdim=True).view(c_in, 1, 1, 1)
std = weight... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | AlphaLFC/mmdetection | ConvWS2d | false | 4,845 | [
"Apache-2.0"
] | 1 | 45619c5b8aca0ca3e6ddc211210a8946c94694d8 | https://github.com/AlphaLFC/mmdetection/tree/45619c5b8aca0ca3e6ddc211210a8946c94694d8 |
GlobalAttentionGeneral | # 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.... | FiroshV/TTI | GlobalAttentionGeneral | false | 5,169 | [
"MIT"
] | 1 | 4d5a40b0ec69a47faf5256caa6d731e95d1f7b9a | https://github.com/FiroshV/TTI/tree/4d5a40b0ec69a47faf5256caa6d731e95d1f7b9a |
InstanceSimilarity | import torch
import torch.nn.functional as F
import torch.nn as nn
class InstanceSimilarity(nn.Module):
"""
Instance Similarity based loss
"""
def __init__(self, mse=True):
super(InstanceSimilarity, self).__init__()
self.mse = mse
def _loss(self, fm_s, fm_t):
fm_s = fm_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.... | DemoAuguste/ZAQ-code | InstanceSimilarity | false | 9,051 | [
"MIT"
] | 0 | 9986a2d217ab5cb284e08c062f8726cabacb311e | https://github.com/DemoAuguste/ZAQ-code/tree/9986a2d217ab5cb284e08c062f8726cabacb311e |
FlowfieldDiscountedLoss | # 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
import torch.random
assert_size_stride = to... | DuaneNielsen/keypoints | FlowfieldDiscountedLoss | false | 8,036 | [
"MIT"
] | 42 | 302fa02966d4372ac9b5aaa3d8dc24684be0b252 | https://github.com/DuaneNielsen/keypoints/tree/302fa02966d4372ac9b5aaa3d8dc24684be0b252 |
CrossUnit | import torch
from torch import nn
from torch.nn import functional
class CrossUnit(nn.Module):
def __init__(self, input_dim, inner_dim, out_dim) ->None:
super().__init__()
self.fc_1 = nn.Linear(input_dim, inner_dim)
self.fc_2 = nn.Linear(inner_dim, out_dim)
self.align = input_dim =... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | LSTM-Kirigaya/NUAA-guandan | CrossUnit | false | 9,216 | [
"MIT"
] | 0 | f6920868649c26536b3dc3fce8ecd1d4f7c755fa | https://github.com/LSTM-Kirigaya/NUAA-guandan/tree/f6920868649c26536b3dc3fce8ecd1d4f7c755fa |
MyUpsample2 | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data.distributed
class MyUpsample2(nn.Module):
def forward(self, x):
return x[:, :, :, None, :, None].expand(-1, -1, -1, 2, -1, 2).reshape(x
.size(0), x.size(1), x.size(2) * 2, x.size(3) * 2)
d... | 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.distributed
assert_size_stride = torch._C._dynamo.... | Dou-Yiming/YouRefIt_ERU | MyUpsample2 | false | 7,989 | [
"MIT"
] | 13 | 2a8e849380ed2d253c467b1af744a514bc171372 | https://github.com/Dou-Yiming/YouRefIt_ERU/tree/2a8e849380ed2d253c467b1af744a514bc171372 |
UpsampleNet | # 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 numpy as np
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dyna... | npuichigo/waveglow | UpsampleNet | false | 16,187 | [
"Apache-2.0"
] | 214 | 44e5cae59842ddb5f692085472b5e09fa18cce42 | https://github.com/npuichigo/waveglow/tree/44e5cae59842ddb5f692085472b5e09fa18cce42 |
Policy | import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions import Categorical
class Policy(nn.Module):
def __init__(self, n_features=4, n_actions=2, device=torch.device('cpu')):
super(Policy, self).__init__()
self.fc1 = nn.Linear(n_features, 128... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | linklab/minimal_rl | Policy | false | 3,920 | [
"MIT"
] | 0 | 382d99ca355ea405414c4ed1077fb4e8ed3532a9 | https://github.com/linklab/minimal_rl/tree/382d99ca355ea405414c4ed1077fb4e8ed3532a9 |
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.... | Jeyhooon/deep-reinforcement-learning | Actor | false | 650 | [
"MIT"
] | 0 | 7a6f1974493a2058635539a4868512cdf3fb5bdb | https://github.com/Jeyhooon/deep-reinforcement-learning/tree/7a6f1974493a2058635539a4868512cdf3fb5bdb |
HingeGANLossDiscriminator | # 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... | ChristophReich1996/Mode_Collapse | HingeGANLossDiscriminator | false | 7,901 | [
"MIT"
] | 14 | 937ee8bf96510fbf4070fc7e14b78276ab036b8c | https://github.com/ChristophReich1996/Mode_Collapse/tree/937ee8bf96510fbf4070fc7e14b78276ab036b8c |
Concat | # 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_... | HalleyJiang/UniFuse-Unidirectional-Fusion | Concat | false | 8,238 | [
"MIT"
] | 30 | 27a4441fe3d3031d1c9f3eb2d72a3624407d19fc | https://github.com/HalleyJiang/UniFuse-Unidirectional-Fusion/tree/27a4441fe3d3031d1c9f3eb2d72a3624407d19fc |
residualUnit | import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
import torch.nn.init
class conv23DUnit(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1,
padding=0, groups=1, bias=True, dilation=1, nd=2):
super(conv2... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | navid0308/medSynthesisV1 | residualUnit | false | 10,686 | [
"MIT"
] | 0 | 6731a67d0eb9bb3e0c1646f01feb24229aa4fe30 | https://github.com/navid0308/medSynthesisV1/tree/6731a67d0eb9bb3e0c1646f01feb24229aa4fe30 |
SoftmaxLoss | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | albertvillanova/s3prl | SoftmaxLoss | false | 6,165 | [
"MIT"
] | 1 | b127ade4ed2f80a1027901bbd2f204b4fb1aaf03 | https://github.com/albertvillanova/s3prl/tree/b127ade4ed2f80a1027901bbd2f204b4fb1aaf03 |
FullAttention | from torch.nn import Module
import torch
from torch.nn import Dropout
class FullAttention(Module):
def __init__(self, use_dropout=False, attention_dropout=0.1):
super().__init__()
self.use_dropout = use_dropout
self.dropout = Dropout(attention_dropout)
def forward(self, queries, keys... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | lee-vius/LoFTR | FullAttention | false | 10,468 | [
"Apache-2.0"
] | 0 | dd9add373a20696fb6f020f4fda38bca7a91cdd9 | https://github.com/lee-vius/LoFTR/tree/dd9add373a20696fb6f020f4fda38bca7a91cdd9 |
FRM | # 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... | ishine/RawNet | FRM | false | 15,630 | [
"MIT"
] | 199 | cddec5afa27049a4b507f3d48bb02b993ea838bb | https://github.com/ishine/RawNet/tree/cddec5afa27049a4b507f3d48bb02b993ea838bb |
VGG_block | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
from to... | H-Liu1997/Pytorch_Pose_Estimation_Framework | VGG_block | false | 5,315 | [
"MIT"
] | 1 | 06616b3459ff639f8486e6ea4f93922597788b2a | https://github.com/H-Liu1997/Pytorch_Pose_Estimation_Framework/tree/06616b3459ff639f8486e6ea4f93922597788b2a |
TwoLinearsModel | # 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 ... | Rohan-Chaudhury/aimet | TwoLinearsModel | false | 18,014 | [
"BSD-3-Clause"
] | 3 | 1c38cac8cc0fd32dca40ce5e39940805d29f7a4a | https://github.com/Rohan-Chaudhury/aimet/tree/1c38cac8cc0fd32dca40ce5e39940805d29f7a4a |
SelfAttention | # AOT ID: ['1_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.... | mariuslindegaard/6.867_MARL_project | SelfAttention | false | 16,011 | [
"Apache-2.0"
] | 401 | 572b88b4d491db8a1673535868f4bf9aff58f73d | https://github.com/mariuslindegaard/6.867_MARL_project/tree/572b88b4d491db8a1673535868f4bf9aff58f73d |
MaxElementwise | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | Akababa/torch2trt | MaxElementwise | false | 18,413 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
PixelNorm | import torch
import torch.nn as nn
import torch.utils.cpp_extension
class PixelNorm(nn.Module):
"""pixel normalization"""
def forward(self, x):
x = x / x.pow(2).mean(dim=1, keepdim=True).sqrt().add(1e-08)
return x
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import torch.utils.cpp_extension
assert_size_stride = tor... | STomoya/animeface | PixelNorm | false | 15,276 | [
"MIT"
] | 61 | 37b3cd26097d7874559d4c152e41e5712b7a1a42 | https://github.com/STomoya/animeface/tree/37b3cd26097d7874559d4c152e41e5712b7a1a42 |
AvgSpacial | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
import torch.nn as nn
import torch.utils.checkpoint
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
... | CNNs4QSPR/se3cnn | AvgSpacial | false | 5,066 | [
"MIT"
] | 1 | 513f5f827c4c511bdc96e3c6ea663c8fbce60f57 | https://github.com/CNNs4QSPR/se3cnn/tree/513f5f827c4c511bdc96e3c6ea663c8fbce60f57 |
UnpoolingAsConvolution | import torch
import torch.nn as nn
def get_incoming_shape(incoming):
size = incoming.size()
return [size[0], size[1], size[2], size[3]]
def interleave(tensors, axis):
old_shape = get_incoming_shape(tensors[0])[1:]
new_shape = [-1] + old_shape
new_shape[axis] *= len(tensors)
stacked = torch.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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | anve96/DE_resnet_unet_hyb | UnpoolingAsConvolution | false | 14,903 | [
"BSD-3-Clause"
] | 45 | f0751854c8707cc4f228bb9d52d93635cc3584ae | https://github.com/anve96/DE_resnet_unet_hyb/tree/f0751854c8707cc4f228bb9d52d93635cc3584ae |
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
import 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... | Xinstein3033/OpenHGNN | Discriminator | false | 1,246 | [
"Apache-2.0"
] | 0 | a9ca499834523419ecdaaa09e4b42f640486f262 | https://github.com/Xinstein3033/OpenHGNN/tree/a9ca499834523419ecdaaa09e4b42f640486f262 |
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 libdevice, math as tl_math
import torc... | BambooPalace/Celeba-attributes-prediction | FocalLoss | false | 8,825 | [
"MIT"
] | 0 | c97fdf2c926eab137e7b6938659a877d3b7dc3f5 | https://github.com/BambooPalace/Celeba-attributes-prediction/tree/c97fdf2c926eab137e7b6938659a877d3b7dc3f5 |
QNetwork | # 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_... | bobiblazeski/navigation | QNetwork | false | 6,353 | [
"MIT"
] | 1 | bb863b4475a90ff26bede20af647ae4882a0f6fb | https://github.com/bobiblazeski/navigation/tree/bb863b4475a90ff26bede20af647ae4882a0f6fb |
ExpLinear | import torch
from torch import nn
import torch.nn
from scipy.linalg import logm
class InverseNotAvailable(Exception):
"""Exception to be thrown when a transform does not have an inverse."""
pass
class Transform(nn.Module):
"""Base class for all transform objects."""
def forward(self, inputs, contex... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import 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
from scipy.linalg import logm
assert_size_s... | mshakerinava/nflows | ExpLinear | false | 10,578 | [
"MIT"
] | 0 | d86cb1478ff36ffd3e005e980d92a3b0bbffbf02 | https://github.com/mshakerinava/nflows/tree/d86cb1478ff36ffd3e005e980d92a3b0bbffbf02 |
ResidualBlock | import torch
class ConvLayer(torch.nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride):
super(ConvLayer, self).__init__()
reflection_padding = kernel_size // 2
self.reflection_pad = torch.nn.ReflectionPad2d(reflection_padding)
self.conv2d = torch.nn.Conv... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | EdenBD/MultiModalStory-demo | ResidualBlock | false | 13,644 | [
"Apache-2.0"
] | 154 | 5e95e2aca766ca7c850e8db4973b8d51dfdba7f8 | https://github.com/EdenBD/MultiModalStory-demo/tree/5e95e2aca766ca7c850e8db4973b8d51dfdba7f8 |
Transition | # 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 ... | druzhkov-paul/T2T-ViT | Transition | false | 12,324 | [
"BSD-3-Clause-Clear"
] | 0 | 819c3ddc4cb6f464d4a9866d8713c7ace42ebf6c | https://github.com/druzhkov-paul/T2T-ViT/tree/819c3ddc4cb6f464d4a9866d8713c7ace42ebf6c |
MultiHeadAttention | from torch.nn import Module
import torch
import numpy as np
import torch.nn as nn
class ScaledDotProductAttention(nn.Module):
"""
Scaled dot-product attention
"""
def __init__(self, d_model, d_k, d_v, h, dropout=0.1, comment=None):
"""
:param d_model: Output dimensionality of the mode... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | jianqingxie/RSTNet | MultiHeadAttention | false | 15,709 | [
"BSD-3-Clause"
] | 68 | aaa7b5be08e5ec9e79e14ed3e6a04fc3d50483be | https://github.com/jianqingxie/RSTNet/tree/aaa7b5be08e5ec9e79e14ed3e6a04fc3d50483be |
InverseSqrt | import torch
import torch.nn as nn
class InverseSqrt(nn.Module):
def forward(self, x, alpha=1.0):
return x / torch.sqrt(1.0 + alpha * x * 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.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | fmhoward/pysurvival | InverseSqrt | false | 12,374 | [
"Apache-2.0"
] | 0 | 3fea55f09477e9f0844845e09d6ea60434436e2e | https://github.com/fmhoward/pysurvival/tree/3fea55f09477e9f0844845e09d6ea60434436e2e |
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
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | attardi/parser | MLP | false | 1,499 | [
"MIT"
] | 0 | 1978ba94ba649ad0a723d71bb2ca225c7e705702 | https://github.com/attardi/parser/tree/1978ba94ba649ad0a723d71bb2ca225c7e705702 |
ScoreCap | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
import torch.nn
import torch.optim
assert_size_stride = torch._C._dy... | mcx/ReAgent | ScoreCap | false | 4,113 | [
"BSD-3-Clause"
] | 0 | 57b58a8b3a6b74bb87a197b73a6cd108ddad895e | https://github.com/mcx/ReAgent/tree/57b58a8b3a6b74bb87a197b73a6cd108ddad895e |
NormalLogProb | import torch
import numpy as np
import torch.nn as nn
import torch.utils
import torch.utils.data
class NormalLogProb(nn.Module):
def __init__(self):
super().__init__()
def forward(self, loc, scale, z):
var = torch.pow(scale, 2)
return -0.5 * torch.log(2 * np.pi * var) - torch.pow(z -... | 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.utils
import torch.utils.data
assert_s... | msunardi/vae_experiment | NormalLogProb | false | 7,294 | [
"MIT"
] | 1 | e3ce39e586f1189d157e753370a90c07713658b3 | https://github.com/msunardi/vae_experiment/tree/e3ce39e586f1189d157e753370a90c07713658b3 |
Vgg16 | # 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_... | Boyiliee/PONO | Vgg16 | false | 13,529 | [
"MIT"
] | 133 | b9108e8bf8ba0228635532ba5bdc973b7393d045 | https://github.com/Boyiliee/PONO/tree/b9108e8bf8ba0228635532ba5bdc973b7393d045 |
FixupResidual | # 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 math
import torch.nn a... | PacktPublishing/Hands-On-Reinforcement-Learning-for-Games | FixupResidual | false | 8,665 | [
"MIT"
] | 41 | 045b8846f2558aa8fb8ac8cef5c71ee098cb9b22 | https://github.com/PacktPublishing/Hands-On-Reinforcement-Learning-for-Games/tree/045b8846f2558aa8fb8ac8cef5c71ee098cb9b22 |
L2Norm | # 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
import torch.nn as nn
assert... | AlessandroRigoli/project_vg | L2Norm | false | 11,168 | [
"MIT"
] | 0 | cb1323bee60cdb4108fe0aab68791321c7974832 | https://github.com/AlessandroRigoli/project_vg/tree/cb1323bee60cdb4108fe0aab68791321c7974832 |
SimpleSpatialEmbedding | import torch
class SimpleSpatialEmbedding(torch.nn.Module):
def __init__(self, in_features, out_features, weight_multiplier=1.0):
super(SimpleSpatialEmbedding, self).__init__()
self.b = torch.zeros((in_features, out_features))
self.b.normal_(0, weight_multiplier)
self.b = torch.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 math as tl_math
assert_size_s... | qway/nerfmeshes | SimpleSpatialEmbedding | false | 16,306 | [
"MIT"
] | 113 | d983dcbbcfec1337c9f2040969213c6d1ea0c39e | https://github.com/qway/nerfmeshes/tree/d983dcbbcfec1337c9f2040969213c6d1ea0c39e |
GCN | from torch.nn import Module
import math
import torch
import torch.nn as nn
from torch.nn.modules.module import Module
class GraphConvolution(Module):
def __init__(self, in_features, out_features, bias=True):
super(GraphConvolution, self).__init__()
self.in_features = in_features
self.out_... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch.nn import Module
import math
import torch.nn as nn
from torch.nn.modu... | caojiangxia/BiGI | GCN | false | 14,997 | [
"MIT"
] | 57 | ed54c20523a5b3f295b90a9c08f7c54e8258d04a | https://github.com/caojiangxia/BiGI/tree/ed54c20523a5b3f295b90a9c08f7c54e8258d04a |
ReLU | import torch
import torch.nn as nn
from abc import abstractmethod
import torch.utils.data
import torch.nn
class EfficientBlockBase(nn.Module):
"""
PyTorchVideo/accelerator provides a set of efficient blocks
that have optimal efficiency for each target hardware device.
Each efficient block has two for... | 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 abc import abstractmethod
import torch.utils.data
import torch... | zijian-hu/pytorchvideo | ReLU | false | 4,697 | [
"Apache-2.0"
] | 0 | 51589b100437af2285c56ce2ccc7ccecb7f9b18b | https://github.com/zijian-hu/pytorchvideo/tree/51589b100437af2285c56ce2ccc7ccecb7f9b18b |
TokenLabelSoftTargetCrossEntropy | # 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
... | QLSong/cv-classify | TokenLabelSoftTargetCrossEntropy | false | 2,733 | [
"Apache-2.0"
] | 0 | 02f53d03868f299a08b5c97a266b50a7fdcd3f2b | https://github.com/QLSong/cv-classify/tree/02f53d03868f299a08b5c97a266b50a7fdcd3f2b |
AE | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
import torch.utils.data
class AE(nn.Module):
""" Class for the AE using Fully Connected
"""
def __init__(self, opt):
super().__init__()
assert opt.isize % 4 == 0, 'input size has to be a multiple of 4'
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | cerbero94/GAN_CP | AE | false | 1,678 | [
"MIT"
] | 0 | e255f5f5b3733c55d47997c1ffc4161529701f8a | https://github.com/cerbero94/GAN_CP/tree/e255f5f5b3733c55d47997c1ffc4161529701f8a |
AttentionModule | # 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 ... | SpyrosMouselinos/DeltaFormers | AttentionModule | false | 5,851 | [
"Apache-2.0"
] | 1 | 38508fa9b85f2c50aa0031b67e7e8feff1a75b27 | https://github.com/SpyrosMouselinos/DeltaFormers/tree/38508fa9b85f2c50aa0031b67e7e8feff1a75b27 |
PositionwiseFeedForward | import torch
import torch.nn as nn
import torch.nn.functional as F
class PositionwiseFeedForward(nn.Module):
""" A two-feed-forward-layer module """
def __init__(self, d_in, d_hid, dropout=0.1):
super().__init__()
self.w_1 = nn.Conv1d(d_in, d_hid, 1)
self.w_2 = nn.Conv1d(d_hid, d_in, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | chenghaoliu89/TSForecasting_FT | PositionwiseFeedForward | false | 9,995 | [
"MIT"
] | 0 | e29227e67f754919672eab9002a1b37b13ed28a0 | https://github.com/chenghaoliu89/TSForecasting_FT/tree/e29227e67f754919672eab9002a1b37b13ed28a0 |
DeiTAttention | from _paritybench_helpers import _mock_config
import math
import torch
from typing import List
from typing import Tuple
from torch import nn
from typing import Set
import torch.utils.checkpoint
def find_pruneable_heads_and_indices(heads: 'List[int]', n_heads: 'int',
head_size: 'int', already_pruned_heads: 'Set[in... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | ncoop57/transformers | DeiTAttention | false | 4,082 | [
"Apache-2.0"
] | 0 | d7e156bd1ae2467e9ea1dbc44f31da0ed2296aee | https://github.com/ncoop57/transformers/tree/d7e156bd1ae2467e9ea1dbc44f31da0ed2296aee |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.