andylizf commited on
Commit
7b1b9b3
·
verified ·
1 Parent(s): 4eec532

Update dataset

Browse files
Files changed (1) hide show
  1. data/test-00000-of-00001.json +1 -1
data/test-00000-of-00001.json CHANGED
@@ -253,4 +253,4 @@
253
  {"problem_id": "vector_addition/2_24", "category": "research", "statement": "Vector Addition Problem - Large Vectors (2^24)\n===============================================\n\nProblem Setting\n---------------\nDesign and optimize high-performance Triton kernels for vector addition on GPU with large vectors (16,777,216 elements). This problem focuses on implementing efficient element-wise addition for high-throughput workloads.\n\nThe challenge involves optimizing:\n- **Memory bandwidth**: Maximizing throughput for large vectors\n- **Memory access patterns**: Efficient loading and storing of vector data\n- **Block sizing**: Optimal block sizes for large vectors\n- **Performance benchmarking**: Achieving speedup over PyTorch baseline\n\nThis variant tests performance on large vectors (2^24 = 16,777,216 elements = 64 MB per vector).\n\nTarget\n------\n- **Primary**: Maximize bandwidth (GB/s) over PyTorch baseline (higher is better)\n- **Secondary**: Minimize kernel launch overhead\n- **Tertiary**: Ensure correctness\n\nAPI Specification\n-----------------\nImplement a `Solution` class that returns a Triton kernel implementation:\n\n```python\nclass Solution:\n def solve(self, spec_path: str = None) -> dict:\n \"\"\"\n Returns a dict with either:\n - {\"code\": \"python_code_string\"}\n - {\"program_path\": \"path/to/kernel.py\"}\n \"\"\"\n # Your implementation\n pass\n```\n\nYour kernel implementation must provide:\n\n```python\nimport torch\nimport triton\nimport triton.language as tl\n\ndef add(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:\n \"\"\"\n Element-wise addition of two vectors.\n \n Args:\n x: Input tensor of shape (16777216,)\n y: Input tensor of shape (16777216,)\n \n Returns:\n Output tensor of shape (16777216,) with x + y\n \"\"\"\n pass\n```\n\nAPI Usage Notes\n---------------\n- The evaluator looks for an `add` function in the module namespace\n- Function must handle vector size of exactly 16,777,216 elements\n- Must use Triton JIT compilation for kernel definition\n- Should optimize for small vector performance and launch overhead\n- Input tensors are guaranteed to be contiguous and same size\n\nScoring (0-100)\n---------------\nPerformance is measured against CPU baseline and PyTorch GPU baseline:\n\n```\ntarget = max(2.0 * (pytorch_bandwidth / cpu_bandwidth), 1.0)\nscore = ((custom_bandwidth / cpu_bandwidth - 1.0) / (target - 1.0)) * 100\n\nWhere:\n- custom_bandwidth = your solution's bandwidth\n- cpu_bandwidth = naive CPU baseline bandwidth\n- pytorch_bandwidth = PyTorch GPU baseline bandwidth\n- target = 2x PyTorch performance vs CPU (normalized to custom vs CPU)\n\nScore is clamped to [0, 100] range\n```\n\n- 0 points = CPU baseline performance (custom/cpu = 1x)\n- 50 points = Halfway between CPU baseline and 2x PyTorch performance\n- 100 points = 2x PyTorch GPU performance vs CPU (custom/cpu = 2 * pytorch/cpu)\n\nEvaluation Details\n------------------\n- Tested on vector size: 2^24 = 16,777,216 elements\n- Performance measured in GB/s (bandwidth)\n- Correctness verified with tolerance: rtol=1e-5, atol=1e-8\n- Performance measured using median execution time across 5 samples\n- Requires CUDA backend and GPU support\n", "config": "dependencies:\n uv_project: resources\ndatasets: []\ntag: hpc\nruntime:\n docker:\n image: andylizf/triton-tlx:tlx-nv-cu122\n gpu: true\n environment: \"Triton 3.2.0 with CUDA 12.2 (triton-tlx image)\"\n"}
