CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-pyopencl

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

86

1.28x
Overview
Eval results
Files

rubric.jsonevals/scenario-3/

{
  "context": "This criteria evaluates how well the engineer uses PyOpenCL's built-in kernel functionality to discover and report information about device-specific kernels. The focus is on proper use of platform/device queries and built-in kernel-specific API methods.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Platform Discovery",
      "description": "Uses pyopencl.get_platforms() or similar to discover available OpenCL platforms.",
      "max_score": 10
    },
    {
      "name": "Device Enumeration",
      "description": "Iterates through devices using platform.get_devices() or context.get_info(pyopencl.context_info.DEVICES) to access all available devices.",
      "max_score": 15
    },
    {
      "name": "Built-in Kernel Query",
      "description": "Uses device.get_info(pyopencl.device_info.BUILT_IN_KERNELS) or device.built_in_kernels to retrieve the list of built-in kernel names for each device.",
      "max_score": 30
    },
    {
      "name": "Device Name Retrieval",
      "description": "Uses device.get_info(pyopencl.device_info.NAME) or device.name property to get device names.",
      "max_score": 10
    },
    {
      "name": "Device Type Retrieval",
      "description": "Uses device.get_info(pyopencl.device_info.TYPE) or device.type property to determine device type (CPU, GPU, etc.), and converts it to a readable string representation.",
      "max_score": 15
    },
    {
      "name": "Empty Kernel Handling",
      "description": "Correctly handles devices that return an empty string or no built-in kernels by parsing the result appropriately (splitting on semicolons or whitespace).",
      "max_score": 10
    },
    {
      "name": "Error Handling",
      "description": "Implements appropriate exception handling for OpenCL errors (e.g., pyopencl.Error, pyopencl.LogicError) and returns an empty list or handles gracefully when no devices are available.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-pyopencl

tile.json