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 |
|---|---|---|---|---|---|---|---|---|---|---|
HaltingUnit | import torch
import torch.nn as nn
import torch as th
import torch.utils.data
from collections import *
import torch.nn.init as INIT
from torch.nn import LayerNorm
class HaltingUnit(nn.Module):
halting_bias_init = 1.0
def __init__(self, dim_model):
super(HaltingUnit, self).__init__()
self.lin... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | pgplus1628/dgl | HaltingUnit | false | 7,455 | [
"Apache-2.0"
] | 1 | bf3994eea68b5841349f1616f41d0f70123a11ec | https://github.com/pgplus1628/dgl/tree/bf3994eea68b5841349f1616f41d0f70123a11ec |
Model | # 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... | dohnlee/qufa2021 | Model | false | 12,301 | [
"MIT"
] | 0 | 5fb42caee09ec228358e49768e32c75e3c0094ce | https://github.com/dohnlee/qufa2021/tree/5fb42caee09ec228358e49768e32c75e3c0094ce |
SoftDetectionModule | import torch
import torch.nn.functional as F
import torch.nn as nn
class SoftDetectionModule(nn.Module):
def __init__(self, soft_local_max_size=3):
super(SoftDetectionModule, self).__init__()
self.soft_local_max_size = soft_local_max_size
self.pad = self.soft_local_max_size // 2
def ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.nn as nn
... | deep-learning-20/d2-net | SoftDetectionModule | false | 1,827 | [
"BSD-3-Clause-Clear"
] | 0 | b092186353af23e9247c7f56ac2de3396b8c5a00 | https://github.com/deep-learning-20/d2-net/tree/b092186353af23e9247c7f56ac2de3396b8c5a00 |
_ShiftedSoftPlus | # 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, math as tl_math
import math
import torch.jit
import torch.nn.functional
import... | albertzhu01/nequip | _ShiftedSoftPlus | false | 1,391 | [
"MIT"
] | 0 | 63ba41185e7852ebb6f68983ec30d1f569e43271 | https://github.com/albertzhu01/nequip/tree/63ba41185e7852ebb6f68983ec30d1f569e43271 |
MedianPool2d | import torch
from torch.nn.modules.utils import _pair
import torch.nn as nn
from torch.nn import functional as F
import torch.nn.parallel
from torch.nn.modules.utils import _quadruple
class MedianPool2d(nn.Module):
""" Median pool (usable as median filter when stride=1) module.
Args:
kernel_size: si... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch.nn.modules.utils import _pair
import torch.nn as nn
import tor... | Fanzhongjie/ARFE | MedianPool2d | false | 444 | [
"Apache-2.0"
] | 0 | 4b96b8c5bc0895d3d30acec2a490f81a860fe860 | https://github.com/Fanzhongjie/ARFE/tree/4b96b8c5bc0895d3d30acec2a490f81a860fe860 |
BertOutput | from _paritybench_helpers import _mock_config
import torch
import torch.utils.data
import torch.nn as nn
import torch
import torch.nn.parallel
class BertLayerNorm(nn.Module):
def __init__(self, hidden_size, eps=1e-12):
"""Construct a layernorm module in the TF style (epsilon inside the square root).
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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.... | IsmaelElsharkawi/new_pororo_repo | BertOutput | false | 8,811 | [
"MIT"
] | 19 | 4617083b420615b8a3eb0f44d02e4e91a8f407f7 | https://github.com/IsmaelElsharkawi/new_pororo_repo/tree/4617083b420615b8a3eb0f44d02e4e91a8f407f7 |
FiLMSIREN | # 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 math
f... | EasternJournalist/pi-GAN | FiLMSIREN | false | 17,236 | [
"MIT"
] | 4 | 3d57611e1c8fca2f3cd00fde1989ec1f9dd94d55 | https://github.com/EasternJournalist/pi-GAN/tree/3d57611e1c8fca2f3cd00fde1989ec1f9dd94d55 |
ContrastiveLoss | import torch
from torch import nn
class ContrastiveLoss(nn.Module):
def __init__(self, margin=1.0, reduction='mean'):
super().__init__()
self.m = margin
assert reduction in ['mean', 'sum', 'none']
self.reduction = reduction
def forward(self, dist, class_):
dist = dist... | 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | vzinche/inferno | ContrastiveLoss | false | 4,510 | [
"Apache-2.0"
] | 0 | 91b22dfcd1b6a9ec415f0bbb6ae66caea42f4034 | https://github.com/vzinche/inferno/tree/91b22dfcd1b6a9ec415f0bbb6ae66caea42f4034 |
fully_connected | # 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... | cankucuksozen/COMP551--ComputerVision-with-DL | fully_connected | false | 9,845 | [
"MIT"
] | 0 | 44c4510a7163ad4bcf00ce0e9d112ae1ba59b143 | https://github.com/cankucuksozen/COMP551--ComputerVision-with-DL/tree/44c4510a7163ad4bcf00ce0e9d112ae1ba59b143 |
VarianceLoss | import torch
import torch.nn as nn
class VarianceLoss(nn.Module):
def forward(self, mu: 'torch.Tensor', std: 'torch.Tensor', target:
'torch.Tensor'):
sigma = std ** 2
log1 = 0.5 * torch.neg(torch.log(sigma)).exp()
mse = (target - mu) ** 2
log2 = 0.5 * torch.log(sigma)
... | 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
... | ncduy0303/wmt21-qe-task | VarianceLoss | false | 12,824 | [
"Apache-2.0"
] | 0 | 93082afd0c56fb8d60101457082116c79adeac50 | https://github.com/ncduy0303/wmt21-qe-task/tree/93082afd0c56fb8d60101457082116c79adeac50 |
RewardCriterion | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from torch.autograd import *
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | anonymous2021hello/transformer-cil | RewardCriterion | false | 3,114 | [
"MIT"
] | 0 | aed4017b61afaf4d9d21d40a078eefb4c7031cd1 | https://github.com/anonymous2021hello/transformer-cil/tree/aed4017b61afaf4d9d21d40a078eefb4c7031cd1 |
VanillaGenerativeAdversarialLoss | import torch
import torch.nn as nn
import torch.utils.data
class VanillaGenerativeAdversarialLoss(nn.Module):
"""
Loss for `Vanilla Generative Adversarial Network <https://arxiv.org/abs/1406.2661>`_
Args:
reduction (str, optional): Specifies the reduction to apply to the output:
``'none... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
import torc... | neka-nat/Transfer-Learning-Library | VanillaGenerativeAdversarialLoss | false | 16,147 | [
"MIT"
] | 1,474 | a3b27b0d7562fa90a02e914140b37ab438469e6c | https://github.com/neka-nat/Transfer-Learning-Library/tree/a3b27b0d7562fa90a02e914140b37ab438469e6c |
ChannelAttention | # 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_... | biolee3/SAMDNet | ChannelAttention | false | 1,566 | [
"MIT"
] | 0 | 9a0d70f976e22d512046b4aa5727dd26422d0aff | https://github.com/biolee3/SAMDNet/tree/9a0d70f976e22d512046b4aa5727dd26422d0aff |
CIoULoss | # 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 math
import torch.dis... | zhangzhengde0225/SwinTrack | CIoULoss | false | 16,808 | [
"MIT"
] | 143 | 526be17f8ef266cb924c6939bd8dda23e9b73249 | https://github.com/zhangzhengde0225/SwinTrack/tree/526be17f8ef266cb924c6939bd8dda23e9b73249 |
FeatureEmbedder | # 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... | valterlej/CustomBMT | FeatureEmbedder | false | 16,852 | [
"MIT"
] | 157 | c9326752d1355c81f845f2caab9c047be76067de | https://github.com/valterlej/CustomBMT/tree/c9326752d1355c81f845f2caab9c047be76067de |
My_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.triton_helpers import libdevice
import torch.utils.data
import torch._utils
import torch.nn.parallel
import tor... | Shelly-Lee/ICCV-2021-Competition-Valence-Arousal-Challenge | My_loss | false | 14,411 | [
"MIT"
] | 58 | b3816ef4d4ba7b98c2f9ddd0dd3942d7a666777a | https://github.com/Shelly-Lee/ICCV-2021-Competition-Valence-Arousal-Challenge/tree/b3816ef4d4ba7b98c2f9ddd0dd3942d7a666777a |
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.... | IsmaelElsharkawi/new_pororo_repo | BertAttention | false | 8,819 | [
"MIT"
] | 19 | 4617083b420615b8a3eb0f44d02e4e91a8f407f7 | https://github.com/IsmaelElsharkawi/new_pororo_repo/tree/4617083b420615b8a3eb0f44d02e4e91a8f407f7 |
FusedUpsample | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
from math import sqrt
assert_size_stride = torch._C._dynamo... | nazarblch/style-based-gan-pytorch | FusedUpsample | false | 4,051 | [
"MIT"
] | 0 | 5ed7fa114904501d77b414921cd9f439773ba24c | https://github.com/nazarblch/style-based-gan-pytorch/tree/5ed7fa114904501d77b414921cd9f439773ba24c |
Inception | import torch
import torch.nn as nn
class BasicConv2d(nn.Module):
def __init__(self, in_planes, out_planes, kernel_size, stride=1,
padding=0, output_relu=True):
super(BasicConv2d, self).__init__()
self.conv = nn.Conv2d(in_planes, out_planes, kernel_size=
kernel_size, stride=str... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | moh2236945/pytorch_classification | Inception | false | 7,279 | [
"MIT"
] | 1 | 8816f08af327e06208b348a78d9c63c133b6a628 | https://github.com/moh2236945/pytorch_classification/tree/8816f08af327e06208b348a78d9c63c133b6a628 |
BCEWithLogitsLossWithOHEM | import torch
from torch import nn
def _ohem_mask(loss, ohem_ratio):
with torch.no_grad():
values, _ = torch.topk(loss.reshape(-1), int(loss.nelement() *
ohem_ratio))
mask = loss >= values[-1]
return mask.float()
class BCEWithLogitsLossWithOHEM(nn.Module):
def __init__(self, ... | 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 ... | ForrestPi/semanticSegmentation | BCEWithLogitsLossWithOHEM | false | 17,341 | [
"MIT"
] | 7 | 1e5519279e2a9574f09eaf91439138b74b0f860c | https://github.com/ForrestPi/semanticSegmentation/tree/1e5519279e2a9574f09eaf91439138b74b0f860c |
TorchModel | import torch
import torch.nn as nn
import torch.nn.functional as F
class TorchModel(nn.Module):
def __init__(self):
super(TorchModel, self).__init__()
self.conv1 = nn.Conv2d(1, 20, 5)
self.conv2 = nn.Conv2d(20, 20, 5)
def forward(self, x):
x = F.relu(self.conv1(x))
re... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | DLPerf/elasticdl | TorchModel | false | 8,937 | [
"MIT"
] | 0 | b9c03ea0e81861ae8d349c3d8ffd1f7b588b910b | https://github.com/DLPerf/elasticdl/tree/b9c03ea0e81861ae8d349c3d8ffd1f7b588b910b |
RDivInt | import torch
class RDivInt(torch.nn.Module):
def __init__(self):
super(RDivInt, self).__init__()
def forward(self, x):
return 100 / 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | ahangchen/torch2trt | RDivInt | false | 6,104 | [
"MIT"
] | 1 | 53c663f0e0570ef7ffd6771354ae3478f63bd328 | https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328 |
PointWiseFeedForward | # 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 ... | RacleRay/TextSummerize | PointWiseFeedForward | false | 5,742 | [
"MIT"
] | 1 | fe2572d26d65bdf849ce89fbb0c5adf5607f06b1 | https://github.com/RacleRay/TextSummerize/tree/fe2572d26d65bdf849ce89fbb0c5adf5607f06b1 |
Normalization | # 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_... | JustinLiam/DAN | Normalization | false | 7,624 | [
"MIT"
] | 1 | eb29cddad6c93e591854b115ef524643b1cd471c | https://github.com/JustinLiam/DAN/tree/eb29cddad6c93e591854b115ef524643b1cd471c |
BERTAttention | from _paritybench_helpers import _mock_config
import math
import torch
import torch.nn as nn
class BERTLayerNorm(nn.Module):
def __init__(self, config, variance_epsilon=1e-12):
"""Construct a layernorm module in the TF style (epsilon inside the square root).
"""
super(BERTLayerNorm, 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.... | BingzhangZhu/Covid19-ABSA | BERTAttention | false | 8,804 | [
"MIT"
] | 31 | e488e74ee53882bba56aedfafb3846ab82c4678e | https://github.com/BingzhangZhu/Covid19-ABSA/tree/e488e74ee53882bba56aedfafb3846ab82c4678e |
FingerprintDecoder | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.utils.data
asser... | Prepaire/MolGNN_fewshot | FingerprintDecoder | false | 17,828 | [
"MIT"
] | 6 | c7c17afdeae7f2ef0c8e3ca2da033091ec7537ca | https://github.com/Prepaire/MolGNN_fewshot/tree/c7c17afdeae7f2ef0c8e3ca2da033091ec7537ca |
SkipBlock | import torch
import torch.nn as nn
import torch.nn.functional as F
class SkipBlock(nn.Module):
def __init__(self, input_dim, output_dim, activation):
"""
Skip Connection for feed-forward block based on ResNet idea:
Refer:
- Youtube: https://www.youtube.com/watch?v=ZILIbUvp5lk
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | HareeshBahuleyan/size-fit-net | SkipBlock | false | 17,361 | [
"MIT"
] | 8 | 2c5e10799b529f94748ccefc080d2af22f3e93d4 | https://github.com/HareeshBahuleyan/size-fit-net/tree/2c5e10799b529f94748ccefc080d2af22f3e93d4 |
SlidingWindowCmn | # 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... | tbright17/audio | SlidingWindowCmn | false | 10,920 | [
"BSD-2-Clause"
] | 0 | 00d38203e401b8d9472a8f8394a10e2c309be02c | https://github.com/tbright17/audio/tree/00d38203e401b8d9472a8f8394a10e2c309be02c |
DiceLoss | import torch
from torch import nn
class DiceLoss(nn.Module):
"""
Loss function from https://arxiv.org/abs/1707.03237,
where iou computation is introduced heatmap manner to measure the
diversity bwtween tow heatmaps.
"""
def __init__(self, eps=1e-06):
super(DiceLoss, self).__init__()
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | gentlebreeze1/dbnet | DiceLoss | false | 3,537 | [
"Apache-2.0"
] | 0 | be28a7ae835af7d6f8b7c2b636b875adc9fc187c | https://github.com/gentlebreeze1/dbnet/tree/be28a7ae835af7d6f8b7c2b636b875adc9fc187c |
SmoothCrossEntropyLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
from torch.nn import M... | AustinCai/gmaxup-augmentation | SmoothCrossEntropyLoss | false | 77 | [
"MIT"
] | 0 | a64ca0a76eb333e5ce6b217c301d27ca04d73bce | https://github.com/AustinCai/gmaxup-augmentation/tree/a64ca0a76eb333e5ce6b217c301d27ca04d73bce |
FusionLayer | # 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 ... | hgrhgy/NumSeq2SQL | FusionLayer | false | 10,228 | [
"MIT"
] | 0 | 6f22fdf108736f979afa2dbd3af14aa9ad4718aa | https://github.com/hgrhgy/NumSeq2SQL/tree/6f22fdf108736f979afa2dbd3af14aa9ad4718aa |
MaskedLoss | # 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... | acycliq/cellpose | MaskedLoss | false | 12,037 | [
"BSD-3-Clause"
] | 0 | 6d7a3f692206bf791e3ea7bd9524ee6df628ed8a | https://github.com/acycliq/cellpose/tree/6d7a3f692206bf791e3ea7bd9524ee6df628ed8a |
DiceLoss | import torch
import torch.nn as nn
import torch.nn.functional as F
class BinaryDiceLoss(nn.Module):
"""Dice loss of binary class
Args:
smooth: A float number to smooth loss, and avoid NaN error, default: 1
p: Denominator value: \\sum{x^p} + \\sum{y^p}, default: 2
predict: A tensor of 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 math as tl_math
import torch.nn as nn
... | hekq/3DFingerPose | DiceLoss | false | 6,817 | [
"MIT"
] | 1 | 385c672408e2fd29ed0373a842727c9fcfd0fc59 | https://github.com/hekq/3DFingerPose/tree/385c672408e2fd29ed0373a842727c9fcfd0fc59 |
PoolingAverage | import torch
import torch.utils.data
import torch
import torch.nn as nn
class PoolingAverage(nn.Module):
def __init__(self, input_dim=2048):
super(PoolingAverage, self).__init__()
self.pool = nn.AdaptiveAvgPool2d((1, 1))
self.output_dim = input_dim
def forward(self, x):
x = t... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
import torch
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cud... | ZhaofanQiu/Optimization-Planning-for-3D-ConvNets | PoolingAverage | false | 18,191 | [
"Apache-2.0"
] | 6 | d9f1b777811ca0d8f462798ca2efcea39b96fcc5 | https://github.com/ZhaofanQiu/Optimization-Planning-for-3D-ConvNets/tree/d9f1b777811ca0d8f462798ca2efcea39b96fcc5 |
UpSampler | import torch
from torch import nn
from torch.nn import functional as F
class UpSampler(nn.Module):
"""Up Sample module
Decrease the channels size and increase the spatial size of tensor
Extends:
nn.Module
"""
def __init__(self, inChannels, outChannels, spatial_size):
"""... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch import nn
assert_s... | Myyyr/segmentation | UpSampler | false | 878 | [
"MIT"
] | 0 | 6b9423e327cff1eb23599404031b7fb8e9ecf75d | https://github.com/Myyyr/segmentation/tree/6b9423e327cff1eb23599404031b7fb8e9ecf75d |
HyperConv2d | # 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
import torch.utils.data
as... | ClaraBing/ffjord | HyperConv2d | false | 13,516 | [
"MIT"
] | 518 | a97c34ff546a063316828f53bd041555e663428d | https://github.com/ClaraBing/ffjord/tree/a97c34ff546a063316828f53bd041555e663428d |
AdaptiveInstanceNorm | import torch
import torch.nn as nn
import torch.jit
import torch.nn
class AdaptiveInstanceNorm(nn.Module):
def __init__(self, in_size, ada_size):
super(AdaptiveInstanceNorm, self).__init__()
self.scale = nn.Linear(ada_size, in_size)
self.bias = nn.Linear(ada_size, in_size)
def forwar... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | ankmathur96/torchsupport | AdaptiveInstanceNorm | false | 3,163 | [
"MIT"
] | 0 | 77bf4a90b8770a408665e2604428808c3ed2f979 | https://github.com/ankmathur96/torchsupport/tree/77bf4a90b8770a408665e2604428808c3ed2f979 |
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
... | Jianf-Wang/RSG | FocalLoss | false | 13,901 | [
"MIT"
] | 108 | 3c5074511455428d81af89e1621493dcdb5db6ce | https://github.com/Jianf-Wang/RSG/tree/3c5074511455428d81af89e1621493dcdb5db6ce |
feedforwardLayer | import torch
import torch.nn as nn
import torch.nn.functional as F
class feedforwardLayer(nn.Module):
""" A two-feed-forward-layer module """
def __init__(self, d_in, d_hid, dropout=0.3):
super().__init__()
self.w_1 = nn.Linear(d_in, d_hid)
self.w_2 = nn.Linear(d_hid, d_in)
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
from torch._inductor.runtime.... | Yottaxx/T-LSTM | feedforwardLayer | false | 18,168 | [
"MIT"
] | 9 | 92618d8c3ee2418b194a2e1592512548da955b77 | https://github.com/Yottaxx/T-LSTM/tree/92618d8c3ee2418b194a2e1592512548da955b77 |
MLP_CRITIC | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
def weights_init(m):
classname = m.__class__.__name__
if classname.find('Linear') != -1:
m.weight.data.normal_(0.0, 0.02)
m.bias.data.fill_(0)
elif classname.find('BatchNorm') != -1:
m.weight.data.norm... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | Huihui-z/CE-GZSL | MLP_CRITIC | false | 15,114 | [
"MIT"
] | 58 | 7bf5358ac4727ea1dc2dc9dec2f453b014500bd8 | https://github.com/Huihui-z/CE-GZSL/tree/7bf5358ac4727ea1dc2dc9dec2f453b014500bd8 |
MultiheadAttention | import torch
import numpy as np
from typing import Optional
import torch.nn as nn
class MultiheadAttention(nn.Module):
"""Multihead scaled dot-product attention.
"""
def __init__(self, contexts: 'int', queries: 'int', channels: 'int',
heads: 'int'):
"""Initializer.
Args:
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | ishine/torch-retriever-vc | MultiheadAttention | false | 6,913 | [
"MIT"
] | 1 | db5119d9d703ea819e2ac9185871ea3db52c14e1 | https://github.com/ishine/torch-retriever-vc/tree/db5119d9d703ea819e2ac9185871ea3db52c14e1 |
MLP | import torch
import torch.nn as nn
import torch.nn.functional as F
class MLP(nn.Module):
def __init__(self, input_dim, output_dim, hidden_dim=128):
""" 初始化q网络,为全连接网络
input_dim: 输入的特征数即环境的状态维度
output_dim: 输出的动作维度
"""
super(MLP, self).__init__()
self.fc1 = 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 import triton_helpers
import torch.nn as nn
assert_... | JohnJim0816/rl-tutorials | MLP | false | 8,357 | [
"MIT"
] | 16 | e99daea815da85f9f25dff2d01b030249a203d22 | https://github.com/JohnJim0816/rl-tutorials/tree/e99daea815da85f9f25dff2d01b030249a203d22 |
SingleHiddenLayer | import torch
class SingleHiddenLayer(torch.nn.Module):
def __init__(self, input_channels, hidden_channels):
super(SingleHiddenLayer, self).__init__()
self.input_channels = input_channels
self.hidden_channels = hidden_channels
self.linear1 = torch.nn.Linear(hidden_channels, 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
assert_size_stride = torch._C... | MLforHealth/state_representations_for_RLinHealth | SingleHiddenLayer | false | 8,509 | [
"MIT"
] | 24 | aa8dbb7d56caa95bf4380e3e745e134996291b66 | https://github.com/MLforHealth/state_representations_for_RLinHealth/tree/aa8dbb7d56caa95bf4380e3e745e134996291b66 |
SequenceClassifier | # 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.... | ngxingyu/Domain-Transfer-for-Punctuation-Retrieval | SequenceClassifier | false | 7,340 | [
"Apache-2.0"
] | 1 | f5aa0ea0946c68aaf7fcf49a5085e6c823766a2f | https://github.com/ngxingyu/Domain-Transfer-for-Punctuation-Retrieval/tree/f5aa0ea0946c68aaf7fcf49a5085e6c823766a2f |
MaskedConv | from torch.nn import Module
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import init
from torch.nn.modules import Module
from torch.nn.modules.utils import _pair
class MaskedConv(Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1,
padding=0, 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.nn import Module
import torch.nn as nn
from torch.nn import init
from... | DwaraknathT/pyfl | MaskedConv | false | 635 | [
"MIT"
] | 0 | e9a4d1ca98c6167a567d0d46771ac9e1c7bb7322 | https://github.com/DwaraknathT/pyfl/tree/e9a4d1ca98c6167a567d0d46771ac9e1c7bb7322 |
IMul | import torch
class IMul(torch.nn.Module):
def __init__(self):
super(IMul, self).__init__()
def forward(self, x, y):
x *= y
return x
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
@triton.jit
def triton_poi_fused_mul_0(in_ptr0, in_ptr1, out_ptr1, xnumel,... | ahangchen/torch2trt | IMul | false | 6,099 | [
"MIT"
] | 1 | 53c663f0e0570ef7ffd6771354ae3478f63bd328 | https://github.com/ahangchen/torch2trt/tree/53c663f0e0570ef7ffd6771354ae3478f63bd328 |
PositionWiseFeedForward | import math
import torch
import torch.nn as nn
def gelu(x):
"""Implementation of the gelu activation function by Hugging Face"""
return x * 0.5 * (1.0 + torch.erf(x / math.sqrt(2.0)))
class PositionWiseFeedForward(nn.Module):
""" FeedForward Neural Networks for each position """
def __init__(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.triton_helpers import libdevice
import math
import ... | renebidart/pytorch-cifar | PositionWiseFeedForward | false | 4,251 | [
"MIT"
] | 0 | 8f623299c25f7f219bab34bc7df41fe24232b1af | https://github.com/renebidart/pytorch-cifar/tree/8f623299c25f7f219bab34bc7df41fe24232b1af |
VAE | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch import device
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from... | DanielTakeshi/DCUR | VAE | false | 366 | [
"MIT"
] | 0 | 1cdb00e7e68060ad3bba9a497106c327f6b5a663 | https://github.com/DanielTakeshi/DCUR/tree/1cdb00e7e68060ad3bba9a497106c327f6b5a663 |
MeanPoolingLayer | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
@triton.j... | Otybrian/blogpost | MeanPoolingLayer | false | 2,708 | [
"MIT"
] | 0 | 518599019e11cd7ee11e01470c4d51dfb4583274 | https://github.com/Otybrian/blogpost/tree/518599019e11cd7ee11e01470c4d51dfb4583274 |
LinearWeightNorm | # 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 ... | XuezheMax/macow | LinearWeightNorm | false | 14,613 | [
"Apache-2.0"
] | 60 | 6de247c09b590a037c9eec2d6b1248845f6efb31 | https://github.com/XuezheMax/macow/tree/6de247c09b590a037c9eec2d6b1248845f6efb31 |
PositionwiseFeedForward | import torch
import torch.nn.functional as F
import torch.nn as nn
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.Linear(d_in, d_hid)
self.w_2 = nn.Linear(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.... | AbubakrHassan/attention-is-all-you-need-pytorch | PositionwiseFeedForward | false | 11,170 | [
"MIT"
] | 0 | 2bf9a477dea6271b082556069f3665ffed2745cd | https://github.com/AbubakrHassan/attention-is-all-you-need-pytorch/tree/2bf9a477dea6271b082556069f3665ffed2745cd |
RPN_Up | # 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... | FMsunyh/SiamDW | RPN_Up | false | 9,286 | [
"MIT"
] | 0 | ef7a97ee6bdf732edbb7dc2943daf15b92535019 | https://github.com/FMsunyh/SiamDW/tree/ef7a97ee6bdf732edbb7dc2943daf15b92535019 |
GlobalMaxPool1d | # 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
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empt... | AndreasLTeigen/few_shot_open_world | GlobalMaxPool1d | false | 1,943 | [
"MIT"
] | 0 | 3514824c4233fdff9af9c0b636435b2ff0fa6e09 | https://github.com/AndreasLTeigen/few_shot_open_world/tree/3514824c4233fdff9af9c0b636435b2ff0fa6e09 |
Net | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | minister19/RL_pytorch_get_started | Net | false | 4,014 | [
"MIT"
] | 0 | e444f524a14d329f9a25c53f102bc96c4ea36ad8 | https://github.com/minister19/RL_pytorch_get_started/tree/e444f524a14d329f9a25c53f102bc96c4ea36ad8 |
PoseNetFeat | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.utils.data
import torch.nn.functional as F
class PoseNetFeat(nn.Module):
def __init__(self, num_points):
super(PoseNetFeat, self).__init__()
self.conv1 = torch.nn.Conv1d(3, 64, 1)
self.conv2 = torch.nn.Conv1d(64, 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
import torch.nn as nn
import ... | JiazeWang/6-PACK | PoseNetFeat | false | 11,555 | [
"MIT"
] | 0 | bce910213cfbf89b4ed7b59ff6c70a59a7c19b99 | https://github.com/JiazeWang/6-PACK/tree/bce910213cfbf89b4ed7b59ff6c70a59a7c19b99 |
EncoderLayer | # 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.... | nlakshmanan/Transformer | EncoderLayer | false | 10,674 | [
"Apache-2.0"
] | 0 | 4562f8e9b282d0a70f26903a7b4410cb6132364b | https://github.com/nlakshmanan/Transformer/tree/4562f8e9b282d0a70f26903a7b4410cb6132364b |
Inception3 | # 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 ... | Galaxies99/inception-cuda | Inception3 | false | 11,638 | [
"MIT"
] | 0 | ed8fdbe3caef415e60b52e671273be90e9423e44 | https://github.com/Galaxies99/inception-cuda/tree/ed8fdbe3caef415e60b52e671273be90e9423e44 |
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_... | ReactiveXYZ-Dev/deep-reinforcement-learning | QNetwork | false | 9,411 | [
"MIT"
] | 0 | 074318b2a73f61d7fee7e0374c739447ee45b6a0 | https://github.com/ReactiveXYZ-Dev/deep-reinforcement-learning/tree/074318b2a73f61d7fee7e0374c739447ee45b6a0 |
Convolutional | # 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_... | f4str/digit-recognizer | Convolutional | false | 3,488 | [
"MIT"
] | 0 | 67c175c683b22a3bf9d8a28dce812a82e08039d5 | https://github.com/f4str/digit-recognizer/tree/67c175c683b22a3bf9d8a28dce812a82e08039d5 |
ZReLU | import numpy
import torch
import numpy as np
import torch.nn as nn
import numpy.matlib
def cylindricalToPolarConversion(input1, input2=None):
if input2 is None:
"""input1 is tensor of [B,C,H,W,D,2] contains both real and imaginary channels
in the last dims"""
ndims = input1.ndimension()
... | 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_... | HMS-CardiacMR/MyoMapNet-Myocardial-Parametric-Mapping | ZReLU | false | 17,443 | [
"MIT"
] | 4 | 1e2dee8d6d1f97722eba91618462537faf9efba7 | https://github.com/HMS-CardiacMR/MyoMapNet-Myocardial-Parametric-Mapping/tree/1e2dee8d6d1f97722eba91618462537faf9efba7 |
PixelShuffle2d | # 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 functools
from torch import nn
import torch.nn.functional as F
assert_siz... | pomelyu/ML_HW | PixelShuffle2d | false | 10,709 | [
"MIT"
] | 0 | b87697f3ee86592a34d80c8dbf167a5767731630 | https://github.com/pomelyu/ML_HW/tree/b87697f3ee86592a34d80c8dbf167a5767731630 |
FocalLoss | import torch
import torch.nn as nn
import torch.nn.functional as F
class FocalLoss(nn.Module):
"""https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/78109"""
def __init__(self, gamma=2):
super().__init__()
self.gamma = gamma
def forward(self, logit, target):
... | 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... | AutuanLiu/PyTorch-ML | FocalLoss | false | 16,962 | [
"MIT"
] | 9 | 884c7723843d9ffb4da09d95eb97886b2cc38f28 | https://github.com/AutuanLiu/PyTorch-ML/tree/884c7723843d9ffb4da09d95eb97886b2cc38f28 |
InvertibleDownsampling2D | from torch.autograd import Function
import torch
import numpy as np
from warnings import warn
from typing import Union
from typing import Tuple
from torch.nn.common_types import _size_2_t
from torch.nn.modules.utils import _pair
import torch.nn.functional as F
def _cayley(A):
I = torch.eye(A.shape[-1], device=A.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.autograd import Function
import numpy as np
from warnings import warn... | cetmann/iunets | InvertibleDownsampling2D | false | 15,021 | [
"MIT"
] | 86 | 80ed7cce0e505a0396c42359eaf27819222d71f6 | https://github.com/cetmann/iunets/tree/80ed7cce0e505a0396c42359eaf27819222d71f6 |
SumAggregator | # 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... | AlexMinhao/NAS_GNN | SumAggregator | false | 0 | [
"Apache-2.0"
] | 0 | 89183988a96e1d6baed910ab3843c13282f8b077 | https://github.com/AlexMinhao/NAS_GNN/tree/89183988a96e1d6baed910ab3843c13282f8b077 |
BottleneckLayerLayer | # 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.... | MikyasDesta/NeMo | BottleneckLayerLayer | false | 2,649 | [
"Apache-2.0"
] | 0 | 4995477e6ce49de55b123723e42021c9eff8e2c0 | https://github.com/MikyasDesta/NeMo/tree/4995477e6ce49de55b123723e42021c9eff8e2c0 |
Actor | import torch
import torch.nn as nn
class Actor(nn.Module):
def __init__(self, hidden_size, action, num_inputs, num_output,
spp_num_outputs=[1, 2, 4], data_width=8):
super(Actor, self).__init__()
self.action = action
self.num_inputs = num_inputs
self.num_outputs = num_outpu... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | GraceYYJ/cbx-k | Actor | false | 9,092 | [
"MIT"
] | 0 | 1a955bc8d1675b8024763218482372dca982cc6c | https://github.com/GraceYYJ/cbx-k/tree/1a955bc8d1675b8024763218482372dca982cc6c |
TreeCRF | import torch
import numpy as np
import torch.nn as nn
from torch.nn.parameter import Parameter
def logdet(x):
"""
Args:
x: 2D positive semidefinite matrix.
Returns: log determinant of x
"""
None
None
u_chol = x.potrf()
return torch.sum(torch.log(u_chol.diag())) * 2
class B... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
from torch.nn.parameter import Parameter
assert_size_strid... | krishnamrith12/DCST | TreeCRF | false | 12,779 | [
"MIT"
] | 0 | 7ba956d7e648aaeb25816ccfc709106db9293270 | https://github.com/krishnamrith12/DCST/tree/7ba956d7e648aaeb25816ccfc709106db9293270 |
SoftDiceLoss | # 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... | ekalyashov/segmentation-unet | SoftDiceLoss | false | 12,342 | [
"MIT"
] | 0 | 59dc95419481b2535a52332e0be92b15c7450674 | https://github.com/ekalyashov/segmentation-unet/tree/59dc95419481b2535a52332e0be92b15c7450674 |
GenNoise | # 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... | dustlrdk/noise2self | GenNoise | false | 3,440 | [
"MIT"
] | 0 | 46e8c4650f7ec4f664448417fecd39b4cae477f7 | https://github.com/dustlrdk/noise2self/tree/46e8c4650f7ec4f664448417fecd39b4cae477f7 |
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... | William-Zhanng/Protein_affinity | LearnedPositionalEmbedding | false | 5,977 | [
"MIT"
] | 1 | 8abd12073b182274bf464ff23fd3be406c4e39ac | https://github.com/William-Zhanng/Protein_affinity/tree/8abd12073b182274bf464ff23fd3be406c4e39ac |
AttentionGRUCell | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
class AttentionGRUCell(nn.Module):
def __init__(self, input_size, hidden_size):
super(AttentionGRUCell, self).__init__()
self.hidden_size = hidden_size
self.Wr = nn.Linear(input_size, hidden_si... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | kirubarajan/Dynamic-Memory-Network-Plus | AttentionGRUCell | false | 12,684 | [
"Apache-2.0"
] | 0 | 0613287ef5a959c7b260afcea2c31afcfb0ea189 | https://github.com/kirubarajan/Dynamic-Memory-Network-Plus/tree/0613287ef5a959c7b260afcea2c31afcfb0ea189 |
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.... | ori-goals/lfd-min-human-effort | Actor | false | 7,432 | [
"MIT"
] | 1 | f9fd70cdeb661151e5f81ac538ceb865531146b9 | https://github.com/ori-goals/lfd-min-human-effort/tree/f9fd70cdeb661151e5f81ac538ceb865531146b9 |
DecoderAttention | from _paritybench_helpers import _mock_config
import math
import torch
from torch import nn
class DecoderBertLayerNorm(nn.Module):
def __init__(self, hidden_size, eps=1e-12):
"""Construct a layernorm module in the TF style (epsilon inside the square root).
"""
super(DecoderBertLayerNorm, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | ArrowLuo/GRACE | DecoderAttention | false | 8,781 | [
"Apache-2.0"
] | 17 | f27b500ba905685c03eee6d91d87adc9ef78b4d1 | https://github.com/ArrowLuo/GRACE/tree/f27b500ba905685c03eee6d91d87adc9ef78b4d1 |
AmdimNCELoss | # 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.... | Luab/pytorch-lightning-bolts | AmdimNCELoss | false | 11,718 | [
"Apache-2.0"
] | 0 | b8ac85154465956b06fd1005b21b071af5493f11 | https://github.com/Luab/pytorch-lightning-bolts/tree/b8ac85154465956b06fd1005b21b071af5493f11 |
AddPositionEmbs | import torch
from typing import *
from torch import nn
class AddPositionEmbs(nn.Module):
"""Adds (optionally learned) positional embeddings to the inputs."""
def __init__(self, num_patches: 'int', dim: 'int', dropout_rate:
'float'=0.0):
super(AddPositionEmbs, self).__init__()
self.pos... | 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 typing import *
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dyn... | JacobARose/image-utils | AddPositionEmbs | false | 603 | [
"MIT"
] | 0 | aa0e005c0b4df5198d188b074f4e21f8d8f97962 | https://github.com/JacobARose/image-utils/tree/aa0e005c0b4df5198d188b074f4e21f8d8f97962 |
AsymmetricLossOptimized | import torch
from torchvision import datasets as datasets
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data.distributed
class AsymmetricLossOptimized(nn.Module):
""" Notice - optimized version, minimizes memory allocation and gpu uploading,
favors inplace operations"""
... | 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 torchv... | jasonnoy/COMP5329 | AsymmetricLossOptimized | false | 10,323 | [
"MIT"
] | 0 | fc17c80b1ac41d788cc0a92d3a033dbe2f9b8b81 | https://github.com/jasonnoy/COMP5329/tree/fc17c80b1ac41d788cc0a92d3a033dbe2f9b8b81 |
DiceLoss | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_str... | DYF-AI/openvino-x | DiceLoss | false | 5,041 | [
"Apache-2.0"
] | 1 | 0f18ebb240ea3394f7e461aca34fac158e686d95 | https://github.com/DYF-AI/openvino-x/tree/0f18ebb240ea3394f7e461aca34fac158e686d95 |
Affine | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.utils.data
from torch import optim as optim
class Affine(nn.Module):
def __init__(self, dim):
super().__init__()
self.alpha = nn.Parameter(torch.ones((1, 1, dim)))
self.beta = nn.Parameter(torch.zeros((1, 1, dim)))
... | 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.utils.data
from torch import optim as optim
assert_size_stride = torch._C._dynam... | liangmuxue/pytorch-image-models | Affine | false | 10,378 | [
"Apache-2.0"
] | 0 | 84da7fdbedda76b1cb513ae128c612ab885e5e3f | https://github.com/liangmuxue/pytorch-image-models/tree/84da7fdbedda76b1cb513ae128c612ab885e5e3f |
DacBlock | import torch
from torch import nn
class DacBlock(nn.Module):
def __init__(self, channel):
super(DacBlock, self).__init__()
self.dilate1 = nn.Conv2d(channel, channel, kernel_size=3, dilation=
1, padding=1)
self.dilate2 = nn.Conv2d(channel, channel, kernel_size=3, dilation=
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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... | JiYuanFeng/MCTrans | DacBlock | false | 13,889 | [
"Apache-2.0"
] | 84 | 9b8b5677eef584b423d5e1630680a4b667cbe823 | https://github.com/JiYuanFeng/MCTrans/tree/9b8b5677eef584b423d5e1630680a4b667cbe823 |
UNETMax | # 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... | quenting44/semantic_segmentation | UNETMax | false | 10,876 | [
"MIT"
] | 0 | bd197ddda3c6891d69ff7e552a0c224c7ec1269a | https://github.com/quenting44/semantic_segmentation/tree/bd197ddda3c6891d69ff7e552a0c224c7ec1269a |
NAC | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch.nn impor... | tanbur/pytorch-nalu | NAC | false | 10,845 | [
"MIT"
] | 0 | 91cb036230144b166137a8f3533850f2d4123d4f | https://github.com/tanbur/pytorch-nalu/tree/91cb036230144b166137a8f3533850f2d4123d4f |
LayerNorm | import torch
class LayerNorm(torch.nn.Module):
"""
A vanilla implementation of layer normalization https://arxiv.org/pdf/1607.06450.pdf
norm_x = (x - mean) / sqrt((x - mean) ^ 2)
This does not include the trainable parameters gamma and beta for performance speed.
Typically, this is norm_x * gamma... | 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... | netdrones/ml-agents | LayerNorm | false | 7,331 | [
"Apache-2.0"
] | 1 | 7d7d6f149c92ea2067d7cea364d92c8c3b8db3f4 | https://github.com/netdrones/ml-agents/tree/7d7d6f149c92ea2067d7cea364d92c8c3b8db3f4 |
Discriminator_D1 | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
def weights_init(m):
classname = m.__class__.__name__
if classname.find('Linear') != -1:
m.weight.data.normal_(0.0, 0.02)
if m.bias is not None:
m.bias.data.fill_(0)
elif classname.find('BatchNorm'... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | e96031413/tfvaegan | Discriminator_D1 | false | 10,110 | [
"MIT"
] | 0 | 4d0512c6ce98155b9e8ba37fbcf90d43cd5bbe90 | https://github.com/e96031413/tfvaegan/tree/4d0512c6ce98155b9e8ba37fbcf90d43cd5bbe90 |
CategoricalAccuracy | import torch
class _Metric(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, input: 'torch.Tensor', target: 'torch.Tensor'):
raise NotImplementedError()
class Accuracy(_Metric):
def __init__(self):
super().__init__()
def forward(self, input: 'torc... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import math as tl_math
assert_size_stride = t... | HalleyYoung/MusicTransformer-pytorch | CategoricalAccuracy | false | 11,467 | [
"MIT"
] | 0 | bbfb7050f4a81675b089cd826d4476cf29bf19c2 | https://github.com/HalleyYoung/MusicTransformer-pytorch/tree/bbfb7050f4a81675b089cd826d4476cf29bf19c2 |
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... | bunderhi/torch2trt | TorchDiv | false | 1,612 | [
"MIT"
] | 0 | fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d | https://github.com/bunderhi/torch2trt/tree/fa5e31e742a0f0c9a9ee38909a6fa56bb07ba96d |
Hflip | import torch
import torch.nn as nn
def hflip(input: 'torch.Tensor') ->torch.Tensor:
"""Horizontally flip a tensor image or a batch of tensor images. Input must
be a tensor of shape (C, H, W) or a batch of tensors :math:`(*, C, H, W)`.
Args:
input (torch.Tensor): input tensor
Returns:
... | 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... | IEM-Computer-Vision/kornia | Hflip | false | 9,258 | [
"ECL-2.0",
"Apache-2.0"
] | 0 | f98bd9a2158a6e59cda076d55d476acf13f4e0af | https://github.com/IEM-Computer-Vision/kornia/tree/f98bd9a2158a6e59cda076d55d476acf13f4e0af |
LowRankResidualDecoderLayer | # 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.... | bahducoup/factorized_training | LowRankResidualDecoderLayer | false | 12,288 | [
"MIT"
] | 0 | 0af38f16338a9bcfcc11091b1a6b75befd67f234 | https://github.com/bahducoup/factorized_training/tree/0af38f16338a9bcfcc11091b1a6b75befd67f234 |
Actor | import torch
import numpy as np
from torch import nn
from torch.nn import functional as F
class Actor(nn.Module):
def __init__(self, input_dim, output_dim):
super(Actor, self).__init__()
self.layer1 = nn.Linear(input_dim, output_dim, bias=True)
def _format(self, state):
x = state
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | ajy8456/active-recognition | Actor | false | 3,052 | [
"MIT"
] | 0 | 7d3a4bbfceaf5fb32cd43f62636f36a10ab63807 | https://github.com/ajy8456/active-recognition/tree/7d3a4bbfceaf5fb32cd43f62636f36a10ab63807 |
TextProcessor | import torch
import torch.nn as nn
import torch.nn.functional as F
def reset_parameters_util_x(model):
for module in model.modules():
if isinstance(module, nn.Linear):
nn.init.xavier_normal_(module.weight.data, 1)
if module.bias is not None:
module.bias.data.zero_()... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | olipinski/MultimodalGame | TextProcessor | false | 10,634 | [
"BSD-3-Clause"
] | 0 | cfacc66baebfadb6ed6a8b44b3dd71a298285d68 | https://github.com/olipinski/MultimodalGame/tree/cfacc66baebfadb6ed6a8b44b3dd71a298285d68 |
PositionwiseFeedForward | import torch
import torch.nn as nn
class LayerNorm(nn.Module):
"""
Layer Normalization class
"""
def __init__(self, features, eps=1e-06):
super(LayerNorm, self).__init__()
self.a_2 = nn.Parameter(torch.ones(features))
self.b_2 = nn.Parameter(torch.zeros(features))
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | IndexFziQ/ASER | PositionwiseFeedForward | false | 2,378 | [
"MIT"
] | 0 | 67dd1a2a25cec175c15675cc1f8a63ca065b447e | https://github.com/IndexFziQ/ASER/tree/67dd1a2a25cec175c15675cc1f8a63ca065b447e |
Net | # AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _alig... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | SummitChen/ComputationalAdvertisement | Net | false | 5,883 | [
"MIT"
] | 1 | 05a9e8bd82ca834219121de4257185d63f592d78 | https://github.com/SummitChen/ComputationalAdvertisement/tree/05a9e8bd82ca834219121de4257185d63f592d78 |
MSELoss | import torch
import torch._C
import torch.serialization
from torch import nn
import torch.nn.functional as F
from typing import *
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".... | 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._C
import torch.serialization
from torch import nn
import torch.nn.functional as F
from typing import *
assert_size_stride = to... | shuaizzZ/mmsegmentation | MSELoss | false | 4,320 | [
"Apache-2.0"
] | 0 | a6c6b348dbf8c4a0a39ffbdb832a1e82309c533c | https://github.com/shuaizzZ/mmsegmentation/tree/a6c6b348dbf8c4a0a39ffbdb832a1e82309c533c |
MIRB3 | # 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 ... | wwjfsfs/wwjyyds | MIRB3 | false | 13,189 | [
"MIT"
] | 0 | 80cd6267fde7cd98838078a0d5178a557ceb7414 | https://github.com/wwjfsfs/wwjyyds/tree/80cd6267fde7cd98838078a0d5178a557ceb7414 |
Attention | import torch
import torch.nn.functional as F
from torch import nn
class Attention(nn.Module):
def __init__(self, input_size, hidden_size):
super(Attention, self).__init__()
self.fc1 = nn.Linear(input_size, hidden_size)
self.fc2 = nn.Linear(hidden_size, 1)
def softmax_mask(self, val, ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | HIT-SCIR-xuanxuan/OpenKS | Attention | false | 13,751 | [
"Apache-2.0"
] | 88 | a7f2ce0890822113322aad22e98d6c961e63caef | https://github.com/HIT-SCIR-xuanxuan/OpenKS/tree/a7f2ce0890822113322aad22e98d6c961e63caef |
CeilModule | import torch
class CeilModule(torch.nn.Module):
def __init__(self):
super(CeilModule, self).__init__()
def forward(self, x):
return torch.ceil(x)
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_c... | mirecta/nncase | CeilModule | false | 4,172 | [
"Apache-2.0"
] | 0 | d2efa59677a26f4259b3b6a5b6ec05ea16d4e40c | https://github.com/mirecta/nncase/tree/d2efa59677a26f4259b3b6a5b6ec05ea16d4e40c |
MaskedConv1d | # 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... | Raiselimit/TorchBlocks | MaskedConv1d | false | 5,760 | [
"MIT"
] | 1 | a5baecb9a2470ff175087475630f2b7db3f7ef51 | https://github.com/Raiselimit/TorchBlocks/tree/a5baecb9a2470ff175087475630f2b7db3f7ef51 |
SEModule | import torch
from torchvision import datasets as datasets
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data.distributed
class FastAvgPool2d(nn.Module):
def __init__(self, flatten=False):
super(FastAvgPool2d, self).__init__()
self.flatten = flatten
def ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 torchvision import datas... | jasonnoy/COMP5329 | SEModule | false | 10,324 | [
"MIT"
] | 0 | fc17c80b1ac41d788cc0a92d3a033dbe2f9b8b81 | https://github.com/jasonnoy/COMP5329/tree/fc17c80b1ac41d788cc0a92d3a033dbe2f9b8b81 |
InnerProductDecoder | # 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
import torch.nn as nn
import torch.nn.modules.loss
assert_size_stride = torch._C... | conf20/Egg | InnerProductDecoder | false | 6,470 | [
"MIT"
] | 1 | 6bd35903d1d7a7430b336545a9ee2b0a7f0e10f3 | https://github.com/conf20/Egg/tree/6bd35903d1d7a7430b336545a9ee2b0a7f0e10f3 |
Expand | # AOT ID: ['0_inference']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _al... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.utils.data
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C.... | Arui66/FPSAutomaticAiming | Expand | false | 13,293 | [
"Apache-2.0"
] | 129 | 87674385d42b065b984b38a2ff59e7f2d4f07dc9 | https://github.com/Arui66/FPSAutomaticAiming/tree/87674385d42b065b984b38a2ff59e7f2d4f07dc9 |
PartialConv | import math
import torch
import torch.nn as nn
def weights_init(init_type='gaussian'):
def init_fun(m):
classname = m.__class__.__name__
if (classname.find('Conv') == 0 or classname.find('Linear') == 0
) and hasattr(m, 'weight'):
if init_type == 'gaussian':
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import math
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.a... | DH-Diego/Homework4995.009DAP | PartialConv | false | 5,039 | [
"Apache-2.0"
] | 1 | ccbdea8b4a0debe29d2014c2cbabe92f4e7f9a4a | https://github.com/DH-Diego/Homework4995.009DAP/tree/ccbdea8b4a0debe29d2014c2cbabe92f4e7f9a4a |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.