254
  {"problem_id": "vector_addition/2_28", "category": "research", "statement": "Vector Addition Problem - Very Large Vectors (2^28)\n==============================================\n\nProblem Setting\n---------------\nDesign and optimize high-performance Triton kernels for vector addition on GPU with very large vectors (268,435,456 elements). This problem focuses on implementing efficient element-wise addition for maximum throughput scenarios.\n\nThe challenge involves optimizing:\n- **Memory access patterns**: Efficient loading and storing of large vector data\n- **Block sizing**: Optimal block sizes for large GPU workloads\n- **Memory bandwidth**: Maximizing throughput at scale\n- **Performance benchmarking**: Achieving speedup over PyTorch baseline\n\nThis variant tests performance on very large vectors (2^28 = 268,435,456 elements = 1 GB per vector). Requires ~3 GB GPU memory total.\n\nTarget\n------\n- **Primary**: Maximize bandwidth (GB/s) over PyTorch baseline (higher is better)\n- **Secondary**: Ensure correctness on large vectors\n- **Tertiary**: Minimize memory overhead\n\nAPI Specification\n-----------------\nImplement a `Solution` class that returns a Triton kernel implementation:\n\n```python\nclass Solution:\n def solve(self, spec_path: str = None) -> dict:\n \"\"\"\n Returns a dict with either:\n - {\"code\": \"python_code_string\"}\n - {\"program_path\": \"path/to/kernel.py\"}\n \"\"\"\n # Your implementation\n pass\n```\n\nYour kernel implementation must provide:\n\n```python\nimport torch\nimport triton\nimport triton.language as tl\n\ndef add(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:\n \"\"\"\n Element-wise addition of two vectors.\n \n Args:\n x: Input tensor of shape (268435456,)\n y: Input tensor of shape (268435456,)\n \n Returns:\n Output tensor of shape (268435456,) with x + y\n \"\"\"\n pass\n```\n\nAPI Usage Notes\n---------------\n- The evaluator looks for an `add` function in the module namespace\n- Function must handle vector size of exactly 268,435,456 elements\n- Must use Triton JIT compilation for kernel definition\n- Should optimize for maximum memory bandwidth at scale\n- Input tensors are guaranteed to be contiguous and same size\n- May cause OOM on GPUs with less than 3GB memory\n\nScoring (0-100)\n---------------\nPerformance is measured against CPU baseline and PyTorch GPU baseline:\n\n```\ntarget = max(2.0 * (pytorch_bandwidth / cpu_bandwidth), 1.0)\nscore = ((custom_bandwidth / cpu_bandwidth - 1.0) / (target - 1.0)) * 100\n\nWhere:\n- custom_bandwidth = your solution's bandwidth\n- cpu_bandwidth = naive CPU baseline bandwidth\n- pytorch_bandwidth = PyTorch GPU baseline bandwidth\n- target = 2x PyTorch performance vs CPU (normalized to custom vs CPU)\n\nScore is clamped to [0, 100] range\n```\n\n- 0 points = CPU baseline performance (custom/cpu = 1x)\n- 50 points = Halfway between CPU baseline and 2x PyTorch performance\n- 100 points = 2x PyTorch GPU performance vs CPU (custom/cpu = 2 * pytorch/cpu)\n\nEvaluation Details\n------------------\n- Tested on vector size: 2^28 = 268,435,456 elements\n- Performance measured in GB/s (bandwidth)\n- Correctness verified with tolerance: rtol=1e-5, atol=1e-8\n- Performance measured using median execution time across 5 samples\n- Requires CUDA backend and GPU support\n- Requires sufficient GPU memory (may OOM on smaller GPUs)\n", "config": "dependencies:\n uv_project: resources\ndatasets: []\ntag: hpc\nruntime:\n docker:\n image: andylizf/triton-tlx:tlx-nv-cu122\n gpu: true\n environment: \"Triton 3.2.0 with CUDA 12.2 (triton-tlx image)\"\n"}
