or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/cupy-cuda101@9.6.x
tile.json

tessl/pypi-cupy-cuda101

tessl install tessl/pypi-cupy-cuda101@9.6.0

CuPy: NumPy & SciPy for GPU (CUDA 10.1 version)

Agent Success

Agent success rate when using this tile

87%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.19x

Baseline

Agent success rate without this tile

73%

rubric.jsonevals/scenario-9/

{
  "context": "This criteria evaluates how effectively the engineer uses CuPy's batched linear algebra operations to implement batch matrix multiplication and inversion. The focus is on leveraging CuPy's automatic batching capabilities for stacked matrices rather than implementing manual loops.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Batched matmul usage",
      "description": "Uses CuPy's matmul operator (@ or cp.matmul) on 3D arrays to perform batched matrix multiplication. CuPy automatically handles batched operations when arrays have ndim > 2, utilizing cuBLAS's gemmBatched internally.",
      "max_score": 25
    },
    {
      "name": "Batched inverse usage",
      "description": "Uses cp.linalg.inv() on 3D arrays to compute batched matrix inverses. CuPy's linalg.inv automatically performs batched inversion using cuSOLVER's getrfBatched and getrsaBatched for stacked matrices.",
      "max_score": 25
    },
    {
      "name": "3D array structure",
      "description": "Correctly uses 3D array structures where the first dimension represents the batch size, enabling automatic batching. Arrays should have shape (N, m, k) for batched operations rather than using lists or loops over 2D matrices.",
      "max_score": 20
    },
    {
      "name": "Avoiding manual loops",
      "description": "Implementation avoids manual iteration over individual matrices in the batch. The batched operations should leverage CuPy's automatic batching rather than using for-loops or list comprehensions to process matrices sequentially.",
      "max_score": 15
    },
    {
      "name": "Performance comparison",
      "description": "The compare_batch_vs_sequential function correctly demonstrates the performance difference by implementing both a batched approach (using 3D arrays) and a sequential approach (using loops), with proper timing using cp.cuda.Stream().synchronize() or similar for accurate GPU timing.",
      "max_score": 10
    },
    {
      "name": "Correct output shapes",
      "description": "All functions return correctly shaped 3D arrays with the batch dimension preserved. For batch_matrix_multiply: (N, m, k) @ (N, k, n) → (N, m, n). For batch_matrix_inverse: (N, d, d) → (N, d, d).",
      "max_score": 5
    }
  ]
}