ops stringlengths 7 42 | data_source stringclasses 1
value | code stringlengths 308 1.18k | _n_ops int64 1 1 | _task_id stringlengths 16 16 |
|---|---|---|---|---|
["nn.BatchNorm3d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, num_features, eps=1e-5, momentum=0.1, affine=True, track_running_stats=True):
super().__init__()
self.batch_norm = nn.BatchNorm3d(
num_features, eps=eps, momentum=momentum, affine=affine, track_running_stats=... | 1 | lvl1-seed42-0017 |
["nn.MaxPool3d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, kernel_size, stride, padding):
super().__init__()
self.max_pool3d = nn.MaxPool3d(kernel_size, stride=stride, padding=padding)
def forward(self, x):
return self.max_pool3d(x)
batch_size = 1024
in_channels =... | 1 | lvl1-seed42-0033 |
["F.softplus"] | torch#1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self):
super().__init__()
def forward(self, x):
return F.softplus(x)
batch_size = 4096 # Increased from 64 to 4096 to increase computation
width = 512
height = 128
def get_inputs():
... | 1 | lvl1-seed42-0011 |
["torch.binary_cross_entropy_with_logits"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self):
super().__init__()
def forward(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch.Tensor:
return torch.binary_cross_entropy_with_logits(y_pred, y_true)
batch_size = 16
width = 2560 # Increased from 512 t... | 1 | lvl1-seed42-0040 |
["nn.PixelUnshuffle"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, upscale_factor):
super().__init__()
self.pixel_unshuffle = nn.PixelUnshuffle(upscale_factor)
def forward(self, x):
return self.pixel_unshuffle(x)
batch_size = 16
channels = 128 # Increased from 3 to 128 t... | 1 | lvl1-seed42-0035 |
["nn.NLLLoss"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, num_classes: int):
super().__init__()
self.nll_loss = nn.NLLLoss()
def forward(self, log_prob: torch.Tensor, target: torch.Tensor) -> torch.Tensor:
return self.nll_loss(log_prob, target)
batch_size = 10000... | 1 | lvl1-seed42-0034 |
["torch.conv2d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(
self,
in_channels: int,
out_channels: int,
kernel_size: tuple,
stride: int = 1,
padding: tuple = (0, 0),
dilation: tuple = (1, 1),
bias: bool = False,
):
super().__i... | 1 | lvl1-seed42-0043 |
["nn.LPPool1d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, norm_type, kernel_size, stride):
super().__init__()
self.lppool = nn.LPPool1d(norm_type, kernel_size, stride=stride)
def forward(self, x):
return self.lppool(x)
batch_size = 128
channels = 32
length = 1638... | 1 | lvl1-seed42-0026 |
["F.rrelu"] | torch#1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, in_features: int, out_features: int, lower: float, upper: float, inplace: bool):
super().__init__()
self.linear = nn.Linear(in_features, out_features)
self.lower = lower
se... | 1 | lvl1-seed42-0010 |
["F.upsample_nearest"] | torch#1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, scale_factor, mode):
super().__init__()
self.scale_factor = scale_factor
self.mode = mode
def forward(self, x):
x = F.upsample_nearest(x, scale_factor=self.scale_facto... | 1 | lvl1-seed42-0013 |
["nn.SyncBatchNorm"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, num_features: int, affine: bool = True, eps: float = 1e-5, momentum: float = 0.1):
super().__init__()
self.sync_batch_norm = nn.SyncBatchNorm(num_features=num_features, affine=affine, eps=eps, momentum=momentum)
def... | 1 | lvl1-seed42-0037 |
["F.grid_sample"] | torch#1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, input_size, output_size):
super().__init__()
self.input_size = input_size
self.output_size = output_size
def forward(self, x, grid):
x = F.grid_sample(x, grid, mode="b... | 1 | lvl1-seed42-0005 |
["torch.logsumexp"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self):
super().__init__()
def forward(self, x: torch.Tensor) -> torch.Tensor:
return torch.logsumexp(x, dim=0)
def get_inputs():
# Increased input size to (1000000, 128) to increase runtime
return [torch.randn(1... | 1 | lvl1-seed42-0046 |
["nn.LPPool2d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, norm_type: int, kernel_size: tuple, stride: int = 1, ceil_mode: bool = False):
super().__init__()
self.lplp = nn.LPPool2d(norm_type, kernel_size, stride=stride, ceil_mode=ceil_mode)
def forward(self, x: torch.Tensor... | 1 | lvl1-seed42-0027 |
["F.avg_pool2d"] | torch#1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride, padding):
super().__init__()
self.avg_pool2d = F.avg_pool2d
def forward(self, x):
x = self.avg_pool2d(x, kernel_size=(2, 2), st... | 1 | lvl1-seed42-0002 |
["F.upsample"] | torch#1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, scale_factor):
super().__init__()
self.scale_factor = scale_factor
def forward(self, x):
x = F.upsample(x, scale_factor=self.scale_factor)
return x
batch_size = 32
c... | 1 | lvl1-seed42-0012 |
["F.l1_loss"] | torch#1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self):
super().__init__()
def forward(self, input, target):
return F.l1_loss(input, target)
batch_size = 512
channels = 3
height = 512
width = 512
def get_inputs():
input = torch.ra... | 1 | lvl1-seed42-0006 |
["torch.cummin"] | torch#1 | import torch
class Model(torch.nn.Module):
def __init__(self):
super(Model, self).__init__()
def forward(self, x):
return torch.cummin(x, dim=0)[0]
def get_inputs():
return [torch.randn(10000, 128)] # Increased first dimension to 10000
def get_init_inputs():
return [] | 1 | lvl1-seed42-0045 |
["nn.AdaptiveAvgPool3d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, output_size):
super().__init__()
self.adaptive_avg_pool3d = nn.AdaptiveAvgPool3d(output_size)
def forward(self, x):
return self.adaptive_avg_pool3d(x)
batch_size = 2
in_channels = 64
depth = 512
height = 1... | 1 | lvl1-seed42-0014 |
["nn.CrossMapLRN2d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, size: int, alpha: float, beta: float, k: float):
super().__init__()
self.cross_map_lrn = nn.CrossMapLRN2d(size, alpha, beta, k)
def forward(self, x: torch.Tensor) -> torch.Tensor:
return self.cross_map_lrn(x... | 1 | lvl1-seed42-0022 |
["F.ctc_loss"] | torch#1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, input_dim, num_classes):
super().__init__()
self.fc = nn.Linear(input_dim, num_classes)
def forward(self, logits, targets, input_lengths, target_lengths):
log_probs = F.log_so... | 1 | lvl1-seed42-0003 |
["torch.minimum"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride, padding, dilation):
super().__init__()
self.conv2d = nn.Conv2d(
in_channels, out_channels, kernel_size, stride=stride, padding=padding, dilation=dilation
... | 1 | lvl1-seed42-0047 |
["nn.LazyInstanceNorm3d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, num_features, eps, momentum, affine):
super().__init__()
self.norm = nn.LazyInstanceNorm3d(eps=eps, momentum=momentum, affine=affine)
def forward(self, x: torch.Tensor) -> torch.Tensor:
return self.norm(x)
... | 1 | lvl1-seed42-0032 |
["nn.LazyInstanceNorm1d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(
self,
num_features: int,
eps: float = 1e-05,
momentum: float = 0.1,
affine: bool = True,
track_running_stats: bool = True,
):
super().__init__()
self.norm = nn.LazyInstanceN... | 1 | lvl1-seed42-0031 |
["nn.InstanceNorm2d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, num_features, eps=1e-5, momentum=0.1, affine=False, track_running_stats=True):
super().__init__()
self.instance_norm = nn.InstanceNorm2d(num_features, eps, momentum, affine, track_running_stats)
def forward(self, x)... | 1 | lvl1-seed42-0024 |
["F.adaptive_max_pool2d"] | torch#1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(
self,
in_channels: int,
out_channels: int,
kernel_size: tuple,
stride: int = 1,
padding: tuple = (0, 0),
dilation: tuple = (1, 1),
bias: bool = F... | 1 | lvl1-seed42-0001 |
["nn.Sequential"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, layers):
super().__init__()
self.sequential = nn.Sequential(*layers)
def forward(self, x):
return self.sequential(x)
height, width = 512, 512 # Modified hyperparameters
def get_inputs():
x = torch.r... | 1 | lvl1-seed42-0036 |
["torch.constant_pad_nd"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, pad_dims, padding_value):
super().__init__()
self.padding_value = padding_value
self.pad_dims = pad_dims
def forward(self, x):
return torch.constant_pad_nd(x, self.pad_dims, self.padding_value)
bat... | 1 | lvl1-seed42-0041 |
["torch.constant_pad_nd"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, pad_dims, padding_value):
super().__init__()
self.padding_value = padding_value
self.pad_dims = pad_dims
def forward(self, x):
return torch.constant_pad_nd(x, self.pad_dims, self.padding_value)
bat... | 1 | lvl1-seed42-0042 |
["nn.BatchNorm2d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, num_features, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True):
super().__init__()
self.batch_norm = nn.BatchNorm2d(
num_features, eps=eps, momentum=momentum, affine=affine, track_running_stats... | 1 | lvl1-seed42-0016 |
["nn.ConvTranspose3d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride, padding, output_padding):
super().__init__()
self.conv_transpose = nn.ConvTranspose2d(
in_channels, out_channels, kernel_size, stride=stride, padding=padding, o... | 1 | lvl1-seed42-0021 |
["F.max_pool3d"] | torch#1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, num_channels, pool_size, stride):
super().__init__()
self.pooling = nn.MaxPool3d(kernel_size=pool_size, stride=stride)
def forward(self, x):
return F.max_pool3d(x, kernel_size... | 1 | lvl1-seed42-0008 |
["nn.ConstantPad3d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, pad_size, bias_shape):
super().__init__()
self.pad = nn.ConstantPad3d(pad_size, 0)
self.bias = nn.Parameter(torch.randn(bias_shape))
def forward(self, x):
x = self.pad(x)
x = x + self.bias
... | 1 | lvl1-seed42-0019 |
["torch.sigmoid"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self):
super().__init__()
def forward(self, x):
x = torch.sigmoid(x)
return x
batch_size = 1024
seq_len = 1024
feature_dim = 512
def get_inputs():
return [torch.randn(batch_size, seq_len, feature_dim)]
d... | 1 | lvl1-seed42-0049 |
["torch.baddbmm"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, batch_size, input_dim, output_dim, bias_shape):
super().__init__()
self.input_dim = input_dim
self.output_dim = output_dim
self.bias = nn.Parameter(torch.randn(bias_shape))
def forward(self, mat1, ma... | 1 | lvl1-seed42-0039 |
["F.multilabel_soft_margin_loss"] | torch#1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, num_classes, num_labels):
super().__init__()
self.fc = nn.Linear(num_classes, num_labels)
def forward(self, x, target):
x = self.fc(x)
loss = F.multilabel_soft_margin_... | 1 | lvl1-seed42-0009 |
["torch.cummax"] | torch#1 | import torch
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, x: torch.Tensor) -> torch.Tensor:
max_values, _ = torch.cummax(x, dim=0)
return max_values
input_dim = 20000 # Increased from 512 to increase computation
def get_inputs():
x = ... | 1 | lvl1-seed42-0044 |
["F.adaptive_avg_pool3d"] | torch#1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, output_size):
super().__init__()
self.output_size = output_size
def forward(self, x):
return F.adaptive_avg_pool3d(x, self.output_size)
batch_size = 128
in_channels = 3
dept... | 1 | lvl1-seed42-0000 |
["nn.LazyBatchNorm2d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, num_features):
super().__init__()
self.batch_norm = nn.LazyBatchNorm2d()
def forward(self, x):
x = self.batch_norm(x)
return x
batch_size = 512
num_features = 32
height, width = 128, 128
def get_... | 1 | lvl1-seed42-0028 |
["F.ctc_loss"] | torch#1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, input_dim, num_classes):
super().__init__()
self.fc = nn.Linear(input_dim, num_classes)
def forward(self, logits, targets, input_lengths, target_lengths):
log_probs = F.log_so... | 1 | lvl1-seed42-0004 |
["sub"] | torch#1 | import torch
class Model(torch.nn.Module):
def __init__(self, input_size, subtract_value):
super().__init__()
self.subtract_value = subtract_value
def forward(self, x):
return x - self.subtract_value
# Hyperparameters determining input shape
batch_size = 64
seq_len = 4096
input_dim ... | 1 | lvl1-seed42-0038 |
["torch.native_layer_norm"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, normalized_shape, eps):
super().__init__()
self.native_layer_norm = nn.LayerNorm(normalized_shape, eps=eps, elementwise_affine=True)
def forward(self, x):
return torch.native_layer_norm(
x,
... | 1 | lvl1-seed42-0048 |
["nn.LazyConvTranspose2d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride, padding, output_padding, bias):
super().__init__()
self.conv_transpose = nn.LazyConvTranspose2d(
out_channels, kernel_size, stride=stride, padding=padding, outp... | 1 | lvl1-seed42-0030 |
["nn.ConvTranspose1d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(
self,
in_channels: int,
out_channels: int,
kernel_size: int,
stride: int = 1,
padding: int = 0,
output_padding: int = 0,
bias: bool = False,
):
super().__init__()
... | 1 | lvl1-seed42-0020 |
["nn.InstanceNorm3d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, num_features, eps=1e-5, momentum=0.1, affine=False, track_running_stats=False):
super().__init__()
self.instance_norm = nn.InstanceNorm3d(num_features, eps, momentum, affine, track_running_stats)
def forward(self, x... | 1 | lvl1-seed42-0025 |
["nn.BatchNorm1d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, num_features, eps=1e-5, momentum=0.1, affine=True, track_running_stats=True):
super().__init__()
self.batch_norm = nn.BatchNorm1d(
num_features, eps=eps, momentum=momentum, affine=affine, track_running_stats=... | 1 | lvl1-seed42-0015 |
["nn.CELU"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, in_features, out_features):
super().__init__()
self.celu = nn.CELU()
self.linear = nn.Linear(in_features, out_features)
def forward(self, x: torch.Tensor) -> torch.Tensor:
return self.celu(self.linea... | 1 | lvl1-seed42-0018 |
["nn.LazyBatchNorm2d"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, num_features):
super().__init__()
self.batch_norm = nn.LazyBatchNorm2d(num_features)
def forward(self, x):
x = self.batch_norm(x)
return x
batch_size = 512
num_features = 32
height, width = 64, 64
... | 1 | lvl1-seed42-0029 |
["F.max_pool2d_with_indices"] | torch#1 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride, padding):
super().__init__()
self.max_pool = nn.MaxPool2d(kernel_size, stride=stride, padding=padding)
def forward(self, x):
x,... | 1 | lvl1-seed42-0007 |
["nn.Hardswish"] | torch#1 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, reduction="mean"):
super().__init__()
self.hardshrink = nn.Hardshrink()
self.reduction = reduction
def forward(self, x):
return self.hardshrink(x)
batch_size = 16
channels = 3
height = 4096
width =... | 1 | lvl1-seed42-0023 |
Kernel RLM CUDA curriculum
Derived from BytedTsinghua-SIA/CUDA-Agent-Ops-6K, whose dataset card declares CC-BY-4.0. Attribute the original dataset and its authors.
These configurations preserve the selected seed42 task references, IDs, row order and all original columns. Changes from upstream are task selection, curriculum ordering, and Parquet packaging. L1 is single-op, L2 two-op, and L3 three-to-five-op under the original builder's ops-column classification, not KernelBench levels.
The easy-first and original L1 configurations are alternate orders of the same selected tasks, not independent train/test sets. All configurations are intended training inputs; not all selected tasks received updates. No held-out evaluation or performance gain is claimed.
The upstream download revision was not recorded and is deliberately unknown. Exact historical JSONL bytes and hashes are retained under original/ and manifest.json. Do not regenerate the historical curriculum from a mutable upstream revision.
Use datasets.load_dataset(repo_id, name=config, split='train', revision=commit_sha) for Arrow/Parquet access. Existing training CLIs can consume an exact original JSONL materialized with python -m kernel_rlm.curriculum download.
This release contains reference programs, not sampled model responses, reasoning traces, checkpoint weights, credentials or private experiment logs. Review attribution and publication contents before changing a private repository to public.
- Downloads last month
- -