255
  {"problem_id": "erdos_demo", "category": "2.0", "statement": "# Erdos Unit Distance Demo\n\n## Problem\n\nPlace exactly `N = 10` distinct points in the Euclidean plane so that the\nnumber of point pairs at Euclidean distance exactly `1` is as large as possible.\n\nThis is a tiny, visually inspectable demo version of the planar unit distance\nproblem. If your construction naturally has a different common distance, scale\nthe coordinates before returning them.\n\n## Program Interface\n\nSubmit a Python file defining one of the following:\n\n```python\ndef solve(n: int) -> list[tuple[float, float]]:\n ...\n```\n\nor:\n\n```python\ndef generate_points(n: int) -> list[tuple[float, float]]:\n ...\n```\n\nor:\n\n```python\nPOINTS = [(0.0, 0.0), (1.0, 0.0), ...]\n```\n\nThe returned value must contain exactly 10 two-dimensional points. No stdin is\nused.\n\n## Validity Constraints\n\nA solution is valid if:\n\n1. It returns exactly 10 points.\n2. Every coordinate is a finite real number.\n3. No two points are closer than `1e-6`.\n\nThe objective is translation-invariant. Very large coordinates are allowed as\nlong as pairwise squared distances remain finite.\n\n## Objective\n\nFor all unordered point pairs, count those whose squared Euclidean distance is\nequal to `1` within a small floating-point tolerance. Let `M` be that count.\n\nMaximize `M`.\n\n## Scoring\n\nThe score is naturally scaled to `[0, 100)`, without clipping against a fixed\ntarget. Let:\n\n```text\nbaseline = N\nX = M\n```\n\nIf the point set is invalid, or if `X <= baseline`, the score is `0`. Otherwise:\n\n```text\nscore = 100 * (X - baseline) / X\n```\n\nThis makes the simple `N`-pair baseline worth `0`. With only 10 points, the\nproblem is intended as a quick sanity check and visual demo for agent workflows.\n", "config": "tag: geometry\nruntime:\n language: python\n timeout_seconds: 300\n environment: \"Python 3.11; no external packages required\"\n docker:\n image: ubuntu:24.04\n"}
256
- {"problem_id": "erdos_unit_distance", "category": "2.0", "statement": "# Erdos Unit Distance\n\n## Problem\n\nPlace exactly `N = 65536` distinct points in the Euclidean plane so that the\nnumber of point pairs at Euclidean distance exactly `1` is as large as possible.\n\nThis is a finite, executable version of the planar unit distance problem:\ngiven `n` points, maximize the number of pairs at distance exactly `1`. If your\nconstruction naturally has a different common distance, scale the coordinates\nbefore returning them.\n\n## Program Interface\n\nSubmit a Python file defining one of the following:\n\n```python\ndef solve(n: int) -> list[tuple[float, float]]:\n ...\n```\n\nor:\n\n```python\ndef generate_points(n: int) -> list[tuple[float, float]]:\n ...\n```\n\nor:\n\n```python\nPOINTS = [(0.0, 0.0), (1.0, 0.0), ...]\n```\n\nThe returned value must contain exactly 65536 two-dimensional points. No stdin\nis used.\n\n## Validity Constraints\n\nA solution is valid if:\n\n1. It returns exactly 65536 points.\n2. Every coordinate is a finite real number.\n3. No two points are closer than `1e-3`.\n\nThe objective is translation-invariant. Very large coordinates are allowed as\nlong as pairwise squared distances remain finite.\n\n## Objective\n\nFor all unordered point pairs, count those whose squared Euclidean distance is\nequal to `1` within a strict floating-point tolerance. Let `M` be that count.\n\nMaximize `M`.\n\n## Scoring\n\nThe score is naturally scaled to `[0, 100)`, without clipping against a fixed\ntarget. Let:\n\n```text\nbaseline = N\nX = M\n```\n\nIf the point set is invalid, or if `X <= baseline`, the score is `0`. Otherwise:\n\n```text\nscore = 100 * (X - baseline) / X\n```\n\nThis makes the simple `N`-pair baseline worth `0`, rewards every improvement\nabove the baseline, and avoids saturating the benchmark at a finite target.\n", "config": "tag: geometry\nruntime:\n language: python\n timeout_seconds: 10800\n environment: \"Python 3.11; no external packages required\"\n docker:\n image: ubuntu:24.04\n"}
 
