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 |
|---|---|---|---|---|---|---|---|---|---|---|
Upsample2d | import functools
import torch
import typing
import torch.optim
class Upsample2d(torch.nn.Module):
def __init__(self, resolution: 'typing.Sequence[int]'=None, scale:
'float'=2.0, mode: 'str'='bilinear'):
super(Upsample2d, self).__init__()
if resolution:
self.upsample = functool... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import functools
import typing
import torch.optim
assert_size_stride = torch._C._dynamo.g... | ai-in-motion/moai | Upsample2d | false | 18,330 | [
"Apache-2.0"
] | 10 | e38cac046c059d2e2331ef4883bbabc5a500a5cf | https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf |
Collapse | import torch
import torch.nn as nn
from string import ascii_lowercase
import torch.optim
class Collapse(nn.Module):
def __init__(self, size):
super(Collapse, self).__init__()
self.weight = nn.Parameter(torch.Tensor(size), requires_grad=True)
self.weight.data.zero_()
self.p_avg_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
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
from string import ascii_lowercase
import torch.optim
assert_size_s... | andrew-xu-monash/UMM-Modified | Collapse | false | 18,331 | [
"Apache-2.0"
] | 4 | 18729dc34733c203e8cd3873fec2b9f7d0b56dba | https://github.com/andrew-xu-monash/UMM-Modified/tree/18729dc34733c203e8cd3873fec2b9f7d0b56dba |
DownsampleB | import torch
import torch.nn as nn
class DownsampleB(nn.Module):
def __init__(self, nIn, nOut, stride):
super(DownsampleB, self).__init__()
self.avg = nn.AvgPool2d(stride)
self.expand_ratio = nOut // nIn
def forward(self, x):
x = self.avg(x)
return torch.cat([x] + [x.... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_st... | andyqmongo/InstAParam | DownsampleB | false | 18,332 | [
"MIT"
] | 3 | 00494d5367ec32b4ce90d01778cba9d4f1166833 | https://github.com/andyqmongo/InstAParam/tree/00494d5367ec32b4ce90d01778cba9d4f1166833 |
InstanceNormFC | import torch
from torch import nn
class InstanceNormFC(nn.Module):
def __init__(self, _unused=0, affine=True):
super().__init__()
self.norm = nn.InstanceNorm1d(1, affine=affine)
def forward(self, x):
return self.norm(x.unsqueeze(1)).squeeze(1)
def get_inputs():
return [torch.ra... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_s... | ankitkv/pylego | InstanceNormFC | false | 18,333 | [
"MIT"
] | 4 | 38d4a8fe8497d748b22c58313cbfd187efb8326e | https://github.com/ankitkv/pylego/tree/38d4a8fe8497d748b22c58313cbfd187efb8326e |
LanguageModelCriterion | import torch
import torch.nn as nn
from torch.autograd import *
class LanguageModelCriterion(nn.Module):
def __init__(self):
super(LanguageModelCriterion, self).__init__()
def forward(self, input, target, mask):
target = target[:, :input.size(1)]
mask = mask[:, :input.size(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
import torch.nn as nn
from torch.autograd import *
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | ankit1khare/Show_Infer_and_Tell-CIC | LanguageModelCriterion | false | 18,334 | [
"MIT"
] | 5 | 5437cceaaaf1bbcd16cb921650afd769378f4fc4 | https://github.com/ankit1khare/Show_Infer_and_Tell-CIC/tree/5437cceaaaf1bbcd16cb921650afd769378f4fc4 |
MutualInformationDiscriminatorHomo | import math
import torch
import torch.nn as nn
class Discriminator(nn.Module):
def __init__(self, n_hidden):
super(Discriminator, self).__init__()
self.weight = nn.Parameter(torch.Tensor(n_hidden, n_hidden))
self.reset_parameters()
def uniform(self, size, tensor):
bound = 1.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.... | amazon-research/panrep | MutualInformationDiscriminatorHomo | false | 18,335 | [
"Apache-2.0"
] | 10 | 57e6f71bb70c0908f3db28be97af0d818a863e19 | https://github.com/amazon-research/panrep/tree/57e6f71bb70c0908f3db28be97af0d818a863e19 |
Bottleneck | import torch
import torch.nn as nn
import torch.nn.functional as F
class Bottleneck(nn.Module):
expansion = 4
def __init__(self, inplanes, planes, stride=1):
super(Bottleneck, self).__init__()
self.conv1 = nn.Conv2d(inplanes, planes, kernel_size=1, bias=False)
self.norm1 = nn.GroupNor... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | andyqmongo/InstAParam | Bottleneck | false | 18,336 | [
"MIT"
] | 3 | 00494d5367ec32b4ce90d01778cba9d4f1166833 | https://github.com/andyqmongo/InstAParam/tree/00494d5367ec32b4ce90d01778cba9d4f1166833 |
PlusOne | import torch
import torch.optim
class PlusOne(torch.nn.Module):
def __init__(self):
super(PlusOne, self).__init__()
def forward(self, x: 'torch.Tensor') ->torch.Tensor:
return x + 1.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
import torch.optim
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strid... | ai-in-motion/moai | PlusOne | false | 18,337 | [
"Apache-2.0"
] | 10 | e38cac046c059d2e2331ef4883bbabc5a500a5cf | https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf |
ResBlock | import torch
import torch.nn as nn
import torch.nn.functional as F
def conv3x3(in_planes, out_planes, stride=1, groups=1):
"""3x3 convolution with padding"""
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride,
padding=1, bias=False, groups=groups)
class ResBlock(nn.Module):
exp... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | andyqmongo/InstAParam | ResBlock | false | 18,338 | [
"MIT"
] | 3 | 00494d5367ec32b4ce90d01778cba9d4f1166833 | https://github.com/andyqmongo/InstAParam/tree/00494d5367ec32b4ce90d01778cba9d4f1166833 |
Adaptive | import torch
import torch.optim
def dims(tensor: 'torch.Tensor', start_index: 'int'=1) ->torch.Tensor:
return torch.Tensor([tensor.size()[start_index:]]).squeeze()
class Adaptive(torch.nn.Module):
def __init__(self, scale_factor: 'float'=2.0, mode: 'str'='max', dims:
'int'=2):
super(Adaptiv... | 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.optim
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_... | ai-in-motion/moai | Adaptive | false | 18,339 | [
"Apache-2.0"
] | 10 | e38cac046c059d2e2331ef4883bbabc5a500a5cf | https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf |
NormalizedPositionError | import torch
import torch.optim
def _normalised_position_error(gt: 'torch.Tensor', pred: 'torch.Tensor'):
l2_norm = torch.linalg.norm(gt - pred, ord=2, dim=-1)
return l2_norm / (torch.linalg.norm(gt, ord=2, dim=-1) + 1e-07)
class NormalizedPositionError(torch.nn.Module):
def __init__(self):
sup... | 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.optim
assert_size_stride = torch._C._dynamo.guards.assert_size_str... | ai-in-motion/moai | NormalizedPositionError | false | 18,340 | [
"Apache-2.0"
] | 10 | e38cac046c059d2e2331ef4883bbabc5a500a5cf | https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf |
Ones | import torch
import torch.optim
class Ones(torch.nn.Module):
def __init__(self):
super(Ones, self).__init__()
def forward(self, tensor: 'torch.Tensor') ->torch.Tensor:
return torch.ones(1, *tensor.shape[1:], dtype=tensor.dtype, device=
tensor.device).expand_as(tensor
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.optim
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strid... | ai-in-motion/moai | Ones | false | 18,341 | [
"Apache-2.0"
] | 10 | e38cac046c059d2e2331ef4883bbabc5a500a5cf | https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf |
Binary | import torch
import torch.optim
class Binary(torch.nn.Module):
def __init__(self):
super(Binary, self).__init__()
def forward(self, tensor: 'torch.Tensor') ->torch.Tensor:
return (tensor != 0.0).bool()
def get_inputs():
return [torch.rand([4, 4, 4, 4])]
def get_init_inputs():
ret... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.optim
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strid... | ai-in-motion/moai | Binary | false | 18,342 | [
"Apache-2.0"
] | 10 | e38cac046c059d2e2331ef4883bbabc5a500a5cf | https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf |
SpatialSoftmax | import torch
import torch.optim
def flatten_spatial_dims(tensor: 'torch.Tensor', spatial_start_index: 'int'=2
) ->torch.Tensor:
dims = [*tensor.shape[:spatial_start_index]] + [-1]
return tensor.view(*dims)
def dims(tensor: 'torch.Tensor', start_index: 'int'=1) ->torch.Tensor:
return torch.Tensor([te... | 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.optim
ass... | ai-in-motion/moai | SpatialSoftmax | false | 18,343 | [
"Apache-2.0"
] | 10 | e38cac046c059d2e2331ef4883bbabc5a500a5cf | https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf |
Zeros | import torch
import torch.optim
class Zeros(torch.nn.Module):
def __init__(self):
super(Zeros, self).__init__()
def forward(self, tensor: 'torch.Tensor') ->torch.Tensor:
return torch.zeros(1, *tensor.shape[1:], dtype=tensor.dtype, device
=tensor.device).expand_as(tensor)
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.optim
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strid... | ai-in-motion/moai | Zeros | false | 18,344 | [
"Apache-2.0"
] | 10 | e38cac046c059d2e2331ef4883bbabc5a500a5cf | https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf |
Znorm | import torch
import typing
import torch.optim
def dims(tensor: 'torch.Tensor', start_index: 'int'=1) ->torch.Tensor:
return torch.Tensor([tensor.size()[start_index:]]).squeeze()
class Znorm(torch.nn.Module):
def __init__(self, dims: 'typing.Sequence[int]'):
super(Znorm, self).__init__()
sel... | 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 typing
import torch.optim
assert_size_stride = torch._C._dynamo.guards.a... | ai-in-motion/moai | Znorm | false | 18,345 | [
"Apache-2.0"
] | 10 | e38cac046c059d2e2331ef4883bbabc5a500a5cf | https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf |
Snake | import torch
import torch.optim
class Snake(torch.nn.Module):
def __init__(self, alpha: 'float'=1.0):
super(Snake, self).__init__()
self.alpha = alpha
self.one_over_alpha = 1.0 / alpha
def forward(self, x: 'torch.Tensor') ->torch.Tensor:
s = torch.sin(self.alpha * x)
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
import torch.optim
assert_size_stride = torch._C._dynamo.guards.assert_si... | ai-in-motion/moai | Snake | false | 18,346 | [
"Apache-2.0"
] | 10 | e38cac046c059d2e2331ef4883bbabc5a500a5cf | https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf |
LayerNorm | import torch
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
class LayerNorm(nn.Module):
def __init__(self, eps=0.0001):
super(LayerNorm, self).__init__()
self.eps = eps
def forward(self, x):
x_shape = x.sh... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.... | amazon-research/network-deconvolution-pp | LayerNorm | false | 18,347 | [
"Apache-2.0"
] | 6 | 99e27ecec7d27c7c4c3fb230e96005bdcbf6f2ce | https://github.com/amazon-research/network-deconvolution-pp/tree/99e27ecec7d27c7c4c3fb230e96005bdcbf6f2ce |
Threshold | import torch
import torch.optim
class Threshold(torch.nn.Module):
CAST_OPS = {'float': lambda t: t.float(), 'byte': lambda t: t.byte()}
def __init__(self, value: 'float', comparison: 'str'='lower', dtype:
'str'='float'):
super(Threshold, self).__init__()
self.threshold = value
... | 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.optim
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strid... | ai-in-motion/moai | Threshold | false | 18,348 | [
"Apache-2.0"
] | 10 | e38cac046c059d2e2331ef4883bbabc5a500a5cf | https://github.com/ai-in-motion/moai/tree/e38cac046c059d2e2331ef4883bbabc5a500a5cf |
Classifier | import torch
from torch import nn
from torch.nn import functional as F
class Classifier(nn.Module):
def __init__(self, input_size, hidden_size, n_classes):
super().__init__()
self.linear1 = nn.Linear(input_size, hidden_size)
self.linear2 = nn.Linear(hidden_size, n_classes)
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
from torch import n... | ankitkv/pylego | Classifier | false | 18,349 | [
"MIT"
] | 4 | 38d4a8fe8497d748b22c58313cbfd187efb8326e | https://github.com/ankitkv/pylego/tree/38d4a8fe8497d748b22c58313cbfd187efb8326e |
Conv2d | import torch
from torch import nn
class Conv2d(nn.Module):
"""docstring for Conv2d
Attributes
----------
bn : TYPE
Description
conv : TYPE
Description
relu : TYPE
Description
"""
def __init__(self, in_channels, out_channels, kernel_size, stride=1,
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 import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_st... | anhlt/yolo-pytorch | Conv2d | false | 18,350 | [
"MIT"
] | 4 | 6e01146a93cbad3207c070536dffb26aef1d9c0f | https://github.com/anhlt/yolo-pytorch/tree/6e01146a93cbad3207c070536dffb26aef1d9c0f |
BERTIntermediate | from _paritybench_helpers import _mock_config
import math
import torch
import torch.nn as nn
def gelu(x):
"""Implementation of the gelu activation function.
For information: OpenAI GPT's gelu is slightly different (and gives slightly different results):
0.5 * x * (1 + torch.tanh(math.sqrt(2 / math... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | Chriskuei/FedMatch | BERTIntermediate | false | 18,351 | [
"Apache-2.0"
] | 4 | 305e8c4bbb398712b00c883a986dfec17b500f76 | https://github.com/Chriskuei/FedMatch/tree/305e8c4bbb398712b00c883a986dfec17b500f76 |
BERTLhuc | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
from torch.nn.parameter import Parameter
class BERTLhuc(nn.Module):
def __init__(self, config):
super(BERTLhuc, self).__init__()
self.lhuc = Parameter(torch.zeros(config.hidden_size))
def forward(self, hidden_st... | 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.nn.parameter import Parameter
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided... | Chriskuei/FedMatch | BERTLhuc | false | 18,352 | [
"Apache-2.0"
] | 4 | 305e8c4bbb398712b00c883a986dfec17b500f76 | https://github.com/Chriskuei/FedMatch/tree/305e8c4bbb398712b00c883a986dfec17b500f76 |
LeNet | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
from torchvision.transforms import functional as F
from torch.nn import functional as F
class LeNet(nn.Module):
def __init__(self, num_classes... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | amazon-research/network-deconvolution-pp | LeNet | false | 18,353 | [
"Apache-2.0"
] | 6 | 99e27ecec7d27c7c4c3fb230e96005bdcbf6f2ce | https://github.com/amazon-research/network-deconvolution-pp/tree/99e27ecec7d27c7c4c3fb230e96005bdcbf6f2ce |
ReceptiveFieldNorm | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
from torchvision.transforms import functional as F
from torch.nn import functional as F
def box_filter(x, k):
if k % 2 == 0:
k = k + 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 import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import... | amazon-research/network-deconvolution-pp | ReceptiveFieldNorm | false | 18,354 | [
"Apache-2.0"
] | 6 | 99e27ecec7d27c7c4c3fb230e96005bdcbf6f2ce | https://github.com/amazon-research/network-deconvolution-pp/tree/99e27ecec7d27c7c4c3fb230e96005bdcbf6f2ce |
Network | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
import torch.nn.functional as F
class Network(nn.Module):
def __init__(self, config):
super().__init__()
self.config = config
self.l1 = nn.Linear(self.config['in_feature'], 500)
self.l2 = nn.Linear(50... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | AutuanLiu/PyTorch-ML | Network | false | 18,355 | [
"MIT"
] | 9 | 884c7723843d9ffb4da09d95eb97886b2cc38f28 | https://github.com/AutuanLiu/PyTorch-ML/tree/884c7723843d9ffb4da09d95eb97886b2cc38f28 |
BERTMultSelfOutput | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
class BERTLayerNorm(nn.Module):
def __init__(self, config, multi_params=None, variance_epsilon=1e-12):
"""Construct a layernorm module in the TF style (epsilon inside the square root).
"""
super(BERTLayerNorm... | 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_... | Chriskuei/FedMatch | BERTMultSelfOutput | false | 18,356 | [
"Apache-2.0"
] | 4 | 305e8c4bbb398712b00c883a986dfec17b500f76 | https://github.com/Chriskuei/FedMatch/tree/305e8c4bbb398712b00c883a986dfec17b500f76 |
MLP | from _paritybench_helpers import _mock_config
import math
import torch
import torch.nn as nn
from torch.nn.parameter import Parameter
def gelu(x):
return 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 *
torch.pow(x, 3))))
class Conv1D(nn.Module):
def __init__(self, nf, nx):
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | EMBEDDIA/tnt_kid | MLP | false | 18,357 | [
"MIT"
] | 4 | 7a8c095de9581a641129939d950ae99ab1593456 | https://github.com/EMBEDDIA/tnt_kid/tree/7a8c095de9581a641129939d950ae99ab1593456 |
BertImageSelfAttention | from _paritybench_helpers import _mock_config
import math
import torch
import torch.nn as nn
class BertImageSelfAttention(nn.Module):
def __init__(self, config):
super(BertImageSelfAttention, self).__init__()
if config.v_hidden_size % config.v_num_attention_heads != 0:
raise ValueErro... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | IMNearth/Curriculum-Learning-For-VLN | BertImageSelfAttention | false | 18,358 | [
"MIT"
] | 8 | d2fe1286eb295dc8c63a0c886b35883f32481d85 | https://github.com/IMNearth/Curriculum-Learning-For-VLN/tree/d2fe1286eb295dc8c63a0c886b35883f32481d85 |
Wav2Vec2ClassificationHead | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
class Wav2Vec2ClassificationHead(nn.Module):
"""Head for classification tasks
Layers:
- dropout
- dense layer (default xlsr hidden size = 1024)
- relu
- dropout
- classificiation layer ... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | HLasse/wav2vec_finetune | Wav2Vec2ClassificationHead | false | 18,359 | [
"MIT"
] | 6 | 084ab432ba4acbf5ce81267e2791fb36a0b70daa | https://github.com/HLasse/wav2vec_finetune/tree/084ab432ba4acbf5ce81267e2791fb36a0b70daa |
LogitsSelfAttention | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
import torch.cuda
import torch.distributed
class LogitsSelfAttention(nn.Module):
def __init__(self, config):
super().__init__()
if config.hidden_size % config.num_attention_heads != 0:
raise ValueError(
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.nn as nn
import torch.cuda
import torch.distributed
assert_size_str... | KaijuML/dtt-multi-branch | LogitsSelfAttention | false | 18,360 | [
"Apache-2.0"
] | 8 | a49850a95034e58d387b9d48c647cfc2b83c45b5 | https://github.com/KaijuML/dtt-multi-branch/tree/a49850a95034e58d387b9d48c647cfc2b83c45b5 |
G_t | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
class G_t(nn.Module):
def __init__(self, args):
super(G_t, self).__init__()
self._relu = nn.ReLU()
self._ws1 = nn.Linear(args.image_feature_dim, args.
Vt_middle_feature_dim, bias=False)
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
assert_... | HCShi/IONet | G_t | false | 18,361 | [
"MIT"
] | 4 | 42e3c0455a1ecb610f458e814d7310d685b2be7b | https://github.com/HCShi/IONet/tree/42e3c0455a1ecb610f458e814d7310d685b2be7b |
G_u | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
class G_u(nn.Module):
def __init__(self, args):
super(G_u, self).__init__()
self._relu = nn.ReLU()
self._ws1 = nn.Linear(args.video_feature_dim, args.
Vu_middle_feature_dim, bias=False)
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
assert_... | HCShi/IONet | G_u | false | 18,362 | [
"MIT"
] | 4 | 42e3c0455a1ecb610f458e814d7310d685b2be7b | https://github.com/HCShi/IONet/tree/42e3c0455a1ecb610f458e814d7310d685b2be7b |
BERTOutput | from _paritybench_helpers import _mock_config
import copy
import math
import torch
import torch.nn as nn
def gelu(x):
"""Implementation of the gelu activation function.
For information: OpenAI GPT's gelu is slightly different (and gives slightly different results):
0.5 * x * (1 + torch.tanh(math.s... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import copy
import ... | Chriskuei/FedMatch | BERTOutput | false | 18,363 | [
"Apache-2.0"
] | 4 | 305e8c4bbb398712b00c883a986dfec17b500f76 | https://github.com/Chriskuei/FedMatch/tree/305e8c4bbb398712b00c883a986dfec17b500f76 |
D_V | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
class D_V(nn.Module):
def __init__(self, args):
super(D_V, self).__init__()
self._relu = nn.ReLU()
self._ws1 = nn.Linear(args.video_feature_dim, args.
DV_middle_feature_dim, bias=False)
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
assert_... | HCShi/IONet | D_V | false | 18,364 | [
"MIT"
] | 4 | 42e3c0455a1ecb610f458e814d7310d685b2be7b | https://github.com/HCShi/IONet/tree/42e3c0455a1ecb610f458e814d7310d685b2be7b |
BertSelfAttention | from _paritybench_helpers import _mock_config
import math
import torch
import torch.nn as nn
class BertSelfAttention(nn.Module):
def __init__(self, config):
super().__init__()
if config.hidden_size % config.num_attention_heads != 0:
raise ValueError(
'The 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 import triton_helpers
from torch._inductor.runtime.... | DerryHub/the-TaobaoLive-Commodity-Identify-Competition | BertSelfAttention | false | 18,365 | [
"MIT"
] | 4 | 7e5e5c4fbddd9949fe01810d58bd7994889c007c | https://github.com/DerryHub/the-TaobaoLive-Commodity-Identify-Competition/tree/7e5e5c4fbddd9949fe01810d58bd7994889c007c |
GreedySearch | import torch
import torch.nn as nn
def cuda():
return torch.cuda.is_available()
def get_device():
return torch.device('cuda' if cuda() else 'cpu')
class Search(nn.Module):
"""Base search class."""
def __init__(self, *args, **kwargs):
super().__init__()
self.device = get_device()
... | 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... | PaccMann/paccmann_chemistry | GreedySearch | false | 18,366 | [
"MIT"
] | 9 | f7e9735aafb936f837c38b5055c654be178f385f | https://github.com/PaccMann/paccmann_chemistry/tree/f7e9735aafb936f837c38b5055c654be178f385f |
SamplingSearch | import torch
import torch.nn as nn
def cuda():
return torch.cuda.is_available()
def get_device():
return torch.device('cuda' if cuda() else 'cpu')
class Search(nn.Module):
"""Base search class."""
def __init__(self, *args, **kwargs):
super().__init__()
self.device = get_device()
... | 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
... | PaccMann/paccmann_chemistry | SamplingSearch | false | 18,367 | [
"MIT"
] | 9 | f7e9735aafb936f837c38b5055c654be178f385f | https://github.com/PaccMann/paccmann_chemistry/tree/f7e9735aafb936f837c38b5055c654be178f385f |
BertTextPooler | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
class BertTextPooler(nn.Module):
def __init__(self, config):
super(BertTextPooler, self).__init__()
self.dense = nn.Linear(config.hidden_size, config.bi_hidden_size)
self.activation = nn.ReLU()
def forwa... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | IMNearth/Curriculum-Learning-For-VLN | BertTextPooler | false | 18,368 | [
"MIT"
] | 8 | d2fe1286eb295dc8c63a0c886b35883f32481d85 | https://github.com/IMNearth/Curriculum-Learning-For-VLN/tree/d2fe1286eb295dc8c63a0c886b35883f32481d85 |
CNNCifar | from _paritybench_helpers import _mock_config
import torch
import torch.nn.functional as F
from torch import nn
class CNNCifar(nn.Module):
def __init__(self, args):
super(CNNCifar, self).__init__()
self.conv1 = nn.Conv2d(3, 6, 5)
self.pool = nn.MaxPool2d(2, 2)
self.conv2 = nn.Conv... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | ITSEG-MQ/Chain-PPFL | CNNCifar | false | 18,369 | [
"MIT"
] | 8 | 21d4fafcd8e118cc4eaa35348f1204fecce78138 | https://github.com/ITSEG-MQ/Chain-PPFL/tree/21d4fafcd8e118cc4eaa35348f1204fecce78138 |
BERTLayerNorm | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
class BERTLayerNorm(nn.Module):
def __init__(self, config, multi_params=None, variance_epsilon=1e-12):
"""Construct a layernorm module in the TF style (epsilon inside the square root).
"""
super(BERTLayerNorm... | 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_... | Chriskuei/FedMatch | BERTLayerNorm | false | 18,370 | [
"Apache-2.0"
] | 4 | 305e8c4bbb398712b00c883a986dfec17b500f76 | https://github.com/Chriskuei/FedMatch/tree/305e8c4bbb398712b00c883a986dfec17b500f76 |
BertMLP | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
class BertMLP(nn.Module):
def __init__(self, config):
super().__init__()
self.dense_layer = nn.Linear(config.hidden_size, config.hidden_size)
self.dense_to_labels_layer = nn.Linear(config.hidden_size, config.... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | JunnYu/GlyceBert_tokenizer | BertMLP | false | 18,371 | [
"MIT"
] | 7 | 27ded9d20421e274ec2e7139e9c79da56d8ad42f | https://github.com/JunnYu/GlyceBert_tokenizer/tree/27ded9d20421e274ec2e7139e9c79da56d8ad42f |
AdapterLayer | from _paritybench_helpers import _mock_config
import math
import torch
import torch.nn as nn
def gelu(x):
"""Implementation of the gelu activation function.
For information: OpenAI GPT's gelu is slightly different (and gives slightly different results):
0.5 * x * (1 + torch.tanh(math.sqrt(2 / math... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | Chriskuei/FedMatch | AdapterLayer | false | 18,372 | [
"Apache-2.0"
] | 4 | 305e8c4bbb398712b00c883a986dfec17b500f76 | https://github.com/Chriskuei/FedMatch/tree/305e8c4bbb398712b00c883a986dfec17b500f76 |
CentralV_Critic | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
import torch.nn.functional as F
class CentralV_Critic(nn.Module):
def __init__(self, input_shape, args):
super(CentralV_Critic, self).__init__()
self.args = args
self.fc1 = nn.Linear(input_shape, 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
assert_... | OkYongChoi/smac | CentralV_Critic | false | 18,373 | [
"Apache-2.0"
] | 8 | 5b2b59e42d17a124e97feeecf9154a3a0aa9d260 | https://github.com/OkYongChoi/smac/tree/5b2b59e42d17a124e97feeecf9154a3a0aa9d260 |
BERTLowRank | from _paritybench_helpers import _mock_config
import math
import torch
import torch.nn as nn
def gelu(x):
"""Implementation of the gelu activation function.
For information: OpenAI GPT's gelu is slightly different (and gives slightly different results):
0.5 * x * (1 + torch.tanh(math.sqrt(2 / math... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language 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 ... | Chriskuei/FedMatch | BERTLowRank | false | 18,374 | [
"Apache-2.0"
] | 4 | 305e8c4bbb398712b00c883a986dfec17b500f76 | https://github.com/Chriskuei/FedMatch/tree/305e8c4bbb398712b00c883a986dfec17b500f76 |
Critic | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
import torch.nn.functional as F
class Critic(nn.Module):
def __init__(self, opts):
super(Critic, self).__init__()
self.l1 = nn.Linear(opts.state_dim + opts.action_dim, 256)
self.l2 = nn.Linear(256, 256)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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 ... | Jiang-HB/AC_CDQ | Critic | false | 18,375 | [
"MIT"
] | 7 | 4b4ec2d611c4481ad0b99cf7ea79eb23014a0325 | https://github.com/Jiang-HB/AC_CDQ/tree/4b4ec2d611c4481ad0b99cf7ea79eb23014a0325 |
BertSelfAttention | from _paritybench_helpers import _mock_config
import math
import torch
from torch import nn
class BertSelfAttention(nn.Module):
def __init__(self, model_config):
super().__init__()
if model_config.hidden_size % model_config.num_attention_heads != 0:
raise ValueError(
'... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | HS-YN/PanoAVQA | BertSelfAttention | false | 18,376 | [
"MIT"
] | 3 | 657b83421ce64ea18b3e79fb580afc7034403ccc | https://github.com/HS-YN/PanoAVQA/tree/657b83421ce64ea18b3e79fb580afc7034403ccc |
Decoder | import torch
import torchvision.transforms.functional as F
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data
import torch.optim
class non_bottleneck_1d(nn.Module):
def __init__(self, chann, dropprob, dilated):
super().__init__()
self.conv3x1_1 = nn.Conv2d(chann, chann,... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | alopezgit/project-adapt | Decoder | false | 18,377 | [
"MIT"
] | 8 | e93ab350344a5504f76f4e460002e0163996f88a | https://github.com/alopezgit/project-adapt/tree/e93ab350344a5504f76f4e460002e0163996f88a |
Alignment | from _paritybench_helpers import _mock_config
from torch.nn import Module
import math
import torch
import torch.nn as nn
import torch.nn.functional as f
class Module(nn.Module):
def __init__(self):
super().__init__()
self.summary = {}
def add_summary(self, name, val):
if self.trainin... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Chriskuei/FedMatch | Alignment | false | 18,378 | [
"Apache-2.0"
] | 4 | 305e8c4bbb398712b00c883a986dfec17b500f76 | https://github.com/Chriskuei/FedMatch/tree/305e8c4bbb398712b00c883a986dfec17b500f76 |
RNNAgent | from _paritybench_helpers import _mock_config
import torch
import torch.nn.functional as F
import torch.nn as nn
class RNNAgent(nn.Module):
def __init__(self, input_shape, args):
super(RNNAgent, self).__init__()
self.args = args
self.fc1 = nn.Linear(input_shape, args.rnn_hidden_dim)
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | Sud0x67/mrmix | RNNAgent | false | 18,379 | [
"Apache-2.0"
] | 4 | 4f4784e421c768509bd007e21b4455b56edc7cd2 | https://github.com/Sud0x67/mrmix/tree/4f4784e421c768509bd007e21b4455b56edc7cd2 |
Att | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
class Att(nn.Module):
def __init__(self, args):
super(Att, self).__init__()
self._sigmoid = nn.Sigmoid()
self._ws1 = nn.Linear(args.video_feature_dim, 1, bias=False)
self._init_weights()
def _ini... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | HCShi/IONet | Att | false | 18,380 | [
"MIT"
] | 4 | 42e3c0455a1ecb610f458e814d7310d685b2be7b | https://github.com/HCShi/IONet/tree/42e3c0455a1ecb610f458e814d7310d685b2be7b |
FusionConcat | from _paritybench_helpers import _mock_config
import torch
import torch.utils.data
from torch import nn
class _NewEmptyTensorOp(torch.autograd.Function):
@staticmethod
def forward(ctx, x, new_shape):
ctx.shape = x.shape
return x.new_empty(new_shape)
@staticmethod
def backward(ctx, gr... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
from torch import nn
assert_size_stride = torch._C._dyna... | Singingkettle/SAF-FCOS | FusionConcat | false | 18,381 | [
"BSD-2-Clause"
] | 10 | 5d00b83d659552940025923460d02bb2db7d29e8 | https://github.com/Singingkettle/SAF-FCOS/tree/5d00b83d659552940025923460d02bb2db7d29e8 |
BERTAttention | from _paritybench_helpers import _mock_config
import copy
import math
import torch
import torch.nn as nn
def gelu(x):
"""Implementation of the gelu activation function.
For information: OpenAI GPT's gelu is slightly different (and gives slightly different results):
0.5 * x * (1 + torch.tanh(math.s... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | Chriskuei/FedMatch | BERTAttention | false | 18,382 | [
"Apache-2.0"
] | 4 | 305e8c4bbb398712b00c883a986dfec17b500f76 | https://github.com/Chriskuei/FedMatch/tree/305e8c4bbb398712b00c883a986dfec17b500f76 |
DotRole | from _paritybench_helpers import _mock_config
import torch
import torch as th
import torch.nn as nn
class DotRole(nn.Module):
def __init__(self, args):
super(DotRole, self).__init__()
self.args = args
self.n_actions = args.n_actions
self.q_fc = nn.Linear(args.rnn_hidden_dim, args.... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch as th
import torch.nn as nn
assert_size_stride = torch._C._dynamo.g... | OkYongChoi/smac | DotRole | false | 18,383 | [
"Apache-2.0"
] | 8 | 5b2b59e42d17a124e97feeecf9154a3a0aa9d260 | https://github.com/OkYongChoi/smac/tree/5b2b59e42d17a124e97feeecf9154a3a0aa9d260 |
BertAttention | from _paritybench_helpers import _mock_config
import math
import torch
from torch import nn
class BertSelfAttention(nn.Module):
def __init__(self, model_config):
super().__init__()
if model_config.hidden_size % model_config.num_attention_heads != 0:
raise ValueError(
'... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | HS-YN/PanoAVQA | BertAttention | false | 18,384 | [
"MIT"
] | 3 | 657b83421ce64ea18b3e79fb580afc7034403ccc | https://github.com/HS-YN/PanoAVQA/tree/657b83421ce64ea18b3e79fb580afc7034403ccc |
RobertaClassificationHead | from _paritybench_helpers import _mock_config
import torch
from torch import nn
class RobertaClassificationHead(nn.Module):
"""Head for sentence-level classification tasks."""
def __init__(self, config):
super(RobertaClassificationHead, self).__init__()
self.dense = nn.Linear(config.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
from torch import n... | INK-USC/expl-refinement | RobertaClassificationHead | false | 18,385 | [
"MIT"
] | 7 | 815a7892a8d4c42fb429856746212a44f67d2547 | https://github.com/INK-USC/expl-refinement/tree/815a7892a8d4c42fb429856746212a44f67d2547 |
DotSelector | from _paritybench_helpers import _mock_config
import torch
import torch as th
from torch.distributions import Categorical
import torch.nn as nn
import torch.nn.functional as F
class DotSelector(nn.Module):
def __init__(self, input_shape, args):
super(DotSelector, self).__init__()
self.args = 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
import torch as th
from torch... | OkYongChoi/smac | DotSelector | false | 18,386 | [
"Apache-2.0"
] | 8 | 5b2b59e42d17a124e97feeecf9154a3a0aa9d260 | https://github.com/OkYongChoi/smac/tree/5b2b59e42d17a124e97feeecf9154a3a0aa9d260 |
PositionWiseFeedForward | from _paritybench_helpers import _mock_config
import math
import torch
import torch.nn as nn
def gelu(x):
return x * 0.5 * (1.0 + torch.erf(x / math.sqrt(2.0)))
class PositionWiseFeedForward(nn.Module):
def __init__(self, args):
super(PositionWiseFeedForward, 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.triton_helpers import libdevice
import math
import ... | DannielSilva/MMBERT | PositionWiseFeedForward | false | 18,387 | [
"MIT"
] | 4 | 2c9069b59b66b8f3fec6de2e68ec42b489a3a437 | https://github.com/DannielSilva/MMBERT/tree/2c9069b59b66b8f3fec6de2e68ec42b489a3a437 |
FusionMul | from _paritybench_helpers import _mock_config
import torch
import torch.utils.data
from torch import nn
class FusionMul(nn.Module):
def __init__(self, input_channels, cfg):
super(FusionMul, self).__init__()
def forward(self, im_x, ra_x):
x = torch.mul(im_x, ra_x)
return x
def get_i... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
import torch.utils.data
from torch import nn
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._... | Singingkettle/SAF-FCOS | FusionMul | false | 18,388 | [
"BSD-2-Clause"
] | 10 | 5d00b83d659552940025923460d02bb2db7d29e8 | https://github.com/Singingkettle/SAF-FCOS/tree/5d00b83d659552940025923460d02bb2db7d29e8 |
CriticNet | from _paritybench_helpers import _mock_config
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data
import torch.nn.parallel
class CriticNet(nn.Module):
def __init__(self, args):
super(CriticNet, self).__init__()
state_dim = args.state_dim
action_dim =... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
import ... | Manojbhat09/Sane-annotation-shape-complete | CriticNet | false | 18,389 | [
"Apache-2.0"
] | 9 | 03b298b2c0a187be979ff31ad2a39238b72a6d78 | https://github.com/Manojbhat09/Sane-annotation-shape-complete/tree/03b298b2c0a187be979ff31ad2a39238b72a6d78 |
BertCrossAttention | from _paritybench_helpers import _mock_config
import math
import torch
from torch import nn
class BertSelfAttention(nn.Module):
def __init__(self, model_config):
super().__init__()
if model_config.hidden_size % model_config.num_attention_heads != 0:
raise ValueError(
'... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | HS-YN/PanoAVQA | BertCrossAttention | false | 18,390 | [
"MIT"
] | 3 | 657b83421ce64ea18b3e79fb580afc7034403ccc | https://github.com/HS-YN/PanoAVQA/tree/657b83421ce64ea18b3e79fb580afc7034403ccc |
BertOutput | from _paritybench_helpers import _mock_config
import torch
from torch import nn
class BertOutput(nn.Module):
def __init__(self, model_config):
super().__init__()
self.dense = nn.Linear(model_config.intermediate_size, model_config
.hidden_size)
self.LayerNorm = nn.LayerNorm(mod... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from torch import n... | HS-YN/PanoAVQA | BertOutput | false | 18,391 | [
"MIT"
] | 3 | 657b83421ce64ea18b3e79fb580afc7034403ccc | https://github.com/HS-YN/PanoAVQA/tree/657b83421ce64ea18b3e79fb580afc7034403ccc |
BertLayer | from _paritybench_helpers import _mock_config
import inspect
import math
import torch
from torch import nn
from typing import Callable
from typing import List
from typing import Set
from typing import Tuple
def find_pruneable_heads_and_indices(heads: 'List[int]', n_heads: 'int',
head_size: 'int', already_pruned_h... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.... | RyanWangZf/SurvTRACE | BertLayer | false | 18,392 | [
"MIT"
] | 8 | d55299a28629d233f49ad1feaea7ed00835f0dd0 | https://github.com/RyanWangZf/SurvTRACE/tree/d55299a28629d233f49ad1feaea7ed00835f0dd0 |
FCN8s | import torch
import torch.utils.data
import torch
import torch.nn as nn
from torchvision import models
from numpy.random import *
class FCN8s(nn.Module):
def __init__(self, n_class=20):
super(FCN8s, self).__init__()
self.conv1_1 = nn.Conv2d(3, 64, 3, padding=100)
self.relu1_1 = nn.ReLU(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
import torch.utils.data
impor... | XomniaJADS/CycleGAN_Unsupervised_Domain_Adaptation | FCN8s | false | 18,393 | [
"MIT"
] | 4 | 37165c74aac8f5743799c36d0f66ee23432068f4 | https://github.com/XomniaJADS/CycleGAN_Unsupervised_Domain_Adaptation/tree/37165c74aac8f5743799c36d0f66ee23432068f4 |
Model | from torch.nn import Module
import torch
import torch.nn.functional
from torch.nn import Parameter
from torch.nn.parameter import Parameter
from torch.nn.modules import Module
import torch.nn.parallel
import torch.utils.data
import torch.optim
import torch.utils.data.distributed
from torch.nn import Module
class Mode... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch.nn import Module
import torch.nn.functional
from torch.nn import Parameter
from torch.nn.parameter import Parameter
from torch.nn... | ROCmSoftwarePlatform/apex | Model | false | 18,394 | [
"BSD-3-Clause"
] | 6 | db92ee13ca55e284342bdca84bddc38c3812f1ed | https://github.com/ROCmSoftwarePlatform/apex/tree/db92ee13ca55e284342bdca84bddc38c3812f1ed |
ISub | import torch
class ISub(torch.nn.Module):
def __init__(self):
super(ISub, 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_sub_0(in_ptr0, in_ptr1, out_ptr1, xnumel,... | Akababa/torch2trt | ISub | false | 18,395 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
RDivFloat | import torch
class RDivFloat(torch.nn.Module):
def __init__(self):
super(RDivFloat, self).__init__()
def forward(self, x):
return 100.0 / 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... | Akababa/torch2trt | RDivFloat | false | 18,396 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
AUXModule | import torch
import torch.nn as nn
import torch.nn.functional as F
class AUXModule(nn.Module):
def __init__(self, in_features, out_features):
super().__init__()
self.linear = nn.Linear(in_features, out_features)
def forward(self, x):
x = F.adaptive_max_pool2d(x, output_size=(1, 1))
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | AhmadQasim/unet-segmentator-brats | AUXModule | false | 18,397 | [
"MIT"
] | 2 | 3e94cc234d55867957024bb5d05df6ec16882bbf | https://github.com/AhmadQasim/unet-segmentator-brats/tree/3e94cc234d55867957024bb5d05df6ec16882bbf |
AnyHead | import torch
import torch.nn as nn
class AnyHead(nn.Module):
"""AnyNet Head part"""
def __init__(self, w_in, nc):
super(AnyHead, self).__init__()
self.avg_pool = nn.AdaptiveAvgPool2d((1, 1))
self.fc = nn.Linear(w_in, nc, bias=True)
def forward(self, x):
x = self.avg_pool(... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | Alessiacosmos/Basic-RegNet-pytorch | AnyHead | false | 18,398 | [
"MIT"
] | 2 | fd6b9a67599dcea6c90ba247f532a7624252b33c | https://github.com/Alessiacosmos/Basic-RegNet-pytorch/tree/fd6b9a67599dcea6c90ba247f532a7624252b33c |
PixelNorm | import torch
import torch.nn as nn
class PixelNorm(nn.Module):
def __init__(self):
super(PixelNorm, self).__init__()
self.epsilon = 1e-08
def forward(self, x):
return x / torch.sqrt(torch.mean(x ** 2, dim=1, keepdim=True) +
self.epsilon)
def get_inputs():
return [to... | 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_... | AjaybirRandhawa/Face-Generator | PixelNorm | false | 18,399 | [
"Apache-2.0"
] | 2 | 9cac0822b6e6337c3599e949154ce44eeae5746b | https://github.com/AjaybirRandhawa/Face-Generator/tree/9cac0822b6e6337c3599e949154ce44eeae5746b |
GeM | import torch
import torch.nn as nn
import torch.nn.functional as F
def gem(x: 'torch.Tensor', p=3, eps=1e-06):
return F.avg_pool2d(x.clamp(min=eps).pow(p), (x.size(-2), x.size(-1))).pow(
1.0 / p)
class GeM(nn.Module):
def __init__(self, p=3, eps=1e-06):
super().__init__()
self.p = n... | 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
import... | Ajax0564/Cornell-Birdcall-Identification | GeM | false | 18,400 | [
"MIT"
] | 2 | af13f2a73a3a665aa27722855a1c6a4d915d46db | https://github.com/Ajax0564/Cornell-Birdcall-Identification/tree/af13f2a73a3a665aa27722855a1c6a4d915d46db |
DepthwiseSeparableConv | import torch
import torch.nn as nn
class DepthwiseSeparableConv(nn.Module):
def __init__(self, in_ch, out_ch, k, dim=1, bias=True):
super().__init__()
if dim == 1:
self.depthwise_conv = nn.Conv1d(in_channels=in_ch, out_channels
=in_ch, kernel_size=k, groups=in_ch, padd... | import torch
from torch._inductor.select_algorithm import extern_kernels
import 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... | AlanShaw-GitHub/video-temporal-localization | DepthwiseSeparableConv | false | 18,401 | [
"Apache-2.0"
] | 3 | 111b654970914305b1f74d26f8dcc32d9224aa22 | https://github.com/AlanShaw-GitHub/video-temporal-localization/tree/111b654970914305b1f74d26f8dcc32d9224aa22 |
RMulFloat | import torch
class RMulFloat(torch.nn.Module):
def __init__(self):
super(RMulFloat, self).__init__()
def forward(self, x):
return 10.0 * 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... | Akababa/torch2trt | RMulFloat | false | 18,402 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
RSubInt | import torch
class RSubInt(torch.nn.Module):
def __init__(self):
super(RSubInt, self).__init__()
def forward(self, x):
return 1 - 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... | Akababa/torch2trt | RSubInt | false | 18,403 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
ContrastiveLoss | import torch
class ContrastiveLoss(torch.nn.Module):
"""
Contrastive loss function.
reference code: https://github.com/delijati/pytorch-siamese/blob/master/contrastive.py
"""
def __init__(self, margin=1.0):
super(ContrastiveLoss, self).__init__()
self.margin = margin
def chec... | 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... | Akimoto-Cris/Pytorch_AMOC | ContrastiveLoss | false | 18,404 | [
"Apache-2.0"
] | 2 | d2587ff3cfdd555c537c021dd616844da63210b9 | https://github.com/Akimoto-Cris/Pytorch_AMOC/tree/d2587ff3cfdd555c537c021dd616844da63210b9 |
ConvLayer | import torch
class ConvLayer(torch.nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride):
super(ConvLayer, self).__init__()
reflection_padding = kernel_size // 2
self.reflection_pad = torch.nn.ReflectionPad2d(reflection_padding)
self.conv2d = torch.nn.Conv... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import math as tl_math
assert_size_s... | Aftaab99/pytorch-multiple-style-transfer | ConvLayer | false | 18,405 | [
"BSD-3-Clause"
] | 3 | 172d384d8ef06d005a49715a9c75fc8f26a4e4f9 | https://github.com/Aftaab99/pytorch-multiple-style-transfer/tree/172d384d8ef06d005a49715a9c75fc8f26a4e4f9 |
RSubFloat | import torch
class RSubFloat(torch.nn.Module):
def __init__(self):
super(RSubFloat, self).__init__()
def forward(self, x):
return 1.0 - 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... | Akababa/torch2trt | RSubFloat | false | 18,406 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
L2Norm | import torch
from itertools import product as product
import torch.nn as nn
import torch.nn.init as init
class L2Norm(nn.Module):
def __init__(self, n_channels, scale):
super(L2Norm, self).__init__()
self.n_channels = n_channels
self.gamma = scale or None
self.eps = 1e-10
... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
from itertools import product as product
import torch.nn as nn
import torch.nn.... | AlanSavio25/AVSR-Dataset-Pipeline | L2Norm | false | 18,407 | [
"MIT"
] | 2 | 6e6d44eca6133c2e0223e9be8d011be0b68c73d1 | https://github.com/AlanSavio25/AVSR-Dataset-Pipeline/tree/6e6d44eca6133c2e0223e9be8d011be0b68c73d1 |
SE | import torch
import torch.nn as nn
class SE(nn.Module):
"""Squeeze-and-Excitation block"""
def __init__(self, w_in, w_se):
super(SE, self).__init__()
self.avg_pool = nn.AdaptiveAvgPool2d((1, 1))
self.se1 = nn.Conv2d(w_in, w_se, kernel_size=1, bias=True)
self.reluse = nn.ReLU(i... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
import torch.nn as nn
assert_... | Alessiacosmos/Basic-RegNet-pytorch | SE | false | 18,408 | [
"MIT"
] | 2 | fd6b9a67599dcea6c90ba247f532a7624252b33c | https://github.com/Alessiacosmos/Basic-RegNet-pytorch/tree/fd6b9a67599dcea6c90ba247f532a7624252b33c |
Mul | import torch
class Mul(torch.nn.Module):
def __init__(self):
super(Mul, self).__init__()
def forward(self, x, y):
return 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... | Akababa/torch2trt | Mul | false | 18,409 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
Net | import torch
import torch.nn as nn
import torch.nn.functional as F
class Net(nn.Module):
def __init__(self, input_size, out_size, drop_prob=0.5):
super(Net, self).__init__()
self.fc1 = nn.Linear(input_size, 256)
self.fc2 = nn.Linear(256, out_size)
self.drop_prob = drop_prob
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_... | AlexMoreo/inntt | Net | false | 18,410 | [
"MIT"
] | 2 | 6f48a37ad5b451f1fef0d2ca1c4c46dd5abc6689 | https://github.com/AlexMoreo/inntt/tree/6f48a37ad5b451f1fef0d2ca1c4c46dd5abc6689 |
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,... | Akababa/torch2trt | IMul | false | 18,411 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
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... | Akababa/torch2trt | RDivInt | false | 18,412 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
MaxElementwise | import torch
class MaxElementwise(torch.nn.Module):
def forward(self, x, y):
return torch.max(x, y)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | Akababa/torch2trt | MaxElementwise | false | 18,413 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
RAddFloat | import torch
class RAddFloat(torch.nn.Module):
def __init__(self):
super(RAddFloat, self).__init__()
def forward(self, x):
return 1.0 + 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... | Akababa/torch2trt | RAddFloat | false | 18,414 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
AttBlockV2 | import torch
import torch.nn as nn
def init_layer(layer):
nn.init.xavier_uniform_(layer.weight)
if hasattr(layer, 'bias'):
if layer.bias is not None:
layer.bias.data.fill_(0.0)
class AttBlockV2(nn.Module):
def __init__(self, in_features: 'int', out_features: 'int', activation=
... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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.... | Ajax0564/Cornell-Birdcall-Identification | AttBlockV2 | false | 18,415 | [
"MIT"
] | 2 | af13f2a73a3a665aa27722855a1c6a4d915d46db | https://github.com/Ajax0564/Cornell-Birdcall-Identification/tree/af13f2a73a3a665aa27722855a1c6a4d915d46db |
Div | import torch
class Div(torch.nn.Module):
def __init__(self):
super(Div, self).__init__()
def forward(self, x, y):
return 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... | Akababa/torch2trt | Div | false | 18,416 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
IAdd | import torch
class IAdd(torch.nn.Module):
def __init__(self):
super(IAdd, 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_add_0(in_ptr0, in_ptr1, out_ptr1, xnumel,... | Akababa/torch2trt | IAdd | false | 18,417 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
MinElementwise | import torch
class MinElementwise(torch.nn.Module):
def forward(self, x, y):
return torch.min(x, y)
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | Akababa/torch2trt | MinElementwise | false | 18,418 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
RpowFloat | import torch
class RpowFloat(torch.nn.Module):
def __init__(self):
super(RpowFloat, self).__init__()
def forward(self, x):
return 2.0 ** 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... | Akababa/torch2trt | RpowFloat | false | 18,419 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
convBlock | import torch
import torch.nn as nn
def conv(in_channel, out_channel, kernel_size, stride=1, dilation=1, bias=False
):
padding = (kernel_size - 1) * dilation // 2
return nn.Conv2d(in_channel, out_channel, kernel_size=kernel_size,
stride=stride, padding=padding, dilation=dilation, bias=bias)
class... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from 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_... | AlbertZhangHIT/DnCNN | convBlock | false | 18,420 | [
"MIT"
] | 2 | 8530dfa6d30424a04ae32ab036fd8cc4ac12e978 | https://github.com/AlbertZhangHIT/DnCNN/tree/8530dfa6d30424a04ae32ab036fd8cc4ac12e978 |
RMulInt | import torch
class RMulInt(torch.nn.Module):
def __init__(self):
super(RMulInt, self).__init__()
def forward(self, x):
return 10 * 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... | Akababa/torch2trt | RMulInt | false | 18,421 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
Pow | import torch
class Pow(torch.nn.Module):
def __init__(self):
super(Pow, self).__init__()
def forward(self, x, y):
return x ** y
def get_inputs():
return [torch.rand([4, 4, 4, 4]), torch.rand([4, 4, 4, 4])]
def get_init_inputs():
return [[], {}]
| import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_c... | Akababa/torch2trt | Pow | false | 18,422 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
RpowInt | import torch
class RpowInt(torch.nn.Module):
def __init__(self):
super(RpowInt, self).__init__()
def forward(self, x):
return 2 ** 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... | Akababa/torch2trt | RpowInt | false | 18,423 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
IDiv | import torch
class IDiv(torch.nn.Module):
def __init__(self):
super(IDiv, 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_div_0(in_ptr0, in_ptr1, out_ptr1, xnumel,... | Akababa/torch2trt | IDiv | false | 18,424 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
Normalize | import torch
class Normalize(torch.nn.Module):
def __init__(self, *args, **kwargs):
super(Normalize, self).__init__()
self.args = args
self.kwargs = kwargs
def forward(self, x):
return torch.nn.functional.normalize(x, *self.args, **self.kwargs)
def get_inputs():
return ... | import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
assert_size_stride = torch._... | Akababa/torch2trt | Normalize | false | 18,425 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
TorchAdd | import torch
class TorchAdd(torch.nn.Module):
def __init__(self):
super(TorchAdd, self).__init__()
def forward(self, x, y):
return torch.add(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... | Akababa/torch2trt | TorchAdd | false | 18,426 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
TensorClamp | import torch
class TensorClamp(torch.nn.Module):
def forward(self, x):
return x.clamp(-0.1, 0.1)
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 import triton_helpers
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | Akababa/torch2trt | TensorClamp | false | 18,427 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
ConvBlock | import torch
import torch.nn as nn
class EQConv2D(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1,
padding=1, gain=2):
super().__init__()
self.conv = nn.Conv2d(in_channels, out_channels, kernel_size,
stride, padding)
self.scale = (gain... | import torch
from torch._inductor.select_algorithm import extern_kernels
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as ... | AjaybirRandhawa/Face-Generator | ConvBlock | false | 18,428 | [
"Apache-2.0"
] | 2 | 9cac0822b6e6337c3599e949154ce44eeae5746b | https://github.com/AjaybirRandhawa/Face-Generator/tree/9cac0822b6e6337c3599e949154ce44eeae5746b |
TensorClampOptionMax | import torch
class TensorClampOptionMax(torch.nn.Module):
def forward(self, x):
return x.clamp(max=0.1)
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 import triton_helpers
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torc... | Akababa/torch2trt | TensorClampOptionMax | false | 18,429 | [
"MIT"
] | 2 | 03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 | https://github.com/Akababa/torch2trt/tree/03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.