Ctrl + k

or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/pyopencl@2025.2.x
tile.json

tessl/pypi-pyopencl

tessl install tessl/pypi-pyopencl@2025.2.0

Python wrapper for OpenCL enabling GPU and parallel computing with comprehensive array operations and mathematical functions

Agent Success

Agent success rate when using this tile

86%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.28x

Baseline

Agent success rate without this tile

67%

task.mdevals/scenario-8/

GPU Image Processor

A Python utility that processes images using GPU acceleration for format conversion and basic manipulation operations.

Capabilities

Create GPU images from numpy arrays

  • Given a numpy array with shape (height, width, 3) and dtype uint8, create an OpenCL image object @test
  • Given a numpy array with shape (height, width, 4) and dtype uint8 containing RGBA data, create an OpenCL RGBA image @test

Read image data from GPU memory

  • After creating an image from a numpy array, read the data back and verify it matches the original array @test

Query supported image formats

  • Query and list all supported image formats for the GPU device @test

Implementation

@generates

API

def create_image_from_array(context, queue, array):
    """
    Create an OpenCL image from a numpy array.

    Args:
        context: OpenCL context
        queue: OpenCL command queue
        array: numpy array with shape (height, width, channels) where channels is 3 or 4

    Returns:
        OpenCL image object
    """
    pass

def read_image_to_array(queue, image, shape):
    """
    Read an OpenCL image back to a numpy array.

    Args:
        queue: OpenCL command queue
        image: OpenCL image object
        shape: tuple of (height, width, channels)

    Returns:
        numpy array with the image data
    """
    pass

def get_supported_image_formats(context):
    """
    Get all supported image formats for the context.

    Args:
        context: OpenCL context

    Returns:
        list of supported ImageFormat objects
    """
    pass

Dependencies { .dependencies }

pyopencl { .dependency }

Provides GPU image creation and manipulation capabilities.