253
  {"problem_id": "vector_addition/2_24", "category": "research", "statement": "Vector Addition Problem - Large Vectors (2^24)\n===============================================\n\nProblem Setting\n---------------\nDesign and optimize high-performance Triton kernels for vector addition on GPU with large vectors (16,777,216 elements). This problem focuses on implementing efficient element-wise addition for high-throughput workloads.\n\nThe challenge involves optimizing:\n- **Memory bandwidth**: Maximizing throughput for large vectors\n- **Memory access patterns**: Efficient loading and storing of vector data\n- **Block sizing**: Optimal block sizes for large vectors\n- **Performance benchmarking**: Achieving speedup over PyTorch baseline\n\nThis variant tests performance on large vectors (2^24 = 16,777,216 elements = 64 MB per vector).\n\nTarget\n------\n- **Primary**: Maximize bandwidth (GB/s) over PyTorch baseline (higher is better)\n- **Secondary**: Minimize kernel launch overhead\n- **Tertiary**: Ensure correctness\n\nAPI Specification\n-----------------\nImplement a `Solution` class that returns a Triton kernel implementation:\n\n```python\nclass Solution:\n def solve(self, spec_path: str = None) -> dict:\n \"\"\"\n Returns a dict with either:\n - {\"code\": \"python_code_string\"}\n - {\"program_path\": \"path/to/kernel.py\"}\n \"\"\"\n # Your implementation\n pass\n```\n\nYour kernel implementation must provide:\n\n```python\nimport torch\nimport triton\nimport triton.language as tl\n\ndef add(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:\n \"\"\"\n Element-wise addition of two vectors.\n \n Args:\n x: Input tensor of shape (16777216,)\n y: Input tensor of shape (16777216,)\n \n Returns:\n Output tensor of shape (16777216,) with x + y\n \"\"\"\n pass\n```\n\nAPI Usage Notes\n---------------\n- The evaluator looks for an `add` function in the module namespace\n- Function must handle vector size of exactly 16,777,216 elements\n- Must use Triton JIT compilation for kernel definition\n- Should optimize for small vector performance and launch overhead\n- Input tensors are guaranteed to be contiguous and same size\n\nScoring (0-100)\n---------------\nPerformance is measured against CPU baseline and PyTorch GPU baseline:\n\n```\ntarget = max(2.0 * (pytorch_bandwidth / cpu_bandwidth), 1.0)\nscore = ((custom_bandwidth / cpu_bandwidth - 1.0) / (target - 1.0)) * 100\n\nWhere:\n- custom_bandwidth = your solution's bandwidth\n- cpu_bandwidth = naive CPU baseline bandwidth\n- pytorch_bandwidth = PyTorch GPU baseline bandwidth\n- target = 2x PyTorch performance vs CPU (normalized to custom vs CPU)\n\nScore is clamped to [0, 100] range\n```\n\n- 0 points = CPU baseline performance (custom/cpu = 1x)\n- 50 points = Halfway between CPU baseline and 2x PyTorch performance\n- 100 points = 2x PyTorch GPU performance vs CPU (custom/cpu = 2 * pytorch/cpu)\n\nEvaluation Details\n------------------\n- Tested on vector size: 2^24 = 16,777,216 elements\n- Performance measured in GB/s (bandwidth)\n- Correctness verified with tolerance: rtol=1e-5, atol=1e-8\n- Performance measured using median execution time across 5 samples\n- Requires CUDA backend and GPU support\n", "config": "dependencies:\n uv_project: resources\ndatasets: []\ntag: hpc\nruntime:\n docker:\n image: andylizf/triton-tlx:tlx-nv-cu122\n gpu: true\n environment: \"Triton 3.2.0 with CUDA 12.2 (triton-tlx image)\"\n"}
