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

{
  "context": "This evaluation assesses how effectively the engineer uses PyOpenCL's image handling capabilities to query device support, create images from numpy arrays, perform format conversions, and transfer image data between host and device.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Format Query Usage",
      "description": "Uses pyopencl.get_supported_image_formats() with correct parameters (context, cl.mem_flags, cl.mem_object_type) to query supported image formats for the device",
      "max_score": 20
    },
    {
      "name": "ImageFormat Handling",
      "description": "Correctly works with pyopencl.ImageFormat objects, accessing channel_order and channel_data_type attributes to identify supported formats",
      "max_score": 15
    },
    {
      "name": "Image Creation",
      "description": "Uses pyopencl.Image to create image objects from numpy arrays, specifying correct ImageFormat with appropriate channel orders (e.g., cl.channel_order.RGBA, cl.channel_order.RGB) and channel types (e.g., cl.channel_type.UNORM_INT8)",
      "max_score": 25
    },
    {
      "name": "Image Transfer",
      "description": "Uses pyopencl.enqueue_copy() or equivalent methods (enqueue_read_image, enqueue_write_image) to transfer image data between host numpy arrays and device Image objects with proper origin and region parameters",
      "max_score": 25
    },
    {
      "name": "Kernel-Based Conversion",
      "description": "Implements format conversion using OpenCL kernels (pyopencl.Program, kernel execution) with image samplers and read_imagef/write_imagef operations, rather than just transferring to host and back",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-pyopencl

tile.json