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-1/

Built-in Kernel Discovery Tool

A utility that discovers and reports information about built-in kernels available on OpenCL devices.

Requirements

Create a tool that discovers built-in kernels on OpenCL devices and provides structured information about them. The tool should:

  1. Query available OpenCL devices for built-in kernels
  2. Return a structured list of devices with their built-in kernel names
  3. Handle devices that don't support built-in kernels gracefully

Functionality

Device and Built-in Kernel Discovery

The tool should be able to:

  • Query all available OpenCL devices in the system
  • For each device, retrieve the list of built-in kernel names (if any)
  • Return results in a structured format containing:
    • Device name
    • Device type (CPU, GPU, etc.)
    • List of built-in kernel names (empty list if none available)

Error Handling

  • Handle cases where devices don't support built-in kernels
  • Handle OpenCL initialization errors gracefully
  • Return an empty result set if no OpenCL devices are available

Test Cases

  • When querying a device with no built-in kernels, it returns an empty kernel list for that device @test
  • When querying multiple devices, it returns information for all devices @test
  • When a device has built-in kernels, they can be accessed by creating a program from built-in kernel names @test

Implementation

@generates

API

from typing import List, Dict, Any

def discover_builtin_kernels() -> List[Dict[str, Any]]:
    """
    Discovers built-in kernels available on all OpenCL devices.

    Returns:
        A list of dictionaries, each containing:
        - 'device_name': str - Name of the device
        - 'device_type': str - Type of device (e.g., 'GPU', 'CPU')
        - 'builtin_kernels': List[str] - List of built-in kernel names

    Returns an empty list if no OpenCL devices are available.
    """
    pass

Dependencies { .dependencies }

pyopencl { .dependency }

Provides OpenCL device access and built-in kernel support.