license
stringclasses
1 value
messages
listlengths
12
230
tools
listlengths
2
6
uuid
stringlengths
36
36
used_in
listlengths
1
1
metadata
listlengths
0
0
CC BY 4.0
[ { "role": "user", "content": "Implement a fused matrix addition and scaling kernel.\n\nYour implementation should:\n1. Compute C = (A + B) * scale for square matrices\n2. Use a 2D grid/block layout similar to the seed matrix multiplication kernel\n3. Support any square matrix dimensions\n4. Properly handle ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
d52df9d6-3059-5e01-b54f-5c0ad35bdd85
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a fused set-union-and-scale kernel that:\n1. Computes the union of two sorted integer arrays A and B\n2. Scales each unique element by a given factor\n\nThe algorithm should:\n- Merge elements from arrays A and B in sorted order\n- Keep duplicates (like thrust::set_un...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
be0a03f1-84cd-582c-8f5e-b1574213e502
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a CUDA kernel that applies an exponential growth transformation and value clamping to each element.\n\nThe kernel should:\n1. For each element, compute a growth value using: growth = weight * (2.0 * exp(-(input[i] - mu)^2 / sigma^2) - 1.0)\n2. Add the growth to the co...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
cf4d16eb-8d1b-5ed0-ae0a-68e107cc65a3
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a row-wise minimum finder kernel that finds both the minimum value\nand its column index for each row in a 2D float array.\n\nYour implementation should:\n1. Use CUB's BlockReduce with ArgMin reducer to find column-wise minima\n2. Launch with one block per row (2D gri...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
30d39f73-f08b-5ceb-a7aa-acf513832948
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a broadcast addition operation that adds two tensors with different shapes.\n\nGiven two tensors:\n- x: shape [x_dim0, 1] (column vector)\n- y: shape [y_dim0, dim1] (2D matrix)\n- output: shape [x_dim0, dim1]\n\nThe operation broadcasts x along dimension 1 and broadca...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
d87aabb1-0058-5528-bc46-2453634331e6
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a CUDA kernel that counts the number of pairwise absolute differences\nbetween two arrays that exceed a given threshold.\n\nFor arrays A and B of size n, compute the count of indices i where |A[i] - B[i]| > threshold.\n\nYour implementation should:\n1. Use grid stride...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
45b21d66-363f-57ea-a3c0-2b7003548657
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Compute a matrix of pairwise squared Euclidean distances between two sets of 2D points.\n\nGiven M points in set A and N points in set B, compute an MxN distance matrix\nwhere each element (i,j) contains the squared Euclidean distance:\n\n distances[i * N + j] = (A[i].x - B[j]...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
3ee3d3e0-08a9-55a2-b698-a07e717f552c
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a vector addition with scaling kernel. The kernel should add two input vectors element-wise and multiply the result by a scalar factor.\n\nYour function signature is in include/solution_header.h.\n\nRequirements:\n1. Use a 1D grid with configurable block size (e.g., 2...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
6f48de87-80a2-5cd4-b729-73c05f72dc47
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a partitioned prefix sum with chunk index mapping.\n\nYour implementation should:\n1. Compute prefix sum (cumulative sum) on the input array: prefix_sum[i] = sum(input[0..i])\n2. For each element, compute which chunk it belongs to: chunk_ids[i] = i / chunk_size\n3. Us...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
395e9e6b-9aa3-54fa-96a5-0f3c47534c1a
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement scaled dot-product attention, a core operation in transformer models.\n\nYour implementation should:\n1. Compute attention scores: scores[query_row][key_col] = scale * dot(Q[query_row], K[key_col])\n2. Compute softmax: attn[query_row][key_col] = exp(scores[query_row][...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
33d82ca6-6d83-52e8-8111-bc318ebaa03d
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a CUDA kernel that computes the row-wise minimum of a matrix.\n\nGiven an M x N matrix, compute an output array of size M where each element\noutput[i] is the minimum value in row i of the input matrix.\n\nYour function signature is in include/solution_header.h.\n\n##...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
d7da589b-bc0a-585e-9f8a-db8962cb54be
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a cumulative maximum computation with position tracking.\n\nGiven a sequence of floating-point numbers, compute the cumulative maximum\nfrom the beginning up to each position, along with the index where each\ncumulative maximum was first attained.\n\nFor input [x0, x1...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
79b42066-bf85-5066-a956-9bb29c1e6182
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a conditional vector addition kernel with threshold counting.\n\nYour kernel should:\n1. Add two double-precision vectors element-wise: C[i] = A[i] + B[i]\n2. Use atomicAdd to count how many results exceed a given threshold\n3. Store the count in a counter variable\n\...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
004b3a15-eb58-53b6-ba5b-f993b0227cef
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a kernel that raises each element of a matrix to a power equal to its row index.\n\nFor a matrix with M rows and N columns:\n- Row 0 remains unchanged\n- Row 1: elements raised to power 2 (x^2)\n- Row 2: elements raised to power 3 (x^3)\n- ... \n- Row i: elements rais...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
2d4c92bc-8e6f-5953-897f-44db0760a56f
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement an indexed complex number negation kernel.\n\nFor each index i in the indices array, negate a complex number from the input\narray and write it to the gains array at position indices[i]. Both gains and\ninput store complex numbers as interleaved [real, imag] pairs.\n\...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
8c8da3e7-8478-5685-a2f2-c0a1fa866e3f
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a CUDA kernel that applies a position-dependent Gaussian weight to each element of a 2D square matrix.\n\nThe weight for element (i, j) is computed as:\n weight = exp(-((i - center_y)^2 + (j - center_x)^2) / sigma^2)\n\nThe output[i][j] = input[i][j] * weight\n\nYour...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
b6b9abbf-b7d7-5923-b075-e1e4d408ded7
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a fused element-wise scaling and reduction using CUDA dynamic parallelism.\n\nYour kernel should:\n1. Scale each element of the input array by multiplying by the scale factor\n2. Compute the sum of all scaled elements using recursive reduction with dynamic parallelism...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
fb5f86b0-c9c4-507c-b339-08f71624a40f
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a kernel that computes per-label RGB statistics with spatial weighting.\n\nFor each pixel in an image, given its label, you need to compute:\n- Weighted sum of RGB values for pixels belonging to each label\n- Count of pixels per label\n\nThe spatial weight for a pixel...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
ec6d12e1-b12f-5d99-a7a4-bd8d5d597a98
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a batched vector operation that scales each element by a per-element scale factor, then applies sigmoid activation.\n\nYour kernel should:\n1. Launch with one block per batch element\n2. Each thread computes: output[b][i] = sigmoid(input[b][i] * scale[i])\n3. Use thre...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
8c6f812b-db58-5af3-a275-ea015d581148
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a sigmoid activation kernel for half-precision (FP16) data.\n\nCompute the element-wise sigmoid function: output[i] = 1.0f / (1.0f + exp(-input[i]))\n\nRequirements:\n1. Use CUDA half-precision (half) data types from cuda_fp16.h\n2. Launch an appropriate grid of threa...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
e59d30ee-1755-5b13-8dad-26183aaf4ef9
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a selective sigmoid activation kernel that applies the sigmoid function\nonly to array elements within specified bounding regions.\n\nFor each input array element:\n- If the element's index lies within ANY of the provided bounding boxes (defined by\n start and end in...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
59e2bc84-0afb-5584-afa3-02f5733fa200
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement an FP16 (half precision) kernel that computes Euclidean distances\nfrom a query point to a set of 3D positions.\n\nYour implementation should:\n1. Read positions as half3 structs from device memory\n2. Compute Euclidean distance: sqrt((x-xq)^2 + (y-yq)^2 + (z-zq)^2)\n...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
1531be1d-4afa-59e0-a307-f53f7c88a2a1
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a 1D convolution kernel that uses FP16 (half-precision) arithmetic.\n\nThe kernel should:\n- Convolve an input signal with a symmetric mask/kernel\n- Use __half data type for accumulation (__hfma intrinsic)\n- Handle boundary conditions by treating out-of-bounds input...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
72c218dd-4e13-56d5-bc34-f97011d3484c
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a 2D max pooling operation for 4D tensors in NCHW format.\n\nYour kernel should:\n1. Process non-overlapping 2x2 windows across height and width dimensions\n2. Output both the maximum value per window AND the flattened index of that max element\n3. Handle batch dimens...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
b0f9e561-e9b0-5d5d-92fa-ae4860738b71
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a scaled distance matrix kernel using FP16 (half precision).\n\nGiven two matrices A [m, k] and B [n, k], compute the L2 Euclidean distance\nbetween each row of A and each row of B, then scale each distance by a\ncorresponding weight from the weights vector [n]. The r...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
0c15894a-3bad-58e5-9e16-8f31d622b595
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement matrix transpose using pitched memory.\n\nYour implementation should:\n1. Write a CUDA kernel that transposes a matrix: output[j][i] = input[i][j]\n2. Handle matrices allocated with cudaMallocPitch (non-contiguous row storage)\n3. Use pitch parameters to correctly ind...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
f1d182fb-200f-54a0-ad0e-5914a558dec2
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a fused matrix multiplication-add-scale operation.\n\nCompute D = gamma * (alpha * (A * B) + beta * C), where A is MxN,\nB is NxP, C and D are MxP.\n\nYour implementation should:\n1. Use a 2D grid with 16x16 thread blocks for parallel computation\n2. Perform the matri...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
86338e74-6363-54c2-a9d4-91a9ef5836aa
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement an exponential element-wise operation with clipping for multi-channel data.\n\nYour implementation should:\n1. Apply exponential function: exp(intensity * input element)\n2. Clip each output value to [clip_min, clip_max]\n3. Process a 3D tensor with dimensions (height...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
81e4fbf1-b34c-5367-9413-6b65b8e80bb0
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a tiled vector add-and-scale kernel using FP16 (half precision).\n\nThe kernel should perform element-wise addition of two half-precision arrays\nA and B, then multiply the result by a scale factor. The implementation should\nuse shared memory tiling to coalesce globa...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
8945cd7a-7929-5cc1-99e9-49afa1f0b7af
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a batched 3D Euclidean distance computation kernel.\n\nFor each batch, compute the Euclidean distance between each query point\nand each point in the point cloud. Given:\n- points: shape [batch_size, num_points, 3] - 3D point cloud per batch\n- queries: shape [batch_s...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
7c17d29d-031e-5850-9762-1e7f0f6a175b
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a fused matrix multiplication with row-wise scaling kernel using FP16 (half precision).\n\nYour implementation should:\n1. Compute C = A * B where A and B are n x n matrices\n2. Apply row-wise scaling: each row i of C is multiplied by scale[i]\n3. Use tiling with shar...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
f08b5582-8608-5c82-9e81-fc55fd0ca1ec
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a function that captures a simple element-wise addition kernel into a CUDA graph,\ninstantiates the graph, and executes it using CUDA Graph APIs.\n\nYour implementation should:\n1. Create a CUDA stream\n2. Begin stream capture with cudaStreamBeginCapture using cudaStr...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
15e4a61c-a894-5734-a325-ffcb15fc5ef5
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a 2D grid bitonic sort that sorts each row of a 2D array independently in ascending order.\n\nYour implementation should:\n1. Use shared memory to perform bitonic sort on each row\n2. Launch one block per row, with threads handling pairwise comparisons\n3. Sort each r...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
b21b13d8-bcd2-5ab3-9f70-9e8743c14a0f
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a matrix multiplication kernel with row-wise random scaling.\n\nYour implementation should:\n1. Compute C = A @ B (standard matrix multiplication) for matrices of size MxK, KxN, MxN\n2. Apply a unique random scale factor (0.5 to 1.5) to each row of the output matrix C...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
1b997a13-dd1f-536b-a0ee-e8fe11a6b551
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a kernel that performs row-wise scaling on a matrix: for each row,\nthe kernel first finds the maximum absolute value in that row, then scales each\nelement by (1.0 - alpha / max_abs). This operation progressively reduces each\nelement based on its row's maximum value...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
f18a2686-7932-5d3e-b982-eee1d1d7da60
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a 2D weighted averaging kernel for a grid of floating point values.\nThe kernel computes for each interior point:\noutput[i,j] = center_weight * input[i,j] + \n neighbor_weight * (input[i-1,j] + input[i+1,j] + input[i,j-1] + input[i,j+1])\nBoundary points...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
defb58c5-e89f-5b0e-be9b-b7839e0ccb31
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a device-aware vector addition that dynamically selects an appropriate CUDA device.\n\nYour implementation should:\n1. Query all available CUDA devices using cudaGetDeviceCount and cudaGetDeviceProperties\n2. Select the first device with compute capability major versi...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
c0409529-c09f-5e07-b88b-ddd98275681e
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a parallel dot product kernel using warp shuffle reduction.\n\nYour implementation should:\n1. Compute the dot product of two vectors: result = sum(a[i] * b[i]) for i in [0, n)\n2. Use warp shuffle operations (__shfl_xor or __shfl_xor_sync) for efficient intra-warp re...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
9ff196ab-34fb-58e5-81a9-9afad4817a35
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a fused 2D max pooling with element-wise ReLU operation.\n\nThe kernel should:\n1. Perform max pooling over a sliding window (kernel_h x kernel_w)\n2. Apply ReLU activation to the pooled result: max(0, pooled_value)\n3. Use strided access: stride_h for rows, stride_w ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
f46955e2-430b-5ecf-8128-9132556bbb4f
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a tiled matrix subtraction kernel that also extracts elements at specific monitor point positions.\n\nYour implementation should:\n1. Compute C = A - B for M x N matrices using shared memory tiling (32x32 blocks)\n2. Extract elements from C at monitor point positions ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
5a7ba8b7-677a-58f8-8037-f311e99f7f0f
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a vector sigmoid activation function kernel.\n\nYour implementation should:\n1. Compute sigmoid(x) = 1/(1 + exp(-x)) for each element\n2. Use GPU kernel with proper threadIdx/blockIdx indexing\n3. Include boundary checking for arbitrary vector sizes\n4. Handle FP32 in...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
3ee9bf48-b351-52ce-85d1-5095f2472ded
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement matrix element-wise addition: C = A + B.\n\nYour task:\n1. Launch a CUDA kernel that computes C[i] = A[i] + B[i] for all i\n2. Use 256 threads per block\n3. Calculate the number of blocks needed based on the matrix size\n4. Handle the case where total elements is not ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
739bceb2-f938-5338-bd6c-1570c0900328
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement an element-wise affine transformation kernel for matrices.\n\nYour implementation should:\n1. Apply y = x * scale + bias to each element in the matrix\n2. Accept transformation parameters via an AffineParams struct (scale, bias)\n3. Operate on FP32 matrices\n4. Handle...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
6aa01e8c-ace6-5a0d-a1b2-18f22f02cc5c
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement an integer matrix multiplication kernel. The kernel should compute\nC = A * B where A is M x K, B is K x N, and C is M x N.\nYour function signature is in include/solution_header.h.\n\nImportant requirements:\n- Handle boundary conditions properly (threads may be laun...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
6aa5e445-7c95-59be-9230-7eaf1ac1f06c
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a row-wise recursive reduction kernel for summing each row of a matrix.\n\nYour implementation should:\n1. Use recursive reduction pattern within each row (divide-and-conquer)\n2. Process each row independently using shared memory\n3. Support power-of-2 column sizes u...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
c3a3aac2-8877-5b58-be12-68141f4fdeb7
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a parallel multi-stream tree reduction kernel that sums all node values\nacross multiple independent trees distributed across multiple CUDA streams.\n\nYour implementation should:\n1. Process multiple trees in parallel across multiple CUDA streams\n2. For each tree, r...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
fa0ae7cb-d26a-5152-b970-07355114dd1f
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a 3D stencil kernel that computes a weighted average for each interior point.\nYour function signature is in include/solution_header.h.\n\nFor each interior point (not on the boundary), compute:\n1. Average of its 6 neighbors: (up + down + left + right + front + back)...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
5f7bb2ef-b45d-5972-a0d5-8903e5b75067
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a fused element-wise kernel that performs multiply-add-clip operation on vectors.\n\nGiven three input vectors A, B, C, and output vector D, compute:\nD[i] = clamp(A[i] * B[i] + C[i], min_val, max_val)\n\nWhere clamp(x, min_val, max_val) ensures min_val <= x <= max_va...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
5deb445d-b637-524d-a67b-eae66c7b07c4
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a CUDA kernel that computes squares of array elements and finds the maximum value atomically.\n\nYour implementation should:\n1. Launch a kernel that computes output[i] = input[i] * input[i] for all elements\n2. Use atomicMax to track the maximum squared value across ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
74ba3b6f-8c64-5ced-a719-93ebf446702a
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a normalized sum add kernel that computes the element-wise average \nof multiple input arrays.\n\nYour implementation should:\n1. Sum elements across multiple input arrays at each index\n2. Normalize (divide) the sum by the number of inputs to compute the average\n3. ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
7194094e-6be6-505c-b6bc-697fa7fc1eaf
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a Swish activation function kernel.\n\nSwish is defined as: swish(x) = x * sigmoid(x) = x / (1 + exp(-x))\n\nYour kernel should:\n- Take an input array and produce an output array of the same size\n- Each element should compute: output[i] = input[i] / (1 + exp(-input[...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
62bd03d1-62fb-57f4-80a0-1b6726b09564
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a pointer chain trace kernel that follows a sequence of index pointers.\n\nGiven an input array where each element contains an index to another element,\nyour kernel should trace through this pointer chain for a specified number of steps.\n\nFor each thread i:\n1. Sta...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
b04e8cf7-73a8-5672-812b-38349f41135a
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a matrix normalization kernel that computes row-wise means \nand subtracts them from each element. For each row, compute the mean value\nof all elements in that row, then subtract this mean from each element.\n\nUse shared memory for efficient parallel reduction when ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
a56fb250-4573-52d9-9028-5557b8126152
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a weighted outer product accumulation kernel that computes:\n\nFor each output matrix element (i, j):\n output[i][j] = accumulated ? existing_value + sum(weights[k] * input[k][i] * input[k][j]) : sum(...)\n\nwhere:\n- output is an M x M matrix\n- input is N vectors, ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
b10d6e52-656b-5173-9a62-d3f31ef4b307
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a strided matrix transpose kernel that transposes a matrix with\narbitrary row stride.\n\nYour kernel should:\n1. Handle arbitrary input row stride (input_stride >= cols)\n2. Transpose a rows x cols matrix to cols x rows matrix\n3. Use thread indexing and boundary che...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
e613106a-95ff-57f0-8af8-c5b0598b00f7
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement an odd-even transposition sort kernel for half-precision (FP16) data.\n\nThe odd-even sort algorithm works by performing alternating odd and even passes:\n- Odd pass: Compare and swap elements at indices (0,1), (2,3), (4,5), ...\n- Even pass: Compare and swap elements...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
9a32caa9-46d8-5f99-8d4d-93c63ba29e94
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a multi-statistic reduction kernel that computes four statistics\nin a single kernel pass: sum, sum of squares, minimum, and maximum.\n\nThe kernel should:\n1. Use shared memory for block-level reduction\n2. Combine two elements per thread (strided loop pattern)\n3. U...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
06b744e4-9a37-59e4-a57a-a16d12a52c89
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a point cloud nearest neighbor distance kernel.\n\nYour implementation should:\n1. For each point in cloud A, find the nearest point in cloud B by Euclidean distance\n2. Store the index of the nearest point from cloud B for each point in cloud A\n3. Process 3D points ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
431eb0d4-9553-58ec-8614-ba02ee623e12
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a batch element-wise scaling kernel that multiplies each element of a float array by a scalar.\nThe function signature is in include/solution_header.h.\n\nYour kernel should:\n- Process the input array in parallel using grid-stride loops\n- Use the same thread indexin...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
1607a57b-b7ae-5627-bc3c-b121b46377a0
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a kernel that fills an array with ordinal values (0, 1, 2, ..., n-1).\n\nEach thread should write its global index to the output array.\nA common pattern for this uses blockIdx.x, blockDim.x, and threadIdx.x\nto compute the global thread index.\n\nThe function signatu...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
1084f166-9ee1-5ead-8653-0dbabf1e40d7
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a kernel that computes channel-wise sum and variance for a 3-channel\nimage using warp primitives. The kernel should process NHWC formatted data.\n\nRequirements:\n1. Use warp shuffle operations (__shfl_down_sync) for efficient reduction\n2. Compute both sum and varia...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
372946bf-fe79-52ec-925f-40148021e29a
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a masked element scaling kernel that selectively multiplies matrix elements\nby a scale factor based on a binary mask.\n\nYour kernel should:\n1. Load input matrix elements and corresponding mask values\n2. Apply scaling only where mask is non-zero: output[i] = input[...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
2683cb4d-fb5a-535f-a41e-04d546577fd4
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a matrix row sum kernel using FP16 (half-precision) data types.\n\nYour implementation should:\n1. Sum each row of the input matrix into a 1D output vector\n2. Use FP16 arithmetic for computations\n3. Use shared memory for efficient reduction (pattern similar to paral...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
ee96656f-d431-5733-abef-4b4cfb5a9dee
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Query CUDA device properties and compute derived capabilities.\n\nGiven a device index, implement query_device_capabilities() to populate\na DeviceCapabilities struct with:\n- global_memory_mb: Total global memory in megabytes (float)\n- compute_capability: Compute capability a...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
c5a0562d-b6b0-514b-b623-4a13d01bd673
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement an indexed parallel reduction with accumulator.\n\nYour implementation should:\n1. Read values from array A using an index mapping: A[index[i]]\n2. Perform a parallel reduction using shared memory (similar to File 1's reduce2)\n3. Each block writes its partial sum to ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
ee8a0fe5-12f0-58e8-a39f-682028e85575
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a kernel that performs element-wise addition on two float arrays while simultaneously\nadding two unsigned integer arrays (limbs) with carry propagation.\n\nFunction signature is in include/solution_header.h.\n\nRequirements:\n- For float arrays: compute result[i] = a...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
49d9cbe0-982e-5765-86d9-0338b725c16c
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a broadcast-threshold-reduce CUDA kernel that:\n1. Broadcasts a smaller input array (size N) into a larger output array (size M)\n2. Compares each element against a threshold\n3. Reduces the count of elements exceeding the threshold using shared memory\n4. Writes the ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
19e9b902-f8c7-562e-80cc-cc336a9d90b1
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a multi-binned weighted reduction kernel.\n\nGiven an input array of values and bin indices, compute bin accumulations where each\nelement contributes to its primary bin with weight 1.0, and to adjacent bins (mod num_bins)\nwith weight 0.5. This tests atomic operation...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
46be22c0-84d5-5bde-a703-c3a628effc7a
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a kernel that computes the sum of values from a base data array using indexed offsets.\nFor each index i in [0, num_indices), read base_data[indices[i] * granularity] and sum all values.\n\nUse warp-level reduction primitives to efficiently accumulate the sum across t...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
3af29ff9-176d-505e-b3a1-e02b3c7267ee
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a fused CUDA kernel that performs element-wise matrix scaling followed by row-wise bias addition.\n\nYour kernel should:\n1. Scale each element of an m×n matrix by a scale parameter\n2. Add a bias vector of size m to each corresponding row of the scaled matrix\n3. For...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
299e3e61-cba7-5cbb-a1ae-9c6e7e9ca9a0
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a conditional vector scalar operation kernel.\n\nFor each element in the input vector:\n- If the value is >= threshold, multiply by scale_factor\n- If the value is < threshold, add add_value\n\nThe kernel should:\n1. Use the standard threadIdx/blockIdx indexing patter...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
8d58ec03-177b-5bac-98b7-840cc7b09eeb
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a fused matrix multiplication and variance computation kernel.\n\nYour implementation should:\n1. Compute matrix multiplication: for each output element C[i,j], compute the dot product\n of row i of matrix A and row j of matrix B: C[i,j] = sum_k (A[i,k] * B[j,k])\n2...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
88c575b3-ca77-551c-bb49-1328c9f5c001
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a peer-to-peer memory copy between two CUDA devices with compute capability checking.\n\nYour implementation should:\n1. Query device properties for both device 0 and device 1 using cudaGetDeviceProperties\n2. Check that both devices have compute capability >= 7.0\n3....
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
7aa663a9-8430-53fa-99b5-02ff112f3b18
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a conditional element negation kernel that negates values in an input array \nonly when they exceed a threshold value. This kernel should efficiently handle \narbitrary array sizes using optimal launch configuration with 512 threads per block.\n\n## Environment Instru...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
07cebbe6-e108-5427-baec-64b32e2ff098
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a tiled matrix multiplication kernel using shared memory.\n\nYour implementation should:\n1. Use 2D tiling to load matrix blocks into shared memory\n2. Process matrix multiplication in tiles of size `tile_size x tile_size`\n3. Handle matrices that are not evenly divis...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
0adf2eac-1d2f-5f55-bdff-cf7d1916cc01
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement the Swish activation function kernel.\n\nSwish is defined as: swish(x) = x * sigmoid(x) = x / (1 + exp(-x))\n\nYour kernel should:\n1. Process all elements in parallel using a 1D grid-stride loop\n2. Handle input and output arrays on the GPU\n3. Use proper boundary ch...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
98e4d1ff-3fcd-5942-891c-6a8091bfe703
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement matrix element-wise operations with scaling and sigmoid activation.\n\nYour implementation should provide three functions:\n1. matrixSigmoid: Apply sigmoid activation to each element of a matrix\n - For each element: output[i,j] = 1.0 / (1.0 + exp(-input[i,j]))\n\n2...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
8238d13e-7a20-5663-860c-d742ad875eb6
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a kernel that finds the minimum value in each row of a 2D array.\n\nThe input is a [num_rows x num_cols] matrix stored in row-major order.\nThe output is a 1D array of size [num_rows] where output[row] = min(input[row, :]).\n\nYour kernel should:\n1. Process each row ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
d0623055-89a5-5178-b600-f99cd51a9ef8
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a max pooling kernel that produces both pooled values and the indices of the max elements.\n\nYour implementation should:\n1. Process batches of 2D feature maps with multiple channels\n2. Support non-contiguous input tensors with arbitrary strides\n3. Compute the maxi...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
91b60153-2015-5751-825d-44b3363e9df8
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a fused convolution-ReLU-scale operation using cuDNN.\n\nYour implementation should:\n1. Perform 2D convolution with NCHW layout\n2. Apply ReLU activation to convolution output\n3. Apply element-wise scaling per output channel\n4. Use cuDNN descriptors properly and av...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
40e3071d-16a0-5ff3-ae32-48c3ce42b3d1
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement stochastic gradient descent with Gaussian noise injection.\n\nYour implementation should:\n1. Initialize curand states for parallel random number generation\n2. Apply SGD weight update: weight = weight - learning_rate * (gradient + noise)\n3. Generate noise ~ N(0, noi...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
6e693a39-1b9a-5012-b944-100be6fad884
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a weighted 1D stencil convolution with periodic boundary conditions.\n\nThe function computes: Output[i] = scale_factor * sum_{j=-radius to radius} input[i+j] * mask[j+radius]\n\nFor boundary positions where i-j or i+j is out of bounds, the indices wrap around\nusing ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
34a04c10-1bb0-5530-8c89-2d19bf620311
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a barycentric interpolation kernel for triangle vertices.\n\nGiven an array of triangle vertices and random barycentric coordinates,\ncompute the interpolated point for each triangle using the formula:\n \n result = (1 - u - v) * v0 + u * v1 + v * v2\n\nwhere (u...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
aa039b7a-5598-559a-bf10-bcd4cf07115f
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a weighted multi-channel pixel normalization kernel.\n\nGiven an input image with multiple channels (e.g., RGB), compute the weighted sum\nof pixel values across channels, then normalize the result to the [0, 1] range\nbased on a global maximum value. This is useful f...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
d0e46e70-1c6c-5753-97dc-109397847851
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a recursive parallel reduction to compute block sums.\n\nYour task is to implement `recursive_reduce` which:\n1. Partitions the input array into blocks of size `block_dim` (power of 2)\n2. Computes the sum of each partition using recursive reduction\n3. Writes each pa...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
89513870-36cb-5090-8b95-66d5339ca2ac
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a function that sorts each row of a matrix independently using the odd-even sort algorithm.\n\nYour implementation should:\n1. Use a 2D grid configuration where each block processes one or more rows\n2. Apply odd-even sort within each row independently\n3. Coordinate ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
0deea8db-300b-5de1-a26f-3de162007d73
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a multi-stage parallel reduction using ping-pong buffers and shared memory.\n\nThe function signature is:\n```cpp\nvoid ping_pong_reduction(\n const float* input,\n float* buffer1,\n float* buffer2,\n int size,\n int blockSize\n);\n```\n\nRequirements:\...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
61b2c1de-0b94-53b9-91a9-a2f575012f23
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a stride-select sort kernel that selects every Nth element from an array\nand sorts those elements in ascending order.\n\nYour implementation should:\n1. Select elements from indices 0, stride, 2*stride, ... up to size\n2. Sort the selected elements using bitonic sort...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
3035c017-98e8-5f46-b414-8e4723601768
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a 2D convolution kernel using shared memory tiling.\n\nYour implementation should:\n1. Use shared memory to load input tiles with padding for the kernel radius\n2. Load padding values (out-of-bounds) as zeros (replicate padding is not required)\n3. Compute convolution...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
7fac9ec8-4e1c-5f76-b27c-2c699b228154
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a fused bias addition followed by ReLU activation for a batched tensor.\n\nThe kernel should for each batch element compute:\n output[i, j] = ReLU(input[i, j] + bias[j])\n\nThis operation is a common pattern in neural networks where bias addition and ReLU\nare combin...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
893b4085-f6c9-5bba-b58a-2f974eb6d7b6
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a histogram with collision detection kernel.\n\nGiven an input array of integers in the range [0, num_bins), count occurrences of each\nvalue and track how many times atomic operations on the same bin indicate simultaneous\nupdates (collisions).\n\nCollision detection...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
07180cb7-a7a4-5549-be36-edf896e9a2d0
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a fused scaled vector addition kernel that computes:\n output[i] = input_a[i] + input_b[i] * scale_factor\n\nYour implementation should:\n- Use grid-striding loops to handle arbitrary input sizes efficiently\n- Ensure coalesced memory access patterns\n- Handle any nu...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
05acc774-4934-5f43-addc-b5a6851fc3d9
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a CUDA kernel that computes the dot product of packed 3D vectors.\n\nGiven two arrays containing packed 3D vectors (a and b), compute the dot\nproduct for each corresponding vector pair:\n\n result[i] = a[3*i] * b[3*i] + a[3*i+1] * b[3*i+1] + a[3*i+2] * b[3*i+2]\n\nR...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
589fa726-f80d-5e19-90fb-ba693d68e98b
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement an adaptive variance-based pixel accumulation kernel for RGB color estimation.\n\nThe kernel processes a 2D image (width x height). For each pixel:\n1. Accumulate weighted random samples using a seed value\n2. Track luminance statistics (sum and sum of squares)\n3. Pe...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
f7c62ee9-55de-5cf7-9e01-4f7bc2e4b9ea
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a matrix scaling kernel that computes C = alpha * A + beta * B.\n\nThe kernel should:\n- Use a 2D thread block configuration (32x16 threads per block)\n- Scale matrices of arbitrary dimensions (not restricted to powers of 2)\n- Apply proper boundary checking for edge ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
f8694b35-77c5-5cac-8cff-67ee53299025
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a matrix row-wise add and scale kernel.\n\nYour kernel should compute C[i][j] = scales[i] * (A[i][j] + B[i][j]) for all\nelements in the matrix, where each row has its own scaling factor.\n\nRequirements:\n1. Use 2D thread indexing with (block.x, block.y) and (thread....
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
b93a378e-ed18-5e81-b5d8-32a21f824489
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a fused vector addition with scaling kernel.\n\nYour kernel should compute C[i] = scale * (A[i] + B[i]) for all elements.\n\nRequirements:\n1. Use 1D grid of thread blocks (blockIdx.x and threadIdx.x)\n2. Use 256 threads per block\n3. Include boundary checking (idx < ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
028d311c-3663-50f5-9439-29f92dd7c3bc
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a histogram kernel using shared memory for efficient bin counting.\n\nYour implementation should:\n1. Use shared memory within each block for local histogram computation\n2. Use atomicAdd operations for thread-safe bin increments\n3. Use stride-based thread indexing (...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
bc8d36ef-d5c2-5c39-b23b-6040fde43842
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a matrix centering kernel that subtracts the column-wise mean from each element.\n\nFor an M x N matrix, compute the mean of each column and subtract it from all elements\nin that column. This combines reduction (computing column means) with element-wise operations\n(...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
f84476e8-57b8-5344-a40b-fcd23cfd8ec3
[ "ultra_v3" ]
[]
CC BY 4.0
[ { "role": "user", "content": "Implement a fused scalar add-and-copy kernel for half-precision (FP16) data.\n\nYour implementation should:\n1. Add a scalar value to each element of the input array (FP16)\n2. Store results in a separate output array (not in-place)\n3. Use proper thread indexing with boundary ...
[ { "type": "function", "function": { "name": "bash", "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - I...
f583be7b-2e1d-5908-b424-62f334173495
[ "ultra_v3" ]
[]