Skip to main content

Module python

Module python 

Source
Expand description

Python kernel parser producing HIR.

Parses a subset of Python suitable for GPU kernels: function definitions with type annotations, arithmetic, comparisons, if/else, for range(), array indexing, and GPU intrinsics (thread_id, barrier, etc.). Uses line-by-line parsing for the restricted kernel subset.

Functionsยง

parse_python
Parse a Python kernel source string into an HIR Kernel.