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 |
|---|---|---|---|---|---|---|---|---|---|---|
BentIdentity | import torch
import torch.nn as nn
class BentIdentity(nn.Module):
def forward(self, x, alpha=1.0):
return x + (torch.sqrt(1.0 + x * x) - 1.0) / 2.0
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | fmhoward/pysurvival | BentIdentity | false | 12,376 | [
"Apache-2.0"
] | 0 | 3fea55f09477e9f0844845e09d6ea60434436e2e | https://github.com/fmhoward/pysurvival/tree/3fea55f09477e9f0844845e09d6ea60434436e2e |
node_norm | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_c... | ngohienduong/Deep_GCN_Benchmarking | node_norm | false | 16,174 | [
"MIT"
] | 70 | 3ee57a265bbfd62d8e6f3ee6e3e9062dd5a44633 | https://github.com/ngohienduong/Deep_GCN_Benchmarking/tree/3ee57a265bbfd62d8e6f3ee6e3e9062dd5a44633 |
Selector | import torch
import torch.nn as nn
import torch.utils.data
class Selector(nn.Module):
def __init__(self):
super(Selector, self).__init__()
self.conv1 = nn.Conv2d(2048 + 256, 256, 3)
self.relu1 = nn.ReLU(inplace=True)
self.conv2 = nn.Conv2d(256, 16, 3)
self.relu2 = nn.ReLU(... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | hsuanchuu/maskrcnn-benchmark | Selector | false | 6,954 | [
"MIT"
] | 1 | 39429eca800fb912418c34d104ff6f3f2ea07bbd | https://github.com/hsuanchuu/maskrcnn-benchmark/tree/39429eca800fb912418c34d104ff6f3f2ea07bbd |
DHead | # 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
from math import *
assert_size_stride = torch._C._dynamo.g... | pengyuzhang97/NIID-Bench | DHead | false | 16,234 | [
"MIT"
] | 124 | 235b6f5c2bf218a587f9effae346a2f616de1855 | https://github.com/pengyuzhang97/NIID-Bench/tree/235b6f5c2bf218a587f9effae346a2f616de1855 |
TripletLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | neka-nat/Transfer-Learning-Library | TripletLoss | false | 16,158 | [
"MIT"
] | 1,474 | a3b27b0d7562fa90a02e914140b37ab438469e6c | https://github.com/neka-nat/Transfer-Learning-Library/tree/a3b27b0d7562fa90a02e914140b37ab438469e6c |
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 ... | vivekagra/Biplane-Quadrotor | Critic | false | 10,896 | [
"BSD-3-Clause"
] | 0 | afe69216494842f5bfe16cbcc0cdcc6ef0de7769 | https://github.com/vivekagra/Biplane-Quadrotor/tree/afe69216494842f5bfe16cbcc0cdcc6ef0de7769 |
Module_CharbonnierLoss | # 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... | danielism97/FLAVR | Module_CharbonnierLoss | false | 9,964 | [
"Apache-2.0"
] | 0 | 17f62c681bb2a5799e3bc23cf60936ac4d2b9407 | https://github.com/danielism97/FLAVR/tree/17f62c681bb2a5799e3bc23cf60936ac4d2b9407 |
Conv2d | import torch
import torch.nn as nn
import torch.utils
class Conv2d(nn.Module):
def __init__(self, C_in, C_out, kernel_size, padding):
super(Conv2d, self).__init__()
self.conv = nn.Conv2d(C_in, C_out, kernel_size=kernel_size, stride=
1, padding=padding)
def forward(self, x):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils
assert_size_stride = torch._C._dynamo.g... | lorylei/DARTS-et | Conv2d | false | 7,137 | [
"Apache-2.0"
] | 1 | f22cfd53c14afd6ba602b8ecfbff9cdf77fc2ff8 | https://github.com/lorylei/DARTS-et/tree/f22cfd53c14afd6ba602b8ecfbff9cdf77fc2ff8 |
ScaledDotProductAttention | # 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.... | krodyush/training_extensions | ScaledDotProductAttention | false | 10,977 | [
"Apache-2.0"
] | 0 | 542f4004dfbc6fc62a622065367ba4f85a703dd3 | https://github.com/krodyush/training_extensions/tree/542f4004dfbc6fc62a622065367ba4f85a703dd3 |
UPChannelRPN | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.nn.functional as F
assert_size_stride = torch... | LSH9832/MyPythonModules | UPChannelRPN | false | 918 | [
"MIT"
] | 0 | 442566a0fbd6ebe2bc20b6914686a1e2663d10c0 | https://github.com/LSH9832/MyPythonModules/tree/442566a0fbd6ebe2bc20b6914686a1e2663d10c0 |
Symmetric | import torch
import torch.nn as nn
import torch.quantization
import torch.onnx
import torch.nn.parallel
import torch.utils.data
import torch.fx
import torch.nn
import torch.optim
import torch.profiler
class Symmetric(nn.Module):
def forward(self, X):
return X.triu() + X.triu(1).transpose(-1, -2)
def ge... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.quantization
import torch.onnx
import torch.nn.parallel
import torch.utils.data
import torch.fx
import to... | MartinRenaudin/tutorials | Symmetric | false | 2,762 | [
"BSD-3-Clause"
] | 0 | 035d6827d77c52fed2a927f105e39fd73516f093 | https://github.com/MartinRenaudin/tutorials/tree/035d6827d77c52fed2a927f105e39fd73516f093 |
SelfGating | import torch
import torch.nn as nn
class SelfGating(nn.Module):
def __init__(self, input_dim):
super(SelfGating, self).__init__()
self.fc = nn.Linear(input_dim, input_dim)
def forward(self, input_tensor):
"""Feature gating as used in S3D-G"""
spatiotemporal_average = torch.me... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | necla-ml/CPR | SelfGating | false | 4,114 | [
"BSD-3-Clause"
] | 0 | 101023c587a35b254ea640b4501167a6830856af | https://github.com/necla-ml/CPR/tree/101023c587a35b254ea640b4501167a6830856af |
Decoder | import torch
from torch import nn
class Decoder(nn.Module):
def __init__(self, latent_dim, hidden_dim, output_dim):
super(Decoder, self).__init__()
self.FC_hidden = nn.Linear(latent_dim, hidden_dim)
self.FC_output = nn.Linear(hidden_dim, output_dim)
def forward(self, x):
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 import nn
assert_s... | Markussorensen/mlops_exercises | Decoder | false | 2,633 | [
"Apache-2.0"
] | 0 | 52a3198367b66bbe0a5cfdc7a9424789b03273db | https://github.com/Markussorensen/mlops_exercises/tree/52a3198367b66bbe0a5cfdc7a9424789b03273db |
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 ... | DanielTakeshi/DCUR | Critic | false | 352 | [
"MIT"
] | 0 | 1cdb00e7e68060ad3bba9a497106c327f6b5a663 | https://github.com/DanielTakeshi/DCUR/tree/1cdb00e7e68060ad3bba9a497106c327f6b5a663 |
BertAttention | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | codecaution/Hetu | BertAttention | false | 1,745 | [
"Apache-2.0"
] | 0 | e278732c2fe3554c8d576585f5bcbf79ade31b68 | https://github.com/codecaution/Hetu/tree/e278732c2fe3554c8d576585f5bcbf79ade31b68 |
SpatialMaxPool | # 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... | CPJKU/kagglebirds2020 | SpatialMaxPool | false | 17,046 | [
"MIT"
] | 4 | f86b459389b1d0b0af96ebc9252ffc8496c272e8 | https://github.com/CPJKU/kagglebirds2020/tree/f86b459389b1d0b0af96ebc9252ffc8496c272e8 |
InverseDepthSmoothnessLoss | import torch
import torch.nn as nn
def _gradient_x(img: 'torch.Tensor') ->torch.Tensor:
assert len(img.shape) == 4, img.shape
return img[:, :, :, :-1] - img[:, :, :, 1:]
def _gradient_y(img: 'torch.Tensor') ->torch.Tensor:
assert len(img.shape) == 4, img.shape
return img[:, :, :-1, :] - img[:, :, 1:... | 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... | connorlee77/kornia | InverseDepthSmoothnessLoss | false | 6,498 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | af5b1f76bedf2a7fc0e0da2386b1be3032b6534f | https://github.com/connorlee77/kornia/tree/af5b1f76bedf2a7fc0e0da2386b1be3032b6534f |
SoftQNetwork | # 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.... | constancecrozier/CityLearn | SoftQNetwork | false | 9,922 | [
"MIT"
] | 0 | c92f981771d29181cffce448a31d8f367a668175 | https://github.com/constancecrozier/CityLearn/tree/c92f981771d29181cffce448a31d8f367a668175 |
Net | import torch
import torch.nn as nn
import torch.nn.functional as F
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.conv1 = nn.Conv2d(1, 32, 3, 1)
self.conv2 = nn.Conv2d(32, 64, 3, 1)
self.dropout1 = nn.Dropout2d(0.25)
self.dropout2 = nn.Dropout2d... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | manjuransari/petastorm | Net | false | 16,001 | [
"Apache-2.0"
] | 1,393 | 1af7212a1293b1edb78767a359aa2b60db24b71b | https://github.com/manjuransari/petastorm/tree/1af7212a1293b1edb78767a359aa2b60db24b71b |
Triaffine | # 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... | ashim95/parser | Triaffine | false | 6,255 | [
"MIT"
] | 1 | 61e9cd6bf16dcf1aa2b9d51b3a6c04ed048b3199 | https://github.com/ashim95/parser/tree/61e9cd6bf16dcf1aa2b9d51b3a6c04ed048b3199 |
ConvAutoencoder | import torch
import torch.nn.functional as F
from torch import nn
import torch.utils.data
class ConvAutoencoder(nn.Module):
def __init__(self):
super(ConvAutoencoder, self).__init__()
self.conv1 = nn.Conv2d(12, 16, 3)
self.conv2 = nn.Conv2d(16, 4, 3)
self.t_conv1 = nn.ConvTranspos... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | dedbox/TOAD-GAN | ConvAutoencoder | false | 6,536 | [
"MIT"
] | 1 | 8a0a84d10f9c5975ae4b1c54f7da99567c8ffd67 | https://github.com/dedbox/TOAD-GAN/tree/8a0a84d10f9c5975ae4b1c54f7da99567c8ffd67 |
SPP | # 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... | LANCEREN/simpleAICV-pytorch-ImageNet-COCO-training | SPP | false | 13,976 | [
"MIT"
] | 154 | 86c1b38df3cdcb195ec5b6229c343f07a52aeb7b | https://github.com/LANCEREN/simpleAICV-pytorch-ImageNet-COCO-training/tree/86c1b38df3cdcb195ec5b6229c343f07a52aeb7b |
LinearBlock | import torch
from torch import nn
from scipy.stats import truncnorm
def truncated_normal_(tensor, mean=0.0, std=1.0):
values = truncnorm.rvs(-2, 2, size=tensor.shape)
values = mean + std * values
tensor.copy_(torch.from_numpy(values))
return tensor
def fc_init_(module):
if hasattr(module, 'weigh... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | JasonMa2016/learn2learn | LinearBlock | false | 870 | [
"MIT"
] | 0 | 502e1ea6db64481d7464fdda4d4d0be9b0f1089a | https://github.com/JasonMa2016/learn2learn/tree/502e1ea6db64481d7464fdda4d4d0be9b0f1089a |
Bottleneck_v1 | # 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 ... | JudeDavis1/intel-extension-for-pytorch | Bottleneck_v1 | false | 2,588 | [
"Apache-2.0"
] | 0 | 364e34cb4917a709f5108c07d4005bf82f3d5067 | https://github.com/JudeDavis1/intel-extension-for-pytorch/tree/364e34cb4917a709f5108c07d4005bf82f3d5067 |
ISub | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
@triton.jit
def triton_poi_fused_sub_0(in_ptr0, in_ptr1, out_ptr1, xnumel,... | ahangchen/torch2trt | ISub | false | 6,085 | [
"MIT"
] | 1 | 53c663f0e0570ef7ffd6771354ae3478f63bd328 | https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328 |
EDMLoss | import torch
import torch.nn as nn
import torch.optim
class EDMLoss(nn.Module):
def __init__(self):
super(EDMLoss, self).__init__()
def forward(self, p_target: 'torch.Tensor', p_estimate: 'torch.Tensor'):
assert p_target.shape == p_estimate.shape
cdf_target = torch.cumsum(p_target, 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
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torc... | ankerok1/nima.pytorch | EDMLoss | false | 14,867 | [
"MIT"
] | 300 | bbdbeeb8c22d880205a4fa35cfc2a533d064ee5d | https://github.com/ankerok1/nima.pytorch/tree/bbdbeeb8c22d880205a4fa35cfc2a533d064ee5d |
CenConv3d | # 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... | Hsuxu/vnet_attention | CenConv3d | false | 13,792 | [
"MIT"
] | 45 | 6958932f3974d268e93bd6443369a3f43c497ed3 | https://github.com/Hsuxu/vnet_attention/tree/6958932f3974d268e93bd6443369a3f43c497ed3 |
BiInteractionPooling | # 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 sklearn.metrics import *
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = tor... | liyunrui/DeepCTR-Torch | BiInteractionPooling | false | 12,946 | [
"Apache-2.0"
] | 0 | 392fd6d39d9ca0ac854022136cdb4d5c68e3a592 | https://github.com/liyunrui/DeepCTR-Torch/tree/392fd6d39d9ca0ac854022136cdb4d5c68e3a592 |
ScalingFactor | import logging
import torch
class ScalingFactor(torch.nn.Module):
"""
Scale the output y of the layer s.t. the (mean) variance wrt. to the reference input x_ref is preserved.
"""
def __init__(self):
super().__init__()
self.scale_factor = torch.nn.Parameter(torch.tensor(1.0),
... | 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 logging
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_c... | Open-Catalyst-Project/baselines | ScalingFactor | false | 17,799 | [
"MIT"
] | 10 | 89948582edfb8debb736406d54db9813a5f2c88d | https://github.com/Open-Catalyst-Project/baselines/tree/89948582edfb8debb736406d54db9813a5f2c88d |
SelfAttention | # 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.... | Antipurity/sensor-network | SelfAttention | false | 241 | [
"MIT"
] | 0 | c5cc67dee408da831c3ab60a03374da3c4789bd2 | https://github.com/Antipurity/sensor-network/tree/c5cc67dee408da831c3ab60a03374da3c4789bd2 |
UnpoolAvgHealpix | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
reinterpret... | ownzonefeng/weather_prediction | UnpoolAvgHealpix | false | 7,427 | [
"MIT"
] | 1 | 723c02b6b3c0a40751d87572b66c7a4e040dec92 | https://github.com/ownzonefeng/weather_prediction/tree/723c02b6b3c0a40751d87572b66c7a4e040dec92 |
Unet_2levels | import torch
import torch.nn as nn
class Unet_2levels(nn.Module):
def __init__(self):
super().__init__()
self.relu = nn.ReLU()
self.sigmoid = nn.Sigmoid()
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear',
align_corners=True)
self.maxpool = nn.MaxPool... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | MuhammadIbrahim0/dvae-refiner | Unet_2levels | false | 9,373 | [
"MIT"
] | 0 | 034241ce6a5aeb19e9f8952ee996b56412a1f95a | https://github.com/MuhammadIbrahim0/dvae-refiner/tree/034241ce6a5aeb19e9f8952ee996b56412a1f95a |
Cosine | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch.optim.lr... | chunhuililili/mt_dnn | Cosine | false | 10,200 | [
"MIT"
] | 0 | 4c6efaf21724c7b8103a05e46b5b44d7b246225e | https://github.com/chunhuililili/mt_dnn/tree/4c6efaf21724c7b8103a05e46b5b44d7b246225e |
BatchSpectralShrinkage | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C.... | neka-nat/Transfer-Learning-Library | BatchSpectralShrinkage | false | 16,142 | [
"MIT"
] | 1,474 | a3b27b0d7562fa90a02e914140b37ab438469e6c | https://github.com/neka-nat/Transfer-Learning-Library/tree/a3b27b0d7562fa90a02e914140b37ab438469e6c |
GCNModelVAE | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch.nn import Module
i... | HongyiZhu/EHI | GCNModelVAE | false | 550 | [
"MIT"
] | 0 | 9fbbc6046546dd7fc6de5d831b4c941bc4404e02 | https://github.com/HongyiZhu/EHI/tree/9fbbc6046546dd7fc6de5d831b4c941bc4404e02 |
BboxHead | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
import torch.nn
assert_size_stride = torch._C._dynamo.guard... | ZongqingHou/Pytorch_Retinaface | BboxHead | false | 3,064 | [
"MIT"
] | 0 | 6284b7158a0d9d3d4a2cc267a393c21863a1b938 | https://github.com/ZongqingHou/Pytorch_Retinaface/tree/6284b7158a0d9d3d4a2cc267a393c21863a1b938 |
SqueezeEmbedding | import torch
import torch.nn as nn
class SqueezeEmbedding(nn.Module):
"""
Squeeze sequence embedding length to the longest one in the batch
"""
def __init__(self, batch_first=True):
super(SqueezeEmbedding, self).__init__()
self.batch_first = batch_first
def forward(self, x, x_len... | 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... | XuMayi/PyABSA | SqueezeEmbedding | false | 1,260 | [
"MIT"
] | 0 | 3d71c0cdaea7ea1eff600d9091c3c63f61c111e5 | https://github.com/XuMayi/PyABSA/tree/3d71c0cdaea7ea1eff600d9091c3c63f61c111e5 |
ApplyHardAttention | import torch
class ApplyHardAttention(torch.nn.Module):
"""
ApplyHardAttention: Apply hard attention for the purpose of time-alignment.
"""
def __init__(self):
super().__init__()
def forward(self, y, att):
self.idx = att.argmax(2)
y = y[torch.arange(y.shape[0]).unsqueeze(... | 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... | ishine/NISQA | ApplyHardAttention | false | 15,620 | [
"MIT"
] | 223 | 2c8917f30c4e4bbca3a48e9852301f1e2480a741 | https://github.com/ishine/NISQA/tree/2c8917f30c4e4bbca3a48e9852301f1e2480a741 |
HeatmapLoss | import torch
import torch.utils.data
class HeatmapLoss(torch.nn.Module):
"""
loss for detection heatmap
"""
def __init__(self):
super(HeatmapLoss, self).__init__()
def forward(self, pred, gt):
l = (pred - gt) ** 2
l = l.mean(dim=3).mean(dim=2).mean(dim=1)
return l... | 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_... | seeinggreen/pyslr | HeatmapLoss | false | 4,374 | [
"BSD-3-Clause"
] | 0 | 17009582f70aed09a9174ce47f9414f715173018 | https://github.com/seeinggreen/pyslr/tree/17009582f70aed09a9174ce47f9414f715173018 |
DQN | import torch
import torch.nn.functional as F
import torch.nn as nn
class DQN(nn.Module):
"""Agent Model."""
def __init__(self, state_size, action_size, seed, layer1_units=64,
layer2_units=64):
"""Initialize parameters and build model.
Params
======
state_size (int): Dimension of ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | FranckNdame/drlkit | DQN | false | 8,106 | [
"MIT"
] | 33 | 698f3c182036cc5eed68f2a05b53a3e3670146bf | https://github.com/FranckNdame/drlkit/tree/698f3c182036cc5eed68f2a05b53a3e3670146bf |
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... | luogan1234/movie-dialog-project | MLP | false | 7,131 | [
"MIT"
] | 1 | 17ac4a10c069c6b4c41bb675b98a35b2182cf504 | https://github.com/luogan1234/movie-dialog-project/tree/17ac4a10c069c6b4c41bb675b98a35b2182cf504 |
PairwiseRankingLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
emp... | BinWang28/EvalRank-Embedding-Evaluation | PairwiseRankingLoss | false | 7,796 | [
"BSD-3-Clause"
] | 15 | 454dac5c7345f01993688f33375f637129c285e3 | https://github.com/BinWang28/EvalRank-Embedding-Evaluation/tree/454dac5c7345f01993688f33375f637129c285e3 |
AsymmetricLossOptimized | # 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... | aangelopoulos/rcps | AsymmetricLossOptimized | false | 14,732 | [
"MIT"
] | 52 | b400457f7cc7261d1ed610cdf7aa2230de657c57 | https://github.com/aangelopoulos/rcps/tree/b400457f7cc7261d1ed610cdf7aa2230de657c57 |
TabularNetD | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import numpy as np
import matplotlib.pyplot as plt
import torch.nn as nn
import ... | Atrus619/CSDGAN | TabularNetD | false | 5,223 | [
"MIT"
] | 1 | 712be213e59b32a79a4970684d726af63616edaf | https://github.com/Atrus619/CSDGAN/tree/712be213e59b32a79a4970684d726af63616edaf |
AgentNN | # 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
assert_size_stride ... | gimait/DaDSbot | AgentNN | false | 12,423 | [
"MIT"
] | 0 | 6ee6fea2339faa9a9a2fce29c3b00def378d88d3 | https://github.com/gimait/DaDSbot/tree/6ee6fea2339faa9a9a2fce29c3b00def378d88d3 |
Loss | # 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
... | Neronjust2017/Bayesian-neural-networks | Loss | false | 17,766 | [
"MIT"
] | 4 | 9d7f781f5c2dfa8fadf26300b4b5b64366c939cd | https://github.com/Neronjust2017/Bayesian-neural-networks/tree/9d7f781f5c2dfa8fadf26300b4b5b64366c939cd |
UpBlock | # 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.utils.data
from torchvision.transforms import *
assert_size_stride ... | HamsterBiz/iSeeBetter | UpBlock | false | 11,674 | [
"MIT"
] | 0 | a71cee61583bdedab1f3b368e2cb7dc5ad969aed | https://github.com/HamsterBiz/iSeeBetter/tree/a71cee61583bdedab1f3b368e2cb7dc5ad969aed |
TransposedUpsample | # 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... | transat/latent-diffusion | TransposedUpsample | false | 10,918 | [
"MIT"
] | 0 | 1ea0d5bb3fb0fe3f7e8c42cbae91423780977f83 | https://github.com/transat/latent-diffusion/tree/1ea0d5bb3fb0fe3f7e8c42cbae91423780977f83 |
GCNConv_diag | import torch
from sklearn.metrics.pairwise import *
from torch.optim.lr_scheduler import *
class GCNConv_diag(torch.nn.Module):
"""
A GCN convolution layer of diagonal matrix multiplication
"""
def __init__(self, input_size, device):
super(GCNConv_diag, self).__init__()
self.W = torch... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from sklearn.metrics.pairwise import *
from torch.optim.lr_scheduler import *
as... | STK101/GRCN | GCNConv_diag | false | 17,921 | [
"MIT"
] | 4 | 7389000a13d5969bcc77dc4cf73a4107acc68403 | https://github.com/STK101/GRCN/tree/7389000a13d5969bcc77dc4cf73a4107acc68403 |
RegWeightedL1Loss | import torch
import torch.nn as nn
import torch.nn.functional as F
def _gather_feat(feat, ind, mask=None):
dim = feat.size(2)
ind = ind.unsqueeze(2).expand(ind.size(0), ind.size(1), dim)
feat = feat.gather(1, ind)
if mask is not None:
mask = mask.unsqueeze(2).expand_as(feat)
feat = fea... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | SaqibMamoon/GSDT | RegWeightedL1Loss | false | 5,799 | [
"MIT"
] | 1 | e11c52a67291e973016ed34c3c95659e0af32d48 | https://github.com/SaqibMamoon/GSDT/tree/e11c52a67291e973016ed34c3c95659e0af32d48 |
MNIST_CNN | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data
class MNIST_CNN(nn.Module):
"""
Hand-tuned architecture for MNIST.
Weirdness I've noticed so far with this architecture:
- adding a linear layer after the mean-pool in features hurts
RotatedMNIST-100 gen... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | alceubissoto/DomainBed | MNIST_CNN | false | 1,427 | [
"MIT"
] | 0 | 80d54050f52fb5349e2a47c0674046e6d0674f3d | https://github.com/alceubissoto/DomainBed/tree/80d54050f52fb5349e2a47c0674046e6d0674f3d |
ContrastivePairwiseEmbeddingLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Casyfill/catalyst | ContrastivePairwiseEmbeddingLoss | false | 9,002 | [
"Apache-2.0"
] | 0 | 7f63545dbc53902c3dd959463def28a67a16a989 | https://github.com/Casyfill/catalyst/tree/7f63545dbc53902c3dd959463def28a67a16a989 |
CaffeNormalize | # 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.utils.data
import torch.nn as nn
assert_size_stride = torch._C._dy... | BingjieTang/DepthAwareCNN | CaffeNormalize | false | 159 | [
"MIT"
] | 0 | 9d72a7dc921d1dd550507018d4b51968ef89bbb7 | https://github.com/BingjieTang/DepthAwareCNN/tree/9d72a7dc921d1dd550507018d4b51968ef89bbb7 |
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
from torch._inductor.runtime.... | poria-cat/Transformer-TTS-Pytorch | FeedForward | false | 10,756 | [
"MIT"
] | 0 | 1e9e2dccc16c17372bf86ca73001f76645f53338 | https://github.com/poria-cat/Transformer-TTS-Pytorch/tree/1e9e2dccc16c17372bf86ca73001f76645f53338 |
OrthogonalFusion | import torch
import torch.nn as nn
class OrthogonalFusion(nn.Module):
def __init__(self):
super().__init__()
def forward(self, local_feat, global_feat):
global_feat_norm = torch.norm(global_feat, p=2, dim=1)
projection = torch.bmm(global_feat.unsqueeze(1), torch.flatten(
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | flrngel/DOLG-pytorch | OrthogonalFusion | false | 15,362 | [
"MIT"
] | 56 | 97732d2932ef6733f17cf8ac1aee990effe6fd64 | https://github.com/flrngel/DOLG-pytorch/tree/97732d2932ef6733f17cf8ac1aee990effe6fd64 |
KL | import torch
import torch.nn as nn
import torch.nn.functional as F
class KL(nn.Module):
def __init__(self, reduction='batchmean'):
super(KL, self).__init__()
self.reduction = reduction
def forward(self, input, target):
input = input.float()
target = target.float()
los... | 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... | lonePatient/TorchBlocks | KL | false | 15,951 | [
"MIT"
] | 82 | 4a65d746cc8a396cb7df73ed4644d97ddf843e29 | https://github.com/lonePatient/TorchBlocks/tree/4a65d746cc8a396cb7df73ed4644d97ddf843e29 |
ChannelPool | # 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.onnx
import torch.nn.parallel
assert_size_stride = tor... | Ganzooo/soil_segmentation | ChannelPool | false | 2,266 | [
"MIT"
] | 0 | 56f410e3e184f24e52dd4b542ea309f0d203ca00 | https://github.com/Ganzooo/soil_segmentation/tree/56f410e3e184f24e52dd4b542ea309f0d203ca00 |
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
from torch ... | DeVriesMatt/cellshape-voxel | FocalLoss | false | 5,062 | [
"BSD-3-Clause"
] | 1 | 64c2c57cc8b8ebe7f6ba1934caaaa3aaa1d6a0c1 | https://github.com/DeVriesMatt/cellshape-voxel/tree/64c2c57cc8b8ebe7f6ba1934caaaa3aaa1d6a0c1 |
MultiAccuracy | import torch
class MultiAccuracy(torch.nn.Module):
"""Calculates accuracy for multiclass inputs (batchsize, feature length) by determining the most likely class
using argmax -> (batchsize,) and then comparing with targets which are also (batchsize,)
"""
def __init__(self):
super(MultiAccuracy... | 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... | namiyousef/ml-utils | MultiAccuracy | false | 12,813 | [
"MIT"
] | 0 | b67611e9e112f8bbc004a083ce4c9fcd8c1949fa | https://github.com/namiyousef/ml-utils/tree/b67611e9e112f8bbc004a083ce4c9fcd8c1949fa |
MDN | from torch.nn import Module
import torch
from torch.nn.modules import Module
from torch.nn.modules import Linear
class MDN(Module):
def __init__(self, input_size, num_mixtures):
super(MDN, self).__init__()
self.input_size = input_size
self.num_mixtures = num_mixtures
self.paramete... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | poctaviano/Handwriting-Model | MDN | false | 4,136 | [
"MIT"
] | 0 | 30311ea0f4cb6e7bc0114cf0b2a96dc915dd9795 | https://github.com/poctaviano/Handwriting-Model/tree/30311ea0f4cb6e7bc0114cf0b2a96dc915dd9795 |
SAModule_Head | # 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.... | DecAngel/C-3-Framework | SAModule_Head | false | 369 | [
"MIT"
] | 0 | 00b792b4481a0ec9d7e30e290c66e7020235e79b | https://github.com/DecAngel/C-3-Framework/tree/00b792b4481a0ec9d7e30e290c66e7020235e79b |
CrossRegion | import torch
import torch.nn as nn
import torch.fft
class CrossRegion(nn.Module):
def __init__(self, step=1, dim=1):
super().__init__()
self.step = step
self.dim = dim
def forward(self, x):
return torch.roll(x, self.step, self.dim)
def get_inputs():
return [torch.rand([... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.fft
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo... | liuruiyang98/Jittor-MLP | CrossRegion | false | 15,928 | [
"MIT"
] | 49 | b86656b65cf5f18ba9eb760d1f7565ed95e7e96e | https://github.com/liuruiyang98/Jittor-MLP/tree/b86656b65cf5f18ba9eb760d1f7565ed95e7e96e |
weightedFeatureFusion | import torch
import torch.nn as nn
class weightedFeatureFusion(nn.Module):
def __init__(self, layers, weight=False):
super(weightedFeatureFusion, self).__init__()
self.layers = layers
self.weight = weight
self.n = len(layers) + 1
if weight:
self.w = torch.nn.Pa... | 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... | heymesut/SJTU_microe | weightedFeatureFusion | false | 6,804 | [
"BSD-3-Clause"
] | 1 | 7a862d03b4d8fe4c8608173a16082f44001f3f13 | https://github.com/heymesut/SJTU_microe/tree/7a862d03b4d8fe4c8608173a16082f44001f3f13 |
_BoundaryRefineModule | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | BloodAxe/segmentation-networks-benchmark | _BoundaryRefineModule | false | 7,876 | [
"MIT"
] | 34 | 2e3feb560102230be9369ab442b4a59cc86dff61 | https://github.com/BloodAxe/segmentation-networks-benchmark/tree/2e3feb560102230be9369ab442b4a59cc86dff61 |
Mid_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
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dyn... | basharbme/3d_segmentation | Mid_block | false | 6,360 | [
"MIT"
] | 1 | efcd966f74ebb74614515c38930e820ea1c4744e | https://github.com/basharbme/3d_segmentation/tree/efcd966f74ebb74614515c38930e820ea1c4744e |
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.... | junchen14/video_language | MultiHeadAttention | false | 3,780 | [
"Apache-2.0"
] | 0 | 1d6d304b795501d1e0d56351047a259d992fab23 | https://github.com/junchen14/video_language/tree/1d6d304b795501d1e0d56351047a259d992fab23 |
PatchEmbed | # 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... | MarcCoru/dino | PatchEmbed | false | 798 | [
"Apache-2.0"
] | 0 | 45c7c7e5ed4649fb74424eef6f64b46d460f745f | https://github.com/MarcCoru/dino/tree/45c7c7e5ed4649fb74424eef6f64b46d460f745f |
DQN | import torch
import torch.nn.functional as F
import torch.nn as nn
class DQN(nn.Module):
"""A simple deep Q network implementation.
Computes Q values for each (action, object) tuple given an input state vector
"""
def __init__(self, state_dim, action_dim, object_dim, hidden_size=100):
super(D... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | Jerimat/MITx-6.86-MachineLearning_EdX | DQN | false | 5,394 | [
"MIT"
] | 1 | e454e0646cd923d689d3946ea2ff3432dec920ac | https://github.com/Jerimat/MITx-6.86-MachineLearning_EdX/tree/e454e0646cd923d689d3946ea2ff3432dec920ac |
BasicModel6_MultiTensor | import torch
import torch.nn as nn
import torch.nn.functional as F
class BasicModel6_MultiTensor(nn.Module):
def __init__(self):
super().__init__()
def forward(self, input1, input2):
input = input1 + input2
return 1 - F.relu(1 - input)[:, 1]
def get_inputs():
return [torch.rand... | 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... | Europium248/captum | BasicModel6_MultiTensor | false | 413 | [
"BSD-3-Clause"
] | 0 | ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc | https://github.com/Europium248/captum/tree/ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc |
CustomNet | # 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... | DenXX/fvcore | CustomNet | false | 2,206 | [
"Apache-2.0"
] | 0 | 4b91cf092f4f5d379b2c93398780a3b5755e7179 | https://github.com/DenXX/fvcore/tree/4b91cf092f4f5d379b2c93398780a3b5755e7179 |
RightSVDLayer | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
import torch.nn as nn
from torch.nn.parameter import Parameter
asser... | collodi/ml_svd | RightSVDLayer | false | 1,733 | [
"MIT"
] | 0 | 67a608ca10d3d37bf861e4e7490e62d298fa83b9 | https://github.com/collodi/ml_svd/tree/67a608ca10d3d37bf861e4e7490e62d298fa83b9 |
PixelwiseNormalization | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_... | DannyDannyDanny/DeepPrivacy | PixelwiseNormalization | false | 2,116 | [
"MIT"
] | 0 | 749e260bdcc28a0c12d526f24e4f5315d1b447ad | https://github.com/DannyDannyDanny/DeepPrivacy/tree/749e260bdcc28a0c12d526f24e4f5315d1b447ad |
GaussianSmoothing | import math
import torch
import torch.nn as nn
import torch.nn.parallel
class GaussianSmoothing(nn.Module):
"""
Apply gaussian smoothing on a
1d, 2d or 3d tensor. Filtering is performed seperately for each channel
in the input using a depthwise convolution.
Arguments:
channels (int, sequen... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
import torch.nn as nn
import torch.nn.parallel
assert_size_stride = ... | rakshithShetty/SemanticAdversary | GaussianSmoothing | false | 7,528 | [
"MIT"
] | 1 | e6d50f00af6f7d847cba4210613afea4be773254 | https://github.com/rakshithShetty/SemanticAdversary/tree/e6d50f00af6f7d847cba4210613afea4be773254 |
ConvSig | import torch
import torch.utils.data
import torch.nn as nn
import torch.nn.parallel
from torch import optim as optim
def autopad(k, p=None):
if p is None:
p = k // 2 if isinstance(k, int) else [(x // 2) for x in k]
return p
class ConvSig(nn.Module):
def __init__(self, c1, c2, k=1, s=1, p=None, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
import torch.nn as nn
import torch.nn.parallel
from torc... | dumpmemory/NonDeepNetworks | ConvSig | false | 15,254 | [
"BSD-3-Clause"
] | 307 | 5513bf588f4e64c99583440507232675c2e21e34 | https://github.com/dumpmemory/NonDeepNetworks/tree/5513bf588f4e64c99583440507232675c2e21e34 |
MaxPoolPad | import torch
import torch.nn as nn
from math import *
class MaxPoolPad(nn.Module):
def __init__(self):
super(MaxPoolPad, self).__init__()
self.pad = nn.ZeroPad2d((1, 0, 1, 0))
self.pool = nn.MaxPool2d(3, stride=2, padding=1)
def forward(self, x):
x = self.pad(x)
x = 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
import torch.nn as nn
from math import *
assert_size_stride = torch._C._dynamo.guards.ass... | Helicopt/torchreid-preprocess | MaxPoolPad | false | 542 | [
"MIT"
] | 0 | 2597e502eef079705a5f8a9115a9a1980a9d080d | https://github.com/Helicopt/torchreid-preprocess/tree/2597e502eef079705a5f8a9115a9a1980a9d080d |
MatrixAttention | # 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 math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guar... | michiyasunaga/GreaseLM | MatrixAttention | false | 16,046 | [
"MIT"
] | 76 | 596aa5047841e3e97730f621a2e4576772733df2 | https://github.com/michiyasunaga/GreaseLM/tree/596aa5047841e3e97730f621a2e4576772733df2 |
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
import ... | XL2248/VHM | FeedForward | false | 18,094 | [
"MIT"
] | 8 | d6c21938f7cf095590b35e6ae7e0ef2b27d430f8 | https://github.com/XL2248/VHM/tree/d6c21938f7cf095590b35e6ae7e0ef2b27d430f8 |
Conv | # 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_... | Jvictor97/AWR-Adaptive-Weighting-Regression | Conv | false | 715 | [
"MIT"
] | 0 | 2c29f8ac3d824edfff07465232ffed8e4d837ebf | https://github.com/Jvictor97/AWR-Adaptive-Weighting-Regression/tree/2c29f8ac3d824edfff07465232ffed8e4d837ebf |
CNN | import torch
import torch.nn as nn
import torch.utils.data
class CNN(nn.Module):
def __init__(self):
super(CNN, self).__init__()
self.Conv1 = nn.Conv2d(1, 15, 9, 1, 0)
self.Relu1 = nn.ReLU()
self.MaxPool1 = nn.MaxPool2d(2)
self.Conv2 = nn.Conv2d(15, 20, 5, 1, 0)
se... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | clapmyhands/cz4042 | CNN | false | 6,482 | [
"MIT"
] | 1 | 8869bacfb5a49566ae9fcce464187035093ed22d | https://github.com/clapmyhands/cz4042/tree/8869bacfb5a49566ae9fcce464187035093ed22d |
TransformerDecoderLayer | # 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.... | FrankVerhoef/Persona-Dialogue-Generation | TransformerDecoderLayer | false | 5,209 | [
"MIT"
] | 1 | ffd8413c2e8b6446097902dd1c496aeb24b852b4 | https://github.com/FrankVerhoef/Persona-Dialogue-Generation/tree/ffd8413c2e8b6446097902dd1c496aeb24b852b4 |
LayerNorm | # 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
from torch.nn import Parameter
assert_size_stride = torch... | autocomic/deepfillv2 | LayerNorm | false | 12,135 | [
"MIT"
] | 0 | 4b0f565accbf20ee90093a4504b1cff0099d9cb9 | https://github.com/autocomic/deepfillv2/tree/4b0f565accbf20ee90093a4504b1cff0099d9cb9 |
Attention | import math
import torch
from torch import nn
from torch.nn import functional as F
class Attention(nn.Module):
def __init__(self, hidden_size):
super(Attention, self).__init__()
self.hidden_size = hidden_size
self.attn = nn.Linear(self.hidden_size * 2, hidden_size)
self.v = nn.Par... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | ZagHe568/pytorch-seq2seq | Attention | false | 6,035 | [
"MIT"
] | 1 | 2491c04650b480944c76a15532e5cc89e9dc62fb | https://github.com/ZagHe568/pytorch-seq2seq/tree/2491c04650b480944c76a15532e5cc89e9dc62fb |
LossMSE | from torch.nn import Module
import torch
class LossMSE(Module):
"""implementation of the Mean-Squared Error Loss"""
def __init__(self):
super().__init__()
self.params = []
def forward(self, y, t):
self.y = y
self.t = t
return torch.dist(y, t, p=2)
def backwar... | 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.nn import Module
... | LucaZampieri/DL | LossMSE | false | 779 | [
"MIT"
] | 0 | e53ade2638ccc3ca368e15c8454845856776e719 | https://github.com/LucaZampieri/DL/tree/e53ade2638ccc3ca368e15c8454845856776e719 |
Project3D | import torch
import torch.nn as nn
class Project3D(nn.Module):
"""Layer which projects 3D points into a camera with intrinsics K and at position T
"""
def __init__(self, batch_size, height, width, eps=1e-07):
super(Project3D, self).__init__()
self.batch_size = batch_size
self.heig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | HalleyJiang/PLNet | Project3D | false | 8,209 | [
"MIT"
] | 16 | a02bd5f343b9e4766891fd234e3a338c1eaa26ff | https://github.com/HalleyJiang/PLNet/tree/a02bd5f343b9e4766891fd234e3a338c1eaa26ff |
MaxSpatialPoolP4 | # 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... | claudio-unipv/groupcnn | MaxSpatialPoolP4 | false | 12,222 | [
"MIT"
] | 0 | 2b1514f5a0fb9a78c6f646e1c075e5c3d5af9c0c | https://github.com/claudio-unipv/groupcnn/tree/2b1514f5a0fb9a78c6f646e1c075e5c3d5af9c0c |
RFDB | # 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 ... | lee-zq/MRDN | RFDB | false | 3,922 | [
"Apache-2.0"
] | 0 | 976c1f8cd0d4b1943378149ef836bb86dd5fc0cd | https://github.com/lee-zq/MRDN/tree/976c1f8cd0d4b1943378149ef836bb86dd5fc0cd |
NextSentencePrediction | # 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.... | byeongjokim/LateTemporalModeling3DCNN_for_sign | NextSentencePrediction | false | 1,628 | [
"MIT"
] | 0 | e3a802fcf91dc3930aea782464ee34d9b747d3ab | https://github.com/byeongjokim/LateTemporalModeling3DCNN_for_sign/tree/e3a802fcf91dc3930aea782464ee34d9b747d3ab |
Dense_block | import torch
import torch.nn as nn
class Dense_block(nn.Module):
""" This is the initial dense block as in the paper """
def __init__(self, in_channels, out_channels):
super(Dense_block, self).__init__()
self.Dense = torch.nn.Linear(in_channels, out_channels)
nn.init.xavier_uniform(se... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | Mohanned-Elkholy/ResNet-GAN | Dense_block | false | 5,612 | [
"MIT"
] | 1 | 81b01294d8b5035131aee24d486e2cb879030832 | https://github.com/Mohanned-Elkholy/ResNet-GAN/tree/81b01294d8b5035131aee24d486e2cb879030832 |
ConvKernel | # 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.nn import Module
import math
from torch.nn.modules.utils import _pair... | MarcCote/spatial-reasoning | ConvKernel | false | 800 | [
"MIT"
] | 0 | 06c57cfafbd1c24b68d6ab634d19806964d867f3 | https://github.com/MarcCote/spatial-reasoning/tree/06c57cfafbd1c24b68d6ab634d19806964d867f3 |
_DualSpanningAvgPool | # 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
from typing import *
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dyn... | HughMun/MultiBench | _DualSpanningAvgPool | false | 13,799 | [
"MIT"
] | 148 | d5712a0815a9486b0e0c76b54cd63c880188fc8e | https://github.com/HughMun/MultiBench/tree/d5712a0815a9486b0e0c76b54cd63c880188fc8e |
SinkhornDivergence | import torch
import torch.nn as nn
from torch.nn import functional as F
class OptimalTransport(nn.Module):
@staticmethod
def distance(batch1, batch2, dist_metric='cosine'):
if dist_metric == 'cosine':
batch1 = F.normalize(batch1, p=2, dim=1)
batch2 = F.normalize(batch2, p=2, d... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | DMIRLAB-Group/Dassl.pytorch | SinkhornDivergence | false | 5,037 | [
"MIT"
] | 1 | 79052448cc0b0622f14e9768dbd6e6c0598fe6d1 | https://github.com/DMIRLAB-Group/Dassl.pytorch/tree/79052448cc0b0622f14e9768dbd6e6c0598fe6d1 |
Debayer2x2 | import torch
import torch.nn
import torch.nn.functional
class Debayer2x2(torch.nn.Module):
"""Demosaicing of Bayer images using 2x2 convolutions.
Requires BG-Bayer color filter array layout. That is,
the image[1,1]='B', image[1,2]='G'. This corresponds
to OpenCV naming conventions.
""... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn
import torch.... | tasptz/pytorch-debayer | Debayer2x2 | false | 13,022 | [
"MIT"
] | 0 | ec35f34a57c045eb2319f4ef87f371d95f7394c3 | https://github.com/tasptz/pytorch-debayer/tree/ec35f34a57c045eb2319f4ef87f371d95f7394c3 |
Advantage_estimate | # 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... | pupupue/Deep-RL-atari | Advantage_estimate | false | 7,490 | [
"MIT"
] | 1 | 9b97157f87826feafcf272761d7eef9693a2b2c4 | https://github.com/pupupue/Deep-RL-atari/tree/9b97157f87826feafcf272761d7eef9693a2b2c4 |
Gate | # 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... | csarron/QAModels | Gate | false | 1,756 | [
"BSD-3-Clause"
] | 0 | 2db2d7b0f546b88211e111b42744408bbf9b6f35 | https://github.com/csarron/QAModels/tree/2db2d7b0f546b88211e111b42744408bbf9b6f35 |
AdaptiveAvgMaxPool2d | import torch
import torch.nn as nn
class FastGlobalAvgPool2d(nn.Module):
def __init__(self, flatten=False):
super(FastGlobalAvgPool2d, self).__init__()
self.flatten = flatten
def forward(self, x):
if self.flatten:
in_size = x.size()
return x.view((in_size[0], ... | 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... | tenghehan/reid_without_id | AdaptiveAvgMaxPool2d | false | 10,866 | [
"MIT"
] | 0 | d1d0ff273b1ef19fc6da8cbbf210527779b37455 | https://github.com/tenghehan/reid_without_id/tree/d1d0ff273b1ef19fc6da8cbbf210527779b37455 |
RobertaClassificationHead | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
class RobertaClassificationHead(nn.Module):
"""Head for sentence-level classification tasks."""
def __init__(self, config):
super().__init__()
self.dense = nn.Linear(config.hidden_size * 2, config.hidden_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.triton_helpers import libdevice
import torch.nn as ... | frankxu2004/CodeT5 | RobertaClassificationHead | false | 10,080 | [
"BSD-3-Clause"
] | 0 | 454e30a40b833a5ed862a1942f5d545e6a06b2b1 | https://github.com/frankxu2004/CodeT5/tree/454e30a40b833a5ed862a1942f5d545e6a06b2b1 |
piNetwork | # 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.... | lolcharles2/TetrisReinforcementLearning | piNetwork | false | 12,730 | [
"MIT"
] | 0 | 5e3d5035732a19681aca57f025d8378a8fc119e8 | https://github.com/lolcharles2/TetrisReinforcementLearning/tree/5e3d5035732a19681aca57f025d8378a8fc119e8 |
GeneralizedMeanPoolingFpn | # 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
from a... | CASIA-IVA-Lab/PASS_reID | GeneralizedMeanPoolingFpn | false | 17,033 | [
"Apache-2.0"
] | 5 | 46dc6d25f4396e35ac1a766ad2dcaa580beccf15 | https://github.com/CASIA-IVA-Lab/PASS_reID/tree/46dc6d25f4396e35ac1a766ad2dcaa580beccf15 |
BertSelfAttention | from _paritybench_helpers import _mock_config
import math
import torch
import torch.nn.functional as F
import torch.nn as nn
class BertSelfAttention(nn.Module):
def __init__(self, config):
super(BertSelfAttention, self).__init__()
if config.hidden_size % config.num_attention_heads != 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.... | codecaution/Hetu | BertSelfAttention | false | 1,741 | [
"Apache-2.0"
] | 0 | e278732c2fe3554c8d576585f5bcbf79ade31b68 | https://github.com/codecaution/Hetu/tree/e278732c2fe3554c8d576585f5bcbf79ade31b68 |
PositionwiseFeedForward | import torch
import torch.nn as nn
import torch.nn.functional as F
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.norm = n... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | fellenB/dcp | PositionwiseFeedForward | false | 3,492 | [
"MIT"
] | 0 | 3ca7724799d38ff8a56acb4b8b9011bb41932cb0 | https://github.com/fellenB/dcp/tree/3ca7724799d38ff8a56acb4b8b9011bb41932cb0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.