254
  {"problem_id": "vector_addition/2_28", "category": "research", "statement": "Vector Addition Problem - Very Large Vectors (2^28)\n==============================================\n\nProblem Setting\n---------------\nDesign and optimize high-performance Triton kernels for vector addition on GPU with very large vectors (268,435,456 elements). This problem focuses on implementing efficient element-wise addition for maximum throughput scenarios.\n\nThe challenge involves optimizing:\n- **Memory access patterns**: Efficient loading and storing of large vector data\n- **Block sizing**: Optimal block sizes for large GPU workloads\n- **Memory bandwidth**: Maximizing throughput at scale\n- **Performance benchmarking**: Achieving speedup over PyTorch baseline\n\nThis variant tests performance on very large vectors (2^28 = 268,435,456 elements = 1 GB per vector). Requires ~3 GB GPU memory total.\n\nTarget\n------\n- **Primary**: Maximize bandwidth (GB/s) over PyTorch baseline (higher is better)\n- **Secondary**: Ensure correctness on large vectors\n- **Tertiary**: Minimize memory overhead\n\nAPI Specification\n-----------------\nImplement a `Solution` class that returns a Triton kernel implementation:\n\n```python\nclass Solution:\n def solve(self, spec_path: str = None) -> dict:\n \"\"\"\n Returns a dict with either:\n - {\"code\": \"python_code_string\"}\n - {\"program_path\": \"path/to/kernel.py\"}\n \"\"\"\n # Your implementation\n pass\n```\n\nYour kernel implementation must provide:\n\n```python\nimport torch\nimport triton\nimport triton.language as tl\n\ndef add(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:\n \"\"\"\n Element-wise addition of two vectors.\n \n Args:\n x: Input tensor of shape (268435456,)\n y: Input tensor of shape (268435456,)\n \n Returns:\n Output tensor of shape (268435456,) with x + y\n \"\"\"\n pass\n```\n\nAPI Usage Notes\n---------------\n- The evaluator looks for an `add` function in the module namespace\n- Function must handle vector size of exactly 268,435,456 elements\n- Must use Triton JIT compilation for kernel definition\n- Should optimize for maximum memory bandwidth at scale\n- Input tensors are guaranteed to be contiguous and same size\n- May cause OOM on GPUs with less than 3GB memory\n\nScoring (0-100)\n---------------\nPerformance is measured against CPU baseline and PyTorch GPU baseline:\n\n```\ntarget = max(2.0 * (pytorch_bandwidth / cpu_bandwidth), 1.0)\nscore = ((custom_bandwidth / cpu_bandwidth - 1.0) / (target - 1.0)) * 100\n\nWhere:\n- custom_bandwidth = your solution's bandwidth\n- cpu_bandwidth = naive CPU baseline bandwidth\n- pytorch_bandwidth = PyTorch GPU baseline bandwidth\n- target = 2x PyTorch performance vs CPU (normalized to custom vs CPU)\n\nScore is clamped to [0, 100] range\n```\n\n- 0 points = CPU baseline performance (custom/cpu = 1x)\n- 50 points = Halfway between CPU baseline and 2x PyTorch performance\n- 100 points = 2x PyTorch GPU performance vs CPU (custom/cpu = 2 * pytorch/cpu)\n\nEvaluation Details\n------------------\n- Tested on vector size: 2^28 = 268,435,456 elements\n- Performance measured in GB/s (bandwidth)\n- Correctness verified with tolerance: rtol=1e-5, atol=1e-8\n- Performance measured using median execution time across 5 samples\n- Requires CUDA backend and GPU support\n- Requires sufficient GPU memory (may OOM on smaller GPUs)\n", "config": "dependencies:\n uv_project: resources\ndatasets: []\ntag: hpc\nruntime:\n docker:\n image: andylizf/triton-tlx:tlx-nv-cu122\n gpu: true\n environment: \"Triton 3.2.0 with CUDA 12.2 (triton-tlx image)\"\n"}
