Python wrapper for Nvidia CUDA parallel computation API with object cleanup, automatic error checking, and convenient abstractions.
{
"context": "This criteria evaluates the engineer's ability to use PyCUDA's texture memory system for image sampling. It focuses on proper CUDA array creation, texture reference configuration with addressing and filtering modes, and kernel-based texture sampling operations.",
"type": "weighted_checklist",
"checklist": [
{
"name": "CUDA Array Creation",
"description": "Creates a CUDA Array object using pycuda.driver.Array (or pycuda.driver.matrix_to_array) to store the 2D image data in texture-compatible format. The array should be properly sized to match the input image dimensions and use appropriate channel format (e.g., single-channel float).",
"max_score": 20
},
{
"name": "Texture Reference Setup",
"description": "Creates and configures a texture reference (pycuda.driver.TextureReference) or uses module.get_texref() to obtain a texture reference from compiled kernel code. Properly binds the CUDA array to the texture reference using set_array() method.",
"max_score": 20
},
{
"name": "Addressing Mode Configuration",
"description": "Correctly sets texture addressing modes using set_address_mode() or the address_mode property on the texture reference. Must properly configure addressing for both dimensions (typically the same mode for both axes) to implement wrap, clamp, and border behaviors. Should use appropriate constants like pycuda.driver.address_mode.WRAP, CLAMP, or BORDER.",
"max_score": 25
},
{
"name": "Filtering Mode Configuration",
"description": "Correctly sets texture filtering mode using set_filter_mode() or the filter_mode property on the texture reference. Must configure linear filtering (pycuda.driver.filter_mode.LINEAR) for bilinear interpolation and point filtering (pycuda.driver.filter_mode.POINT) for nearest-neighbor sampling.",
"max_score": 20
},
{
"name": "Texture Sampling in Kernel",
"description": "Implements a CUDA kernel that uses texture memory for sampling. The kernel should use tex2D() or similar texture sampling function to read from the configured texture, properly converting normalized coordinates to texture space. The kernel must be compiled (e.g., using SourceModule) and invoked with appropriate grid/block dimensions to process all sampling coordinates.",
"max_score": 15
}
]
}tessl i tessl/pypi-pycuda@2025.1.0docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10