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 tensor broadcasting kernel that expands an input tensor along specified dimensions.\n\nThe kernel should:\n1. Broadcast an input tensor to a larger output tensor by replicating data\n2. Support broadcasting where input dimension == 1 or matches output dimension\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... | fe2175f0-b164-5887-9c4b-f144b0c542dd | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a parallel odd-even sort (also known as brick sort) that sorts floating-point keys while keeping associated metadata arrays synchronized.\n\nYour implementation should:\n1. Use the odd-even sort algorithm adapted for GPU parallelization\n2. Sort an array of floating-p... | [
{
"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... | 3a8ff79b-8259-50e9-a5e7-048e21b0d4b7 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a function that computes the L2 norm (Euclidean norm) of a scaled vector sum.\n\nGiven two vectors x and y of length n, and scaling factors a and b, compute:\n ||a * x + b * y||\n\nThe result is the square root of the sum of squared values of (a*x[i] + b*y[i]) for al... | [
{
"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... | 5ff858cb-f448-54db-94dc-8121e3080238 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a matrix-vector multiplication using cooperative groups for parallel reduction.\n\nCompute y = A * x where:\n- A is a matrix of size (rows x cols) stored in row-major order\n- x is a vector of size cols\n- y is a vector of size rows\n\nYour implementation must:\n1. 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... | a7a233da-944b-5c7b-b826-0809a5a1c7cb | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a weighted matrix multiplication kernel.\n\nCompute C = scale * (A @ B * weight_matrix) where the weight for each output\nelement C[i][j] is based on its distance from a center point:\n\n weight(i, j) = 1.0 / (1.0 + logf(distance + 1.0))\n distance = sqrtf((i - cent... | [
{
"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... | 36db07cd-7149-5e3c-ae14-24fb6bda5805 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a 2D max pooling forward pass using FP16 (half precision).\n\nGiven input tensor with shape [N, C, H_in, W_in], compute output tensor\nwith shape [N, C, H_out, W_out] where:\n- H_out = (H_in - K) / stride + 1\n- W_out = (W_in - K) / stride + 1\n- Each output element i... | [
{
"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... | db589870-4f48-5a77-8283-b21c94eac20d | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a persistent thread batch reduction kernel with atomic work stealing.\n\nThe kernel should process batches of input data using a dynamic work fetching\napproach where threads repeatedly fetch work indices from a global atomic counter.\nEach thread block processes one ... | [
{
"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... | 42640171-fc42-5e11-bfdb-df1d7ea49dda | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a row-wise prefix sum with per-row power transformation for a matrix.\n\nFor each row i of an M x N matrix:\n - Row 0: Compute prefix sum of the original values\n - Rows i > 0: Raise each element to the power of (i+1), then compute prefix sum\n\nYour function signat... | [
{
"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... | 73d430ab-3d5e-5ab5-bec9-1f90de83a840 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a function that scales each element in an array by a given factor using CUDA.\n\nYour task is to write a GPU kernel and a host function that:\n1. Takes an input array of floats on device memory\n2. Multiplies each element by a scaling factor\n3. Stores the result in 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... | ce10aedd-0380-5c15-97da-e23070edad6a | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a weighted dot product kernel using atomic operations.\n\nCompute result = weight * sum(a[i] * b[i]) where a and b are vectors\nof length n. Your implementation should:\n\n1. Use shared memory for partial reductions within each block\n2. Use atomicAdd to accumulate 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... | b0539eae-b452-5293-96e5-0c975d3a60a9 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a phased visibility computation kernel for radio interferometry simulation.\n\nThe kernel computes the real part of the complex visibility for each baseline visibility:\n\n real(V_uv) = sum_s amplitude[s] * cos(2*pi*(u*l + v*m + w*n))\n\nwhere for each visibility v 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... | a1cd9ab7-d358-56b6-ac41-c1ce8cb81f35 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement an exclusive scan (prefix sum) operation using Thrust.\n\nThe exclusive scan computes for each element i: output[i] = sum(input[0:i-1])\nwith output[0] = 0. This is a fundamental parallel primitive used in many\napplications including graph algorithms, stream compacti... | [
{
"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... | 2710d962-579e-5bb3-a73f-5854bf06d4aa | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a matrix element-wise multiplication kernel with tanh activation.\n\nGiven two matrices A and B of the same dimensions (m x n), compute:\nC[i][j] = tanh(A[i][j] * B[i][j])\n\nRequirements:\n1. Use 2D thread indexing with block/grid dimensions\n2. Apply boundary checks... | [
{
"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... | 5259c504-0e85-5e1a-89bd-4e2d7acdbc96 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a fused add-and-scale kernel that performs element-wise operations on a large array.\n\nYour kernel should:\n1. Add a constant offset (1.5f) to each element in the array\n2. Multiply the result by a scale factor\n3. Use 1D grid-stride indexing with proper 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... | a347c9ed-b427-53a5-ac60-d007562a7b20 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a triangle counting kernel for sparse graphs stored in CSR format.\n\nFor each node u in the graph, find all unordered triplets (u, v, w) where:\n- u, v, w are all nodes in the graph\n- There is an edge between u and v, u and w, and v and w\n- u < v < w\n\nThe graph i... | [
{
"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... | 2336e527-17b7-51e9-bac2-6f33c4fa278e | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a weighted phase accumulation kernel that computes matrix-like\noperations with complex phase modulation.\n\nThe kernel computes output[row][col] = sum_k (A[row][k] * B[k][col] * weights[col] * exp(i * phase_factor * k))\n\nYour implementation should:\n1. Apply per-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... | 173c0478-623e-5f81-b2ef-2f15d157205e | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a CUDA kernel that computes the 3D discrete Laplacian of a volumetric grid.\nThe 3D discrete Laplacian is sum of second partial derivatives:\n\nLaplacian(u) = (∂²u/∂x² + ∂²u/∂y² + ∂²u/∂z²)\n\nFor a discrete grid at position (x, y, z), this is:\noutput[x,y,z] = (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... | 76131627-ffdd-5d9e-9bd5-b660465ad902 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a fused multiply-reduction kernel that performs element-wise multiplication\nof two vectors and then finds the maximum product value using Thrust.\n\nThe kernel should:\n1. Compute products[i] = a[i] * b[i] for all i = 0..n-1 using a custom CUDA kernel\n2. Find the ma... | [
{
"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... | 251fd760-0ccb-5b4f-a683-8e0f47030e10 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a kernel that conditionally adds a constant value to selected elements of an array\nbased on an index map. For each valid thread, if the element should be processed (determined\nby an index array), add a constant value of 5.0 to it. This combines element-wise arithmet... | [
{
"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... | 436883a7-7500-586c-8bf8-ccea8b7d0e0d | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a block-wise weighted reduction using shared memory.\n\nFor each thread block, compute the sum of scaled elements:\n results[blockIdx] = Σ (data[i] * scales[blockIdx])\n\nwhere the sum is taken over indices i assigned to that block.\nEach block processes a contiguous... | [
{
"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... | 3a5a0785-1ff9-5e9f-8162-39d19f9d4334 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a Lenia growth kernel that computes cellular automaton growth values.\n\nThe kernel performs a circular convolution of the input grid with a kernel (neighborhood weights),\nthen applies a growth function based on the convolved value:\n\n1. For each grid cell (i, j), 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... | 58f4ee73-7a60-5315-af77-33dfa275b8b0 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a matrix multiplication kernel optimized based on device properties.\n\nYour implementation should:\n1. Query GPU device properties using cudaGetDeviceProperties\n2. Adaptively choose block dimensions based on maxThreadsPerBlock and warpSize\n3. Compute C = A × B wher... | [
{
"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... | ad631a66-c753-53e3-a8ca-3d71788f8ef1 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement an RGB to grayscale conversion kernel with thresholding.\n\nYour kernel should:\n1. Convert each RGB pixel to grayscale using the formula: gray = 0.07*R + 0.72*G + 0.21*B\n2. Apply thresholding: if gray < threshold, output 255; otherwise output 0\n3. Use stride-based ... | [
{
"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... | bef1758f-856d-5e0f-86f4-ecfd7d50271b | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a point-to-plane distance computation kernel for point cloud registration.\n\nGiven two point clouds P (source) and Q (target), compute the point-to-plane\ndistance for each corresponding point pair. The distance is the projection of\nthe vector (p_i - q_i) onto the 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... | c23559b3-4616-5503-bef1-58b2e753ea57 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a hybrid matrix operation that combines element-wise scaling with element-wise squaring.\n\nYour implementation should:\n1. Launch a kernel to scale an FP16 array in-place: d_x[i] = alpha * d_x[i]\n2. Launch a second kernel to compute element-wise squares: d_y[i] = d_... | [
{
"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... | fa4c2027-57a7-5faa-87f7-fac490b46b98 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a conditional vector operation kernel that applies either addition or multiplication\nelement-wise based on a control vector.\n\nYour implementation should:\n1. For each element i, if scale[i] < 0.5 compute out[i] = a[i] + b[i]\n2. Otherwise compute out[i] = a[i] * b[... | [
{
"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... | ad33c5c2-b61d-587c-bacf-df9e511ad174 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a kernel that computes row sums of a matrix with sigma clipping outlier rejection.\n\nFor each row of the matrix:\n1. Compute the mean and standard deviation of that row's values\n2. Define valid range: [mean - sigma * stdDev, mean + sigma * stdDev]\n3. Sum only the v... | [
{
"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... | 8b4e3086-8f82-58b2-960d-1bd7b1136c7c | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a batched normalized flux computation kernel for fluid dynamics simulations.\n\nYour implementation should:\n1. Compute normalized velocity (flux/depth) for each element across multiple batches\n2. Apply depth thresholding to avoid division by near-zero values\n3. Use... | [
{
"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... | 5e223b5b-84e7-53cf-9f7d-3b3935cc73b7 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a weighted Euclidean distance matrix computation between two matrices using tiled shared memory.\n\nGiven a query matrix Q of shape (num_queries, num_features) and a reference matrix R of shape (num_refs, num_features),\ncompute a distance matrix D where D[i][j] = sqr... | [
{
"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... | 391338b1-1872-582d-ac18-738ccbb011a5 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a max pooling operation with index mask tracking.\n\nYour implementation should:\n1. Find the maximum value within each kernel window\n2. Store the maximum value in the output tensor\n3. Store the linear index of the maximum element in the mask array\n4. Handle batch ... | [
{
"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... | 51fb56e1-f901-5afc-8013-6f1a4a9970ca | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a two-phase CUDA kernel that performs element-wise squaring and block reduction.\n\nYour kernel should:\n1. Phase 1: Each thread squares its input value (output[i] = input[i] * input[i])\n2. Synchronize threads with __syncthreads()\n3. Phase 2: Each block computes 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... | b918bb2e-4c15-5882-a843-5779f59859b1 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a K-Nearest Neighbor distance computation kernel for 3D point clouds.\nYour function signature is in include/solution_header.h.\n\nThe task computes the k-nearest neighbors from point cloud P to point cloud Q.\nBoth clouds have num_points points, each with 3 coordinat... | [
{
"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... | a998dde8-f933-5580-886d-3b6350eba0aa | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a CUDA kernel that computes bilinear interpolation for a 2D grid of values.\nGiven an input grid of dimensions M (rows) x N (cols) and a point (x,y) in normalized\ncoordinates [0,1), compute the interpolated value using bilinear interpolation.\n\nThe kernel should han... | [
{
"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... | 4ba8e3da-f732-58db-a7ee-89eeddff108f | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a row-wise sigma clipping operation for a matrix.\n\nGiven an input matrix, compute the mean and standard deviation of each row,\nthen replace any elements in that row that deviate more than `sigma_threshold`\nstandard deviations from the row mean with 0.\n\nYour func... | [
{
"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... | 1dfd8dbf-4aca-558f-8033-dce8cd224349 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a function that finds the CUDA device with the highest compute capability\nand returns its properties in a struct. Your function signature is in include/solution_header.h.\n\nThe algorithm should:\n1. Query all available CUDA devices using cudaGetDeviceCount\n2. Itera... | [
{
"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... | f47f8f39-6eaa-5462-abda-5ad835e3f666 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a 2D Laplacian smoothing kernel with double buffering.\n\nThe Laplacian smoothing operation computes for each pixel:\n output[y,x] = 0.2 * (input[y,x] + input[y,x-1] + input[y,x+1] + input[y-1,x] + input[y+1,x])\n\nYour implementation must:\n1. Use double buffering (... | [
{
"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... | 96bbfd8d-344d-5175-9ef7-1e55433d1577 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a custom matrix operation kernel that computes element-wise powers for each row, where the exponent depends on the row index.\n\nYour kernel should:\n1. Process each row of an M x N matrix in parallel (one block per row)\n2. For row i, compute matrix[i][j] = matrix[i]... | [
{
"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... | 1e6bccdd-c36a-530d-b822-5a961c4e82fb | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement an expand-and-reduce kernel that broadcasts (expands) an input array\nto a larger size by repeating elements, then computes the sum of the expanded array.\n\nGiven an input array of size N and an expanded size M (M >= N), the function should:\n1. Expand: For each inde... | [
{
"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... | d33f9533-0f14-5412-8edd-bfe6c2b9e265 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a matrix multiplication function that adds an initial value to each element\nof the computed GEMM result.\n\nYour implementation should:\n1. Initialize the output matrix C with a specified init_value using a CUDA kernel\n2. Compute the GEMM result C_gemm = A * B using... | [
{
"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... | 25e9341f-4321-52ff-bb96-b45a36971142 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a 2D Gaussian smoothing operation with additive random noise using shared memory tiling.\n\nYour implementation should:\n1. Apply a 3x3 Gaussian kernel with weights [1/16, 2/16, 1/16; 2/16, 4/16, 2/16; 1/16, 2/16, 1/16]\n2. Add uniform random noise in range [-0.01, 0.... | [
{
"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... | 5b81e160-1131-571f-857b-9a70edd1eb44 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a batched matrix-vector multiplication using cuBLAS.\n\nFor each batch i, compute: y[i] = alpha * A[i] * x[i] + beta * y[i]\n\nRequirements:\n1. Use cublasSgemvBatched for FP32 batched GEMV operations\n2. Handle non-transposed matrices (CUBLAS_OP_N)\n3. Support variab... | [
{
"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... | fa250b86-52ae-57cb-9c73-63b34040883c | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a CUDA kernel that computes the popcount (number of set bits) for each row of a matrix,\nsumming the popcounts of all elements in the row.\n\nThe function signature in include/solution_header.h is:\n\nvoid tiled_popcount_rows(\n const uint32_t* d_input, // Device... | [
{
"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... | b4fadbd3-a62c-58b2-aa8c-f58b899c74ec | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a fused matrix multiplication followed by row-wise layer normalization.\n\nYour implementation should:\n1. Perform matrix multiplication C = A * B where A is (M x K) and B is (K x N)\n2. Apply row-wise layer normalization to the result C\n3. For each row i: compute me... | [
{
"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... | cb5ce35a-ab93-5082-9508-c57cdd052509 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement exponential-scaled activation using dot products between query and key vectors.\n\nYour kernel should:\n1. Compute dot products between each query row and all key rows\n2. Apply exponential activation: axb = a * dot - b, then result = axb / (1 - exp(-d * axb))\n3. Cli... | [
{
"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... | e8928a29-f0cc-5051-b5fe-1f86ace2210c | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a matrix row-wise scaling kernel with a constant offset.\n\nYour kernel should:\n1. Take a 2D matrix (M rows x N columns)\n2. Take a 1D array of scaling factors (M elements, one per row)\n3. For each element at position (row, col), compute: output[row * N + col] = mat... | [
{
"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... | 14ca1d06-745a-5cdb-9ce8-2f8c53836728 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a kernel that converts RGB image data to binary grayscale and computes\nstatistics in a single pass.\n\nThe kernel should:\n1. Convert each pixel from RGB to grayscale using weighted sum: gray = r * 0.07 + g * 0.72 + b * 0.21\n2. Apply binary thresholding: if gray < 1... | [
{
"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... | 7f31a35c-01ed-5a8e-9ff5-215125ddbb76 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a sparse graph attention aggregation kernel.\n\nYou are given a graph with N nodes and E edges, where each edge has a source node,\ndestination node, and an attention weight. For each node, aggregate weighted values\nfrom all incoming edges: result[dst] += src_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... | ab27327c-3995-552c-9974-13d807c40ba3 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a weighted random walk on a 2D grid.\n\nEach walker starts at position (0, 0) and takes `numSteps` steps. At each step,\nthe walker evaluates the weight values in the 4 neighboring cells (up, down, left, right)\nand moves in a direction with probability proportional 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... | 6613127e-3498-58ed-ab74-7fd28990d0af | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a strided element-wise scaling with accumulation kernel.\n\nFor each thread index i in [0, n):\n output[i] += input[(i * stride) % n] * scale\n\nRequirements:\n - Use half-precision (FP16) for all computation\n - Modulo arithmetic wraps the source index to st... | [
{
"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... | 0c298d5e-f70a-5016-8867-ca8fa9082d63 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a CUDA kernel for row-wise matrix normalization.\n\nFor each row of the input matrix, compute its mean and standard deviation,\nthen normalize the row using z-score: (x - mean) / std.\n\nIf a row's standard deviation is near zero ( < 1e-5 ), mark it as an outlier\nby ... | [
{
"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... | c01965f9-471e-5474-8b69-c7b81714707a | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a stochastic blend filter kernel for half-precision (FP16) image data.\n\nYour kernel should apply a two-tap stochastic blending operation commonly used\nin image sharpening and texture filtering. For each pixel, the output is\ncomputed as:\n\n output = (1.0 + weig... | [
{
"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... | 0c665753-c21a-5ec4-b439-3cdea99be8f1 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a CUDA kernel that initializes and scales an array of 2D points.\n\nThe Point2D struct contains two float fields: x and y.\n\nYour kernel should:\n- Initialize each point at index i with: x = i * scale, y = (i * 2) * scale\n- Handle any array size n using proper 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... | 93e8a9f8-5260-5392-beea-dfa938e451fd | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a kernel to sort each row of a 2D integer matrix in ascending order.\nYour function signature is in include/solution_header.h.\n\nRequirements:\n- Sort each row independently (rows are processed in parallel)\n- Use integer comparison (sorting 32-bit int values)\n- Han... | [
{
"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... | 0eed6347-167b-56fb-8a4e-c2c140aafca2 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a sigmoid linear response computation with edge case handling.\n\nFor each element i:\n axb = a * input[i] - b\n output[i] = axb / (1 - exp(-d * axb))\n\nEdge case: When |axb| < epsilon, set output = 1.0 to avoid\nsingularity and numerical instability near the 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... | 405651de-751a-546a-ac30-051e8a0e6d9a | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a 2D convolution with ReLU activation that uses padded memory alignment.\n\nYour kernel should:\n1. Round input/output dimensions up to the nearest multiple of 16 for memory alignment\n2. Compute 2D convolution with a 3x3 filter using zero padding (no stride)\n3. Appl... | [
{
"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... | 9267fcca-8e27-5644-92af-5f19f31a7831 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a point cloud transformation kernel.\n\nGiven a point cloud of N 3D points stored in homogeneous coordinates [x, y, z, 1],\nand a 4x4 transformation matrix, compute the transformed point cloud by applying\nthe transformation to each point: point_out = transform^T * po... | [
{
"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... | 7f37db04-be0e-5aff-9aeb-dc840c8f38be | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a kernel that performs clamped position updates for 2D points.\n\nGiven arrays of positions (x[], y[]) and velocity vectors (vx[], vy[]), compute\nnew positions by moving along the velocity direction with a step size scaled\nby the vector magnitude:\n\n scale = step ... | [
{
"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... | 67be880f-104d-5a36-b02e-2f17818ca9e6 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a weighted parallel reduction using shared memory.\n\nCompute the weighted sum: output[0] = sum(values[i] * weights[i]) for all i.\nYour implementation should:\n1. Use a single block with shared memory for efficient reduction\n2. Perform element-wise multiplication fi... | [
{
"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... | f18180e2-087b-57e2-885e-387a80826636 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a fused scale-and-dot computation that combines custom kernel scaling with cuBLAS dot product.\n\nYour function should:\n1. Scale vector A element-wise by factor `scale`: A[i] = A[i] * scale\n2. Compute dot product of scaled A with vector B using cuBLAS: result = sum(... | [
{
"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... | 4933dd89-65e2-52a2-a1d3-ee46cdbefe39 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a 3x3 convolution followed by ReLU activation using cuDNN.\n\nYour implementation should:\n1. Create tensor descriptors for input (NCHW: 1,1,28,28) and output (NCHW: 1,1,26,26)\n2. Create filter descriptor (NCHW: 1,1,3,3)\n3. Create convolution descriptor with padding... | [
{
"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... | 3b8d075f-7d9e-5f22-bbd6-a6e3622aa3b2 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a kernel that merges two arrays of 3-vectors element-wise.\nFor each index i, C[i] = (i < n/2) ? A[i] : B[i].\n\nThe function signature is in include/solution_header.h.\n\n## Environment Instructions\n- Write your implementation to `solution/solution.cu`.\n- Tests may... | [
{
"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... | bd7f2582-53ae-5d11-9bc4-f482382a8e02 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a parallel histogram computation kernel that also computes per-block sums.\n\nYour kernel should:\n1. Build a histogram of input values in shared memory first\n2. Accumulate shared memory histograms to global histogram using atomicAdd\n3. Compute the sum of counts 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... | 02cd4e3f-aafc-5c03-b7cc-e4a202ee8ad1 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a sparse vector accumulation kernel that processes float2 values.\n\nFor each element i in the input arrays, accumulate values[i] into output[indices[i]]:\n output[indices[i]] += values[i]\n\nRequirements:\n1. Use atomic operations to handle concurrent writes to 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... | 010852d0-7393-5199-ba55-fd6ed9c2aa2a | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a batched group-and-select operation commonly used in point cloud processing.\n\nGiven:\n- features: tensor of shape (batch_size, num_channels, num_points) containing feature values\n- indices: tensor of shape (batch_size, num_queries, num_samples) specifying which po... | [
{
"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... | aaff6024-b9b7-5c1f-8478-def0fb5fde03 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement per-row quantization parameter computation for a matrix.\n\nFor each row of the matrix, compute scale and zero-point parameters used in\nuniform quantization:\n - scale[i] = (max[i] - min[i]) / 255.0\n - zero[i] = round(128.0 - min[i] / scale[i]), clipped to [0, 255... | [
{
"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... | a1f4ddcb-b6a3-5b6e-bbf3-5f882143c979 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement an alpha-scale vector operation with device-initialized parameters.\n\nThis problem combines two CUDA concepts:\n1. Device-side struct initialization using a simple kernel launch (<<<1,1>>>)\n2. cuBLAS vector scaling operation (cublasSscal)\n\nYour function should:\n1... | [
{
"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... | 607a9327-f234-5712-b4f6-2205f6c9f929 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a row-wise L2 norm computation for a matrix.\n\nYour implementation should:\n1. Use thread reduction, block reduction, and warp reduction patterns\n2. Use shared memory for intra-block reduction\n3. Compute sqrt(sum(x[i]*x[i])) for each row\n4. Use bit_cast for warp 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... | e68eba04-5847-5a84-8132-b576cf4aedf3 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a multi-stream parallel sum using custom atomic operations.\n\nYour implementation should:\n1. Divide the input array into chunks, one per CUDA stream\n2. Each stream launches a reduction kernel for its chunk\n3. Kernels use a custom atomic CAS-based add to accumulate... | [
{
"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... | e3fda472-cf37-59f5-854f-35a2fb42e996 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a batched parallel reduction to compute the sum of each row in a 2D array.\n\nGiven an input array with shape [batch_size][num_elements], compute the sum\nof each row independently. Each thread block should handle one row using\nshared memory reduction. The kernel sho... | [
{
"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... | db6bfb31-d639-5769-95b3-f87a801dbd97 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a fused matrix multiplication with element-wise scaling operation.\n\nThe function should compute: C = scale * (A × B)\nwhere:\n- A is an n×k matrix stored in row-major order\n- B is a k×m matrix stored in row-major order \n- C is an n×m matrix stored in row-major or... | [
{
"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... | 57640d46-74ee-5122-a309-c41739848c7d | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement matrix multiplication with scaling: C = alpha * A * B + beta * C.\n\nThe matrices are stored in row-major order. Write a CUDA kernel that performs\nthis fused operation efficiently. The function signature is in include/solution_header.h.\n\n## Environment Instructions... | [
{
"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... | cc53dfe9-55da-5393-bd40-0ee63f08148a | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a batched weighted subtraction with clamping kernel.\n\nYour implementation should:\n1. Compute output[batch][elem] = input_a[batch][elem] - alpha * input_b[batch][elem]\n2. Clamp the result to [min_val, max_val]\n3. Use a 2D grid: x dimension for element index, y dim... | [
{
"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... | 22f4c32d-1d33-595e-be58-eeab137cd9d3 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a matrix multiplication using cuBLAS library.\n\nYour implementation should:\n1. Use cublasSgemm to compute C = alpha * A * B + beta * C\n2. Set alpha = 1.0f and beta = 0.0f for standard matrix multiplication\n3. Handle square matrices of size N x N\n4. Use non-transp... | [
{
"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... | cb2af276-9638-58a8-9b94-b23a3ea13c28 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a 2D max pooling kernel that computes both the maximum values and their index locations.\n\nYour implementation should:\n1. Compute max pooling over a 2D kernel sliding across the input\n2. Return both the maximum value and the flattened index of the max element\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... | 8626097f-055f-5799-80d5-8512db748741 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a kernel that finds the minimum distance from each test point to all training points.\n\nGiven a training dataset of N points and a test dataset of M points, where each point\nhas D features, compute the minimum Euclidean distance from each test point to any\ntraining... | [
{
"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... | e99a1960-ba13-515f-a6b2-6f1f1b4271b9 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a function that computes the sum of all positive values in a 3D array.\n\nThe function signature is provided in include/solution_header.h:\n\n```cpp\nvoid reduce_positive_3d(const float* d_input, float* d_output, int nx, int ny, int nz);\n```\n\nRequirements:\n- 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... | 0442d706-999d-5c0c-94d3-2491b013c942 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a 3D boundary detection kernel for labeled volumes.\n\nA voxel is considered a boundary if it has at least one neighbor (in any\nof the 26 directions) with a different label. This is the 3D extension\nof the 2D boundary detection problem commonly used in image segment... | [
{
"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... | ee26ff21-d565-534d-bbc3-170606708b91 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a batched velocity vector computation kernel for fluid simulation.\n\nGiven:\n- h: depth values for each grid cell\n- hu_hv: discharge vectors (x,y components) with float2 type\n- depth_threshold: minimum depth for valid velocity computation\n\nYour kernel should comp... | [
{
"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... | 64c84c02-ff09-5cfc-a84a-a6807e539968 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a sparse matrix scaling kernel using FP16 (half precision).\n\nThe kernel should:\n1. Process a 2D matrix stored with row pitch (memory-aligned rows)\n2. Apply a boolean mask to perform sparse pruning: masked-out elements become zero\n3. Scale unmasked elements by 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... | 379b28c2-647b-5b64-adef-000bcead8efd | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a tiled matrix multiplication kernel with ReLU activation and configurable per-row threshold.\n\nThe function computes C = Threshold_ReLU(A * B) where:\n- First, compute the matrix product of A (M x K) and B (K x N)\n- Then apply ReLU: replace all negative values with... | [
{
"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... | 88be02a6-eb63-5eaa-aefc-acf10177e6d2 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a struct-based vector operation kernel that applies element-wise transformations\nto unsigned long integer vectors. The VectorTransform struct contains:\n- input: pointer to input array on device\n- output: pointer to output array on device\n- operand: value to use fo... | [
{
"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... | b4067751-3847-5f28-83e7-cb33e045af85 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a complex-valued magnitude leaky ReLU kernel.\n\nYour implementation should:\n1. Compute the magnitude of each complex number: |a + bi| = sqrt(a^2 + b^2)\n2. Apply leaky ReLU activation: f(x) = x if x > 0 else alpha * x\n3. Use thread indexing pattern with 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... | 5bcaea39-4336-5e62-8d69-837546e2db9e | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a CUDA kernel that computes the sum of values for each label.\n\nGiven an array of values and a corresponding array of integer labels,\ncompute the sum of all values belonging to each label.\n\nFunction signature: void labelSum(const float* values, const int* labels,\... | [
{
"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... | da8f2e14-f04e-5b93-86c9-7fceca4c47e6 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a memory copy kernel that adds a constant offset to each byte.\n\nYour implementation should:\n1. Copy bytes from src to dst while adding the specified offset\n2. Handle 8-bit unsigned integers (uint8_t)\n3. Use standard 1D grid/block indexing with boundary checking\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... | 1c3e231c-b778-5a47-9396-8395701fc5aa | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a matrix multiplication kernel that adds a scalar bias to the result.\n\nYour implementation should:\n1. Compute the matrix product C = A * B where A is [rows x k] and B is [k x cols]\n2. Add a scalar bias value to each element of the product result\n3. Use proper thr... | [
{
"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... | 45409d91-7a1d-5ac7-b001-7b9cc8bd1251 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a matrix scale-and-offset operation using cuBLAS.\n\nYour implementation should:\n1. Compute B = alpha * A + beta element-wise for matrix A of size M x N\n2. Use double precision floating point (FP64)\n3. Support arbitrary matrix dimensions (M, N up to 4096)\n4. Effic... | [
{
"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... | d135d194-9fe1-5413-bbd4-ffcc67f754ff | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement channel-wise normalization for a 3D NHWC tensor.\n\nYour implementation should:\n1. Compute mean per channel: mean[c] = sum(input[n,h,w,c]) / (N * H * W)\n2. Compute variance per channel: variance[c] = sum((input[n,h,w,c] - mean[c])^2) / (N * H * W)\n3. Apply normaliz... | [
{
"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... | f5e5408b-b0f3-5695-8161-27dc361eb100 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement matrix multiplication using CUDA kernels with 2D grid/block indexing.\n\nYour function should:\n1. Allocate device memory for matrices A, B, and C\n2. Copy input matrices from host to device\n3. Launch a 2D kernel using dim3 for block and grid dimensions\n4. Implement... | [
{
"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... | e91bd0bd-0b05-5c2b-8165-231af86d3b19 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a kernel that performs element-wise addition while accumulating\nelements exceeding a threshold.\n\nEach thread computes: result[i] = a[i] + b[i]\nIf result[i] > threshold, atomically increment global_sum.\n\nYour function signature is in include/solution_header.h.\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... | e47348c4-995f-5885-a483-c327f8042269 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a CUDA kernel that performs a fused matrix operation:\nFor each element, compute C[i][j] = (A[i][j] + B[i][j]) * scale[i]\nwhere scale[i] = 1.0 / (i + 1) for row i.\n\nUse tiled shared memory optimization with a tile width of 16.\nHandle edge cases where matrix 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... | 028514f2-8e62-545b-b71a-f55220d18cd7 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a matrix multiplication kernel with an additional global scaling factor.\n\nGiven three matrices A, B, and output C, compute C = scale * (A × B) where:\n- A is M×K, B is K×N, C is M×N\n- scale is a global float factor applied to each element of the result\n\nThe funct... | [
{
"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... | 30058974-da94-5755-b4bc-39db55e30bd8 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a sigmoid clipping kernel that applies the sigmoid function to an input array\nand clips the results to the range [0, 1].\n\nFor each element:\n 1. Compute sigmoid: output = 1.0f / (1.0f + expf(-input))\n 2. Clip to range: output = max(0.0f, min(1.0f, output))\n\nYo... | [
{
"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... | 52533d36-ba7b-5660-9d91-33a2a4fe88a5 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a fused batched matrix multiply-add operation using cuBLAS.\n\nYour implementation should:\n1. Use cublasSgemmBatched to compute batched matrix multiplication: A * B\n2. Use cublasSgeam to add the accumulator matrix C to the result: (A * B) + C\n3. Operate on arrays o... | [
{
"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... | dad9770a-3431-5cf2-b304-9779ec0331b5 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a function that merges two sorted arrays into one sorted array\nwhile finding the minimum absolute difference between any two consecutive\nelements in the merged result.\n\nYour task is to:\n1. Merge two sorted floating-point arrays (A and B) into a single sorted arra... | [
{
"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... | 4f164545-bfda-5d29-8c22-9d080fda033b | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a batched element gather kernel using CUDA.\n\nYour implementation should:\n1. Copy elements from source to destination following a stride pattern per batch\n2. Process each batch independently in separate thread blocks\n3. For each batch i and element j, copy: dst[i*... | [
{
"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... | e0d0022f-604a-5b05-9f0e-ffff57362afb | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a boolean array compaction function that extracts indices of true elements using stride-based parallelization.\n\nYour kernel should:\n1. Use stride-based indexing pattern: `const auto idx = threadIdx.x + blockDim.x * blockIdx.x;`\n2. Iterate with: `for (auto i = 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... | fa940c0d-c9d2-5fc7-93d6-1aa707f0f126 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement an in-place matrix transpose with scaling.\n\nYour function should:\n1. Transpose a square matrix in place (swap elements across the diagonal)\n2. Scale all elements by a given factor during the transpose operation\n3. Use shared memory with padding to avoid bank conf... | [
{
"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... | 93001833-9875-55a9-9847-5011878c9f37 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement multi-stream parallel weight normalization.\n\nYour task is to normalize an array of weight values by dividing each weight\nby the sum of all weights. The computation should be split across multiple\nCUDA streams to demonstrate stream parallelism.\n\nRequirements:\n1.... | [
{
"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... | 137aed04-abec-5bd8-9566-19a2d1611a30 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a kernel that computes both the minimum and maximum values of an integer array in a single pass.\n\nYour implementation should:\n1. Use atomicMin and atomicMax to find min and max values\n2. Initialize min to INT_MAX and max to INT_MIN before computing\n3. Return both... | [
{
"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... | 86581687-710c-5637-b5d4-a3ec3ba9e729 | [
"ultra_v3"
] | [] |
CC BY 4.0 | [
{
"role": "user",
"content": "Implement a strided element-wise multiplication kernel.\n\nYour kernel should compute out[i] = a[i] * b[(i + stride) % n] for all i in [0, n).\n\nThe function signature is declared in include/solution_header.h.\n\nHelper utilities are provided in include/helpers.h.\n\n## Enviro... | [
{
"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... | d47ebcf9-9eac-5539-83ad-c32f850c0467 | [
"ultra_v3"
] | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.