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%

task.mdevals/scenario-5/

Vector Operations with Custom GPU Kernels

Build a Python module that performs custom vector operations using GPU acceleration. The module should implement element-wise computations that leverage GPU parallelism for performance-critical mathematical operations.

Capabilities

Custom Element-wise Operations

  • Given x=[1.0, 2.0, 3.0] and y=[2.0, 3.0, 4.0], squared_sum returns [5.0, 13.0, 25.0] (1²+2², 2²+3², 3²+4²) @test
  • Given x=[2.0, 4.0] and y=[3.0, 5.0] with alpha=2.0, scaled_product returns [12.0, 40.0] (223, 245) @test
  • Given x with shape (3,) and y with shape (4,), squared_sum raises ValueError @test

Advanced Mathematical Functions

  • Given x=[0.0, 1.0, -1.0], sigmoid_activation returns [0.5, 0.7311, 0.2689] (approximately) @test
  • Given x=[3.0, 0.0] and y=[4.0, 1.0], euclidean_norm returns [5.0, 1.0] (sqrt(3²+4²), sqrt(0²+1²)) @test

Implementation

@generates

API

def squared_sum(x, y):
    """
    Computes element-wise x² + y².

    Args:
        x: First input array
        y: Second input array (must have same shape as x)

    Returns:
        Array containing x² + y² for each element

    Raises:
        ValueError: If x and y have different shapes
    """
    pass

def scaled_product(x, y, alpha):
    """
    Computes element-wise alpha * (x * y).

    Args:
        x: First input array
        y: Second input array (must have same shape as x)
        alpha: Scalar multiplier

    Returns:
        Array containing alpha * (x * y) for each element

    Raises:
        ValueError: If x and y have different shapes
    """
    pass

def sigmoid_activation(x):
    """
    Computes sigmoid activation: 1 / (1 + exp(-x)).

    Args:
        x: Input array

    Returns:
        Array containing sigmoid values for each element
    """
    pass

def euclidean_norm(x, y):
    """
    Computes element-wise Euclidean norm: sqrt(x² + y²).

    Args:
        x: First input array
        y: Second input array (must have same shape as x)

    Returns:
        Array containing Euclidean norm for each element pair

    Raises:
        ValueError: If x and y have different shapes
    """
    pass

Dependencies { .dependencies }

cupy-cuda101 { .dependency }

Provides GPU-accelerated computing with Python.

@satisfied-by