Datasets:
type stringclasses 2
values | schema_version int64 2 2 | task_id stringlengths 6 23 | date timestamp[s]date 2025-10-31 00:00:00 2026-07-20 00:00:00 | prompt stringlengths 194 4.22k | metadata dict | group stringclasses 9
values | context_files listlengths 0 4 | test_files listlengths 1 3 | source_references dict | build_command stringclasses 88
values | test_command stringclasses 58
values | benchmark_command stringclasses 51
values | base_image stringclasses 1
value | timing_mode unknown | min_cuda_toolkit stringclasses 7
values | compute_capability stringclasses 3
values | requires_datacenter_gpu bool 2
classes | timeout_seconds float64 30 360 | baseline_solution dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cuda_cpp | 2 | CUDA/146 | 2025-10-31T00:00:00 | Develop a CUDA program using the Thrust API to search for a set of elements within an input array and return their corresponding indices. If multiple occurrences of an element exist in the input array, the index of its first occurrence will be returned; if an element is not found, -1 will be returned.
Your implementat... | {
"difficulty": "medium",
"tags": [
"thrust",
"binary-search",
"sorting",
"functor"
],
"releases": [
"2025-2",
"2025-3",
"2026-1",
"2026-2"
],
"do_not_release": false
} | cccl | [
{
"path": "include/find_indices.h",
"content": "#ifndef FIND_INDICES_H\n#define FIND_INDICES_H\n\n#include <thrust/host_vector.h>\n#include <thrust/device_vector.h>\n\n#define DEFAULT_OUTPUT -1\n\n// Functor for updating indices\nstruct indexUpdate {\n int* result;\n const int* testData;\n const in... | [
{
"path": "test/test_main.cu",
"content": "#include <limits>\n#include <cstdio>\n#include <cstring>\n#include <assert.h>\n#include <cuda.h>\n#include <cuda_runtime.h>\n#include <algorithm>\n#include <vector>\n#include <numeric>\n\n#include <thrust/host_vector.h>\n#include <thrust/device_vector.h>\n\n#includ... | null | nvcc -I include -o test.out solution.cu test/*.cu | ./test.out | ./test.out --perf | null | {
"type": "region",
"include": [
"bench_region"
],
"exclude": null,
"time_type": "kernel"
} | 12.2 | null | false | 120 | {
"schema_version": 1,
"type": "file",
"task_id": "CUDA/146",
"files": [
{
"path": "solution.cu",
"content": "#include <thrust/sequence.h>\n#include <thrust/sort.h>\n#include <thrust/binary_search.h>\n#include <thrust/gather.h>\n#include <thrust/for_each.h>\n#include <thrust/device_vector.h>\n\n... |
cuda_cpp | 2 | CUDA/151 | 2025-11-05T00:00:00 | Write a CUDA kernel to test the primality of a list of numbers using the Miller-Rabin algorithm.
The kernel should be launched with different configurations of blocksize.
Your implementation must be in `solution.cu` and include `miller_rabin.h`. Implement the following kernel signature:
```cuda
__global__ void k_mill... | {
"difficulty": "hard",
"tags": [
"miller-rabin",
"primality-testing",
"warp-primitives",
"shared-memory",
"occupancy-api",
"perf-sensitive"
],
"releases": [
"2025-2",
"2025-3",
"2026-1",
"2026-2"
],
"do_not_release": false
} | cccl | [
{
"path": "helper.cu",
"content": "#include \"miller_rabin.h\"\n\nint gWarpSize;\n\n// Compute the required dynamic shared memory size for k_millerRabin.\n__host__ size_t dynamicSMemSizeMillerRabin(int blockSize) {\n int numWarps = blockSize / gWarpSize;\n return numWarps * (sizeof(unsigned long long)... | [
{
"path": "test/test_main.cu",
"content": "#include \"miller_rabin.h\"\n#include <nvtx3/nvToolsExt.h>\n#include <cstdlib>\n#include <cstring>\n\nstatic void benchmarkMillerRabin() {\n cudaDeviceProp prop;\n CUDA_CHECK(cudaGetDeviceProperties(&prop, 0));\n gWarpSize = prop.warpSize;\n\n const int... | null | nvcc -I include -o test.out solution.cu helper.cu test/*.cu | ./test.out | ./test.out --perf | null | {
"type": "region",
"include": [
"bench_region"
],
"exclude": null,
"time_type": "kernel"
} | 12.2 | null | false | 120 | {
"schema_version": 1,
"type": "file",
"task_id": "CUDA/151",
"files": [
{
"path": "solution.cu",
"content": "#include \"miller_rabin.h\"\n\n__global__ void k_millerRabin(unsigned long long* inputNumbers, unsigned long long* primalityResults, int numberOfElements) {\n \n // Compute the num... |
cuda_cpp | 2 | CUDA/152 | 2025-10-31T00:00:00 | Write a CUDA function using the Thrust library to remove integers from an array if they are divisible by any integer in another array. Use the functor `ThrustTransformFunctor` to do the divisibility checks within the `thrust::transform` function.
The signature of the functor is:
```cpp
struct ThrustTransformFunctor {
... | {
"difficulty": "medium",
"tags": [
"thrust",
"transform",
"remove_if",
"functors",
"streams",
"perf-sensitive"
],
"releases": [
"2025-2",
"2025-3",
"2026-1",
"2026-2"
],
"do_not_release": false
} | cccl | [
{
"path": "include/remove_divisible.h",
"content": "#ifndef REMOVE_DIVISIBLE_H\n#define REMOVE_DIVISIBLE_H\n\n#include <cuda.h>\n#include <thrust/remove.h>\n#include <thrust/device_vector.h>\n#include <thrust/host_vector.h>\n#include <thrust/execution_policy.h>\n#include <thrust/system/cuda/vector.h>\n#incl... | [
{
"path": "test/test_main.cu",
"content": "#undef NDEBUG\n#include <assert.h>\n#include <stdio.h>\n#include <map>\n#include <cstring>\n#include <cuda.h>\n#include <nvtx3/nvToolsExt.h>\n#include \"remove_divisible.h\"\n\n#define CUDA_CHECK(call) { \\\n cudaError_t error... | null | nvcc -I include -o test.out solution.cu test/*.cu | ./test.out | ./test.out --perf | null | {
"type": "region",
"include": [
"bench_region"
],
"exclude": null,
"time_type": "kernel"
} | 12.2 | null | false | 120 | {
"schema_version": 1,
"type": "file",
"task_id": "CUDA/152",
"files": [
{
"path": "solution.cu",
"content": "#include \"remove_divisible.h\"\n\nint removeDivisibleElements(thrust::device_vector<int> & dividend_d, \n thrust::device_vector<int> & divisor_d, \n ... |
cuda_cpp | 2 | CUDA/156 | 2025-10-31T00:00:00 | Implement a CUDA function to find the kth smallest element in an array of floats using Thrust library's sort functionality.
The function signature is defined in `include/kth_smallest.h`:
```cpp
float findKthSmallest(thrust::device_vector<float>& data_d, int k,
thrust::device_vector<float>& buffe... | {
"difficulty": "medium",
"tags": [
"thrust",
"sorting",
"device-vector",
"streams"
],
"releases": [
"2025-2",
"2025-3",
"2026-1",
"2026-2"
],
"do_not_release": false
} | cccl | [
{
"path": "include/kth_smallest.h",
"content": "#ifndef KTH_SMALLEST_H\n#define KTH_SMALLEST_H\n\n#include <cuda.h>\n#include <thrust/device_vector.h>\n\nfloat findKthSmallest(thrust::device_vector<float>& data_d, int k, \n thrust::device_vector<float>& buffer_d,\n ... | [
{
"path": "test/test_main.cu",
"content": "#undef NDEBUG\n#include <assert.h>\n#include <cstdio>\n#include <cstring>\n#include <map>\n#include <random>\n#include <cuda.h>\n#include <algorithm>\n#include <thrust/partition.h>\n#include <thrust/sort.h>\n#include <thrust/device_vector.h>\n#include <thrust/host_... | null | nvcc -I include -o test.out solution.cu test/*.cu | ./test.out | ./test.out --perf | null | {
"type": "region",
"include": [
"bench_region"
],
"exclude": null,
"time_type": "kernel"
} | 12.2 | null | false | 120 | {
"schema_version": 1,
"type": "file",
"task_id": "CUDA/156",
"files": [
{
"path": "solution.cu",
"content": "#include \"kth_smallest.h\"\n#include \"cuda_helpers.h\"\n#include <thrust/copy.h>\n#include <thrust/sort.h>\n#include <thrust/execution_policy.h>\n#include <thrust/system/cuda/execution... |
cuda_cpp | 2 | CUDA/157 | 2025-10-31T00:00:00 | Write a function to compute the cumulative distribution function (CDF) of grayscale images using the CUDA Thrust library. The pixel values of the image range from 0-255. The function should sort the pixel values, calculate their histogram, derive the CDF, and then map each pixel to its CDF value.
Implement the functio... | {
"difficulty": "medium",
"tags": [
"thrust",
"image-processing",
"histogram",
"cdf",
"async"
],
"releases": [
"2025-2",
"2025-3",
"2026-1",
"2026-2"
],
"do_not_release": false
} | cccl | [
{
"path": "include/cdf_calculator.h",
"content": "#ifndef CDF_CALCULATOR_H\n#define CDF_CALCULATOR_H\n\n#include <thrust/device_vector.h>\n#include <cuda_runtime.h>\n\nvoid calculatePixelCdf(thrust::device_vector<int> &srcImage, int size, cudaStream_t stream, thrust::device_vector<float> &output);\n\n#endif... | [
{
"path": "test/test_main.cu",
"content": "#include \"cdf_calculator.h\"\n#include \"cuda_utils.h\"\n#include <algorithm>\n#include <vector>\n#include <cstdlib>\n#include <cstring>\n#undef NDEBUG\n#include <cassert>\n#include <nvtx3/nvToolsExt.h>\n\n#define EPSILON 1e-4\n\nvoid launch() {\n // Number of ... | null | nvcc -I include -o test.out solution.cu test/*.cu --extended-lambda | ./test.out | ./test.out --perf | null | {
"type": "region",
"include": [
"bench_region"
],
"exclude": null,
"time_type": "kernel"
} | 12.2 | null | false | 120 | {
"schema_version": 1,
"type": "file",
"task_id": "CUDA/157",
"files": [
{
"path": "solution.cu",
"content": "#include \"cdf_calculator.h\"\n#include \"cuda_utils.h\"\n#include <thrust/sort.h>\n#include <thrust/reduce.h>\n#include <thrust/scan.h>\n#include <thrust/scatter.h>\n#include <thrust/tr... |
cuda_cpp | 2 | CUDA/160 | 2025-10-31T00:00:00 | Use CUB's device-wide primitives to identify all continuous sequences of identical boolean values in a given boolean array, and count the frequency of each sequence.
Implement the function declared in `include/detect_streaks.h`:
```cpp
void detectStreaks(char* input_d, char* streakTypes_d, int* streakLengths_d,
... | {
"difficulty": "medium",
"tags": [
"cub",
"run-length-encode",
"streams",
"device-primitives"
],
"releases": [
"2025-2",
"2025-3",
"2026-1",
"2026-2"
],
"do_not_release": false
} | cccl | [
{
"path": "include/detect_streaks.h",
"content": "#ifndef DETECT_STREAKS_H\n#define DETECT_STREAKS_H\n\n#include <cuda_runtime.h>\n#include <cstdio>\n#include <cstdlib>\n\n#define CUDA_CHECK(call) \\\n{ ... | [
{
"path": "test/test_main.cu",
"content": "#include \"detect_streaks.h\"\n#include <vector>\n#include <utility>\n#include <cassert>\n#include <algorithm>\n#include <cstring>\n\nstruct StreakTestCase {\n std::vector<char> inputArray;\n std::vector<std::pair<bool, int>> expectedStreaks;\n};\n\nvoid laun... | null | nvcc -I include -o test.out solution.cu test/*.cu | ./test.out | ./test.out --perf | null | {
"type": "kernels",
"include": null,
"exclude": null
} | 12.2 | null | false | 60 | {
"schema_version": 1,
"type": "file",
"task_id": "CUDA/160",
"files": [
{
"path": "solution.cu",
"content": "#include \"detect_streaks.h\"\n#include <cub/device/device_run_length_encode.cuh>\n\nvoid detectStreaks(char* input_d, char* streakTypes_d, int* streakLengths_d, int* numStreaks_d, int i... |
cuda_cpp | 2 | CUDA/164 | 2025-10-31T00:00:00 | Implement a function using Thrust that filters out elements from the input array wherever the corresponding value in the predicate array is one.
The function signature is declared in `include/predicate_filter.h`:
```cpp
void predicateBasedFilter(thrust::device_vector<int>& inpVector,
thrust::d... | {
"difficulty": "medium",
"tags": [
"thrust",
"partition",
"filter",
"predicate",
"perf-sensitive"
],
"releases": [
"2025-2",
"2025-3",
"2026-1",
"2026-2"
],
"do_not_release": false
} | cccl | [
{
"path": "include/predicate_filter.h",
"content": "#ifndef PREDICATE_FILTER_H\n#define PREDICATE_FILTER_H\n\n#include <thrust/device_vector.h>\n\nvoid predicateBasedFilter(thrust::device_vector<int>& inpVector, \n thrust::device_vector<int>& predicateVector, \n ... | [
{
"path": "test/test_main.cu",
"content": "#define _USE_MATH_DEFINES\n\n#include \"predicate_filter.h\"\n#include <cuda_runtime_api.h>\n#include <thrust/partition.h>\n#include <thrust/host_vector.h>\n#include <thrust/device_vector.h>\n#include <thrust/unique.h>\n#include <thrust/reduce.h>\n#include <thrust/... | null | nvcc -I include -o test.out solution.cu test/*.cu | ./test.out | ./test.out --perf | null | {
"type": "region",
"include": [
"bench_region"
],
"exclude": null,
"time_type": "kernel"
} | 12.8 | null | false | 60 | {
"schema_version": 1,
"type": "file",
"task_id": "CUDA/164",
"files": [
{
"path": "solution.cu",
"content": "#include \"predicate_filter.h\"\n#include <thrust/reduce.h>\n#include <thrust/partition.h>\n#include <thrust/copy.h>\n#include <thrust/execution_policy.h>\n\nvoid predicateBasedFilter(th... |
cuda_cpp | 2 | CUDA/170 | 2025-10-31T00:00:00 | Use CUB's device-wide primitives to compute inclusive prefix maximum on a device array.
Implement the function declared in `include/prefix_max.h`:
```cpp
void computePrefixMax(int* input_d, int* output_d, int dataSize, cudaStream_t stream);
```
Where:
- `input_d`: pointer to the input array in device memory
- `outpu... | {
"difficulty": "medium",
"tags": [
"cub",
"prefix-scan",
"device-primitives"
],
"releases": [
"2025-2",
"2025-3",
"2026-1",
"2026-2"
],
"do_not_release": false
} | cccl | [
{
"path": "include/prefix_max.h",
"content": "#ifndef PREFIX_MAX_H\n#define PREFIX_MAX_H\n\n#include <cuda_runtime.h>\n\nvoid computePrefixMax(int* input_d, int* output_d, int dataSize, cudaStream_t stream);\n\n#endif // PREFIX_MAX_H"
},
{
"path": "include/cuda_utils.h",
"content": "#ifndef CUDA... | [
{
"path": "test/test_main.cu",
"content": "#include \"prefix_max.h\"\n#include \"cuda_utils.h\"\n#include <cassert>\n#include <cstdlib>\n#include <cstring>\n#include <nvtx3/nvToolsExt.h>\n\nvoid launch() {\n const int ARRAY_SIZE = 10;\n const int NUM_TEST_CASES = 7;\n\n int testInputs[NUM_TEST_CASE... | null | nvcc -I include -o test.out solution.cu test/*.cu -ldl | ./test.out | ./test.out --perf | null | {
"type": "region",
"include": [
"bench_region"
],
"exclude": null,
"time_type": "kernel"
} | 12.2 | null | false | 60 | {
"schema_version": 1,
"type": "file",
"task_id": "CUDA/170",
"files": [
{
"path": "solution.cu",
"content": "#include \"prefix_max.h\"\n#include \"cuda_utils.h\"\n#include <cub/device/device_scan.cuh>\n\nstruct MaxOp {\n __host__ __device__ __forceinline__\n int operator()(const int &a, c... |
cuda_cpp | 2 | CUDA/175 | 2025-10-31T00:00:00 | Write a CUDA function using CUB device-wide API to transform the input array into its logarithmic form using a given custom functor.
The function should have the following signature:
```cpp
void cubNormalizeFunction(int* input_d, float* output_d, int inputSize, cudaStream_t stream);
```
Where:
- `input_d` is the poin... | {
"difficulty": "medium",
"tags": [
"cub",
"device-transform",
"functor",
"logarithmic-scaling",
"perf-sensitive"
],
"releases": [
"2025-2",
"2025-3",
"2026-1",
"2026-2"
],
"do_not_release": false
} | cccl | [
{
"path": "include/cuda_helpers.h",
"content": "#ifndef CUDA_HELPERS_H\n#define CUDA_HELPERS_H\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <cuda.h>\n#include <cuda_runtime.h>\n\n#define TOLERANCE 1e-4\n\n#define CUDA_CHECK(call){ \\\n cudaError_t error = call... | [
{
"path": "test/test_main.cu",
"content": "#include <stdio.h>\n#include <iostream>\n#include <assert.h>\n#include <algorithm>\n#include <cstring>\n#include <cuda.h>\n#include <cuda_runtime.h>\n#include <nvtx3/nvToolsExt.h>\n#include \"cub_normalize.h\"\n#include \"cuda_helpers.h\"\n\n#undef NDEBUG\n\nvoid l... | null | nvcc -I include -o test.out solution.cu test/*.cu -Icccl/thrust -Icccl/libcudacxx/include -Icccl/cub --extended-lambda | ./test.out | ./test.out --perf | null | {
"type": "region",
"include": [
"bench_region"
],
"exclude": null,
"time_type": "kernel"
} | 13.0 | null | false | 120 | {
"schema_version": 1,
"type": "file",
"task_id": "CUDA/175",
"files": [
{
"path": "solution.cu",
"content": "#include \"cub_normalize.h\"\n#include \"cuda_helpers.h\"\n\nvoid cubNormalizeFunction(int* input_d, float* output_d, int inputSize, cudaStream_t stream){\n //Transform the input to l... |
cuda_cpp | 2 | CUDA/176 | 2025-10-31T00:00:00 | Perform filtering of perfect squares from an integer array using the CUB library with a custom predicate functor which validates the elements, compacting the sequence to retain only qualifying elements and resulting the total count of selected values.
Implement the function declared in `include/perfect_squares.h`:
``... | {
"difficulty": "medium",
"tags": [
"cub",
"device-select",
"predicates"
],
"releases": [
"2025-2",
"2025-3",
"2026-1",
"2026-2"
],
"do_not_release": false
} | cccl | [
{
"path": "include/perfect_squares.h",
"content": "#ifndef PERFECT_SQUARES_H\n#define PERFECT_SQUARES_H\n\n#include <cuda_runtime.h>\n\nvoid selectPerfectSquares(int* input_d, int* output_d, int* numSelected_d, int inputSize, cudaStream_t stream);\n\n#endif // PERFECT_SQUARES_H"
},
{
"path": "includ... | [
{
"path": "test/test_main.cu",
"content": "#include \"perfect_squares.h\"\n#include \"cuda_utils.h\"\n#include <vector>\n#include <cassert>\n#include <algorithm>\n#include <cstring>\n#include <cstdlib>\n#include <nvtx3/nvToolsExt.h>\n\nusing namespace std;\n\n// Simplified structure for test cases\nstruct P... | null | nvcc -I include -o test.out solution.cu test/*.cu | ./test.out | ./test.out --perf | null | {
"type": "region",
"include": [
"bench_region"
],
"exclude": null,
"time_type": "kernel"
} | 12.2 | null | false | 60 | {
"schema_version": 1,
"type": "file",
"task_id": "CUDA/176",
"files": [
{
"path": "solution.cu",
"content": "#include \"perfect_squares.h\"\n#include \"cuda_utils.h\"\n#include <cub/device/device_select.cuh>\n#include <cmath>\n\n// Custom predicate for perfect squares\nstruct IsPerfectSquare {\... |
cuda_cpp | 2 | CUDA/177 | 2025-10-31T00:00:00 | Write a CUDA function that computes histograms for the R, G, and B channels from an RGBA image with equally sized bins using the CUB library.
The image is stored as an interleaved array of 32-bit pixels, each with four 8-bit unsigned char channels.
Implement the following function in `solution.cu`:
```cpp
void calcM... | {
"difficulty": "medium",
"tags": [
"cub",
"histogram",
"multi-channel",
"image-processing",
"perf-sensitive"
],
"releases": [
"2025-2",
"2025-3",
"2026-1",
"2026-2"
],
"do_not_release": false
} | cccl | [
{
"path": "include/histogram_helpers.h",
"content": "#ifndef HISTOGRAM_HELPERS_H\n#define HISTOGRAM_HELPERS_H\n\n#include <cstdio>\n#include <cstdlib>\n#include <cuda_runtime.h>\n\n#define NUM_CHANNELS (4)\n#define NUM_ACTIVE_CHANNELS (3)\n#define LOWER_LEVEL (0)\n#define UPPER_LEVEL ... | [
{
"path": "test/test_main.cu",
"content": "#include <algorithm>\n#include <cstring>\n#include <cuda_runtime.h>\n#include <nvtx3/nvToolsExt.h>\n#undef NDEBUG\n#include <assert.h>\n#include \"histogram.h\"\n#include \"histogram_helpers.h\"\n\nvoid launch() {\n // Number of test cases\n constexpr int TES... | null | nvcc -I include -o test.out solution.cu test/*.cu | ./test.out | ./test.out --perf | null | {
"type": "region",
"include": [
"bench_region"
],
"exclude": null,
"time_type": "kernel"
} | 12.2 | null | false | 120 | {
"schema_version": 1,
"type": "file",
"task_id": "CUDA/177",
"files": [
{
"path": "solution.cu",
"content": "#include <cub/cub.cuh>\n#include \"histogram.h\"\n#include \"histogram_helpers.h\"\n\nvoid calcMultiHistogram(uint8_t* inputImage_d, int** histogram_d,\n int* nu... |
cuda_cpp | 2 | CUDA/178 | 2025-10-31T00:00:00 | Use CUB's device-wide primitives to compute the minimum and maximum values of each segment of a row major matrix of dimension m x n. Consider each row as an individual segment.
Implement the function declared in `include/minmax_function.h`:
```cpp
void minMaxFunction(int* input_d, int* outputMin_d, int* outputMax_d, ... | {
"difficulty": "medium",
"tags": [
"cub",
"segmented-reduction",
"device-primitives",
"streams"
],
"releases": [
"2025-2",
"2025-3",
"2026-1",
"2026-2"
],
"do_not_release": false
} | cccl | [
{
"path": "include/minmax_function.h",
"content": "#ifndef MINMAX_FUNCTION_H\n#define MINMAX_FUNCTION_H\n\n#include <cuda_runtime.h>\n\nvoid minMaxFunction(int* input_d, int* outputMin_d, int* outputMax_d, int rows, int cols, cudaStream_t stream);\n\n#endif // MINMAX_FUNCTION_H"
},
{
"path": "includ... | [
{
"path": "test/test_main.cu",
"content": "#include \"minmax_function.h\"\n#include \"cuda_helpers.h\"\n#include <assert.h>\n#include <algorithm>\n#include <climits>\n#include <string>\n#include <nvtx3/nvToolsExt.h>\n\n#undef NDEBUG\n\nvoid launch() {\n\n const int TEST_CASE_COUNT = 7;\n int rows[TEST... | null | nvcc -I include -o test.out solution.cu test/*.cu | ./test.out | ./test.out --perf | null | {
"type": "region",
"include": [
"bench_region"
],
"exclude": null,
"time_type": "kernel"
} | 12.2 | null | false | 120 | {
"schema_version": 1,
"type": "file",
"task_id": "CUDA/178",
"files": [
{
"path": "solution.cu",
"content": "#include \"minmax_function.h\"\n#include \"cuda_helpers.h\"\n#include <limits>\n\n// Define custom reduction operators for CUB\nstruct MinOp {\n __device__ __forceinline__ int operato... |
cuda_cpp | 2 | CUDA/179 | 2025-10-31T00:00:00 | Use the Thrust API to perform a parallel element-wise transformation on the array with a custom predicate that uses a flag array to mark peaks (elements greater than both neighbors) with 1 and valleys (elements smaller than both neighbors) with -1.
Implement the function declared in `include/peaks_valleys.h`:
```cpp
v... | {
"difficulty": "medium",
"tags": [
"thrust",
"transformation",
"peaks-valleys",
"custom-functor"
],
"releases": [
"2025-2",
"2025-3",
"2026-1",
"2026-2"
],
"do_not_release": false
} | cccl | [
{
"path": "include/peaks_valleys.h",
"content": "#ifndef PEAKS_VALLEYS_H\n#define PEAKS_VALLEYS_H\n\n#include <cuda.h>\n#include <thrust/device_vector.h>\n\nvoid detectPeaksAndValleys(thrust::device_vector<int>& data_d, \n thrust::device_vector<int>& flags_d,\n ... | [
{
"path": "test/test_main.cu",
"content": "#undef NDEBUG\n#include <assert.h>\n#include <vector>\n#include <cstring>\n#include <cuda.h>\n#include <thrust/device_vector.h>\n#include <thrust/host_vector.h>\n#include <nvtx3/nvToolsExt.h>\n#include \"cuda_utils.h\"\n#include \"peaks_valleys.h\"\n\nusing namespa... | null | nvcc -I include -o test.out solution.cu test/*.cu | ./test.out | ./test.out --perf | null | {
"type": "region",
"include": [
"bench_region"
],
"exclude": null,
"time_type": "kernel"
} | 12.2 | null | false | 120 | {
"schema_version": 1,
"type": "file",
"task_id": "CUDA/179",
"files": [
{
"path": "solution.cu",
"content": "#include <thrust/device_vector.h>\n#include <thrust/host_vector.h>\n#include <thrust/transform.h>\n#include <thrust/functional.h>\n#include <thrust/execution_policy.h>\n#include <thrust/... |
cuda_cpp | 2 | CUDA/181 | 2025-11-05T00:00:00 | Write a CUDA kernel to find the mode (most frequent element) and its frequency (no. of occurrences) in an array using libcu++ synchronization primitives.
The function signature is declared in `include/mode_detection.h`:
```cpp
__global__ void k_parallelMode(
cuda::std::span<const int> input,
cuda::std::span<cu... | {
"difficulty": "hard",
"tags": [
"cooperative-groups",
"atomics",
"libcu++",
"histogram",
"mode-detection",
"perf-sensitive"
],
"releases": [
"2025-2",
"2025-3",
"2026-1",
"2026-2"
],
"do_not_release": false
} | cccl | [
{
"path": "include/mode_detection.h",
"content": "#ifndef MODE_DETECTION_H\n#define MODE_DETECTION_H\n\n#include <cuda/atomic>\n#include <cuda/std/cstdint>\n#include <cuda/std/span>\n#include <cuda_runtime.h>\n#include <cooperative_groups.h>\n#include <vector>\n#include <algorithm>\n\n#define BLOCK_SIZE 256... | [
{
"path": "test/test_main.cu",
"content": "#include \"mode_detection.h\"\n#include <cassert>\n#include <cstring>\n#include <cstdlib>\n#include <nvtx3/nvToolsExt.h>\n\nvoid launch() {\n // Test‐case struct for mode detection\n struct TestCase {\n std::vector<int> array; // input array\n ... | null | nvcc -I include -o test.out solution.cu test/*.cu | ./test.out | ./test.out --perf | null | {
"type": "region",
"include": [
"bench_region"
],
"exclude": null,
"time_type": "kernel"
} | 12.2 | null | false | 120 | {
"schema_version": 1,
"type": "file",
"task_id": "CUDA/181",
"files": [
{
"path": "solution.cu",
"content": "#include \"mode_detection.h\"\n\n// Kernel: grid‐stride over array, updating histogram and tracking mode\n__global__ void k_parallelMode(\n cuda::std::span<const int> input,\n ... |
cuda_cpp | 2 | CUDA/182 | 2025-10-31T00:00:00 | Write a CUDA kernel that calculates Minkowski distance between 3D floating points and the fixed reference point (0,0,0) using libcu++ library. The kernel should leverage libcu++ containers to store the multi-dimensional spatial data points.
The kernel signature is defined in `include/minkowski.h`:
```cpp
__global__ vo... | {
"difficulty": "medium",
"tags": [
"libcudacxx",
"mdspan",
"kernel-launch",
"distance-computation",
"perf-sensitive"
],
"releases": [
"2025-2",
"2025-3",
"2026-1",
"2026-2"
],
"do_not_release": false
} | cccl | [
{
"path": "include/minkowski.h",
"content": "#ifndef MINKOWSKI_H\n#define MINKOWSKI_H\n\n#include <cuda/std/mdspan>\n#include <cuda/std/array>\n#include <cstdio>\n#include <cstdlib>\n\n// Reference point to calculate distances from\nconstexpr float REF_X = 0.0f;\nconstexpr float REF_Y = 0.0f;\nconstexpr flo... | [
{
"path": "test/test_main.cu",
"content": "#include \"minkowski.h\"\n#include <vector>\n#include <cmath>\n#include <string>\n#include <cassert>\n#include <random>\n#include <chrono>\n#include <cstring>\n#include <nvtx3/nvToolsExt.h>\n\n// Function containing all test cases and launching them\nvoid launch() ... | null | nvcc -I include -o test.out solution.cu test/*.cu | ./test.out | ./test.out --perf | null | {
"type": "region",
"include": [
"bench_region"
],
"exclude": null,
"time_type": "kernel"
} | 12.2 | null | false | 120 | {
"schema_version": 1,
"type": "file",
"task_id": "CUDA/182",
"files": [
{
"path": "solution.cu",
"content": "#include \"minkowski.h\"\n#include <cuda/std/mdspan>\n#include <cuda/std/array>\n\n__global__ void k_calculateMinkowskiDistance(\n cuda::std::mdspan<DataPoint, cuda::std::extents<size... |
cuda_cpp | 2 | CUDA/187 | 2025-10-31T00:00:00 | Implement a CUDA kernel that calculates powers of complex numbers, where input is an array of tuples containing complex numbers and their integer powers. Use libcu++ library to extract the complex number z and power p from each tuple then compute z^p and store in the output array named results.
The signature of the CU... | {
"difficulty": "medium",
"tags": [
"libcudacxx",
"complex-numbers",
"kernel-launch",
"tuple",
"mathematical-operations",
"perf-sensitive"
],
"releases": [
"2025-2",
"2025-3",
"2026-1",
"2026-2"
],
"do_not_release": false
} | cccl | [
{
"path": "include/complex_powers.h",
"content": "#ifndef COMPLEX_POWERS_H\n#define COMPLEX_POWERS_H\n\n#include <cuda/std/tuple>\n#include <cuda/std/complex>\n\n// Define a tuple to store a complex number and its power\nusing ComplexPower = cuda::std::tuple<cuda::std::complex<double>, int>;\n\n__global__ v... | [
{
"path": "test/test_main.cu",
"content": "#include \"complex_powers.h\"\n#include <cuda/std/cassert>\n#include <iostream>\n#include <random>\n#include <vector>\n#include <cassert>\n#include <cstring>\n#include <nvtx3/nvToolsExt.h>\n\n// CUDA error checking macro\n#define CUDA_CHECK(call) do { \\\n cudaE... | null | nvcc -I include -o test.out solution.cu test/*.cu | ./test.out | ./test.out --perf | null | {
"type": "region",
"include": [
"bench_region"
],
"exclude": null,
"time_type": "kernel"
} | 12.2 | null | false | 120 | {
"schema_version": 1,
"type": "file",
"task_id": "CUDA/187",
"files": [
{
"path": "solution.cu",
"content": "#include \"complex_powers.h\"\n\n__global__ void calculateComplexPowers(\n ComplexPower* input,\n cuda::std::complex<double>* results,\n int numElements\n) {\n\nfor (int idx = b... |
- データの内容
- データの概要
- 複製について
- 出典
- 論文
- アノテーションの方法
- 微調整に使うときの注意
- 調査メモの記述
- 元のカード(日本語訳)
- データセットの概要
- データセットの特徴
- データセットの規模
- 問題のグループ
- データの形式
- データのスキーマ
- 評価の手順
- バージョン管理と保守
- 問題の例
- 倫理上の考慮
- ライセンス
- 引用
- Dataset Overview
- Dataset Characterization
- Dataset Quantification
- Problem Groups
- Dataset Format
- Data Schema
- Evaluation Protocol
- Versioning and Maintenance
- Example Problem
- Ethical Considerations
- License
- Citation
nvidia/compute-eval(複製)
データの内容
LLM が生成した CUDA コードの正しさと性能を測るベンチマークの課題のデータ。1 行が 1 問で、課題文 prompt、所属する領域 group、ビルドとテストのコマンド、基準となる解答 baseline_solution などを持つ。問題は NVIDIA のエンジニアが作り、一部は OpenAI と Anthropic のモデルの支援で生成または修正し、すべて人間のエンジニアが確認した。ライセンスは NVIDIA Evaluation Dataset License Agreement で、評価用のベンチマークとして作られている。
データの概要
| 項目 | 値 |
|---|---|
| 行数 | 3,102(15 構成・15 分割の合計) |
| 列数 | 20 |
| 容量 | 31.99 MB(ファイル 27 本) |
| ファイルの形式 | jsonl 14、json 5、md 2、pdf 1、yaml 1 |
| 言語 | en |
| 公開 | public |
構成と分割
| 構成(config) | 分割(split)ごとの行数 | 列数 |
|---|---|---|
default |
eval 591 |
20 |
2025-1 |
eval 127 |
20 |
2025-2 |
eval 231 |
20 |
2025-3 |
eval 405 |
20 |
2026-1 |
eval 566 |
20 |
2026-2 |
eval 591 |
20 |
cccl |
eval 80 |
20 |
cublas |
eval 81 |
20 |
cuda-kernels |
eval 114 |
20 |
cuda-runtime |
eval 29 |
20 |
cudnn |
eval 113 |
20 |
cute-dsl |
eval 15 |
20 |
cutile |
eval 48 |
20 |
cutlass |
eval 10 |
20 |
mathlibs |
eval 101 |
20 |
列(構成 default・分割 eval。構成ごとに列が違う)
| 列 | 型 | 先頭の行の値 |
|---|---|---|
type |
string |
cuda_cpp |
schema_version |
int64 |
2 |
task_id |
string |
CUDA/146 |
date |
timestamp[s] |
2025-10-31T00:00:00 |
prompt |
string |
Develop a CUDA program using the Thrust API to s… |
metadata |
struct{difficulty: string, tags: list<string>, releases: list<string>, do_not_release: bool} |
{difficulty, tags, releases, do_not_release} |
group |
string |
cccl |
context_files |
list<struct{path: string, content: string}> |
[1 件] |
test_files |
list<struct{path: string, content: string}> |
[1 件] |
source_references |
struct{any: list<string>, all: list<string>} |
null |
build_command |
string |
nvcc -I include -o test.out solution.cu test/*.c… |
test_command |
string |
./test.out |
benchmark_command |
string |
./test.out --perf |
base_image |
string |
null |
timing_mode |
json |
{type, include, exclude, time_type} |
min_cuda_toolkit |
string |
12.2 |
compute_capability |
string |
null |
requires_datacenter_gpu |
bool |
False |
timeout_seconds |
float64 |
120.0 |
baseline_solution |
struct{schema_version: int64, type: string, task_id: string, files: list<struct{…}>} |
{schema_version, type, task_id, files} |
行数と列は HF のデータセットビューアの集計(元のデータセットの現在の版で数えたもの)。全データセットの一覧は HYUKI5/dataset-catalog にある。
複製について
nvidia/compute-eval をリビジョン 60301f090273ee64967105ebb2eb5bad0aed3595 の時点でそのまま複製したもの。中身は変えていない。判断モデル Laya(convaiinnovations/laya)の微調整に使う候補として、調査メモ(Laya 学習用データセット調査)に載せたデータを集めている。
出典
- 元のデータセット: https://huggingface.co/datasets/nvidia/compute-eval
- 複製したリビジョン:
60301f090273ee64967105ebb2eb5bad0aed3595(2026-09-14 20:39:09+00:00) - 元のライセンス表記:
other
論文
- 元のカードに論文へのリンクは見つからなかった
アノテーションの方法
(元のカードに該当の見出しが無いので、ラベルの付け方に触れた段落を抜き出した)
ComputeEval は、LLM が生成した CUDA コードを正しさと性能の両面で評価するベンチマークである。各問題は自己完結したプログラミングの課題を 1 つ提示する。課題は、カーネル、ランタイム API、メモリ管理、並列アルゴリズム、GPU ライブラリ、テンプレートと DSL によるカーネルの記述にわたる。機能の検証用に非公開のテストハーネスを持ち、任意で、GPU の実行時間を基準と比べて測る性能のベンチマークも持つ。
データの収集方法
- ハイブリッド: 手作業による収集、合成 — 問題は NVIDIA のエンジニアが作成し、一部は最先端の言語モデル(OpenAI、Anthropic)の支援で生成または修正した。すべての問題は人間のエンジニアが確認し、検証した。
ラベル付けの方法
- ハイブリッド: 手作業によるラベル付け、合成 — テストハーネス、ビルドとテストのコマンド、領域のグループの割り当ては NVIDIA のエンジニアが作成した。難易度の評価とタグは、最先端の言語モデルの支援で補った。すべてのラベルは人間のエンジニアが確認し、検証した。
- 作業用の一時ワークスペースを作る(問題が
base_imageを宣言していれば、そのコンテナ内で) context_filesをワークスペースに書き出す- モデルが生成した解のファイルをワークスペースに書き出す
test_filesをワークスペースに書き出す(この時点で見えるようになる)build_commandを実行してコンパイルする(ある場合)- コンパイルが成功した場合(またはビルドの手順が不要な場合)、
test_commandを実行する - テストの終了コードで合否を決める(終了コード 0 が合格)
- Compute Sanitizer のゲートが有効な場合、選んだサニタイザーの各ツールのもとでテストを再実行する(サニタイザーのゲート を参照)
- テストが合格し、
benchmark_commandが宣言されていれば、設定されたtiming_modeとプロファイラで性能を測る
微調整に使うときの注意
- 調査メモの台帳での区分: D(記載なし・other・unknown・資料間の食い違い)。区分は記載の文言で機械的に付けたもので、法的な判定ではない。学習に入れる前に元のカードとライセンスの原文で確かめる。
- Laya の入力は 2,048 token まで(ModernBERT-large / mmBERT)。長い本文は先頭から黙って切られるので、切れる行は事前に除くか、要約・切り出しをしてから入れる。
- 分割は記事・文書単位で行い、同じ本文から作った別の問いを学習側と較正側に分けない。温度と閾値は学習に使っていない分割で別々に当てる。
調査メモの記述
| メモ | 節 | ライセンス(記載) | 確認 | 注記 |
|---|---|---|---|---|
nvidia_nemotron.md |
付録. 取得した nvidia 組織のデータセット全件の簡易一覧 (L390) | other | 確認済 | 確認印なし(各ファイルの凡例により確認済扱い) / 原文注記: × 数学・コード・科学・計測 |
元のカード(日本語訳)
以下は元のデータセットのカードの本文を日本語に訳したもの(機械翻訳)。訳に疑問があるときは、末尾の原文を確かめる。
ComputeEval のデータセットカード
ComputeEval は、LLM が生成した CUDA コードを正しさと性能の両面で評価するベンチマークである。各問題は自己完結したプログラミングの課題を 1 つ提示する。課題は、カーネル、ランタイム API、メモリ管理、並列アルゴリズム、GPU ライブラリ、テンプレートと DSL によるカーネルの記述にわたる。機能の検証用に非公開のテストハーネスを持ち、任意で、GPU の実行時間を基準と比べて測る性能のベンチマークも持つ。
ホームページ: github.com/NVIDIA/compute-eval データセット: huggingface.co/datasets/nvidia/compute-eval
作ったものや学んだこと、今後の方向性についての定期的な技術解説は、エンジニアリング日記 を参照。
データセットの概要
| データセットの所有者 | NVIDIA Corporation |
| 作成日 | 2025-04-02 |
| ライセンス | NVIDIA Evaluation Dataset License Agreement(データ)。Apache 2.0(評価ハーネスのコード)。 |
| 想定される用途 | CUDA コード生成の能力を評価する研究者と開発者。用途は、GPU プログラミングの課題で LLM の正しさと性能をベンチマークすること、CUDA の領域をまたいでモデルを比較すること、システムプログラミングのための LLM の学習で改善すべき点を見つけることを含む。 |
このデータセットは、商用利用にも非商用利用にも使える。
データセットの特徴
データの収集方法
- ハイブリッド: 手作業による収集、合成 — 問題は NVIDIA のエンジニアが作成し、一部は最先端の言語モデル(OpenAI、Anthropic)の支援で生成または修正した。すべての問題は人間のエンジニアが確認し、検証した。
ラベル付けの方法
- ハイブリッド: 手作業によるラベル付け、合成 — テストハーネス、ビルドとテストのコマンド、領域のグループの割り当ては NVIDIA のエンジニアが作成した。難易度の評価とタグは、最先端の言語モデルの支援で補った。すべてのラベルは人間のエンジニアが確認し、検証した。
データセットの規模
- レコード数: バージョン付きの 5 つのデータパックにまたがる 591 問(2025.1: 127、2025.2: 231、2025.3: 405、2026.1: 566、2026.2: 591)
- フィールド数: 問題ごとに 20 フィールド(task_id, type, prompt, group, metadata, context_files, test_files, source_references, build_command, test_command, benchmark_command, base_image, timing_mode, baseline_solution, min_cuda_toolkit, compute_capability, requires_datacenter_gpu, timeout_seconds, date, schema_version)
- データの合計サイズ: すべてのデータパックで圧縮後およそ 4.1 MB(問題と基準の解を含む)
問題のグループ
問題は領域ごとにグループに分けてある。各問題はちょうど 1 つのグループに属し、そのグループが、問題の試す CUDA API とプログラミングの概念を決める。
CUDA C++
| Group | Description |
|---|---|
cuda-runtime |
カーネル起動、メモリ管理、ストリーム、イベント、CUDA Graphs、クラスタ起動、オキュパンシー |
cuda-kernels |
共有メモリ、warp の組み込み関数、リダクション、スキャン、ステンシル、テンソルコア、協調グループ |
cccl |
Thrust、CUB、libcu++ |
cublas |
BLAS のレベル 1〜3、拡張、応用 |
mathlibs |
cuSPARSE、cuSOLVER、cuFFT、cuRAND |
cudnn |
cuDNN Graph API による畳み込み、アテンション、行列積、正規化 |
cutlass |
CUTLASS のテンプレート、collective、スケジューラ、エピローグ、統合のパターン |
CUDA Python
| Group | Description |
|---|---|
cutile |
タイルベースのカーネル: 行列積、アテンション、正規化、要素ごとの演算(SM 10.0 以上) |
cute-dsl |
CuTe DSL のレイアウト、テンソル、コピーと MMA の atom、パイプライン、カスタムカーネル |
cutlass と cute-dsl の問題は、固定された環境で評価する。CUDA Toolkit 13.1 と CUTLASS 4.6.1(C++)、nvidia-cutlass-dsl 4.6.1(Python)である。問題は base_image でこれを宣言している。
領域の網羅の対応表とバックログは DOMAIN_MAP.md を参照。
データの形式
モダリティ: テキスト(構造化された JSONL)
問題はデータパックとして配布する。データパックは、圧縮された tarball(.tar.gz)として保存されるバージョン付きのリリースである。各データパックには次が入る。
metadata.json- リリースのバージョン、作成日時、問題数、整合性のハッシュproblems.jsonl- 問題ごとに 1 行の JSON オブジェクト
エンコーディング: UTF-8
データのスキーマ
問題の構造
各問題は、次のスキーマを持つ JSON オブジェクトである。
主要なフィールド
| Field | Type | Required | Description |
|---|---|---|---|
task_id |
string |
✓ | 一意の ID(例: "CUDA/0"、"CUDA/42") |
type |
string |
✓ | 問題の型: "cuda_cpp" または "cuda_python" |
group |
string |
✓ | 領域のグループ(上の 問題のグループ を参照) |
schema_version |
integer |
✓ | データのスキーマのバージョン(現在は 2) |
date |
string |
✓ | 問題の作成日(ISO 8601 形式: "YYYY-MM-DD") |
prompt |
string |
✓ | プログラミング課題の自然言語による指示 |
context_files |
array |
✓ | モデル/システムに見えるファイル(ヘッダ、スタブ、補助関数) |
test_files |
array |
✓ | 評価用の非公開のテストハーネス(モデル/システムには見せない) |
build_command |
string |
— | 解をコンパイルするコマンド(例: "nvcc -I include ...") |
test_command |
string |
✓ | テストを実行するコマンド(例: "./test.out") |
benchmark_command |
string |
— | 性能のベンチマークを実行するコマンド(テストとは別) |
base_image |
string |
— | 問題を評価するコンテナイメージ。既定の評価イメージを上書きする(例: "compute-eval:13.1.0") |
timing_mode |
object |
— | 性能の時間をどう取り出すか(既定値: {"type": "process"})。タイミングモード を参照 |
baseline_solution |
object |
— | 速度向上を比べるための参照解 |
min_cuda_toolkit |
string |
— | 必要な CUDA Toolkit の最低バージョン(例: "12.0") |
compute_capability |
string |
— | 必要な GPU の compute capability の最低値(既定値: "8.0") |
requires_datacenter_gpu |
boolean |
— | データセンター向けの GPU を必要とするかどうか(既定値: false) |
timeout_seconds |
float |
— | テストに許す最大の実行時間(秒) |
source_references |
string、array、object |
— | 解の中で検証する必須の API 呼び出し。{any: [...], all: [...]} の意味づけに対応する |
metadata |
object |
— | 問題のメタデータ: difficulty、tags、releases、do_not_release |
ファイルのオブジェクト(context_files と test_files)
context_files と test_files の各ファイルは、次のフィールドを持つオブジェクトである。
| Field | Type | Description |
|---|---|---|
path |
string |
相対ファイルパス(例: "include/kernel.h") |
content |
string |
ファイルの全内容(UTF-8 でエンコード) |
タイミングモード
性能のベンチマークを宣言する問題は、timing_mode で性能の時間の取り方を指定できる。すべてのモードは値をミリ秒で報告する。
| Type | Description |
|---|---|
process |
既定値。アプリケーション全体の壁時計時間。 |
kernels |
GPU カーネルの実行時間の合計。include/exclude のグロブパターンに対応する。 |
region |
NVTX で注釈を付けたコード範囲からの時間。include/exclude のグロブと time_type("kernel" または "wall_clock")に対応する。 |
gpu |
GPU の合計時間(カーネルの実行とメモリ転送)。 |
custom |
ベンチマークのプログラムが自分の時間を STDOUT に COMPUTE_EVAL_TIME_MS: <value> の形で出力する。 |
評価の手順
ComputeEval は、生成と評価を厳密に分ける。
モデル/システムが見るもの(生成のとき)
- 問題の
prompt(課題と要件を記述) context_files(インターフェースの定義と補助関数)build_command(コンパイルの指示。ある場合)- CUDA Toolkit の最低バージョンとアーキテクチャの要件
モデル/システムが見ないもの
test_files(非公開のテストハーネス)- 参照解
評価の流れ
- 作業用の一時ワークスペースを作る(問題が
base_imageを宣言していれば、そのコンテナ内で) context_filesをワークスペースに書き出す- モデルが生成した解のファイルをワークスペースに書き出す
test_filesをワークスペースに書き出す(この時点で見えるようになる)build_commandを実行してコンパイルする(ある場合)- コンパイルが成功した場合(またはビルドの手順が不要な場合)、
test_commandを実行する - テストの終了コードで合否を決める(終了コード 0 が合格)
- Compute Sanitizer のゲートが有効な場合、選んだサニタイザーの各ツールのもとでテストを再実行する(サニタイザーのゲート を参照)
- テストが合格し、
benchmark_commandが宣言されていれば、設定されたtiming_modeとプロファイラで性能を測る
これにより、モデルはテストケースに過学習できず、自然言語の説明とインターフェースの契約だけに基づいて問題を解かなければならない。
サニタイザーのゲート
評価では任意で、機能テストに合格した解それぞれを NVIDIA Compute Sanitizer(memcheck、racecheck、synccheck、initcheck)で実行できる。既定では無効で、問題の正しさの結果は変わらない。
このゲートは、問題の test_files に 1 つの制約を課す。サニタイザーの結果を「異常なし」と報告するには、テストが意図した作業量を実際に実行したことを示さなければならない。ComputeEval は、テストに COMPUTE_EVAL_SANITIZER_REPORT と COMPUTE_EVAL_SANITIZER_TOKEN を渡す。テストは、対象のカーネルが起動したことを確かめる小さな JSON のレコードを書き戻す。候補の標準出力は証拠としては決して受け入れない。どちらの変数も、候補が制御する子プロセスには渡さないこと。この副次的な経路を実装していない問題は、誤って「異常なし」と報告せず、invalid のサニタイザー結果を報告する。
ほとんどの問題は生成の課題である。仕様から関数やカーネルを書く。cutlass と cute-dsl のグループでは、修復の課題も導入する。context_files に欠陥がある、または性能の出ない実装が入っており、モデルがそれを直さなければならない。
バージョン管理と保守
現在のバージョン: 2026.2
以前のバージョン:
以前のバージョンとの関係: 拡張。NVIDIA の追加の技術を扱う新しい問題を加え、対象の範囲を広げる。
ComputeEval は、以前のリリースのバージョンをすべて保持し、モデルの進歩を経時的に追跡できるようにしている。利用者はどのリリースのバージョンに対してもベンチマークを実行でき、時間をかけた改善を追跡できる。
重要: 互換性は保つが、ビット単位の不変性までは保証しない。問題のバグ(解けないテストケース、誤った仕様など)を見つけた場合、修正して今後のリリースでデータパックを更新する権利を留保する。
この方針により、利用者は以前のベンチマークのバージョンを使い続けつつ、バグの修正と改善の恩恵も受けられる。
問題の例
{
"task_id": "CUDA/3",
"type": "cuda_cpp",
"group": "cuda-runtime",
"date": "2025-10-31",
"prompt": "Implement a function called `launch` that launches a kernel function named `kernel` without using triple chevrons. The x, y, z grid and block dimensions will be provided as parameters to the `launch` function.\n\nThe function signature is defined in `include/kernel_launch.h`:\n```cuda\nvoid launch(int gridSizeX, int blockSizeX, int gridSizeY = 1, int blockSizeY = 1,\n int gridSizeZ = 1, int blockSizeZ = 1);\n```\n\nThe `kernel` function is already defined with the following signature:\n```cuda\n__global__ void kernel(int *output, const int *input);\n```\n\nYour implementation should use the CUDA runtime API to launch the kernel with the specified grid and block dimensions.",
"context_files": [
{
"path": "include/kernel_launch.h",
"content": "#pragma once\n\nvoid launch(int gridSizeX, int blockSizeX, int gridSizeY = 1, int blockSizeY = 1,\n int gridSizeZ = 1, int blockSizeZ = 1);\n"
},
{
"path": "src/kernel.cu",
"content": "#include <cuda_runtime.h>\n\n__global__ void kernel(int *output, const int *input) {\n int idx = blockIdx.x * blockDim.x + threadIdx.x;\n output[idx] = input[idx] * 2;\n}\n"
}
],
"test_files": [
{
"path": "test/test_main.cu",
"content": "#include <cassert>\n#include <cuda_runtime.h>\n#include \"../include/kernel_launch.h\"\n\nint main() {\n // Test implementation\n int *d_input, *d_output;\n cudaMalloc(&d_input, 256 * sizeof(int));\n cudaMalloc(&d_output, 256 * sizeof(int));\n \n launch(4, 64); // Launch with 4 blocks, 64 threads each\n \n cudaFree(d_input);\n cudaFree(d_output);\n return 0;\n}\n"
}
],
"build_command": "nvcc -I include -o test.out solution.cu src/kernel.cu test/*.cu -arch=sm_80",
"test_command": "./test.out",
"min_cuda_toolkit": "12.0",
"timeout_seconds": 30.0,
"source_references": {"any": null, "all": ["cudaLaunchKernelEx"]}
}
倫理上の考慮
NVIDIA は、信頼できる AI は共有された責任であると考えており、幅広い AI の用途での開発を可能にするための方針と実践を確立している。開発者は、このデータセットが該当する業界と用途の要件を満たし、想定外の製品の誤用に対処するよう、社内の開発チームと協力すべきである。品質、リスク、セキュリティの脆弱性、または NVIDIA の AI に関する懸念は、こちら から報告すること。
ライセンス
SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: LicenseRef-NVIDIA-Evaluation
このデータセットは NVIDIA Evaluation Dataset License Agreement のもとでライセンスされている。このライセンスは、データセットを AI モデルの評価とベンチマークのためだけに 使うことを認める。特に次のとおり。
- 学習の禁止: データセットを AI モデルや機械学習アルゴリズムの学習に使ってはならない(第 3.1 条)。
- 再配布の禁止: データセットを販売、再ライセンス、配布、ホストしてはならない(第 3.2 条)。
- 結果の公表は可: 評価とベンチマークの結果は公表してよい。
完全なライセンス文は ライセンス全文 を参照。
引用
ComputeEval を研究で使う場合は、次を引用すること。
@misc{computeeval2025,
title={ComputeEval: A Benchmark for Evaluating Large Language Models on CUDA Code Generation},
author={NVIDIA Corporation},
year={2025},
url={https://github.com/NVIDIA/compute-eval}
}
原文(英語)
Dataset Card for ComputeEval
ComputeEval is a benchmark for evaluating LLM-generated CUDA code on correctness and performance. Each problem provides a self-contained programming challenge — spanning kernels, runtime APIs, memory management, parallel algorithms, GPU libraries, and template/DSL kernel authoring — with a held-out test harness for functional validation and optional performance benchmarks for measuring GPU execution time against a baseline.
Homepage: github.com/NVIDIA/compute-eval Dataset: huggingface.co/datasets/nvidia/compute-eval
For periodic technical write-ups on what we've built, what we've learned, and where we're headed, see the Engineering Diaries.
Dataset Overview
| Dataset Owner | NVIDIA Corporation |
| Dataset Creation Date | 2025-04-02 |
| License | NVIDIA Evaluation Dataset License Agreement (data). Apache 2.0 (evaluation harness code). |
| Intended Usage | Researchers and developers evaluating the CUDA code generation capabilities of large language models. Use cases include benchmarking LLM correctness and performance on GPU programming tasks, comparing models across CUDA domains, and identifying areas for improvement in LLM training for systems programming. |
This dataset is ready for commercial or non-commercial uses.
Dataset Characterization
Data Collection Method
- Hybrid: Manually-Collected, Synthetic — Problems were authored by NVIDIA engineers and in some cases generated or modified with assistance from frontier language models (OpenAI, Anthropic). All problems were reviewed and validated by human engineers.
Labeling Method
- Hybrid: Manually-Labeled, Synthetic — Test harnesses, build/test commands, and domain group assignments were authored by NVIDIA engineers. Difficulty ratings and tags were augmented with assistance from frontier language models. All labels were reviewed and validated by human engineers.
Dataset Quantification
- Record Count: 591 problems across 5 versioned datapacks (2025.1: 127, 2025.2: 231, 2025.3: 405, 2026.1: 566, 2026.2: 591)
- Feature Count: 20 fields per problem (task_id, type, prompt, group, metadata, context_files, test_files, source_references, build_command, test_command, benchmark_command, base_image, timing_mode, baseline_solution, min_cuda_toolkit, compute_capability, requires_datacenter_gpu, timeout_seconds, date, schema_version)
- Total Data Storage: ~4.1 MB compressed across all datapacks (problems + baseline solutions)
Problem Groups
Problems are organized into groups by domain. Each problem belongs to exactly one group, which determines the CUDA APIs and programming concepts it tests.
CUDA C++
| Group | Description |
|---|---|
cuda-runtime |
Kernel launch, memory management, streams, events, CUDA Graphs, cluster launch, occupancy |
cuda-kernels |
Shared memory, warp intrinsics, reductions, scans, stencils, tensor cores, cooperative groups |
cccl |
Thrust, CUB, libcu++ |
cublas |
BLAS levels 1-3, extensions, applications |
mathlibs |
cuSPARSE, cuSOLVER, cuFFT, cuRAND |
cudnn |
Convolutions, attention, matmul, normalization via cuDNN Graph API |
cutlass |
CUTLASS templates, collectives, schedulers, epilogues, and integration patterns |
CUDA Python
| Group | Description |
|---|---|
cutile |
Tile-based kernels: matmul, attention, normalization, element-wise ops (SM 10.0+) |
cute-dsl |
CuTe DSL layouts, tensors, copy/MMA atoms, pipelines, and custom kernels |
The cutlass and cute-dsl problems are evaluated against a pinned stack — CUDA Toolkit 13.1 with CUTLASS 4.6.1 (C++) and nvidia-cutlass-dsl 4.6.1 (Python) — and declare it via base_image.
For a full coverage map and domain backlog, see DOMAIN_MAP.md.
Dataset Format
Modality: Text (structured JSONL)
Problems are distributed as datapacks - versioned releases stored as compressed tarballs (.tar.gz). Each datapack contains:
metadata.json- Release version, creation timestamp, problem count, and integrity hashesproblems.jsonl- One JSON object per line representing each problem
Encoding: UTF-8
Data Schema
Problem Structure
Each problem is a JSON object with the following schema:
Core Fields
| Field | Type | Required | Description |
|---|---|---|---|
task_id |
string |
✓ | Unique identifier (e.g., "CUDA/0", "CUDA/42") |
type |
string |
✓ | Problem type: "cuda_cpp" or "cuda_python" |
group |
string |
✓ | Domain group (see Problem Groups above) |
schema_version |
integer |
✓ | Data schema version (currently 2) |
date |
string |
✓ | Problem creation date (ISO 8601 format: "YYYY-MM-DD") |
prompt |
string |
✓ | Natural language instruction for the programming task |
context_files |
array |
✓ | Files visible to the model/system (headers, stubs, helpers) |
test_files |
array |
✓ | Held-out test harness for evaluation (not shown to model/system) |
build_command |
string |
— | Command to compile the solution (e.g., "nvcc -I include ...") |
test_command |
string |
✓ | Command to execute tests (e.g., "./test.out") |
benchmark_command |
string |
— | Command to run performance benchmark (separate from tests) |
base_image |
string |
— | Container image to evaluate this problem in, overriding the default evaluation image (e.g. "compute-eval:13.1.0") |
timing_mode |
object |
— | How to extract performance timing (default: {"type": "process"}). See Timing Modes |
baseline_solution |
object |
— | Reference solution for speedup comparison |
min_cuda_toolkit |
string |
— | Minimum CUDA Toolkit version required (e.g., "12.0") |
compute_capability |
string |
— | Minimum GPU compute capability required (default: "8.0") |
requires_datacenter_gpu |
boolean |
— | Whether the problem requires a datacenter-class GPU (default: false) |
timeout_seconds |
float |
— | Maximum execution time allowed for tests (in seconds) |
source_references |
string, array, or object |
— | Required API calls to verify in solution. Supports {any: [...], all: [...]} semantics |
metadata |
object |
— | Problem metadata: difficulty, tags, releases, do_not_release |
File Objects (context_files & test_files)
Each file in context_files and test_files is an object with:
| Field | Type | Description |
|---|---|---|
path |
string |
Relative file path (e.g., "include/kernel.h") |
content |
string |
Complete file contents (UTF-8 encoded) |
Timing Modes
Problems that declare a benchmark_command can specify a timing_mode to control how performance timing is extracted. All modes report values in milliseconds.
| Type | Description |
|---|---|
process |
Default. Total application wall-clock time. |
kernels |
Sum of GPU kernel execution time. Supports include/exclude glob patterns. |
region |
Timing from NVTX-annotated code ranges. Supports include/exclude globs and time_type ("kernel" or "wall_clock"). |
gpu |
Total GPU time: kernel execution + memory transfers. |
custom |
The benchmark program prints its own timing to STDOUT as COMPUTE_EVAL_TIME_MS: <value>. |
Evaluation Protocol
ComputeEval follows a strict separation between generation and evaluation:
What Models/Systems See (Generation Time)
- Problem
prompt- describes the task and requirements context_files- interface definitions and helper utilitiesbuild_command- compilation instructions (if provided)- Minimum CUDA toolkit version and architecture requirements
What Models/Systems Do NOT See
test_files- held-out test harness- Reference solutions
Evaluation Process
- Create temporary workspace (in the problem's
base_imagecontainer, if one is declared) - Write
context_filesto workspace - Write model-generated solution files to workspace
- Write
test_filesto workspace (now visible) - Execute
build_commandto compile (if provided) - If compilation succeeds (or no build step required), execute
test_command - Test exit code determines pass/fail (exit code 0 = pass)
- If a Compute Sanitizer gate is enabled, re-run the test under each selected sanitizer tool (see Sanitizer Gate)
- If tests pass and
benchmark_commandis declared, run performance measurement using the configuredtiming_modeand profiler
This ensures models cannot overfit to test cases and must solve problems based solely on the natural language description and interface contracts.
Sanitizer Gate
Evaluation can optionally run each solution under NVIDIA Compute Sanitizer (memcheck, racecheck, synccheck, initcheck) after it passes its functional test. This is off by default and does not change a problem's correctness result.
The gate imposes one contract on a problem's test_files: to report a clean sanitizer result, the held-out test must prove it actually exercised the intended workload. ComputeEval supplies COMPUTE_EVAL_SANITIZER_REPORT and COMPUTE_EVAL_SANITIZER_TOKEN to the test, which writes back a small JSON record confirming the target launched. Candidate stdout is never accepted as proof, and neither variable should be passed to candidate-controlled child processes. Problems that do not implement this side channel report an invalid sanitizer result rather than a false clean one.
Most problems are generation tasks — write a function or kernel from a specification. The cutlass and cute-dsl groups also introduce repair tasks, where context_files contain a defective or under-performing implementation that the model must fix.
Versioning and Maintenance
Current version: 2026.2
Previous versions:
- 2026.1: Extension to 566 problems
- 2025.3: Extension to 405 problems
- 2025.2: Extension to 231 problems
- 2025.1: Initial set of 127 problems
Relationship to previous versions: Extension - Adds new problems for coverage of additional NVIDIA technologies.
ComputeEval maintains all previous release versions to enable longitudinal tracking of model progress. Users can benchmark against any release version to track improvements over time.
Important: We are committed to maintaining backward compatibility, but not bit-for-bit immutability. If we discover bugs in problems (e.g., unsolvable test cases, incorrect specifications), we reserve the right to fix them and update the corresponding datapacks in future releases.
This approach ensures users can continue using previous benchmark versions while benefiting from bug fixes and improvements.
Example Problem
{
"task_id": "CUDA/3",
"type": "cuda_cpp",
"group": "cuda-runtime",
"date": "2025-10-31",
"prompt": "Implement a function called `launch` that launches a kernel function named `kernel` without using triple chevrons. The x, y, z grid and block dimensions will be provided as parameters to the `launch` function.\n\nThe function signature is defined in `include/kernel_launch.h`:\n```cuda\nvoid launch(int gridSizeX, int blockSizeX, int gridSizeY = 1, int blockSizeY = 1,\n int gridSizeZ = 1, int blockSizeZ = 1);\n```\n\nThe `kernel` function is already defined with the following signature:\n```cuda\n__global__ void kernel(int *output, const int *input);\n```\n\nYour implementation should use the CUDA runtime API to launch the kernel with the specified grid and block dimensions.",
"context_files": [
{
"path": "include/kernel_launch.h",
"content": "#pragma once\n\nvoid launch(int gridSizeX, int blockSizeX, int gridSizeY = 1, int blockSizeY = 1,\n int gridSizeZ = 1, int blockSizeZ = 1);\n"
},
{
"path": "src/kernel.cu",
"content": "#include <cuda_runtime.h>\n\n__global__ void kernel(int *output, const int *input) {\n int idx = blockIdx.x * blockDim.x + threadIdx.x;\n output[idx] = input[idx] * 2;\n}\n"
}
],
"test_files": [
{
"path": "test/test_main.cu",
"content": "#include <cassert>\n#include <cuda_runtime.h>\n#include \"../include/kernel_launch.h\"\n\nint main() {\n // Test implementation\n int *d_input, *d_output;\n cudaMalloc(&d_input, 256 * sizeof(int));\n cudaMalloc(&d_output, 256 * sizeof(int));\n \n launch(4, 64); // Launch with 4 blocks, 64 threads each\n \n cudaFree(d_input);\n cudaFree(d_output);\n return 0;\n}\n"
}
],
"build_command": "nvcc -I include -o test.out solution.cu src/kernel.cu test/*.cu -arch=sm_80",
"test_command": "./test.out",
"min_cuda_toolkit": "12.0",
"timeout_seconds": 30.0,
"source_references": {"any": null, "all": ["cudaLaunchKernelEx"]}
}
Ethical Considerations
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. Developers should work with their internal developer teams to ensure this dataset meets requirements for the relevant industry and use case and addresses unforeseen product misuse. Please report quality, risk, security vulnerabilities or NVIDIA AI Concerns here.
License
SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: LicenseRef-NVIDIA-Evaluation
This dataset is licensed under the NVIDIA Evaluation Dataset License Agreement. The license permits use of the dataset solely for evaluation and benchmarking of AI models. In particular:
- No training: The dataset may not be used for training AI models or machine learning algorithms (Section 3.1).
- No redistribution: The dataset may not be sold, sublicensed, distributed, or hosted (Section 3.2).
- Results may be published: You may publish or otherwise disclose evaluation and benchmarking results.
See the full license text for details.
Citation
If you use ComputeEval in your research, please cite:
@misc{computeeval2025,
title={ComputeEval: A Benchmark for Evaluating Large Language Models on CUDA Code Generation},
author={NVIDIA Corporation},
year={2025},
url={https://github.com/NVIDIA/compute-eval}
}
- Downloads last month
- 40