255
  {"problem_id": "erdos_demo", "category": "2.0", "statement": "# Erdos Unit Distance Demo\n\n## Problem\n\nPlace exactly `N = 10` distinct points in the Euclidean plane so that the\nnumber of point pairs at Euclidean distance exactly `1` is as large as possible.\n\nThis is a tiny, visually inspectable demo version of the planar unit distance\nproblem. If your construction naturally has a different common distance, scale\nthe coordinates before returning them.\n\n## Program Interface\n\nSubmit a Python file defining one of the following:\n\n```python\ndef solve(n: int) -> list[tuple[float, float]]:\n ...\n```\n\nor:\n\n```python\ndef generate_points(n: int) -> list[tuple[float, float]]:\n ...\n```\n\nor:\n\n```python\nPOINTS = [(0.0, 0.0), (1.0, 0.0), ...]\n```\n\nThe returned value must contain exactly 10 two-dimensional points. No stdin is\nused.\n\n## Validity Constraints\n\nA solution is valid if:\n\n1. It returns exactly 10 points.\n2. Every coordinate is a finite real number.\n3. No two points are closer than `1e-6`.\n\nThe objective is translation-invariant. Very large coordinates are allowed as\nlong as pairwise squared distances remain finite.\n\n## Objective\n\nFor all unordered point pairs, count those whose squared Euclidean distance is\nequal to `1` within a small floating-point tolerance. Let `M` be that count.\n\nMaximize `M`.\n\n## Scoring\n\nThe score is naturally scaled to `[0, 100)`, without clipping against a fixed\ntarget. Let:\n\n```text\nbaseline = N\nX = M\n```\n\nIf the point set is invalid, or if `X <= baseline`, the score is `0`. Otherwise:\n\n```text\nscore = 100 * (X - baseline) / X\n```\n\nThis makes the simple `N`-pair baseline worth `0`. With only 10 points, the\nproblem is intended as a quick sanity check and visual demo for agent workflows.\n", "config": "tag: geometry\nruntime:\n language: python\n timeout_seconds: 300\n environment: \"Python 3.11; no external packages required\"\n docker:\n image: ubuntu:24.04\n"}
256
+ {"problem_id": "erdos_unit_distance", "category": "2.0", "statement": "# Erdos Unit Distance\n\n## Problem\n\nPlace exactly `N = 65536` distinct points in the Euclidean plane so that the\nnumber of point pairs at Euclidean distance exactly `1` is as large as possible.\n\nThis is a finite, executable version of the planar unit distance problem:\ngiven `n` points, maximize the number of pairs at distance exactly `1`. If your\nconstruction naturally has a different common distance, scale the coordinates\nbefore returning them.\n\n## Program Interface\n\nSubmit a Python file defining one of the following:\n\n```python\ndef solve(n: int) -> list[tuple[float, float]]:\n ...\n```\n\nor:\n\n```python\ndef generate_points(n: int) -> list[tuple[float, float]]:\n ...\n```\n\nor:\n\n```python\nPOINTS = [(0.0, 0.0), (1.0, 0.0), ...]\n```\n\nThe returned value must contain exactly 65536 two-dimensional points. No stdin\nis used.\n\n## Validity Constraints\n\nA solution is valid if:\n\n1. It returns exactly 65536 points.\n2. Every coordinate is a finite real number.\n3. No two points are closer than `1e-3`.\n\nThe objective is translation-invariant. Very large coordinates are allowed as\nlong as pairwise squared distances remain finite.\n\n## Objective\n\nFor all unordered point pairs, count those whose squared Euclidean distance is\nequal to `1` within a strict floating-point tolerance. Let `M` be that count.\n\nMaximize `M`.\n\n## Scoring\n\nThe score is naturally scaled to `[0, 100)`, without clipping against a fixed\ntarget. Let:\n\n```text\nbaseline = N\nX = M\n```\n\nIf the point set is invalid, or if `X <= baseline`, the score is `0`. Otherwise\nthe raw score is:\n\n```text\nraw_score = 100 * (X - baseline) / X\n```\n\nThe reported score applies a cubic scale:\n\n```text\nscore = 100 * (raw_score / 100)^3\n```\n\nThis makes the simple `N`-pair baseline worth `0`, rewards every improvement\nabove the baseline, and keeps high-scoring constructions from saturating the\nbenchmark too quickly. The bounded and unbounded score fields both report this\ncubic-scaled score; evaluator messages also include `raw_score` for reference.\n", "config": "tag: geometry\nruntime:\n language: python\n timeout_seconds: 10800\n environment: \"Python 3.11; no external packages required\"\n docker:\n image: ubuntu:24.04\n"}